@omer-x/buttler 1.0.0 → 1.0.2
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.
- package/README.md +173 -0
- package/package.json +24 -21
- package/ui/.next/BUILD_ID +1 -1
- package/ui/.next/app-build-manifest.json +85 -64
- package/ui/.next/app-path-routes-manifest.json +1 -1
- package/ui/.next/build-manifest.json +15 -14
- package/ui/.next/prerender-manifest.json +1 -1
- package/ui/.next/react-loadable-manifest.json +192 -192
- package/ui/.next/required-server-files.json +1 -1
- package/ui/.next/routes-manifest.json +1 -1
- package/ui/.next/server/app/_not-found/page.js +1 -1
- package/ui/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/ui/.next/server/app/_not-found.html +1 -1
- package/ui/.next/server/app/_not-found.meta +2 -0
- package/ui/.next/server/app/_not-found.rsc +19 -15
- package/ui/.next/server/app/api/db/backup/route.js +1 -1
- package/ui/.next/server/app/api/db/backup/route.js.nft.json +1 -1
- package/ui/.next/server/app/api/db/backup/route_client-reference-manifest.js +1 -0
- package/ui/.next/server/app/api/logs/route.js +1 -1
- package/ui/.next/server/app/api/logs/route.js.nft.json +1 -1
- package/ui/.next/server/app/api/logs/route_client-reference-manifest.js +1 -0
- package/ui/.next/server/app/index.html +1 -1
- package/ui/.next/server/app/index.meta +2 -0
- package/ui/.next/server/app/index.rsc +19 -11
- package/ui/.next/server/app/page.js +1 -1
- package/ui/.next/server/app/page.js.nft.json +1 -1
- package/ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/ui/.next/server/app/services/[id]/databases/page.js +1 -1
- package/ui/.next/server/app/services/[id]/databases/page.js.nft.json +1 -1
- package/ui/.next/server/app/services/[id]/databases/page_client-reference-manifest.js +1 -1
- package/ui/.next/server/app/services/[id]/edit/page.js +1 -1
- package/ui/.next/server/app/services/[id]/edit/page.js.nft.json +1 -1
- package/ui/.next/server/app/services/[id]/edit/page_client-reference-manifest.js +1 -1
- package/ui/.next/server/app/services/[id]/page.js +1 -1
- package/ui/.next/server/app/services/[id]/page.js.nft.json +1 -1
- package/ui/.next/server/app/services/[id]/page_client-reference-manifest.js +1 -1
- package/ui/.next/server/app/services/page.js +1 -1
- package/ui/.next/server/app/services/page.js.nft.json +1 -1
- package/ui/.next/server/app/services/page_client-reference-manifest.js +1 -1
- package/ui/.next/server/app/settings/page.js +1 -1
- package/ui/.next/server/app/settings/page.js.nft.json +1 -1
- package/ui/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/ui/.next/server/app/settings.html +1 -1
- package/ui/.next/server/app/settings.meta +2 -0
- package/ui/.next/server/app/settings.rsc +28 -20
- package/ui/.next/server/app/webhook/route.js +1 -1
- package/ui/.next/server/app/webhook/route.js.nft.json +1 -1
- package/ui/.next/server/app/webhook/route_client-reference-manifest.js +1 -0
- package/ui/.next/server/app-paths-manifest.json +3 -3
- package/ui/.next/server/chunks/124.js +1 -0
- package/ui/.next/server/chunks/284.js +13 -0
- package/ui/.next/server/chunks/363.js +1 -0
- package/ui/.next/server/chunks/471.js +1 -0
- package/ui/.next/server/chunks/557.js +1 -0
- package/ui/.next/server/chunks/571.js +2 -0
- package/ui/.next/server/chunks/606.js +1 -0
- package/ui/.next/server/chunks/627.js +6 -0
- package/ui/.next/server/chunks/640.js +1 -0
- package/ui/.next/server/chunks/806.js +13 -0
- package/ui/.next/server/chunks/82.js +3 -0
- package/ui/.next/server/chunks/994.js +13 -0
- package/ui/.next/server/instrumentation.js +1 -1
- package/ui/.next/server/middleware-build-manifest.js +1 -1
- package/ui/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/ui/.next/server/pages/404.html +1 -1
- package/ui/.next/server/pages/500.html +1 -1
- package/ui/.next/server/pages/_app.js +1 -1
- package/ui/.next/server/pages/_app.js.nft.json +1 -1
- package/ui/.next/server/pages/_document.js +1 -1
- package/ui/.next/server/pages/_document.js.nft.json +1 -1
- package/ui/.next/server/pages/_error.js +1 -1
- package/ui/.next/server/pages/_error.js.nft.json +1 -1
- package/ui/.next/server/server-reference-manifest.js +1 -1
- package/ui/.next/server/server-reference-manifest.json +1 -1
- package/ui/.next/server/webpack-runtime.js +1 -1
- package/ui/.next/static/-IyDb-UkfsY66Fnk2jTmF/_buildManifest.js +1 -0
- package/ui/.next/static/chunks/121-696b40648ac380c3.js +1 -0
- package/ui/.next/static/chunks/175-9a7735c1b176836a.js +1 -0
- package/ui/.next/static/chunks/179-61b51145e45a5a8a.js +1 -0
- package/ui/.next/static/chunks/181-3c7f47d298a6c5ba.js +1 -0
- package/ui/.next/static/chunks/275-b00b1f9d8d43921a.js +1 -0
- package/ui/.next/static/chunks/33-6a8a5d476c194d98.js +1 -0
- package/ui/.next/static/chunks/4bd1b696-ac5c9b695fa3e66d.js +1 -0
- package/ui/.next/static/chunks/517-294eec10d95890a5.js +2 -0
- package/ui/.next/static/chunks/537-0bc07043ff4dbf97.js +1 -0
- package/ui/.next/static/chunks/950-5e7233cf9e267e4f.js +1 -0
- package/ui/.next/static/chunks/app/_not-found/page-3105c243860143b1.js +1 -0
- package/ui/.next/static/chunks/app/api/db/backup/route-8452d22eaacd89f2.js +1 -0
- package/ui/.next/static/chunks/app/api/logs/route-b98b5626905b8864.js +1 -0
- package/ui/.next/static/chunks/app/layout-62ccc36441c6532b.js +1 -0
- package/ui/.next/static/chunks/app/page-5df13438f3e9dc6d.js +1 -0
- package/ui/.next/static/chunks/app/services/[id]/databases/page-af1ed1fbc977bcfc.js +1 -0
- package/ui/.next/static/chunks/app/services/[id]/edit/page-bcc8c30557196530.js +1 -0
- package/ui/.next/static/chunks/app/services/[id]/page-d0f3970faffda3af.js +1 -0
- package/ui/.next/static/chunks/app/services/page-d2dbcb1bfbf99d9c.js +1 -0
- package/ui/.next/static/chunks/app/settings/page-f07d3a5fd6660bc2.js +1 -0
- package/ui/.next/static/chunks/app/webhook/route-e28a1c8e342a8432.js +1 -0
- package/ui/.next/static/chunks/framework-895c1583be5f925a.js +1 -0
- package/ui/.next/static/chunks/main-045a680c8b23286d.js +1 -0
- package/ui/.next/static/chunks/main-app-d3ad9b54ff2f4460.js +1 -0
- package/ui/.next/static/chunks/pages/_app-abffdcde9d309a0c.js +1 -0
- package/ui/.next/static/chunks/pages/_error-94b8133dd8229633.js +1 -0
- package/ui/.next/static/chunks/webpack-a19e0d5a5b664ed9.js +1 -0
- package/ui/package.json +23 -20
- package/ui/server.js +1 -1
- package/ui/.next/server/chunks/116.js +0 -13
- package/ui/.next/server/chunks/269.js +0 -2
- package/ui/.next/server/chunks/361.js +0 -1
- package/ui/.next/server/chunks/397.js +0 -1
- package/ui/.next/server/chunks/549.js +0 -1
- package/ui/.next/server/chunks/659.js +0 -1
- package/ui/.next/server/chunks/681.js +0 -1
- package/ui/.next/server/chunks/682.js +0 -6
- package/ui/.next/server/chunks/719.js +0 -1
- package/ui/.next/server/chunks/863.js +0 -1
- package/ui/.next/server/chunks/871.js +0 -2
- package/ui/.next/server/chunks/902.js +0 -13
- package/ui/.next/server/chunks/948.js +0 -2
- package/ui/.next/server/edge-instrumentation.js +0 -2
- package/ui/.next/server/font-manifest.json +0 -1
- package/ui/.next/static/chunks/117-3b8d34fa94485032.js +0 -2
- package/ui/.next/static/chunks/146-5b9462531053a4c5.js +0 -1
- package/ui/.next/static/chunks/303-c65efd1cc09d56fd.js +0 -1
- package/ui/.next/static/chunks/355-1e51ac955ff8955f.js +0 -1
- package/ui/.next/static/chunks/391-496467ca6f95afde.js +0 -1
- package/ui/.next/static/chunks/392-27b37c7f04898266.js +0 -1
- package/ui/.next/static/chunks/581-2e3e69ca13e0474f.js +0 -1
- package/ui/.next/static/chunks/734-02b6331f3bd9c318.js +0 -1
- package/ui/.next/static/chunks/857-f888440b100832b8.js +0 -1
- package/ui/.next/static/chunks/app/_not-found/page-31d3ea3db635cbc2.js +0 -1
- package/ui/.next/static/chunks/app/layout-dd91aec6218093d2.js +0 -1
- package/ui/.next/static/chunks/app/page-6b7dd63af3dd45de.js +0 -1
- package/ui/.next/static/chunks/app/services/[id]/databases/page-0ab83677f41e4872.js +0 -1
- package/ui/.next/static/chunks/app/services/[id]/edit/page-4e855fc95079d3b0.js +0 -1
- package/ui/.next/static/chunks/app/services/[id]/page-91c945af4fe4b38f.js +0 -1
- package/ui/.next/static/chunks/app/services/page-e1eb6d0670544d2c.js +0 -1
- package/ui/.next/static/chunks/app/settings/page-972e8f623bc80dde.js +0 -1
- package/ui/.next/static/chunks/fd9d1056-2fd070b6bf76421a.js +0 -1
- package/ui/.next/static/chunks/framework-00a8ba1a63cfdc9e.js +0 -1
- package/ui/.next/static/chunks/main-003047948bd01e37.js +0 -1
- package/ui/.next/static/chunks/main-app-65b07a3d5b8df539.js +0 -1
- package/ui/.next/static/chunks/pages/_app-15e2daefa259f0b5.js +0 -1
- package/ui/.next/static/chunks/pages/_error-28b803cb2479b966.js +0 -1
- package/ui/.next/static/chunks/webpack-87d7cc477c47986b.js +0 -1
- package/ui/.next/static/iPuJc_dz0G66oW0IF7CF9/_buildManifest.js +0 -1
- /package/ui/.next/static/{iPuJc_dz0G66oW0IF7CF9 → -IyDb-UkfsY66Fnk2jTmF}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports.id=557,exports.ids=[557],exports.modules={30882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(61515))},61515:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=r(29021),i=n(r(23481)).default("@kwsites/file-exists");t.exists=function(e,r=t.READABLE){return function(e,t,r){i("checking %s",e);try{let n=s.statSync(e);if(n.isFile()&&t)return i("[OK] path represents a file"),!0;if(n.isDirectory()&&r)return i("[OK] path represents a directory"),!0;return i("[FAIL] path represents something other than a file or directory"),!1}catch(e){if("ENOENT"===e.code)return i("[FAIL] path is not accessible: %o",e),!1;throw i("[FATAL] %o",e),e}}(e,(r&t.FILE)>0,(r&t.FOLDER)>0)},t.FILE=1,t.FOLDER=2,t.READABLE=t.FILE+t.FOLDER},48868:(e,t)=>{"use strict";function r(){let e,t;let r="pending";return{promise:new Promise((r,n)=>{e=r,t=n}),done(t){"pending"===r&&(r="resolved",e(t))},fail(e){"pending"===r&&(r="rejected",t(e))},get fulfilled(){return"pending"!==r},get status(){return r}}}t.ud=t.yX=void 0,t.yX=r,t.ud=r},15401:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))}),t.splice(s,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){let e;return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(8824)(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},8824:(e,t,r)=>{e.exports=function(e){function t(e){let r,s,i;let o=null;function a(...e){if(!a.enabled)return;let n=Number(new Date),s=n-(r||n);a.diff=s,a.prev=r,a.curr=n,r=n,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let s=t.formatters[n];if("function"==typeof s){let t=e[i];r=s.call(a,t),e.splice(i,1),i--}return r}),t.formatArgs.call(a,e),(a.log||t.log).apply(a,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(s!==t.namespaces&&(s=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){let n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function s(e,t){let r=0,n=0,s=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(s=n,i=r):r++,n++;else{if(-1===s)return!1;n=s+1,r=++i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(s(e,r))return!1;for(let r of t.names)if(s(e,r))return!0;return!1},t.humanize=r(83337),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},23481:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||process.__nwjs?e.exports=r(15401):e.exports=r(54897)},54897:(e,t,r)=>{let n=r(83997),s=r(28354);t.init=function(e){e.inspectOpts={};let r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(s.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(r){let{namespace:n,useColors:s}=this;if(s){let t=this.color,s="\x1b[3"+(t<8?t:"8;5;"+t),i=` ${s};1m${n} \u001B[0m`;r[0]=i+r[0].split("\n").join("\n"+i),r.push(s+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else r[0]=(t.inspectOpts.hideDate?"":new Date().toISOString()+" ")+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?!!t.inspectOpts.colors:n.isatty(process.stderr.fd)},t.destroy=s.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{let e=r(23203);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),e.exports=r(8824)(t);let{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)}},58684:e=>{"use strict";e.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return -1!==n&&(-1===s||n<s)}},83337:e=>{function t(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}e.exports=function(e,r){r=r||{};var n,s,i=typeof e;if("string"===i&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return 864e5*r;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*r;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===i&&isFinite(e))return r.long?(n=Math.abs(e))>=864e5?t(e,n,864e5,"day"):n>=36e5?t(e,n,36e5,"hour"):n>=6e4?t(e,n,6e4,"minute"):n>=1e3?t(e,n,1e3,"second"):e+" ms":(s=Math.abs(e))>=864e5?Math.round(e/864e5)+"d":s>=36e5?Math.round(e/36e5)+"h":s>=6e4?Math.round(e/6e4)+"m":s>=1e3?Math.round(e/1e3)+"s":e+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},39187:(e,t,r)=>{"use strict";var n=r(41520);r.o(n,"after")&&r.d(t,{after:function(){return n.after}})},64446:(e,t,r)=>{var n;(()=>{var s={226:function(s,i){!function(o,a){"use strict";var u="function",c="undefined",l="object",d="string",p="major",f="model",h="name",m="type",g="vendor",b="version",w="architecture",y="console",v="mobile",k="tablet",x="smarttv",T="wearable",C="embedded",_="Amazon",O="Apple",S="ASUS",E="BlackBerry",R="Browser",A="Chrome",F="Firefox",j="Google",M="Huawei",P="Microsoft",L="Motorola",I="Opera",N="Samsung",$="Sharp",D="Sony",B="Xiaomi",U="Zebra",q="Facebook",z="Chromium OS",G="Mac OS",H=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},W=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},V=function(e,t){return typeof e===d&&-1!==X(t).indexOf(X(e))},X=function(e){return e.toLowerCase()},K=function(e,t){if(typeof e===d)return e=e.replace(/^\s\s*/,""),typeof t===c?e:e.substring(0,350)},Y=function(e,t){for(var r,n,s,i,o,c,d=0;d<t.length&&!o;){var p=t[d],f=t[d+1];for(r=n=0;r<p.length&&!o&&p[r];)if(o=p[r++].exec(e))for(s=0;s<f.length;s++)c=o[++n],typeof(i=f[s])===l&&i.length>0?2===i.length?typeof i[1]==u?this[i[0]]=i[1].call(this,c):this[i[0]]=i[1]:3===i.length?typeof i[1]!==u||i[1].exec&&i[1].test?this[i[0]]=c?c.replace(i[1],i[2]):void 0:this[i[0]]=c?i[1].call(this,c,i[2]):void 0:4===i.length&&(this[i[0]]=c?i[3].call(this,c.replace(i[1],i[2])):void 0):this[i]=c||a;d+=2}},Q=function(e,t){for(var r in t)if(typeof t[r]===l&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(V(t[r][n],e))return"?"===r?a:r}else if(V(t[r],e))return"?"===r?a:r;return e},Z={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,b],[/opios[\/ ]+([\w\.]+)/i],[b,[h,I+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[h,I]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[h,"UC"+R]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[b,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[b,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+R],b],[/\bfocus\/([\w\.]+)/i],[b,[h,F+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[h,I+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[h,I+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[h,"MIUI "+R]],[/fxios\/([-\w\.]+)/i],[b,[h,F]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+R]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+R],b],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,b],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,q],b],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[h,A+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,A+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[h,"Android "+R]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[b,Q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[h,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[h,F+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[h,b],[/(cobalt)\/([\w\.]+)/i],[h,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,X]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,"",X]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,X]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[g,N],[m,k]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[g,N],[m,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[g,O],[m,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[g,O],[m,k]],[/(macintosh);/i],[f,[g,O]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[g,$],[m,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[g,M],[m,k]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[g,M],[m,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g," "],[g,B],[m,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[g,B],[m,k]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[g,"OPPO"],[m,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[g,"Vivo"],[m,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[g,"Realme"],[m,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[g,L],[m,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[g,L],[m,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[g,"LG"],[m,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[g,"LG"],[m,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[g,"Lenovo"],[m,k]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[g,"Nokia"],[m,v]],[/(pixel c)\b/i],[f,[g,j],[m,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[g,j],[m,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[g,D],[m,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[g,D],[m,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[g,"OnePlus"],[m,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[g,_],[m,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[g,_],[m,v]],[/(playbook);[-\w\),; ]+(rim)/i],[f,g,[m,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[g,E],[m,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[g,S],[m,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[g,S],[m,v]],[/(nexus 9)/i],[f,[g,"HTC"],[m,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[f,/_/g," "],[m,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[g,"Acer"],[m,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[g,"Meizu"],[m,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,f,[m,v]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,f,[m,k]],[/(surface duo)/i],[f,[g,P],[m,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[g,"Fairphone"],[m,v]],[/(u304aa)/i],[f,[g,"AT&T"],[m,v]],[/\bsie-(\w*)/i],[f,[g,"Siemens"],[m,v]],[/\b(rct\w+) b/i],[f,[g,"RCA"],[m,k]],[/\b(venue[\d ]{2,7}) b/i],[f,[g,"Dell"],[m,k]],[/\b(q(?:mv|ta)\w+) b/i],[f,[g,"Verizon"],[m,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[g,"Barnes & Noble"],[m,k]],[/\b(tm\d{3}\w+) b/i],[f,[g,"NuVision"],[m,k]],[/\b(k88) b/i],[f,[g,"ZTE"],[m,k]],[/\b(nx\d{3}j) b/i],[f,[g,"ZTE"],[m,v]],[/\b(gen\d{3}) b.+49h/i],[f,[g,"Swiss"],[m,v]],[/\b(zur\d{3}) b/i],[f,[g,"Swiss"],[m,k]],[/\b((zeki)?tb.*\b) b/i],[f,[g,"Zeki"],[m,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],f,[m,k]],[/\b(ns-?\w{0,9}) b/i],[f,[g,"Insignia"],[m,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[g,"NextBook"],[m,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],f,[m,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],f,[m,v]],[/\b(ph-1) /i],[f,[g,"Essential"],[m,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[g,"Envizen"],[m,k]],[/\b(trio[-\w\. ]+) b/i],[f,[g,"MachSpeed"],[m,k]],[/\btu_(1491) b/i],[f,[g,"Rotor"],[m,k]],[/(shield[\w ]+) b/i],[f,[g,"Nvidia"],[m,k]],[/(sprint) (\w+)/i],[g,f,[m,v]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[g,P],[m,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[g,U],[m,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[g,U],[m,v]],[/smart-tv.+(samsung)/i],[g,[m,x]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[g,N],[m,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,"LG"],[m,x]],[/(apple) ?tv/i],[g,[f,O+" TV"],[m,x]],[/crkey/i],[[f,A+"cast"],[g,j],[m,x]],[/droid.+aft(\w)( bui|\))/i],[f,[g,_],[m,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[g,$],[m,x]],[/(bravia[\w ]+)( bui|\))/i],[f,[g,D],[m,x]],[/(mitv-\w{5}) bui/i],[f,[g,B],[m,x]],[/Hbbtv.*(technisat) (.*);/i],[g,f,[m,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,K],[f,K],[m,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,f,[m,y]],[/droid.+; (shield) bui/i],[f,[g,"Nvidia"],[m,y]],[/(playstation [345portablevi]+)/i],[f,[g,D],[m,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[g,P],[m,y]],[/((pebble))app/i],[g,f,[m,T]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[g,O],[m,T]],[/droid.+; (glass) \d/i],[f,[g,j],[m,T]],[/droid.+; (wt63?0{2,3})\)/i],[f,[g,U],[m,T]],[/(quest( 2| pro)?)/i],[f,[g,q],[m,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[m,C]],[/(aeobc)\b/i],[f,[g,_],[m,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[m,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,v]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[h,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,b],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[b,Q,Z]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[b,Q,Z]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,G],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,b],[/\(bb(10);/i],[b,[h,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[h,F+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[h,A+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,z],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,b],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,b]]},ee=function(e,t){if(typeof e===l&&(t=e,e=a),!(this instanceof ee))return new ee(e,t).getResult();var r=typeof o!==c&&o.navigator?o.navigator:a,n=e||(r&&r.userAgent?r.userAgent:""),s=r&&r.userAgentData?r.userAgentData:a,i=t?H(J,t):J,y=r&&r.userAgent==n;return this.getBrowser=function(){var e,t={};return t[h]=a,t[b]=a,Y.call(t,n,i.browser),t[p]=typeof(e=t[b])===d?e.replace(/[^\d\.]/g,"").split(".")[0]:a,y&&r&&r.brave&&typeof r.brave.isBrave==u&&(t[h]="Brave"),t},this.getCPU=function(){var e={};return e[w]=a,Y.call(e,n,i.cpu),e},this.getDevice=function(){var e={};return e[g]=a,e[f]=a,e[m]=a,Y.call(e,n,i.device),y&&!e[m]&&s&&s.mobile&&(e[m]=v),y&&"Macintosh"==e[f]&&r&&typeof r.standalone!==c&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[f]="iPad",e[m]=k),e},this.getEngine=function(){var e={};return e[h]=a,e[b]=a,Y.call(e,n,i.engine),e},this.getOS=function(){var e={};return e[h]=a,e[b]=a,Y.call(e,n,i.os),y&&!e[h]&&s&&"Unknown"!=s.platform&&(e[h]=s.platform.replace(/chrome os/i,z).replace(/macos/i,G)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===d&&e.length>350?K(e,350):e,this},this.setUA(n),this};ee.VERSION="1.0.35",ee.BROWSER=W([h,b,p]),ee.CPU=W([w]),ee.DEVICE=W([f,g,m,y,v,x,k,T,C]),ee.ENGINE=ee.OS=W([h,b]),typeof i!==c?(s.exports&&(i=s.exports=ee),i.UAParser=ee):r.amdO?void 0!==(n=(function(){return ee}).call(t,r,t,e))&&(e.exports=n):typeof o!==c&&(o.UAParser=ee);var et=typeof o!==c&&(o.jQuery||o.Zepto);if(et&&!et.ua){var er=new ee;et.ua=er.getResult(),et.ua.get=function(){return er.getUA()},et.ua.set=function(e){er.setUA(e);var t=er.getResult();for(var r in t)et.ua[r]=t[r]}}}("object"==typeof window?window:this)}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},n=!0;try{s[e].call(r.exports,r,r.exports,o),n=!1}finally{n&&delete i[e]}return r.exports}o.ab=__dirname+"/";var a=o(226);e.exports=a})()},46050:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"after",{enumerable:!0,get:function(){return s}});let n=r(29294);function s(e){let t=n.workAsyncStorage.getStore();if(!t)throw Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context");let{afterContext:r}=t;return r.after(e)}},95036:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){Object.keys(e).forEach(function(r){"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})})}(r(46050),t)},26807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"connection",{enumerable:!0,get:function(){return c}});let n=r(29294),s=r(63033),i=r(10436),o=r(82312),a=r(60457),u=r(24982);function c(){let e=n.workAsyncStorage.getStore(),t=s.workUnitAsyncStorage.getStore();if(e){if(t&&"after"===t.phase&&!(0,u.isRequestAPICallableInsideAfter)())throw Error(`Route ${e.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`);if(e.forceStatic)return Promise.resolve(void 0);if(t){if("cache"===t.type)throw Error(`Route ${e.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`);if("unstable-cache"===t.type)throw Error(`Route ${e.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`)}if(e.dynamicShouldError)throw new o.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(t){if("prerender"===t.type)return(0,a.makeHangingPromise)(t.renderSignal,"`connection()`");"prerender-ppr"===t.type?(0,i.postponeWithTracking)(e.route,"connection",t.dynamicTracking):"prerender-legacy"===t.type&&(0,i.throwToInterruptStaticGeneration)("connection",e,t)}(0,i.trackDynamicDataInDynamicRender)(e,t)}return Promise.resolve(void 0)}},41520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ImageResponse:function(){return n.ImageResponse},NextRequest:function(){return s.NextRequest},NextResponse:function(){return i.NextResponse},URLPattern:function(){return a.URLPattern},after:function(){return u.after},connection:function(){return c.connection},userAgent:function(){return o.userAgent},userAgentFromString:function(){return o.userAgentFromString}});let n=r(14159),s=r(41639),i=r(44899),o=r(22215),a=r(31512),u=r(95036),c=r(26807)},14159:(e,t)=>{"use strict";function r(){throw Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead')}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageResponse",{enumerable:!0,get:function(){return r}})},44899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NextResponse",{enumerable:!0,get:function(){return d}});let n=r(9181),s=r(49619),i=r(55225),o=r(20614),a=r(9181),u=Symbol("internal response"),c=new Set([301,302,303,307,308]);function l(e,t){var r;if(null==e?void 0:null==(r=e.request)?void 0:r.headers){if(!(e.request.headers instanceof Headers))throw Error("request.headers must be an instance of Headers");let r=[];for(let[n,s]of e.request.headers)t.set("x-middleware-request-"+n,s),r.push(n);t.set("x-middleware-override-headers",r.join(","))}}class d extends Response{constructor(e,t={}){super(e,t);let r=this.headers,c=new Proxy(new a.ResponseCookies(r),{get(e,s,i){switch(s){case"delete":case"set":return(...i)=>{let o=Reflect.apply(e[s],e,i),u=new Headers(r);return o instanceof a.ResponseCookies&&r.set("x-middleware-set-cookie",o.getAll().map(e=>(0,n.stringifyCookie)(e)).join(",")),l(t,u),o};default:return o.ReflectAdapter.get(e,s,i)}}});this[u]={cookies:c,url:t.url?new s.NextURL(t.url,{headers:(0,i.toNodeOutgoingHttpHeaders)(r),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[u].cookies}static json(e,t){let r=Response.json(e,t);return new d(r.body,r)}static redirect(e,t){let r="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!c.has(r))throw RangeError('Failed to execute "redirect" on "response": Invalid status code');let n="object"==typeof t?t:{},s=new Headers(null==n?void 0:n.headers);return s.set("Location",(0,i.validateURL)(e)),new d(null,{...n,headers:s,status:r})}static rewrite(e,t){let r=new Headers(null==t?void 0:t.headers);return r.set("x-middleware-rewrite",(0,i.validateURL)(e)),l(t,r),new d(null,{...t,headers:r})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),l(e,t),new d(null,{...e,headers:t})}}},31512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"URLPattern",{enumerable:!0,get:function(){return r}});let r="undefined"==typeof URLPattern?void 0:URLPattern},22215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isBot:function(){return s},userAgent:function(){return o},userAgentFromString:function(){return i}});let n=function(e){return e&&e.__esModule?e:{default:e}}(r(64446));function s(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function i(e){return{...(0,n.default)(e),isBot:void 0!==e&&s(e)}}function o({headers:e}){return i(e.get("user-agent")||void 0)}},23203:(e,t,r)=>{"use strict";let n;let s=r(21820),i=r(83997),o=r(58684),{env:a}=process;function u(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===n)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===n)return 0;let r=n||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){let e=s.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in a)||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){let e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?n=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(n=1),"FORCE_COLOR"in a&&(n="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return u(c(e,e&&e.isTTY))},stdout:u(c(!0,i.isatty(1))),stderr:u(c(!0,i.isatty(2)))}},99159:(e,t,r)=>{"use strict";r.d(t,{LW:()=>p,kW:()=>d});let n=/([\p{Ll}\d])(\p{Lu})/gu,s=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,i=/(\d)\p{Ll}|(\p{L})\d/u,o=/[^\p{L}\d]+/giu,a="$1\0$2";function u(e){let t=e.trim();t=(t=t.replace(n,a).replace(s,a)).replace(o,"\0");let r=0,i=t.length;for(;"\0"===t.charAt(r);)r++;if(r===i)return[];for(;"\0"===t.charAt(i-1);)i--;return t.slice(r,i).split(/\0/g)}function c(e){let t=u(e);for(let e=0;e<t.length;e++){let r=t[e],n=i.exec(r);if(n){let s=n.index+(n[1]??n[2]).length;t.splice(e,1,r.slice(0,s),r.slice(s))}}return t}function l(e,t){let[r,n,s]=function(e,t={}){let r=t.split??(t.separateNumbers?c:u),n=t.prefixCharacters??"",s=t.suffixCharacters??"",i=0,o=e.length;for(;i<e.length;){let t=e.charAt(i);if(!n.includes(t))break;i++}for(;o>i;){let t=o-1,r=e.charAt(t);if(!s.includes(r))break;o=t}return[e.slice(0,i),r(e.slice(i,o)),e.slice(o)]}(e,t);return r+n.map(function(e){return!1===e?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}(t?.locale)).join(t?.delimiter??" ")+s}function d(e,t){return l(e,{delimiter:"-",...t})}function p(e,t){return l(e,{delimiter:"_",...t})}},61777:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>sB});var n,s,i,o,a,u,c,l,d,p,f,h,m,g,b,w,y,v,k,x,T,C,_,O,S,E,R,A,F,j,M,P,L,I,N,$,D,B,U,q,z,G,H,W,V,X,K,Y,Q,Z,J,ee,et,er,en,es,ei,eo,ea,eu,ec,el,ed,ep,ef,eh,em,eg,eb,ew,ey,ev,ek,ex,eT,eC,e_,eO,eS,eE,eR,eA,eF,ej,eM,eP,eL,eI,eN,e$,eD,eB,eU,eq,ez,eG,eH,eW,eV,eX,eK,eY,eQ=r(30882),eZ=r(23481),eJ=r(79646),e0=r(48868),e1=r(78474),e3=Object.defineProperty,e2=Object.defineProperties,e6=Object.getOwnPropertyDescriptor,e9=Object.getOwnPropertyDescriptors,e8=Object.getOwnPropertyNames,e4=Object.getOwnPropertySymbols,e5=Object.prototype.hasOwnProperty,e7=Object.prototype.propertyIsEnumerable,te=(e,t,r)=>t in e?e3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tt=(e,t)=>{for(var r in t||(t={}))e5.call(t,r)&&te(e,r,t[r]);if(e4)for(var r of e4(t))e7.call(t,r)&&te(e,r,t[r]);return e},tr=(e,t)=>e2(e,e9(t)),tn=(e,t)=>function(){return e&&(t=(0,e[e8(e)[0]])(e=0)),t},ts=(e,t)=>{for(var r in t)e3(e,r,{get:t[r],enumerable:!0})},ti=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of e8(t))e5.call(e,s)||s===r||e3(e,s,{get:()=>t[s],enumerable:!(n=e6(t,s))||n.enumerable});return e},to=e=>ti(e3({},"__esModule",{value:!0}),e),ta=(e,t,r)=>new Promise((n,s)=>{var i=e=>{try{a(r.next(e))}catch(e){s(e)}},o=e=>{try{a(r.throw(e))}catch(e){s(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,o);a((r=r.apply(e,t)).next())});function tu(e){return e instanceof String&&n.has(e)}function tc(e){return n.get(e)||[]}var tl=tn({"src/lib/args/pathspec.ts"(){n=new WeakMap}}),td=tn({"src/lib/errors/git-error.ts"(){s=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),tp=tn({"src/lib/errors/git-response-error.ts"(){td(),i=class extends s{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),tf=tn({"src/lib/errors/task-configuration-error.ts"(){td(),o=class extends s{constructor(e){super(void 0,e)}}}});function th(e){return"function"==typeof e?e:u}function tm(e){return"function"==typeof e&&e!==u}function tg(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function tb(e,t=0){return ty(e)&&e.length>t?e[t]:void 0}function tw(e,t=0){if(ty(e)&&e.length>t)return e[e.length-1-t]}function ty(e){return!!(e&&"number"==typeof e.length)}function tv(e="",t=!0,r="\n"){return e.split(r).reduce((e,r)=>{let n=t?r.trim():r;return n&&e.push(n),e},[])}function tk(e,t){return tv(e,!0).map(e=>t(e))}function tx(e){return(0,eQ.exists)(e,eQ.FOLDER)}function tT(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function tC(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function t_(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function tO(e){return Array.isArray(e)?e:[e]}function tS(e){return e.replace(/[\s-]+(.)/g,(e,t)=>t.toUpperCase())}function tE(e){return tO(e).map(String)}function tR(e,t=0){if(null==e)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function tA(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function tF(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function tj(e,t){return Object.assign({},...t.map(t=>t in e?{[t]:e[t]}:{}))}function tM(e=0){return new Promise(t=>setTimeout(t,e))}function tP(e){if(!1!==e)return e}var tL=tn({"src/lib/utils/util.ts"(){a="\0",u=()=>{},c=Object.prototype.toString.call.bind(Object.prototype.toString)}});function tI(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function tN(e,t){let r=tu(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function t$(e){return!!e&&"[object Object]"===c(e)}function tD(e){return"function"==typeof e}var tB=tn({"src/lib/utils/argument-filters.ts"(){tL(),tl(),l=e=>Array.isArray(e),d=e=>"string"==typeof e,p=e=>Array.isArray(e)&&e.every(d),f=e=>d(e)||Array.isArray(e)&&e.every(d),h=e=>!(null==e||"number|boolean|function".includes(typeof e))&&(Array.isArray(e)||"string"==typeof e||"number"==typeof e.length)}}),tU=tn({"src/lib/utils/exit-codes.ts"(){var e;(e=m||{})[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",m=e}}),tq=tn({"src/lib/utils/git-output-streams.ts"(){g=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new g(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),tz=tn({"src/lib/utils/line-parser.ts"(){b=class{constructor(e,t){this.matches=[],this.parse=(e,t)=>(this.resetMatches(),!!this._regExp.every((t,r)=>this.addMatch(t,r,e(r)))&&!1!==this.useMatches(t,this.prepareMatches())),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},w=class extends b{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function tG(...e){let t=process.cwd(),r=Object.assign(tt({baseDir:t},y),...e.filter(e=>"object"==typeof e&&e));return r.baseDir=r.baseDir||t,r.trimmed=!0===r.trimmed,r}var tH=tn({"src/lib/utils/simple-git-options.ts"(){y={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function tW(e,t=[]){return t$(e)?Object.keys(e).reduce((t,r)=>{let n=e[r];return tu(n)?t.push(n):tN(n,["boolean"])?t.push(r+"="+n):t.push(r),t},t):t}function tV(e,t=0,r=!1){let n=[];for(let r=0,s=t<0?e.length:t;r<s;r++)"string|number".includes(typeof e[r])&&n.push(String(e[r]));return tW(tX(e),n),r||n.push(...function(e){let t="function"==typeof tw(e);return tI(tw(e,t?1:0),l,[])}(e)),n}function tX(e){let t=tD(tw(e));return tI(tw(e,t?1:0),t$)}function tK(e,t=!0){let r=th(tw(e));return t||tm(r)?r:void 0}var tY=tn({"src/lib/utils/task-options.ts"(){tB(),tL(),tl()}});function tQ(e,t){return e(t.stdOut,t.stdErr)}function tZ(e,t,r,n=!0){return tO(r).forEach(r=>{for(let s=tv(r,n),i=0,o=s.length;i<o;i++){let r=(e=0)=>{if(!(i+e>=o))return s[i+e]};t.some(({parse:t})=>t(r,e))}}),e}var tJ=tn({"src/lib/utils/task-parser.ts"(){tL()}}),t0={};ts(t0,{ExitCodes:()=>m,GitOutputStreams:()=>g,LineParser:()=>b,NOOP:()=>u,NULL:()=>a,RemoteLineParser:()=>w,append:()=>tT,appendTaskOptions:()=>tW,asArray:()=>tO,asCamelCase:()=>tS,asFunction:()=>th,asNumber:()=>tR,asStringArray:()=>tE,bufferToString:()=>tF,callTaskParser:()=>tQ,createInstanceConfig:()=>tG,delay:()=>tM,filterArray:()=>l,filterFunction:()=>tD,filterHasLength:()=>h,filterPlainObject:()=>t$,filterPrimitives:()=>tN,filterString:()=>d,filterStringArray:()=>p,filterStringOrStringArray:()=>f,filterType:()=>tI,first:()=>tb,folderExists:()=>tx,forEachLineWithContent:()=>tk,getTrailingOptions:()=>tV,including:()=>tC,isUserFunction:()=>tm,last:()=>tw,objectToString:()=>c,orVoid:()=>tP,parseStringResponse:()=>tZ,pick:()=>tj,prefixedArray:()=>tA,remove:()=>t_,splitOn:()=>tg,toLinesWithContent:()=>tv,trailingFunctionArgument:()=>tK,trailingOptionsArgument:()=>tX});var t1=tn({"src/lib/utils/index.ts"(){tB(),tU(),tq(),tz(),tH(),tY(),tJ(),tL()}}),t3={};function t2(e){switch(e){case"bare":return t9();case"root":return t6()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:k,parser:x}}function t6(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:k,parser:e=>/^\.(git)?$/.test(e.trim())}}function t9(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:k,parser:x}}ts(t3,{CheckRepoActions:()=>v,checkIsBareRepoTask:()=>t9,checkIsRepoRootTask:()=>t6,checkIsRepoTask:()=>t2});var t8=tn({"src/lib/tasks/check-is-repo.ts"(){var e;t1(),(e=v||{}).BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",v=e,k=({exitCode:e},t,r,n)=>{if(128===e&&/(Not a git repository|Kein Git-Repository)/i.test(String(t)))return r(Buffer.from("false"));n(t)},x=e=>"true"===e.trim()}}),t4=tn({"src/lib/responses/CleanSummary.ts"(){t1(),T=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},C=/^[a-z]+\s*/i,_=/^[a-z]+\s+[a-z]+\s*/i,O=/\/$/}}),t5={};function t7(e){return{commands:S,format:"empty",parser:e}}function re(e){return{commands:S,format:"empty",parser(){throw"string"==typeof e?new o(e):e}}}function rt(e,t=!1){return{commands:e,format:"utf-8",parser:e=>t?String(e).trim():e}}function rr(e){return{commands:e,format:"buffer",parser:e=>e}}function rn(e){return"buffer"===e.format}function rs(e){return"empty"===e.format||!e.commands.length}ts(t5,{EMPTY_COMMANDS:()=>S,adhocExecTask:()=>t7,configurationErrorTask:()=>re,isBufferTask:()=>rn,isEmptyTask:()=>rs,straightThroughBufferTask:()=>rr,straightThroughStringTask:()=>rt});var ri=tn({"src/lib/tasks/task.ts"(){tf(),S=[]}}),ro={};function ra(e,t){let r,n,s;let{cleanMode:i,options:o,valid:a}=(n=[],s={cleanMode:!1,options:!0},e.replace(/[^a-z]i/g,"").split("").forEach(e=>{var t;"f"===e||"n"===e?(r=e,s.cleanMode=!0):s.options=s.options&&(t=n[n.length]=`-${e}`,/^-[a-z]$/i.test(t)&&j.has(t.charAt(1)))}),{cleanMode:r,options:n,valid:s});return i?a.options?(o.push(...t),o.some(rl))?re(E):ru(i,o):re(A+JSON.stringify(e)):re(R)}function ru(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser:t=>(function(e,t){let r=new T(e),n=e?_:C;return tv(t).forEach(e=>{let t=e.replace(n,"");r.paths.push(t),(O.test(t)?r.folders:r.files).push(t)}),r})("n"===e,t)}}function rc(e){return Array.isArray(e)&&e.every(e=>j.has(e))}function rl(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:"--interactive"===e}ts(ro,{CONFIG_ERROR_INTERACTIVE_MODE:()=>E,CONFIG_ERROR_MODE_REQUIRED:()=>R,CONFIG_ERROR_UNKNOWN_OPTION:()=>A,CleanOptions:()=>F,cleanTask:()=>ru,cleanWithOptionsTask:()=>ra,isCleanOptionsArray:()=>rc});var rd=tn({"src/lib/tasks/clean.ts"(){var e;t4(),t1(),ri(),E="Git clean interactive mode is not supported",R='Git clean mode parameter ("n" or "f") is required',A="Git clean unknown option found in: ",(e=F||{}).DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",j=new Set(["i",...tE(Object.values(F=e))])}});function*rp(e,t=null){let r=e.split("\0");for(let e=0,n=r.length-1;e<n;){let n=r[e++].replace(/^(file):/,""),s=r[e++],i=t;if(s.includes("\n")){let e=tg(s,"\n");i=e[0],s=e[1]}yield{file:n,key:i,value:s}}}var rf=tn({"src/lib/responses/ConfigList.ts"(){t1(),M=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=tw(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function rh(e,t){return"string"==typeof e&&P.hasOwnProperty(e)?e:t}var rm=tn({"src/lib/tasks/config.ts"(){var e;rf(),t1(),(e=P||{}).system="system",e.global="global",e.local="local",e.worktree="worktree",P=e}}),rg=tn({"src/lib/tasks/diff-name-status.ts"(){var e;(e=L||{}).ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",I=new Set(Object.values(L=e))}}),rb=tn({"src/lib/tasks/grep.ts"(){t1(),ri(),N=["-h"],$=Symbol("grepQuery"),B=class{constructor(){this[D]=[]}*[(D=$,Symbol.iterator)](){for(let e of this[$])yield e}and(...e){return e.length&&this[$].push("--and","(",...tA(e,"-e"),")"),this}param(...e){return this[$].push(...tA(e,"-e")),this}}}}),rw={};function ry(e,t){let r=["reset"];return rk(e)&&r.push(`--${e}`),r.push(...t),rt(r)}function rv(e){if(rk(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function rk(e){return q.includes(e)}ts(rw,{ResetMode:()=>U,getResetMode:()=>rv,resetTask:()=>ry});var rx=tn({"src/lib/tasks/reset.ts"(){var e;ri(),(e=U||{}).MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",q=Array.from(Object.values(U=e))}});function rT(e,t,r){return t&&String(t).replace(/\s*/,"")?(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}:r?(t,...n)=>{e(t,...n),r(t,...n)}:e}function rC(e,t,r,n=eZ("simple-git")){let s=e&&`[${e}]`||"",i=[],o="string"==typeof t?n.extend(t):t,a=function(e,t,{namespace:r}){if("string"==typeof e)return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}(tI(t,d),o,n);return function t(r){let i=r&&`[${r}]`||"",a=o&&rT(o,i)||u,l=rT(n,`${s} ${i}`,a);return Object.assign(o?a:l,{label:e,sibling:c,info:l,step:t})}(r);function c(t,r){return tT(i,rC(e,a.replace(/^[^:]+/,t),r,n))}}var r_=tn({"src/lib/git-logger.ts"(){t1(),eZ.formatters.L=e=>String(h(e)?e.length:"-"),eZ.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):c(e)}}),rO=tn({"src/lib/runners/tasks-pending-queue.ts"(){td(),r_(),(G=z=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=z.getName(e.commands[0]);return{task:e,logger:rC(this.logLabel,t),name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(0!==this._queue.size)throw Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new s(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++z.counter}`}}).counter=0}});function rS(e,t){return{method:tb(e.commands)||"",commands:t}}function rE(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var rR=tn({"src/lib/runners/git-executor-chain.ts"(){td(),ri(),t1(),rO(),H=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new G}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return ta(this,null,function*(){let t=yield this._scheduler.next();try{let{logger:t}=this._queue.attempt(e);return yield rs(e)?this.attemptEmptyTask(e,t):this.attemptRemoteTask(e,t)}catch(t){throw this.onFatalException(e,t)}finally{this._queue.complete(e),t()}})}onFatalException(e,t){let r=t instanceof s?Object.assign(t,{task:e}):new s(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return ta(this,null,function*(){let r=this._plugins.exec("spawn.binary","",rS(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],rS(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),i=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return(t("passing response to task's parser as a %s",e.format),rn(e))?tQ(e.parser,i):tQ(e.parser,i.asStrings())})}attemptEmptyTask(e,t){return ta(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:i,stdOut:o,stdErr:a}=r;return new Promise((u,l)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:d}=this._plugins.exec("task.error",{error:i},tt(tt({},rS(e,t)),r));return d&&e.onError?(n.info("exitCode=%s handling with custom error handler"),e.onError(r,d,e=>{n.info("custom error handler treated as success"),n("custom error returned a %s",c(e)),u(new g(Array.isArray(e)?Buffer.concat(e):e,Buffer.concat(a)))},l)):d?(n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,i),l(d)):void(n.info("retrieving task output complete"),u(new g(Buffer.concat(o),Buffer.concat(a))))})}gitResponse(e,t,r,n,s){return ta(this,null,function*(){let i=s.sibling("output"),o=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},rS(e,e.commands));return new Promise(a=>{let u=[],c=[];s.info("%s %o",t,r),s("%O",o);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:u,stdErr:c,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,tr(tt({},rS(e,r)),{kill(e){l=e||l}}));let d=(0,eJ.spawn)(t,r,o);d.stdout.on("data",rE(u,"stdOut",s,i.step("stdOut"))),d.stderr.on("data",rE(c,"stdErr",s,i.step("stdErr"))),d.on("error",e=>{s("[ERROR] child process exception %o",e),c.push(Buffer.from(String(e.stack),"ascii"))}),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,d.stdout,d.stderr,[...r])),this._plugins.exec("spawn.after",void 0,tr(tt({},rS(e,r)),{spawned:d,close(e,t){a({stdOut:u,stdErr:c,exitCode:e,rejection:l||t})},kill(e){d.killed||(l=e,d.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,tr(tt({},rS(e,t)),{kill(e){r=e||r}})),r}}}}),rA={};ts(rA,{GitExecutor:()=>W});var rF=tn({"src/lib/runners/git-executor.ts"(){rR(),W=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new H(this,this._scheduler,this._plugins)}chain(){return new H(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}}),rj=tn({"src/lib/task-callback.ts"(){tp(),t1()}});function rM(e,t){return t7(r=>{if(!tx(e))throw Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var rP=tn({"src/lib/tasks/change-working-directory.ts"(){t1(),ri()}});function rL(e){let t=["checkout",...e];return"-b"===t[1]&&t.includes("-B")&&(t[1]=t_(t,"-B")),rt(t)}var rI=tn({"src/lib/tasks/checkout.ts"(){t1(),ri()}}),rN=tn({"src/lib/tasks/count-objects.ts"(){t1(),V=new b(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=tS(t);e.hasOwnProperty(n)&&(e[n]=tR(r))})}});function r$(e){return tZ({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},X,e)}var rD=tn({"src/lib/parsers/parse-commit.ts"(){t1(),X=[new b(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new b(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();n&&n.includes("@")&&(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new b(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new b(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;"-"===n?e.summary.deletions=s:"+"===n&&(e.summary.insertions=s)})]}}),rB=tn({"src/lib/tasks/commit.ts"(){rD(),t1(),ri()}}),rU=tn({"src/lib/tasks/first-commit.ts"(){t1(),ri()}}),rq=tn({"src/lib/tasks/hash-object.ts"(){ri()}}),rz=tn({"src/lib/responses/InitSummary.ts"(){K=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Y=/^Init.+ repository in (.+)$/,Q=/^Rein.+ in (.+)$/}}),rG=tn({"src/lib/tasks/init.ts"(){rz(),Z="--bare"}});function rH(e){for(let t=0;t<e.length;t++){let r=J.exec(e[t]);if(r)return`--${r[1]}`}return""}function rW(e){return J.test(e)}var rV=tn({"src/lib/args/log-format.ts"(){J=/^--(stat|numstat|name-only|name-status)(=|$)/}}),rX=tn({"src/lib/responses/DiffSummary.ts"(){ee=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function rK(e=""){let t=es[e];return e=>tZ(new ee,t,e,!1)}var rY=tn({"src/lib/parsers/parse-diff-summary.ts"(){rV(),rX(),rg(),t1(),et=[new b(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:tR(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new b(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:tR(r),after:tR(n),binary:!0})}),new b(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=tR(t),e.insertions=tR(null==n?void 0:n[1]),e.deletions=tR(null==s?void 0:s[1])})],er=[new b(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=tR(t),i=tR(r);e.changed++,e.insertions+=s,e.deletions+=i,e.files.push({file:n,changes:s+i,insertions:s,deletions:i,binary:!1})}),new b(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],en=[new b(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],es={"":et,"--stat":et,"--numstat":er,"--name-status":[new b(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,i])=>{e.changed++,e.files.push({file:null!=i?i:n,changes:0,insertions:0,deletions:0,binary:!1,status:tP(I.has(t)&&t),from:tP(!!i&&n!==i&&n),similarity:tR(r)})})],"--name-only":en}}});function rQ(e=ea,t=eu,r=""){let n=rK(r);return function(r){let s=tv(r.trim(),!1,ei).map(function(r){var s;let i=r.split(eo),o=(s=i[0].split(e),t.reduce((e,t,r)=>(e[t]=s[r]||"",e),Object.create({diff:null})));return i.length>1&&i[1].trim()&&(o.diff=n(i[1])),o});return{all:s,latest:s.length&&s[0]||null,total:s.length}}}var rZ=tn({"src/lib/parsers/parse-list-log-summary.ts"(){t1(),rY(),rV(),ei="\xf2\xf2\xf2\xf2\xf2\xf2 ",eo=" \xf2\xf2",ea=" \xf2 ",eu=["hash","date","message","refs","author_name","author_email"]}}),rJ={};function r0(e){let t=rH(e),r=["diff"];return""===t&&(t="--stat",r.push("--stat=4096")),r.push(...e),r1(r)||{commands:r,format:"utf-8",parser:rK(t)}}function r1(e){let t=e.filter(rW);return t.length>1?re(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`):t.length&&e.includes("-z")?re(`Summary flag ${t} parsing is not compatible with null termination option '-z'`):void 0}ts(rJ,{diffSummaryTask:()=>r0,validateLogFormatConfig:()=>r1});var r3=tn({"src/lib/tasks/diff.ts"(){rV(),rY(),ri()}});function r2(e={},t=[]){let r=tI(e.splitter,d,ea),[s,i]=function(e,t){let r=[],n=[];return Object.keys(e).forEach(t=>{r.push(t),n.push(String(e[t]))}),[r,n.join(t)]}(!tN(e.format)&&e.format?e.format:{hash:"%H",date:!1===e.strictDate?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:!1!==e.mailMap?"%aN":"%an",author_email:!1!==e.mailMap?"%aE":"%ae"},r),o=[],a=[`--pretty=format:${ei}${i}${eo}`,...t],u=e.n||e["max-count"]||e.maxCount;if(u&&a.push(`--max-count=${u}`),e.from||e.to){let t=!1!==e.symmetric?"...":"..";o.push(`${e.from||""}${t}${e.to||""}`)}return d(e.file)&&a.push("--follow",function(...e){let t=new String(e);return n.set(t,e),t}(e.file)),tW(Object.keys(e).reduce((t,r)=>(r in ec||(t[r]=e[r]),t),{}),a),{fields:s,splitter:r,commands:[...a,...o]}}var r6=tn({"src/lib/tasks/log.ts"(){var e;rV(),tl(),rZ(),t1(),ri(),r3(),(e=ec||{})[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",ec=e}}),r9=tn({"src/lib/responses/MergeSummary.ts"(){el=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},ed=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),r8=tn({"src/lib/responses/PullSummary.ts"(){ep=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},ef=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function r4(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function r5(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:tR(t&&t[1]||"0"),delta:tR(r&&r[1]||"0")}}var r7=tn({"src/lib/parsers/parse-remote-objects.ts"(){t1(),eh=[new w(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase();Object.assign(r4(e.remoteMessages),{[n]:tR(r)})}),new w(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase();Object.assign(r4(e.remoteMessages),{[n]:tR(r)})}),new w(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=r4(e.remoteMessages);s.total=r5(t),s.reused=r5(r),s.packReused=tR(n)})]}});function ne(e,t){return tZ({remoteMessages:new eg},em,t)}var nt=tn({"src/lib/parsers/parse-remote-messages.ts"(){t1(),r7(),em=[new w(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...eh,new w([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new w([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:tR(t),summary:r,url:n}})],eg=class{constructor(){this.all=[]}}}}),nr=tn({"src/lib/parsers/parse-pull.ts"(){r8(),t1(),nt(),eb=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,ew=/^(create|delete) mode \d+ (.+)/,ey=[new b(/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new b(eb,(e,[t,,r,,n])=>(void 0!==r||void 0!==n)&&(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0)),new b(ew,(e,[t,r])=>{tT(e.files,r),tT("create"===t?e.created:e.deleted,r)})],ev=[new b(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new b(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new b(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],ek=(e,t)=>tZ(new ep,ey,[e,t]),ex=(e,t)=>Object.assign(new ep,ek(e,t),ne(e,t))}}),nn=tn({"src/lib/parsers/parse-merge.ts"(){r9(),t1(),nr(),eT=[new b(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new b(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new el(t,r))}),new b(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new el(t,r,{deleteRef:n}))}),new b(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new el(t,null))}),new b(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],eC=(e,t)=>Object.assign(e_(e,t),ex(e,t)),e_=e=>tZ(new ed,eT,e)}});function ns(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(e,t){let r=eC(e,t);if(r.failed)throw new i(r);return r}}:re("Git.merge requires at least one option")}var ni=tn({"src/lib/tasks/merge.ts"(){tp(),nn(),ri()}}),no=tn({"src/lib/parsers/parse-push.ts"(){t1(),nt(),eO=[new b(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new b(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=tr(tt({},e.ref||{}),{local:t})}),new b(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(function(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),i=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!i,alreadyUpdated:i,local:e,remote:t}}(t,r,n))}),new b(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=tr(tt({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new b(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],eS=(e,t)=>{let r=eE(e,t),n=ne(e,t);return tt(tt({},r),n)},eE=(e,t)=>tZ({pushed:[]},eO,[e,t])}}),na={};function nu(e={},t){return tT(t,"--tags"),nc(e,t)}function nc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),t_(r,"-v"),tT(r,"--verbose"),tT(r,"--porcelain"),{commands:r,format:"utf-8",parser:eS}}ts(na,{pushTagsTask:()=>nu,pushTask:()=>nc});var nl=tn({"src/lib/tasks/push.ts"(){no(),t1()}}),nd=tn({"src/lib/tasks/show.ts"(){t1(),ri()}}),np=tn({"src/lib/responses/FileStatusSummary.ts"(){eR=/^(.+)\0(.+)$/,eA=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,"R"===t||"R"===r){let t=eR.exec(e)||[null,e,e];this.from=t[2]||"",this.path=t[1]||""}}}}});function nf(e){let[t,r]=e.split(a);return{from:r||t,to:t}}function nh(e,t,r){return[`${e}${t}`,r]}function nm(e,...t){return t.map(t=>nh(e,t,(e,t)=>tT(e.conflicted,t)))}var ng=tn({"src/lib/responses/StatusSummary.ts"(){t1(),np(),eF=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},ej=new Map([nh(" ","A",(e,t)=>tT(e.created,t)),nh(" ","D",(e,t)=>tT(e.deleted,t)),nh(" ","M",(e,t)=>tT(e.modified,t)),nh("A"," ",(e,t)=>tT(e.created,t)&&tT(e.staged,t)),nh("A","M",(e,t)=>tT(e.created,t)&&tT(e.staged,t)&&tT(e.modified,t)),nh("D"," ",(e,t)=>tT(e.deleted,t)&&tT(e.staged,t)),nh("M"," ",(e,t)=>tT(e.modified,t)&&tT(e.staged,t)),nh("M","M",(e,t)=>tT(e.modified,t)&&tT(e.staged,t)),nh("R"," ",(e,t)=>{tT(e.renamed,nf(t))}),nh("R","M",(e,t)=>{let r=nf(t);tT(e.renamed,r),tT(e.modified,r.to)}),nh("!","!",(e,t)=>{tT(e.ignored=e.ignored||[],t)}),nh("?","?",(e,t)=>tT(e.not_added,t)),...nm("A","A","U"),...nm("D","D","U"),...nm("U","A","D","U"),["##",(e,t)=>{let r;r=/ahead (\d+)/.exec(t),e.ahead=r&&+r[1]||0,r=/behind (\d+)/.exec(t),e.behind=r&&+r[1]||0,r=/^(.+?(?=(?:\.{3}|\s|$)))/.exec(t),e.current=r&&r[1],r=/\.{3}(\S*)/.exec(t),e.tracking=r&&r[1],r=/\son\s([\S]+)$/.exec(t),e.current=r&&r[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),eM=function(e){let t=e.split(a),r=new eF;for(let e=0,n=t.length;e<n;){let n=t[e++].trim();n&&("R"===n.charAt(0)&&(n+=a+(t[e++]||"")),function(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(t,r,n){let s=`${t}${r}`,i=ej.get(s);i&&i(e,n),"##"!==s&&"!!"!==s&&e.files.push(new eA(n,t,r))}}(r,n))}return r}}}),nb=tn({"src/lib/tasks/status.ts"(){ng(),eP=["--null","-z"]}});function nw(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function ny(e){return e===eL?nw(0,0,0,"",!1):tZ(nw(0,0,0,e),eI,e)}var nv=tn({"src/lib/tasks/version.ts"(){t1(),eL="installed=false",eI=[new b(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,nw(tR(t),tR(r),tR(n),s))}),new b(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,nw(tR(t),tR(r),n,s))})]}}),nk={};ts(nk,{SimpleGitApi:()=>eN});var nx=tn({"src/lib/simple-git-api.ts"(){rj(),rP(),rI(),rN(),rB(),rm(),rU(),rb(),rq(),rG(),r6(),ni(),nl(),nd(),nb(),ri(),nv(),t1(),Object.assign((eN=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&function(e,t,r=u){t.then(e=>{r(null,e)},t=>{let n;(null==t?void 0:t.task)===e&&r(t instanceof i?(n=e=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${e} should be GitResponseError.git.${e}, this will no longer be available in version 3`),n=u},Object.create(t,Object.getOwnPropertyNames(t.git).reduce(function(e,r){return r in t||(e[r]={enumerable:!1,configurable:!1,get:()=>(n(r),t.git[r])}),e},{}))):t,void 0)})}(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(rt(["add",...tO(e)]),tK(arguments))}cwd(e){let t=tK(arguments);return"string"==typeof e?this._runTask(rM(e,this._executor),t):"string"==typeof(null==e?void 0:e.path)?this._runTask(rM(e.path,e.root&&this._executor||void 0),t):this._runTask(re("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(function(e,t){let r=["hash-object",e];return t&&r.push("-w"),rt(r,!0)}(e,!0===t),tK(arguments))}init(e){return this._runTask(function(e=!1,t,r){let n=["init",...r];return e&&!n.includes(Z)&&n.splice(1,0,Z),{commands:n,format:"utf-8",parser:e=>(function(e,t,r){let n;let s=String(r).trim();if(n=Y.exec(s))return new K(e,t,!1,n[1]);if(n=Q.exec(s))return new K(e,t,!0,n[1]);let i="",o=s.split(" ");for(;o.length;)if("in"===o.shift()){i=o.join(" ");break}return new K(e,t,/^re/i.test(s),i)})(n.includes("--bare"),t,e)}}(!0===e,this._executor.cwd,tV(arguments)),tK(arguments))}merge(){return this._runTask(ns(tV(arguments)),tK(arguments))}mergeFromTo(e,t){return d(e)&&d(t)?this._runTask(ns([e,t,...tV(arguments)]),tK(arguments,!1)):this._runTask(re("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=nc({remote:tI(arguments[0],d),branch:tI(arguments[1],d)},tV(arguments));return this._runTask(e,tK(arguments))}stash(){return this._runTask(rt(["stash",...tV(arguments)]),tK(arguments))}status(){var e;return this._runTask((e=tV(arguments),{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(e=>!eP.includes(e))],parser:e=>eM(e)}),tK(arguments))}}).prototype,{checkout(){return this._runTask(rL(tV(arguments,1)),tK(arguments))},checkoutBranch(e,t){return this._runTask(rL(["-b",e,t,...tV(arguments)]),tK(arguments))},checkoutLocalBranch(e){return this._runTask(rL(["-b",e,...tV(arguments)]),tK(arguments))}},{commit(e,...t){var r,n,s;let i=tK(arguments),o=!f(e)&&re("git.commit: requires the commit message to be supplied as a string/string[]")||(r=tO(e),n=tO(tI(t[0],f,[])),s=[...tI(t[1],l,[]),...tV(arguments,0,!0)],{commands:["-c","core.abbrev=40","commit",...tA(r,"-m"),...n,...s],format:"utf-8",parser:r$});return this._runTask(o,i)}},{addConfig(e,t,...r){return this._runTask(function(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser:e=>e}}(e,t,!0===r[0],rh(r[1],"local")),tK(arguments))},getConfig(e,t){return this._runTask(function(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser:t=>(function(e,t){let r=null,n=[],s=new Map;for(let i of rp(e,t))i.key===t&&(n.push(r=i.value),s.has(i.file)||s.set(i.file,[]),s.get(i.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}})(t,e)}}(e,rh(t,void 0)),tK(arguments))},listConfig(...e){return this._runTask(function(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser:e=>(function(e){let t=new M;for(let r of rp(e))t.addValue(r.file,String(r.key),r.value);return t})(e)}}(rh(e[0],void 0)),tK(arguments))}},{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser:e=>tZ({count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0},[V],e)})}},{firstCommit(){return this._runTask(rt(["rev-list","--max-parents=0","HEAD"],!0),tK(arguments))}},{grep(e){let t=tK(arguments),r=tV(arguments);for(let e of N)if(r.includes(e))return this._runTask(re(`git.grep: use of "${e}" is not supported.`),t);"string"==typeof e&&(e=(function(...e){return new B().param(...e)})().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser:e=>(function(e){let t=new Set,r={};return tk(e,e=>{let[n,s,i]=e.split(a);t.add(n),(r[n]=r[n]||[]).push({line:tR(s),path:n,preview:i})}),{paths:t,results:r}})(e)},t)}},{log(...e){let t=tK(arguments),r=r2(tX(arguments),tI(arguments[0],l)),n=function(e,t){return d(e)&&d(t)&&re("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}(...e)||r1(r.commands)||function(e,t,r){let n=rQ(e,t,rH(r));return{commands:["log",...r],format:"utf-8",parser:n}}(r.splitter,r.fields,r.commands);return this._runTask(n,t)}},{showBuffer(){let e=["show",...tV(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(rr(e),tK(arguments))},show(){let e=["show",...tV(arguments,1)];return this._runTask(rt(e),tK(arguments))}},{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:ny,onError(e,t,r,n){if(-2===e.exitCode)return r(Buffer.from(eL));n(t)}})}})}}),nT={};ts(nT,{Scheduler:()=>eD});var nC=tn({"src/lib/runners/scheduler.ts"(){let e;t1(),r_(),e=0,e$=()=>{e++;let{promise:t,done:r}=(0,e0.ud)();return{promise:t,done:r,id:e}},eD=class{constructor(e=2){this.concurrency=e,this.logger=rC("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=tT(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),t_(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=tT(this.pending,e$());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),n_={};function nO(e,t){return rt(["apply",...t,...e])}ts(n_,{applyPatchTask:()=>nO});var nS=tn({"src/lib/tasks/apply-patch.ts"(){ri()}}),nE=tn({"src/lib/responses/BranchDeleteSummary.ts"(){eB=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function nR(e,t){return 1===t&&eU.test(e)}var nA=tn({"src/lib/parsers/parse-branch-delete.ts"(){nE(),t1(),eU=/^error[^']+'([^']+)'/m,eq=[new b(/(\S+)\s+\(\S+\s([^)]+)\)/,(e,[t,r])=>{let n={branch:t,hash:r,success:!0};e.all.push(n),e.branches[t]=n}),new b(eU,(e,[t])=>{let r={branch:t,hash:null,success:!1};e.errors.push(r),e.all.push(r),e.branches[t]=r})],ez=(e,t)=>tZ(new eB,eq,[e,t])}}),nF=tn({"src/lib/responses/BranchSummary.ts"(){eG=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){"*"===e&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:"*"===e,linkedWorkTree:"+"===e,name:r,commit:n,label:s}}}}});function nj(e){return e?e.charAt(0):""}function nM(e){return tZ(new eG,eH,e)}var nP=tn({"src/lib/parsers/parse-branch.ts"(){nF(),t1(),eH=[new b(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(nj(t),!0,r,n,s)}),new b(RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(nj(t),!1,r,n,s)})]}}),nL={};function nI(e){let t=["-d","-D","--delete"];return e.some(e=>t.includes(e))}function nN(e){let t=nI(e),r=["branch",...e];return 1===r.length&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser:(e,r)=>t?ez(e,r).all[0]:nM(e)}}function n$(){return{format:"utf-8",commands:["branch","-v"],parser:nM}}function nD(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser:(e,t)=>ez(e,t),onError({exitCode:e,stdOut:t},r,n,s){if(!nR(String(r),e))return s(r);n(t)}}}function nB(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser:(t,r)=>ez(t,r).branches[e],onError({exitCode:e,stdErr:t,stdOut:n},s,o,a){if(!nR(String(s),e))return a(s);throw new i(r.parser(tF(n),tF(t)),String(s))}};return r}ts(nL,{branchLocalTask:()=>n$,branchTask:()=>nN,containsDeleteBranchCommand:()=>nI,deleteBranchTask:()=>nB,deleteBranchesTask:()=>nD});var nU=tn({"src/lib/tasks/branch.ts"(){tp(),nA(),nP(),t1()}}),nq=tn({"src/lib/responses/CheckIgnore.ts"(){eW=e=>e.split(/\n/g).map(e=>e.trim()).filter(e=>!!e)}}),nz={};function nG(e){return{commands:["check-ignore",...e],format:"utf-8",parser:eW}}ts(nz,{checkIgnoreTask:()=>nG});var nH=tn({"src/lib/tasks/check-ignore.ts"(){nq()}}),nW={};function nV(e){return/^--upload-pack(=|$)/.test(e)}function nX(e,t,r){let n=["clone",...r];return(d(e)&&n.push(e),d(t)&&n.push(t),n.find(nV))?re("git.fetch: potential exploit argument blocked."):rt(n)}function nK(e,t,r){return tT(r,"--mirror"),nX(e,t,r)}ts(nW,{cloneMirrorTask:()=>nK,cloneTask:()=>nX});var nY=tn({"src/lib/tasks/clone.ts"(){ri(),t1()}});function nQ(e,t){return tZ({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},eV,[e,t])}var nZ=tn({"src/lib/parsers/parse-fetch.ts"(){t1(),eV=[new b(/From (.+)$/,(e,[t])=>{e.remote=t}),new b(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new b(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new b(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new b(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),nJ={};function n0(e){return/^--upload-pack(=|$)/.test(e)}function n1(e,t,r){let n=["fetch",...r];return(e&&t&&n.push(e,t),n.find(n0))?re("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:nQ}}ts(nJ,{fetchTask:()=>n1});var n3=tn({"src/lib/tasks/fetch.ts"(){nZ(),ri()}});function n2(e){return tZ({moves:[]},eX,e)}var n6=tn({"src/lib/parsers/parse-move.ts"(){t1(),eX=[new b(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),n9={};function n8(e,t){return{commands:["mv","-v",...tO(e),t],format:"utf-8",parser:n2}}ts(n9,{moveTask:()=>n8});var n4=tn({"src/lib/tasks/move.ts"(){n6(),t1()}}),n5={};function n7(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser:(e,t)=>ex(e,t),onError(e,t,r,n){let s=function(e,t){let r=tZ(new ef,ev,[e,t]);return r.message&&r}(tF(e.stdOut),tF(e.stdErr));if(s)return n(new i(s));n(t)}}}ts(n5,{pullTask:()=>n7});var se=tn({"src/lib/tasks/pull.ts"(){tp(),nr(),t1()}});function st(e){let t={};return sn(e,([e])=>t[e]={name:e}),Object.values(t)}function sr(e){let t={};return sn(e,([e,r,n])=>{t.hasOwnProperty(e)||(t[e]={name:e,refs:{fetch:"",push:""}}),n&&r&&(t[e].refs[n.replace(/[^a-z]/g,"")]=r)}),Object.values(t)}function sn(e,t){tk(e,e=>t(e.split(/\s+/)))}var ss=tn({"src/lib/responses/GetRemoteSummary.ts"(){t1()}}),si={};function so(e,t,r){return rt(["remote","add",...r,e,t])}function sa(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?sr:st}}function su(e){let t=[...e];return"ls-remote"!==t[0]&&t.unshift("ls-remote"),rt(t)}function sc(e){let t=[...e];return"remote"!==t[0]&&t.unshift("remote"),rt(t)}function sl(e){return rt(["remote","remove",e])}ts(si,{addRemoteTask:()=>so,getRemotesTask:()=>sa,listRemotesTask:()=>su,remoteTask:()=>sc,removeRemoteTask:()=>sl});var sd=tn({"src/lib/tasks/remote.ts"(){ss(),ri()}}),sp={};function sf(e={},t){let r=r2(e),n=["stash","list",...r.commands,...t],s=rQ(r.splitter,r.fields,rH(n));return r1(n)||{commands:n,format:"utf-8",parser:s}}ts(sp,{stashListTask:()=>sf});var sh=tn({"src/lib/tasks/stash-list.ts"(){rV(),rZ(),r3(),r6()}}),sm={};function sg(e,t){return sw(["add",e,t])}function sb(e){return sw(["init",...e])}function sw(e){let t=[...e];return"submodule"!==t[0]&&t.unshift("submodule"),rt(t)}function sy(e){return sw(["update",...e])}ts(sm,{addSubModuleTask:()=>sg,initSubModuleTask:()=>sb,subModuleTask:()=>sw,updateSubModuleTask:()=>sy});var sv=tn({"src/lib/tasks/sub-module.ts"(){ri()}});function sk(e,t){return e===t?0:e>t?1:-1}function sx(e){return e.trim()}function sT(e){return"string"==typeof e&&parseInt(e.replace(/^\D+/g,""),10)||0}var sC=tn({"src/lib/responses/TagList.ts"(){eK=class{constructor(e,t){this.all=e,this.latest=t}},eY=function(e,t=!1){let r=e.split("\n").map(sx).filter(Boolean);t||r.sort(function(e,t){let r=e.split("."),n=t.split(".");if(1===r.length||1===n.length)return function(e,t){let r=isNaN(e);return r!==isNaN(t)?r?1:-1:r?sk(e,t):0}(sT(r[0]),sT(n[0]));for(let e=0,t=Math.max(r.length,n.length);e<t;e++){let t=sk(sT(r[e]),sT(n[e]));if(t)return t}return 0});let n=t?r[0]:[...r].reverse().find(e=>e.indexOf(".")>=0);return new eK(r,n)}}}),s_={};function sO(e=[]){let t=e.some(e=>/^--sort=/.test(e));return{format:"utf-8",commands:["tag","-l",...e],parser:e=>eY(e,t)}}function sS(e){return{format:"utf-8",commands:["tag",e],parser:()=>({name:e})}}function sE(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser:()=>({name:e})}}ts(s_,{addAnnotatedTagTask:()=>sE,addTagTask:()=>sS,tagListTask:()=>sO});var sR=tn({"src/lib/tasks/tag.ts"(){sC()}}),sA=((e,t)=>function(){return t||(0,e[e8(e)[0]])((t={exports:{}}).exports,t),t.exports})({"src/git.js"(e,t){var{GitExecutor:r}=(rF(),to(rA)),{SimpleGitApi:n}=(nx(),to(nk)),{Scheduler:s}=(nC(),to(nT)),{configurationErrorTask:i}=(ri(),to(t5)),{asArray:o,filterArray:a,filterPrimitives:u,filterString:c,filterStringOrStringArray:l,filterType:d,getTrailingOptions:p,trailingFunctionArgument:f,trailingOptionsArgument:h}=(t1(),to(t0)),{applyPatchTask:m}=(nS(),to(n_)),{branchTask:g,branchLocalTask:b,deleteBranchesTask:w,deleteBranchTask:y}=(nU(),to(nL)),{checkIgnoreTask:v}=(nH(),to(nz)),{checkIsRepoTask:k}=(t8(),to(t3)),{cloneTask:x,cloneMirrorTask:T}=(nY(),to(nW)),{cleanWithOptionsTask:C,isCleanOptionsArray:_}=(rd(),to(ro)),{diffSummaryTask:O}=(r3(),to(rJ)),{fetchTask:S}=(n3(),to(nJ)),{moveTask:E}=(n4(),to(n9)),{pullTask:R}=(se(),to(n5)),{pushTagsTask:A}=(nl(),to(na)),{addRemoteTask:F,getRemotesTask:j,listRemotesTask:M,remoteTask:P,removeRemoteTask:L}=(sd(),to(si)),{getResetMode:I,resetTask:N}=(rx(),to(rw)),{stashListTask:$}=(sh(),to(sp)),{addSubModuleTask:D,initSubModuleTask:B,subModuleTask:U,updateSubModuleTask:q}=(sv(),to(sm)),{addAnnotatedTagTask:z,addTagTask:G,tagListTask:H}=(sR(),to(s_)),{straightThroughBufferTask:W,straightThroughStringTask:V}=(ri(),to(t5));function X(e,t){this._plugins=t,this._executor=new r(e.baseDir,new s(e.maxConcurrentProcesses),t),this._trimmed=e.trimmed}function K(e,t,r,n){return"string"!=typeof r?i(`git.${e}() requires a string 'repoPath'`):t(r,d(n,c),p(arguments))}(X.prototype=Object.create(n.prototype)).constructor=X,X.prototype.customBinary=function(e){return this._plugins.reconfigure("binary",e),this},X.prototype.env=function(e,t){return 1==arguments.length&&"object"==typeof e?this._executor.env=e:(this._executor.env=this._executor.env||{})[e]=t,this},X.prototype.stashList=function(e){return this._runTask($(h(arguments)||{},a(e)&&e||[]),f(arguments))},X.prototype.clone=function(){return this._runTask(K("clone",x,...arguments),f(arguments))},X.prototype.mirror=function(){return this._runTask(K("mirror",T,...arguments),f(arguments))},X.prototype.mv=function(e,t){return this._runTask(E(e,t),f(arguments))},X.prototype.checkoutLatestTag=function(e){var t=this;return this.pull(function(){t.tags(function(r,n){t.checkout(n.latest,e)})})},X.prototype.pull=function(e,t,r,n){return this._runTask(R(d(e,c),d(t,c),p(arguments)),f(arguments))},X.prototype.fetch=function(e,t){return this._runTask(S(d(e,c),d(t,c),p(arguments)),f(arguments))},X.prototype.silent=function(e){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},X.prototype.tags=function(e,t){return this._runTask(H(p(arguments)),f(arguments))},X.prototype.rebase=function(){return this._runTask(V(["rebase",...p(arguments)]),f(arguments))},X.prototype.reset=function(e){return this._runTask(N(I(e),p(arguments)),f(arguments))},X.prototype.revert=function(e){let t=f(arguments);return"string"!=typeof e?this._runTask(i("Commit must be a string"),t):this._runTask(V(["revert",...p(arguments,0,!0),e]),t)},X.prototype.addTag=function(e){let t="string"==typeof e?G(e):i("Git.addTag requires a tag name");return this._runTask(t,f(arguments))},X.prototype.addAnnotatedTag=function(e,t){return this._runTask(z(e,t),f(arguments))},X.prototype.deleteLocalBranch=function(e,t,r){return this._runTask(y(e,"boolean"==typeof t&&t),f(arguments))},X.prototype.deleteLocalBranches=function(e,t,r){return this._runTask(w(e,"boolean"==typeof t&&t),f(arguments))},X.prototype.branch=function(e,t){return this._runTask(g(p(arguments)),f(arguments))},X.prototype.branchLocal=function(e){return this._runTask(b(),f(arguments))},X.prototype.raw=function(e){let t=!Array.isArray(e),r=[].slice.call(t?arguments:e,0);for(let e=0;e<r.length&&t;e++)if(!u(r[e])){r.splice(e,r.length-e);break}r.push(...p(arguments,0,!0));var n=f(arguments);return r.length?this._runTask(V(r,this._trimmed),n):this._runTask(i("Raw: must supply one or more command to execute"),n)},X.prototype.submoduleAdd=function(e,t,r){return this._runTask(D(e,t),f(arguments))},X.prototype.submoduleUpdate=function(e,t){return this._runTask(q(p(arguments,!0)),f(arguments))},X.prototype.submoduleInit=function(e,t){return this._runTask(B(p(arguments,!0)),f(arguments))},X.prototype.subModule=function(e,t){return this._runTask(U(p(arguments)),f(arguments))},X.prototype.listRemote=function(){return this._runTask(M(p(arguments)),f(arguments))},X.prototype.addRemote=function(e,t,r){return this._runTask(F(e,t,p(arguments)),f(arguments))},X.prototype.removeRemote=function(e,t){return this._runTask(L(e),f(arguments))},X.prototype.getRemotes=function(e,t){return this._runTask(j(!0===e),f(arguments))},X.prototype.remote=function(e,t){return this._runTask(P(p(arguments)),f(arguments))},X.prototype.tag=function(e,t){let r=p(arguments);return"tag"!==r[0]&&r.unshift("tag"),this._runTask(V(r),f(arguments))},X.prototype.updateServerInfo=function(e){return this._runTask(V(["update-server-info"]),f(arguments))},X.prototype.pushTags=function(e,t){let r=A({remote:d(e,c)},p(arguments));return this._runTask(r,f(arguments))},X.prototype.rm=function(e){return this._runTask(V(["rm","-f",...o(e)]),f(arguments))},X.prototype.rmKeepLocal=function(e){return this._runTask(V(["rm","--cached",...o(e)]),f(arguments))},X.prototype.catFile=function(e,t){return this._catFile("utf-8",arguments)},X.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},X.prototype._catFile=function(e,t){var r=f(t),n=["cat-file"],s=t[0];if("string"==typeof s)return this._runTask(i("Git.catFile: options must be supplied as an array of strings"),r);Array.isArray(s)&&n.push.apply(n,s);let o="buffer"===e?W(n):V(n);return this._runTask(o,r)},X.prototype.diff=function(e,t){let r=c(e)?i("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):V(["diff",...p(arguments)]);return this._runTask(r,f(arguments))},X.prototype.diffSummary=function(){return this._runTask(O(p(arguments,1)),f(arguments))},X.prototype.applyPatch=function(e){let t=l(e)?m(o(e),p([].slice.call(arguments,1))):i("git.applyPatch requires one or more string patches as the first argument");return this._runTask(t,f(arguments))},X.prototype.revparse=function(){let e=["rev-parse",...p(arguments,!0)];return this._runTask(V(e,!0),f(arguments))},X.prototype.clean=function(e,t,r){let n=_(e),s=n&&e.join("")||d(e,c)||"",i=p([].slice.call(arguments,n?1:0));return this._runTask(C(s,i),f(arguments))},X.prototype.exec=function(e){return this._runTask({commands:[],format:"utf-8",parser(){"function"==typeof e&&e()}})},X.prototype.clearQueue=function(){return this},X.prototype.checkIgnore=function(e,t){return this._runTask(v(o(d(e,l,[]))),f(arguments))},X.prototype.checkIsRepo=function(e,t){return this._runTask(k(d(e,c)),f(arguments))},t.exports=X}});tl(),td();var sF=class extends s{constructor(e,t){super(void 0,t),this.config=e}};td(),td();var sj=class extends s{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};tp(),tf(),t8(),rd(),rm(),rg(),rb(),rx(),t1(),t1();var sM=(0,e0.yX)().promise;t1();var sP="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function sL(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function sI(e,t){if(e.length<1||e.length>2)throw new sj(void 0,"binary","Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings");if(e.some(sL)){if(t)console.warn(sP);else throw new sj(void 0,"binary",sP)}let[r,n]=e;return{binary:r,prefix:n}}function sN(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new s(void 0,n.toString("utf-8"))}:{error:n}}}}td(),t1();var s$=class{constructor(){this.plugins=new Set,this.events=new e1.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=tT(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return tO(e).forEach(e=>e&&this.plugins.add(tT(t,e))),()=>{t.forEach(e=>this.plugins.delete(e))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let t of this.plugins)t.type===e&&(n=t.action(n,s));return n}};t1(),t1(),tl(),t1();var sD=sA();tp();var sB=function(e,t){var r;let n=new s$,s=tG(e&&("string"==typeof e?{baseDir:e}:e)||{},t);if(!tx(s.baseDir))throw new sF(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(function(e){let t=tA(e,"-c");return{type:"spawn.args",action:e=>[...t,...e]}}(s.config)),n.add(function({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action:(r,n)=>(r.forEach((s,i)=>{let o=i<r.length?r[i+1]:"";e||function(e,t){if("string"==typeof e&&"-c"===e.trim().toLowerCase()&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new sj(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}(s,o),t||function(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new sj(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if("clone"===t&&/^\s*-u\b/.test(e))throw new sj(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if("push"===t&&/^\s*--exec\b/.test(e))throw new sj(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}(s,n.method)}),r)}}(s.unsafe)),n.add({type:"spawn.args",action(e){let t;let r=[];function n(e){(t=t||[]).push(...e)}for(let t=0;t<e.length;t++){let s=e[t];if(tu(s)){n(tc(s));continue}if("--"===s){n(e.slice(t+1).flatMap(e=>tu(e)&&tc(e)||e));break}r.push(s)}return t?[...r,"--",...t.map(String)]:r}}),n.add(function({onClose:e=!0,onExit:t=50}={}){function r(e,t,r){!1!==e&&(!0===e?t.promise:t.promise.then(()=>tM(e))).then(r.done)}return{type:"spawn.after",action(n,s){return ta(this,arguments,function*(n,{spawned:s,close:i}){var o,a;let u=function(){let n=-1,s={close:(0,e0.yX)(),closeTimeout:(0,e0.yX)(),exit:(0,e0.yX)(),exitTimeout:(0,e0.yX)()},i=Promise.race([!1===e?sM:s.closeTimeout.promise,!1===t?sM:s.exitTimeout.promise]);return r(e,s.close,s.closeTimeout),r(t,s.exit,s.exitTimeout),{close(e){n=e,s.close.done()},exit(e){n=e,s.exit.done()},get exitCode(){return n},result:i}}(),c=!0,l=()=>void(c=!1);null==(o=s.stdout)||o.on("data",l),null==(a=s.stderr)||a.on("data",l),s.on("error",l),s.on("close",e=>u.close(e)),s.on("exit",e=>u.exit(e));try{yield u.result,c&&(yield tM(50)),i(u.exitCode)}catch(e){i(u.exitCode,e)}})}}}(s.completion)),s.abort&&n.add(function(e){if(e)return[{type:"spawn.before",action(t,r){e.aborted&&r.kill(new sj(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(t,r){function n(){r.kill(new sj(void 0,"abort","Abort signal received"))}e.addEventListener("abort",n),r.spawned.on("close",()=>e.removeEventListener("abort",n))}}]}(s.abort)),s.progress&&n.add(function(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action:(e,n)=>r.includes(n.method)?tC(e,t):e},{type:"spawn.after",action(r,n){var s;n.commands.includes(t)&&(null==(s=n.spawned.stderr)||s.on("data",t=>{let r=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(t.toString("utf8"));r&&e({method:n.method,stage:String(r[1].toLowerCase().split(" ",1))||"unknown",progress:tR(r[2]),processed:tR(r[3]),total:tR(r[4])})}))}}]}(s.progress)),s.timeout&&n.add(function({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var i,o;let a;function u(){a&&clearTimeout(a),a=setTimeout(l,e)}function c(){var e,t;null==(e=s.spawned.stdout)||e.off("data",u),null==(t=s.spawned.stderr)||t.off("data",u),s.spawned.off("exit",c),s.spawned.off("close",c),a&&clearTimeout(a)}function l(){c(),s.kill(new sj(void 0,"timeout","block timeout reached"))}r&&(null==(i=s.spawned.stdout)||i.on("data",u)),t&&(null==(o=s.spawned.stderr)||o.on("data",u)),s.spawned.on("exit",c),s.spawned.on("close",c),u()}}}(s.timeout)),s.spawnOptions&&n.add(function(e){let t=tj(e,["uid","gid"]);return{type:"spawn.options",action:e=>tt(tt({},t),e)}}(s.spawnOptions)),n.add(sN(function(e=!1,t=function(e){return!!(e.exitCode&&e.stdErr.length)},r=function(e){return Buffer.concat([...e.stdOut,...e.stdErr])}){return(n,s)=>(e||!n)&&t(s)?r(s):n}(!0))),s.errors&&n.add(sN(s.errors)),function(e,t=["git"],r=!1){let n=sI(tO(t),r);e.on("binary",e=>{n=sI(tO(e),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",e=>n.prefix?[n.prefix,...e]:e)}(n,s.binary,null==(r=s.unsafe)?void 0:r.allowUnsafeCustomBinary),new sD(s,n)}}};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.id=571,exports.ids=[571],exports.modules={72821:(e,r,t)=>{t.d(r,{default:()=>c});var n=t(56073),o=t.n(n),a=t(58009),i=t(37679),l=t(45512);let s=a.forwardRef((e,r)=>{let[{className:t,...n},{as:a="div",bsPrefix:s,spans:c}]=function({as:e,bsPrefix:r,className:t,...n}){r=(0,i.oU)(r,"col");let a=(0,i.gy)(),l=(0,i.Jm)(),s=[],c=[];return a.forEach(e=>{let t,o,a;let i=n[e];delete n[e],"object"==typeof i&&null!=i?{span:t,offset:o,order:a}=i:t=i;let u=e!==l?`-${e}`:"";t&&s.push(!0===t?`${r}${u}`:`${r}${u}-${t}`),null!=a&&c.push(`order${u}-${a}`),null!=o&&c.push(`offset${u}-${o}`)}),[{...n,className:o()(t,...s,...c)},{as:e,bsPrefix:r,spans:s}]}(e);return(0,l.jsx)(a,{...n,ref:r,className:o()(t,!c.length&&s)})});s.displayName="Col";let c=s},17164:(e,r,t)=>{t.d(r,{A:()=>f});var n=t(56073),o=t.n(n),a=t(58009),i=t(28200),l=t.n(i),s=t(45512);let c={type:l().string,tooltip:l().bool,as:l().elementType},u=a.forwardRef(({as:e="div",className:r,type:t="valid",tooltip:n=!1,...a},i)=>(0,s.jsx)(e,{...a,ref:i,className:o()(r,`${t}-${n?"tooltip":"feedback"}`)}));u.displayName="Feedback",u.propTypes=c;let f=u},79887:(e,r,t)=>{t.d(r,{A:()=>R});var n=t(56073),o=t.n(n),a=t(28200),i=t.n(a),l=t(58009),s=t(57763),c=t(89688),u=t(37679),f=t(45512);let d=l.forwardRef(({className:e,bsPrefix:r,as:t="div",...n},a)=>(r=(0,u.oU)(r,"form-floating"),(0,f.jsx)(t,{ref:a,className:o()(e,r),...n})));d.displayName="FormFloating";var p=t(91558),g=t(39983),m=t(53518);let y=l.forwardRef(({bsPrefix:e,className:r,id:t,...n},a)=>{let{controlId:i}=(0,l.useContext)(m.A);return e=(0,u.oU)(e,"form-range"),(0,f.jsx)("input",{...n,type:"range",ref:a,className:o()(r,e),id:t||i})});y.displayName="FormRange";var v=t(64313);let h=l.forwardRef(({bsPrefix:e,className:r,as:t="small",muted:n,...a},i)=>(e=(0,u.oU)(e,"form-text"),(0,f.jsx)(t,{...a,ref:i,className:o()(r,e,n&&"text-muted")})));h.displayName="FormText";let A=l.forwardRef((e,r)=>(0,f.jsx)(s.A,{...e,ref:r,type:"switch"}));A.displayName="Switch";let b=Object.assign(A,{Input:s.A.Input,Label:s.A.Label}),w=l.forwardRef(({bsPrefix:e,className:r,children:t,controlId:n,label:a,...i},l)=>(e=(0,u.oU)(e,"form-floating"),(0,f.jsxs)(p.A,{ref:l,className:o()(r,e),controlId:n,...i,children:[t,(0,f.jsx)("label",{htmlFor:n,children:a})]})));w.displayName="FloatingLabel";let M={_ref:i().any,validated:i().bool,as:i().elementType},x=l.forwardRef(({className:e,validated:r,as:t="form",...n},a)=>(0,f.jsx)(t,{...n,ref:a,className:o()(e,r&&"was-validated")}));x.displayName="Form",x.propTypes=M;let R=Object.assign(x,{Group:p.A,Control:c.A,Floating:d,Check:s.A,Switch:b,Label:g.A,Text:h,Range:y,Select:v.A,FloatingLabel:w})},57763:(e,r,t)=>{t.d(r,{A:()=>p});var n=t(56073),o=t.n(n),a=t(58009),i=t(17164),l=t(98581),s=t(53518),c=t(37679),u=t(45512);let f=a.forwardRef(({bsPrefix:e,className:r,htmlFor:t,...n},i)=>{let{controlId:l}=(0,a.useContext)(s.A);return e=(0,c.oU)(e,"form-check-label"),(0,u.jsx)("label",{...n,ref:i,htmlFor:t||l,className:o()(r,e)})});f.displayName="FormCheckLabel";let d=a.forwardRef(({id:e,bsPrefix:r,bsSwitchPrefix:t,inline:n=!1,reverse:d=!1,disabled:p=!1,isValid:g=!1,isInvalid:m=!1,feedbackTooltip:y=!1,feedback:v,feedbackType:h,className:A,style:b,title:w="",type:M="checkbox",label:x,children:R,as:j="input",...S},N)=>{r=(0,c.oU)(r,"form-check"),t=(0,c.oU)(t,"form-switch");let{controlId:C}=(0,a.useContext)(s.A),E=(0,a.useMemo)(()=>({controlId:e||C}),[C,e]),T=!R&&null!=x&&!1!==x||a.Children.toArray(R).some(e=>a.isValidElement(e)&&e.type===f),$=(0,u.jsx)(l.A,{...S,type:"switch"===M?"checkbox":M,ref:N,isValid:g,isInvalid:m,disabled:p,as:j});return(0,u.jsx)(s.A.Provider,{value:E,children:(0,u.jsx)("div",{style:b,className:o()(A,T&&r,n&&`${r}-inline`,d&&`${r}-reverse`,"switch"===M&&t),children:R||(0,u.jsxs)(u.Fragment,{children:[$,T&&(0,u.jsx)(f,{title:w,children:x}),v&&(0,u.jsx)(i.A,{type:h,tooltip:y,children:v})]})})})});d.displayName="FormCheck";let p=Object.assign(d,{Input:l.A,Label:f})},98581:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(56073),o=t.n(n),a=t(58009),i=t(53518),l=t(37679),s=t(45512);let c=a.forwardRef(({id:e,bsPrefix:r,className:t,type:n="checkbox",isValid:c=!1,isInvalid:u=!1,as:f="input",...d},p)=>{let{controlId:g}=(0,a.useContext)(i.A);return r=(0,l.oU)(r,"form-check-input"),(0,s.jsx)(f,{...d,ref:p,type:n,id:e||g,className:o()(t,r,c&&"is-valid",u&&"is-invalid")})});c.displayName="FormCheckInput";let u=c},53518:(e,r,t)=>{t.d(r,{A:()=>n});let n=t(58009).createContext({})},89688:(e,r,t)=>{t.d(r,{A:()=>f});var n=t(56073),o=t.n(n),a=t(58009);t(86827);var i=t(17164),l=t(53518),s=t(37679),c=t(45512);let u=a.forwardRef(({bsPrefix:e,type:r,size:t,htmlSize:n,id:i,className:u,isValid:f=!1,isInvalid:d=!1,plaintext:p,readOnly:g,as:m="input",...y},v)=>{let{controlId:h}=(0,a.useContext)(l.A);return e=(0,s.oU)(e,"form-control"),(0,c.jsx)(m,{...y,type:r,size:n,ref:v,readOnly:g,id:i||h,className:o()(u,p?`${e}-plaintext`:e,t&&`${e}-${t}`,"color"===r&&`${e}-color`,f&&"is-valid",d&&"is-invalid")})});u.displayName="FormControl";let f=Object.assign(u,{Feedback:i.A})},91558:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(58009),o=t(53518),a=t(45512);let i=n.forwardRef(({controlId:e,as:r="div",...t},i)=>{let l=(0,n.useMemo)(()=>({controlId:e}),[e]);return(0,a.jsx)(o.A.Provider,{value:l,children:(0,a.jsx)(r,{...t,ref:i})})});i.displayName="FormGroup";let l=i},39983:(e,r,t)=>{t.d(r,{A:()=>f});var n=t(56073),o=t.n(n),a=t(58009);t(86827);var i=t(72821),l=t(53518),s=t(37679),c=t(45512);let u=a.forwardRef(({as:e="label",bsPrefix:r,column:t=!1,visuallyHidden:n=!1,className:u,htmlFor:f,...d},p)=>{let{controlId:g}=(0,a.useContext)(l.A);r=(0,s.oU)(r,"form-label");let m="col-form-label";"string"==typeof t&&(m=`${m} ${m}-${t}`);let y=o()(u,r,n&&"visually-hidden",t&&m);return(f=f||g,t)?(0,c.jsx)(i.default,{ref:p,as:"label",className:y,htmlFor:f,...d}):(0,c.jsx)(e,{ref:p,className:y,htmlFor:f,...d})});u.displayName="FormLabel";let f=u},64313:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(56073),o=t.n(n),a=t(58009),i=t(37679),l=t(53518),s=t(45512);let c=a.forwardRef(({bsPrefix:e,size:r,htmlSize:t,className:n,isValid:c=!1,isInvalid:u=!1,id:f,...d},p)=>{let{controlId:g}=(0,a.useContext)(l.A);return e=(0,i.oU)(e,"form-select"),(0,s.jsx)("select",{...d,size:t,ref:p,className:o()(n,e,r&&`${e}-${r}`,c&&"is-valid",u&&"is-invalid"),id:f||g})});c.displayName="FormSelect";let u=c},86827:e=>{e.exports=function(){}},56215:(e,r)=>{function t(e){for(let r=0;r<e.length;r++){let t=e[r];if("function"!=typeof t)throw Error(`A "use server" file can only export async functions, found ${typeof t}.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(r,"D",{enumerable:!0,get:function(){return t}})},88977:(e,r,t)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n.registerServerReference}});let n=t(46760)},54175:(e,r,t)=>{let n;Object.defineProperty(r,"__esModule",{value:!0}),function(e,r){for(var t in r)Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}(r,{arrayBufferToString:function(){return l},decrypt:function(){return u},encrypt:function(){return c},getActionEncryptionKey:function(){return m},getClientReferenceManifestForRsc:function(){return g},getServerModuleMap:function(){return p},setReferenceManifestsSingleton:function(){return d},stringToUint8Array:function(){return s}});let o=t(39212),a=t(62045),i=t(29294);function l(e){let r=new Uint8Array(e),t=r.byteLength;if(t<65535)return String.fromCharCode.apply(null,r);let n="";for(let e=0;e<t;e++)n+=String.fromCharCode(r[e]);return n}function s(e){let r=e.length,t=new Uint8Array(r);for(let n=0;n<r;n++)t[n]=e.charCodeAt(n);return t}function c(e,r,t){return crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,t)}function u(e,r,t){return crypto.subtle.decrypt({name:"AES-GCM",iv:r},e,t)}let f=Symbol.for("next.server.action-manifests");function d({page:e,clientReferenceManifest:r,serverActionsManifest:t,serverModuleMap:n}){var o;let i=null==(o=globalThis[f])?void 0:o.clientReferenceManifestsPerPage;globalThis[f]={clientReferenceManifestsPerPage:{...i,[(0,a.normalizeAppPath)(e)]:r},serverActionsManifest:t,serverModuleMap:n}}function p(){let e=globalThis[f];if(!e)throw new o.InvariantError("Missing manifest for Server Actions.");return e.serverModuleMap}function g(){let e=globalThis[f];if(!e)throw new o.InvariantError("Missing manifest for Server Actions.");let{clientReferenceManifestsPerPage:r}=e,t=i.workAsyncStorage.getStore();if(!t)return function(e){let r=Object.values(e),t={clientModules:{},edgeRscModuleMapping:{},rscModuleMapping:{}};for(let e of r)t.clientModules={...t.clientModules,...e.clientModules},t.edgeRscModuleMapping={...t.edgeRscModuleMapping,...e.edgeRscModuleMapping},t.rscModuleMapping={...t.rscModuleMapping,...e.rscModuleMapping};return t}(r);let n=r[t.route];if(!n)throw new o.InvariantError(`Missing Client Reference Manifest for ${t.route}.`);return n}async function m(){if(n)return n;let e=globalThis[f];if(!e)throw new o.InvariantError("Missing manifest for Server Actions.");let r=process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY||e.serverActionsManifest.encryptionKey;if(void 0===r)throw new o.InvariantError("Missing encryption key for Server Actions");return n=await crypto.subtle.importKey("raw",s(atob(r)),"AES-GCM",!0,["encrypt","decrypt"])}},98063:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),function(e,r){for(var t in r)Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}(r,{decryptActionBoundArgs:function(){return p},encryptActionBoundArgs:function(){return d}}),t(27315);let n=t(46760),o=t(8534),a=t(57212),i=t(54175),l=t(63033),s=new TextEncoder,c=new TextDecoder;async function u(e,r){let t=await (0,i.getActionEncryptionKey)();if(void 0===t)throw Error("Missing encryption key for Server Action. This is a bug in Next.js");let n=atob(r),o=n.slice(0,16),a=n.slice(16),l=c.decode(await (0,i.decrypt)(t,(0,i.stringToUint8Array)(o),(0,i.stringToUint8Array)(a)));if(!l.startsWith(e))throw Error("Invalid Server Action payload: failed to decrypt.");return l.slice(e.length)}async function f(e,r){let t=await (0,i.getActionEncryptionKey)();if(void 0===t)throw Error("Missing encryption key for Server Action. This is a bug in Next.js");let n=new Uint8Array(16);l.workUnitAsyncStorage.exit(()=>crypto.getRandomValues(n));let o=(0,i.arrayBufferToString)(n.buffer),a=await (0,i.encrypt)(t,n,s.encode(e+r));return btoa(o+(0,i.arrayBufferToString)(a))}async function d(e,r){let{clientModules:t}=(0,i.getClientReferenceManifestForRsc)(),o=Error();Error.captureStackTrace(o,d);let s=!1,c=await (0,a.streamToString)((0,n.renderToReadableStream)(r,t,{onError(e){s||(s=!0,o.message=e instanceof Error?e.message:String(e))}}));if(s)throw o;let u=l.workUnitAsyncStorage.getStore();if(!u)return f(e,c);let p=(0,l.getPrerenderResumeDataCache)(u),g=(0,l.getRenderResumeDataCache)(u),m=e+c,y=(null==p?void 0:p.encryptedBoundArgs.get(m))??(null==g?void 0:g.encryptedBoundArgs.get(m));if(y)return y;let v="prerender"===u.type?u.cacheSignal:void 0;null==v||v.beginRead();let h=await f(e,c);return null==v||v.endRead(),null==p||p.encryptedBoundArgs.set(m,h),h}async function p(e,r){let{edgeRscModuleMapping:t,rscModuleMapping:n}=(0,i.getClientReferenceManifestForRsc)(),a=await u(e,await r);return await (0,o.createFromReadableStream)(new ReadableStream({start(e){e.enqueue(s.encode(a)),e.close()}}),{serverConsumerManifest:{moduleLoading:null,moduleMap:n,serverModuleMap:(0,i.getServerModuleMap)()}})}},50164:(e,r)=>{function t(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}})},62045:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),function(e,r){for(var t in r)Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}(r,{normalizeAppPath:function(){return a},normalizeRscURL:function(){return i}});let n=t(50164),o=t(18758);function a(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,r,t,n)=>!r||(0,o.isGroupSegment)(r)||"@"===r[0]||("page"===r||"route"===r)&&t===n.length-1?e:e+"/"+r,""))}function i(e){return e.replace(/\.rsc($|\?)/,"$1")}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports.id=606,exports.ids=[606],exports.modules={25152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52172);class AbortSignal extends n.EventTarget{constructor(){throw super(),TypeError("AbortSignal cannot be constructed directly")}get aborted(){let e=i.get(this);if("boolean"!=typeof e)throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return e}}n.defineEventAttribute(AbortSignal.prototype,"abort");let i=new WeakMap;Object.defineProperties(AbortSignal.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(AbortSignal.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class o{constructor(){s.set(this,function(){let e=Object.create(AbortSignal.prototype);return n.EventTarget.call(e),i.set(e,!1),e}())}get signal(){return a(this)}abort(){var e;e=a(this),!1===i.get(e)&&(i.set(e,!0),e.dispatchEvent({type:"abort"}))}}let s=new WeakMap;function a(e){let t=s.get(e);if(null==t)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${null===e?"null":typeof e}`);return t}Object.defineProperties(o.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(o.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),t.AbortController=o,t.AbortSignal=AbortSignal,t.default=o,e.exports=o,e.exports.AbortController=e.exports.default=o,e.exports.AbortSignal=AbortSignal},90299:(e,t,r)=>{var n=r(52826),i=r(47943),o=r(19905),s=r(79652),a=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),l=function(e,t){e._corked?e.once("uncork",t):t()},u=function(e,t){e._autoDestroy&&e.destroy(t)},h=function(e,t){return function(r){r?u(e,"premature close"===r.message?null:r):t&&!e._ended&&e.end()}},f=function(){},d=function(e,t,r){if(!(this instanceof d))return new d(e,t,r);n.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||!1!==r.autoDestroy,this._forwardDestroy=!r||!1!==r.destroy,this._forwardEnd=!r||!1!==r.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};o(d,n.Duplex),d.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new d(e,t,r)},d.prototype.cork=function(){1==++this._corked&&this.emit("cork")},d.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},d.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(null===e||!1===e){this.end();return}var t=this,r=i(e,{writable:!0,readable:!1},h(this,this._forwardEnd)),n=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&process.nextTick(n),this._writable=e,this._writable.on("drain",n),this._unwrite=function(){t._writable.removeListener("drain",n),r()},this.uncork()},d.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(null===e||!1===e){this.push(null),this.resume();return}var t=this,r=i(e,{writable:!1,readable:!0},h(this)),o=function(){t._forward()},s=function(){t.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:new n.Readable({objectMode:!0,highWaterMark:16}).wrap(e),this._readable2.on("readable",o),this._readable2.on("end",s),this._unread=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",s),r()},this._forward()},d.prototype._read=function(){this._drained=!0,this._forward()},d.prototype._forward=function(){var e;if(!this._forwarding&&this._readable2&&this._drained){for(this._forwarding=!0;this._drained&&null!==(e=s(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},d.prototype.destroy=function(e,t){if(t||(t=f),this.destroyed)return t(null);this.destroyed=!0;var r=this;process.nextTick(function(){r._destroy(e),t(null)})},d.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},d.prototype._write=function(e,t,r){if(!this.destroyed){if(this._corked)return l(this,this._write.bind(this,e,t,r));if(e===a)return this._finish(r);if(!this._writable)return r();!1===this._writable.write(e)?this._ondrain=r:this.destroyed||r()}},d.prototype._finish=function(e){var t=this;this.emit("preend"),l(this,function(){var r,n;r=t._forwardEnd&&t._writable,n=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),l(t,e)},!r||r._writableState&&r._writableState.finished?n():r._writableState?r.end(n):(r.end(),n())})},d.prototype.end=function(e,t,r){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this._writableState.destroyed||this.write(a),n.Writable.prototype.end.call(this,r))},e.exports=d},52172:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=new WeakMap,n=new WeakMap;function i(e){let t=r.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function o(e){if(null!=e.passiveListener){"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener);return}e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault())}function s(e,t){r.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let n=Object.keys(t);for(let e=0;e<n.length;++e){let t=n[e];t in this||Object.defineProperty(this,t,a(t))}}function a(e){return{get(){return i(this).event[e]},set(t){i(this).event[e]=t},configurable:!0,enumerable:!0}}function l(e,t){i(e).passiveListener=t}s.prototype={get type(){return i(this).event.type},get target(){return i(this).eventTarget},get currentTarget(){return i(this).currentTarget},composedPath(){let e=i(this).currentTarget;return null==e?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return i(this).eventPhase},stopPropagation(){let e=i(this);e.stopped=!0,"function"==typeof e.event.stopPropagation&&e.event.stopPropagation()},stopImmediatePropagation(){let e=i(this);e.stopped=!0,e.immediateStopped=!0,"function"==typeof e.event.stopImmediatePropagation&&e.event.stopImmediatePropagation()},get bubbles(){return!!i(this).event.bubbles},get cancelable(){return!!i(this).event.cancelable},preventDefault(){o(i(this))},get defaultPrevented(){return i(this).canceled},get composed(){return!!i(this).event.composed},get timeStamp(){return i(this).timeStamp},get srcElement(){return i(this).eventTarget},get cancelBubble(){return i(this).stopped},set cancelBubble(value){if(!value)return;let e=i(this);e.stopped=!0,"boolean"==typeof e.event.cancelBubble&&(e.event.cancelBubble=!0)},get returnValue(){return!i(this).canceled},set returnValue(value){value||o(i(this))},initEvent(){}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),n.set(window.Event.prototype,s));let u=new WeakMap;function h(e){return null!==e&&"object"==typeof e}function f(e){let t=u.get(e);if(null==t)throw TypeError("'this' is expected an EventTarget object, but got another value.");return t}function d(e,t){Object.defineProperty(e,`on${t}`,{get(){let e=f(this).get(t);for(;null!=e;){if(3===e.listenerType)return e.listener;e=e.next}return null},set(e){"function"==typeof e||h(e)||(e=null);let r=f(this),n=null,i=r.get(t);for(;null!=i;)3===i.listenerType?null!==n?n.next=i.next:null!==i.next?r.set(t,i.next):r.delete(t):n=i,i=i.next;if(null!==e){let i={listener:e,listenerType:3,passive:!1,once:!1,next:null};null===n?r.set(t,i):n.next=i}},configurable:!0,enumerable:!0})}function c(e){function t(){p.call(this)}t.prototype=Object.create(p.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let r=0;r<e.length;++r)d(t.prototype,e[r]);return t}function p(){if(this instanceof p){u.set(this,new Map);return}if(1==arguments.length&&Array.isArray(arguments[0]))return c(arguments[0]);if(arguments.length>0){let e=Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return c(e)}throw TypeError("Cannot call a class as a function")}p.prototype={addEventListener(e,t,r){if(null==t)return;if("function"!=typeof t&&!h(t))throw TypeError("'listener' should be a function or an object.");let n=f(this),i=h(r),o=(i?r.capture:r)?1:2,s={listener:t,listenerType:o,passive:i&&!!r.passive,once:i&&!!r.once,next:null},a=n.get(e);if(void 0===a){n.set(e,s);return}let l=null;for(;null!=a;){if(a.listener===t&&a.listenerType===o)return;l=a,a=a.next}l.next=s},removeEventListener(e,t,r){if(null==t)return;let n=f(this),i=(h(r)?r.capture:r)?1:2,o=null,s=n.get(e);for(;null!=s;){if(s.listener===t&&s.listenerType===i){null!==o?o.next=s.next:null!==s.next?n.set(e,s.next):n.delete(e);return}o=s,s=s.next}},dispatchEvent(e){if(null==e||"string"!=typeof e.type)throw TypeError('"event.type" should be a string.');let t=f(this),r=e.type,o=t.get(r);if(null==o)return!0;let u=new(function e(t){if(null==t||t===Object.prototype)return s;let r=n.get(t);return null==r&&(r=function(e,t){let r=Object.keys(t);if(0===r.length)return e;function n(t,r){e.call(this,t,r)}n.prototype=Object.create(e.prototype,{constructor:{value:n,configurable:!0,writable:!0}});for(let o=0;o<r.length;++o){let s=r[o];if(!(s in e.prototype)){let e="function"==typeof Object.getOwnPropertyDescriptor(t,s).value;Object.defineProperty(n.prototype,s,e?function(e){return{value(){let t=i(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}(s):a(s))}}return n}(e(Object.getPrototypeOf(t)),t),n.set(t,r)),r}(Object.getPrototypeOf(e)))(this,e),h=null;for(;null!=o;){if(o.once?null!==h?h.next=o.next:null!==o.next?t.set(r,o.next):t.delete(r):h=o,l(u,o.passive?o.listener:null),"function"==typeof o.listener)try{o.listener.call(this,u)}catch(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e)}else 3!==o.listenerType&&"function"==typeof o.listener.handleEvent&&o.listener.handleEvent(u);if(i(u).immediateStopped)break;o=o.next}return l(u,null),i(u).eventPhase=0,i(u).currentTarget=null,!u.defaultPrevented}},Object.defineProperty(p.prototype,"constructor",{value:p,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(p.prototype,window.EventTarget.prototype),t.defineEventAttribute=d,t.EventTarget=p,t.default=p,e.exports=p,e.exports.EventTarget=e.exports.default=p,e.exports.defineEventAttribute=d},19905:(e,t,r)=>{try{var n=r(28354);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(23206)}},23206:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},44123:(e,t,r)=>{var n=r(69083),i=r(19905),o=r(90299),s=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},a=function(e){var t=function(){var r=s(arguments);if(!(this instanceof t))return new t(r);o.call(this,null,null,e),r.length&&this.setPipeline(r)};return i(t,o),t.prototype.setPipeline=function(){var e=s(arguments),t=this,r=!1,i=e[0],o=e[e.length-1];o=o.readable?o:null,i=i.writable?i:null;var a=function(){e[0].emit("error",Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){r||t.cork()}),n(e,function(e){if(t.removeListener("close",a),e)return t.destroy("premature close"===e.message?null:e);r=!0,!1===t._autoDestroy&&(t._autoDestroy=!0),t.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(o)},t};e.exports=a({autoDestroy:!1,destroy:!1}),e.exports.obj=a({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16}),e.exports.ctor=a},45665:e=>{"use strict";let t={};function r(e,r,n){n||(n=Error);class i extends n{constructor(e,t,n){super("string"==typeof r?r:r(e,t,n))}}i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,s,a;let l,u;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",o=" argument",(void 0===s||s>e.length)&&(s=e.length),e.substring(s-o.length,s)===o)u=`The ${e} ${l} ${n(t,"type")}`;else{let r=("number"!=typeof a&&(a=0),a+1>e.length||-1===e.indexOf(".",a))?"argument":"property";u=`The "${e}" ${r} ${l} ${n(t,"type")}`}return u+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},45402:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(57108),o=r(76324);r(19905)(u,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var l=s[a];u.prototype[l]||(u.prototype[l]=o.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||process.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},38840:(e,t,r)=>{"use strict";e.exports=i;var n=r(56366);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(19905)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},57108:(e,t,r)=>{"use strict";e.exports=k,k.ReadableState=S,r(94735).EventEmitter;var n,i,o,s,a,l=function(e,t){return e.listeners(t).length},u=r(21792),h=r(79428).Buffer,f=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},d=r(28354);i=d&&d.debuglog?d.debuglog("stream"):function(){};var c=r(26249),p=r(37744),y=r(81807).getHighWaterMark,g=r(45665).F,b=g.ERR_INVALID_ARG_TYPE,m=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(19905)(k,u);var _=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(45402),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new c,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=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=r(98333).I),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function k(e){if(n=n||r(45402),!(this instanceof k))return new k(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function R(e,t,r,n,o){i("readableAddChunk",t);var s,a,l,u,d,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?x(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,c);else{if(o||(s=c,a=t,h.isBuffer(a)||a instanceof f||"string"==typeof a||void 0===a||s.objectMode||(l=new b("chunk",["string","Buffer","Uint8Array"],a)),d=l),d)_(e,d);else if(c.objectMode||t&&t.length>0){if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===h.prototype||(u=t,t=h.from(u)),n)c.endEmitted?_(e,new v):A(e,c,t,!0);else if(c.ended)_(e,new m);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?A(e,c,t,!1):C(e,c)):A(e,c,t,!1)}}else n||(c.reading=!1,C(e,c))}return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&x(e)),C(e,t)}function T(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)return t.flowing&&t.length?t.buffer.head.data.length:t.length;if(e>t.highWaterMark){var r;t.highWaterMark=((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)}return e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)}function x(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function C(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){i("readable nexttick read 0"),e.read(0)}function B(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function N(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(D,t,e))}function D(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=p.destroy,k.prototype._undestroy=p.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=h.from(e,t),t=""),r=!0),R(this,e,t,!1,r)},k.prototype.unshift=function(e){return R(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){o||(o=r(98333).I);var t=new o(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},k.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?N(this):x(this),null;if(0===(e=T(e,r))&&r.ended)return 0===r.length&&N(this),null;var o=r.needReadable;return i("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&i("length less than watermark",o=!0),r.ended||r.reading?i("reading or ended",o=!1):o&&(i("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=T(n,r))),null===(t=e>0?L(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&N(this)),null!==t&&this.emit("data",t),t},k.prototype._read=function(e){_(this,new w("_read()"))},k.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===process.stdout||e===process.stderr?p:s;function s(){i("onend"),e.end()}n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",function t(o,l){i("onunpipe"),o===r&&l&&!1===l.hasUnpiped&&(l.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",c),e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",p),r.removeListener("data",h),u=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&a())});var a=function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&l(r,"data")&&(e.flowing=!0,j(r))};e.on("drain",a);var u=!1;function h(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!u&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){i("onerror",t),p(),e.removeListener("error",f),0===l(e,"error")&&_(e,t)}function d(){e.removeListener("finish",c),p()}function c(){i("onfinish"),e.removeListener("close",d),p()}function p(){i("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",d),e.once("finish",c),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=U(t.pipes,e);return -1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?x(this):n.reading||process.nextTick(P,this)),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=u.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(I,this),r},k.prototype.removeAllListeners=function(e){var t=u.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&process.nextTick(I,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(B,this,e))),e.paused=!1,this},k.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),(!r.objectMode||null!=o)&&(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===s&&(s=r(90031)),s(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=L,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===a&&(a=r(29892)),a(k,e,t)})},56366:(e,t,r)=>{"use strict";e.exports=h;var n=r(45665).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(45402);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,r){d(e,t,r)})}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(19905)(h,l),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new i("_transform()"))},h.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e)})}},76324:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(void 0),n=n.next}t.corkedRequestsFree.next=e})(t,e)}}e.exports=k,k.WritableState=S;var i,o,s={deprecate:r(11387)},a=r(21792),l=r(79428).Buffer,u=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=r(37744),f=r(81807).getHighWaterMark,d=r(45665).F,c=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,_=h.errorOrDestroy;function E(){}function S(e,t,o){i=i||r(45402),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new y;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,n?(process.nextTick(i,t),process.nextTick(C,e,r),e._writableState.errorEmitted=!0,_(e,t)):(i(t),e._writableState.errorEmitted=!0,_(e,t),C(e,r));else{var o=x(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?process.nextTick(A,e,r,o,i):A(e,r,o,i)}})(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function k(e){var t=this instanceof(i=i||r(45402));if(!t&&!o.call(k,this))return new k(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function R(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain")),t.pendingcb--,n(),C(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=Array(t.bufferedRequestCount),o=t.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,R(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,f=t.objectMode?1:l.length;if(R(e,t,!1,f,l,u,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final(function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),C(e,t)})}function C(e,t){var r=x(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(O,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(19905)(k,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===k&&e&&e._writableState instanceof S}})):o=function(e){return e instanceof this},k.prototype.pipe=function(){_(this,new g)},k.prototype.write=function(e,t,r){var n,i,o,s,a,h,f,d=this._writableState,p=!1,y=!d.objectMode&&(n=e,l.isBuffer(n)||n instanceof u);return y&&!l.isBuffer(e)&&(i=e,e=l.from(i)),("function"==typeof t&&(r=t,t=null),y?t="buffer":t||(t=d.defaultEncoding),"function"!=typeof r&&(r=E),d.ending)?(o=r,_(this,s=new w),process.nextTick(o,s)):(y||(a=e,h=r,null===a?f=new m:"string"==typeof a||d.objectMode||(f=new c("chunk",["string","Buffer"],a)),!f||(_(this,f),process.nextTick(h,f),0)))&&(d.pendingcb++,p=function(e,t,r,n,i,o){if(!r){var s,a,u=(s=n,a=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof s||(s=l.from(s,a)),s);n!==u&&(r=!0,i="buffer",n=u)}var h=t.objectMode?1:n.length;t.length+=h;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,h,n,i,o);return f}(this,d,y,e,t,r)),p},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;!e.corked||(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new p("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n,i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||(n=r,i.ending=!0,C(this,i),n&&(i.finished?process.nextTick(n):this.once("finish",n)),i.ended=!0,this.writable=!1),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=h.destroy,k.prototype._undestroy=h.undestroy,k.prototype._destroy=function(e,t){t(e)}},90031:(e,t,r)=>{"use strict";function n(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i,o=r(62098),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),h=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function c(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[h]=null,e[s]=null,e[a]=null,t(c(r,!1)))}}function y(e){process.nextTick(p,e)}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((n(i={get stream(){return this[d]},next:function(){var e,t,r=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[u])return Promise.resolve(c(void 0,!0));if(this[d].destroyed)return new Promise(function(e,t){process.nextTick(function(){r[l]?t(r[l]):e(c(void 0,!0))})});var i=this[h];if(i)t=new Promise((e=this,function(t,r){i.then(function(){if(e[u]){t(c(void 0,!0));return}e[f](t,r)},r)}));else{var o=this[d].read();if(null!==o)return Promise.resolve(c(o,!1));t=new Promise(this[f])}return this[h]=t,t}},Symbol.asyncIterator,function(){return this}),n(i,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){if(e){r(e);return}t(c(void 0,!0))})})}),i),g);e.exports=function(e){var t,r=Object.create(b,(n(t={},d,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,a,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,u,{value:e._readableState.endEmitted,writable:!0}),n(t,f,{value:function(e,t){var n=r[d].read();n?(r[h]=null,r[s]=null,r[a]=null,e(c(n,!1))):(r[s]=e,r[a]=t)},writable:!0}),t));return r[h]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];null!==t&&(r[h]=null,r[s]=null,r[a]=null,t(e)),r[l]=e;return}var n=r[s];null!==n&&(r[h]=null,r[s]=null,r[a]=null,n(c(void 0,!0))),r[u]=!0}),e.on("readable",y.bind(null,r)),r}},26249:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=o(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var s=r(79428).Buffer,a=r(28354).inspect,l=a&&a.custom||"inspect";e.exports=function(){var e;function t(){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n=s.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=o,s.prototype.copy.call(t,n,r),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return a(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}()},37744:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this},undestroy:function(){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)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},62098:(e,t,r)=>{"use strict";var n=r(45665).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),s=o||i,a=!1,o=function(){if(!a){a=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];s.apply(this,t)}};var s,a,l=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,h=function(){t.writable||d()},f=t._writableState&&t._writableState.finished,d=function(){u=!1,f=!0,l||o.call(t)},c=t._readableState&&t._readableState.endEmitted,p=function(){l=!1,c=!0,u||o.call(t)},y=function(e){o.call(t,e)},g=function(){var e;return l&&!c?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):u&&!f?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},b=function(){t.req.on("finish",d)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",d),t.on("abort",g),t.req?b():t.on("request",b)):u&&!t._writableState&&(t.on("end",h),t.on("close",h)),t.on("end",p),t.on("finish",d),!1!==r.error&&t.on("error",y),t.on("close",g),function(){t.removeListener("complete",d),t.removeListener("abort",g),t.removeListener("request",b),t.req&&t.req.removeListener("finish",d),t.removeListener("end",h),t.removeListener("close",h),t.removeListener("finish",d),t.removeListener("end",p),t.removeListener("error",y),t.removeListener("close",g)}}},29892:(e,t,r)=>{"use strict";function n(e,t,r,n,i,o,s){try{var a=e[o](s),l=a.value}catch(e){r(e);return}a.done?t(l):Promise.resolve(l).then(n,i)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var o=r(45665).F.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){if(t&&"function"==typeof t.next)s=t;else if(t&&t[Symbol.asyncIterator])s=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])s=t[Symbol.iterator]();else throw new o("iterable",["Iterable"],t);var s,a=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({objectMode:!0},r)),l=!1;function u(){return h.apply(this,arguments)}function h(){var e;return e=function*(){try{var e=yield s.next(),t=e.value;e.done?a.push(null):a.push((yield t))?u():l=!1}catch(e){a.destroy(e)}},(h=function(){var t=this,r=arguments;return new Promise(function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,l,"next",e)}function l(e){n(s,i,o,a,l,"throw",e)}a(void 0)})}).apply(this,arguments)}return a._read=function(){l||(l=!0,u())},a}},36946:(e,t,r)=>{"use strict";var n,i=r(45665).F,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e,t,i=arguments.length,h=Array(i),f=0;f<i;f++)h[f]=arguments[f];var d=(e=h).length&&"function"==typeof e[e.length-1]?e.pop():a;if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new o("streams");var c=h.map(function(e,i){var o,a,u,f,p,y,g=i<h.length-1;return o=i>0,u=a=function(e){t||(t=e),e&&c.forEach(l),g||(c.forEach(l),d(t))},f=!1,a=function(){f||(f=!0,u.apply(void 0,arguments))},p=!1,e.on("close",function(){p=!0}),void 0===n&&(n=r(62098)),n(e,{readable:g,writable:o},function(e){if(e)return a(e);p=!0,a()}),y=!1,function(t){if(!p&&!y){if(y=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();a(t||new s("pipe"))}}});return h.reduce(u)}},81807:(e,t,r)=>{"use strict";var n=r(45665).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=null!=t.highWaterMark?t.highWaterMark:i?t[r]:null;if(null!=o){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},21792:(e,t,r)=>{e.exports=r(27910)},52826:(e,t,r)=>{var n=r(27910);"disable"===process.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=r(57108)).Stream=n||t,t.Readable=t,t.Writable=r(76324),t.Duplex=r(45402),t.Transform=r(56366),t.PassThrough=r(38840),t.finished=r(62098),t.pipeline=r(36946))},95957:(e,t,r)=>{var n=r(79428),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},79652:e=>{e.exports=function(e){var t=e._readableState;return t?t.objectMode||"number"==typeof e._duplexState?e.read():e.read(function(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}(t)):null}},82887:(e,t,r)=>{var n=r(27910),i=r(28354),o=n.Transform;function s(e){if(!(this instanceof s))return new s(e);this._toSkip=e.skip,o.call(this,e)}i.inherits(s,o),s.prototype._transform=function(e,t,r){0==this._toSkip?this.push(e):this._toSkip>e.length?this._toSkip-=e.length:(this._toSkip!==e.length&&this.push(e.slice(this._toSkip)),this._toSkip=0),r()},e.exports=s},98333:(e,t,r)=>{"use strict";var n=r(95957).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 o(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=h,this.end=f,t=3;break;default:this.write=d,this.end=c;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e,0);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},11387:(e,t,r)=>{e.exports=r(28354).deprecate},14606:(e,t,r)=>{"use strict";r.d(t,{wc:()=>Y});var n=r(27910),i=r(44123),o=r(55511),s=r(94735),a=r(81630),l=r(55591),u=r(25152),h=r(82887);function f(e,t){let r;let n=[];e.on("data",e=>n.push(e)),e.on("end",()=>{r||(r=!0,t(null,Buffer.concat(n)))}),e.on("error",e=>{r||(r=!0,t(e))})}function d(e){let t;return new n.Transform({transform(r,n,i){t&&(r=Buffer.concat([t,r]));let o=Math.floor(r.length/e)*e;o?r.length>o?(t=r.slice(o),this.push(r.slice(0,o))):(t=void 0,this.push(r)):t=t?Buffer.concat([t,r]):r,i()},flush(e){t&&this.push(t),e()}})}function c(e){let t;let r=new Promise((e,r)=>{t=(t,n)=>{t?r(t):e(n)}});return e&&r.then(t=>e(null,t),e),[t,r]}var p=class{constructor(e){if(16!==e.length)throw Error("Wrong key length. Key must be 128bit.");this.key=e}encryptCBC(e){let t=Buffer.alloc(16,0),r=o.createCipheriv("aes-128-cbc",this.key,t).setAutoPadding(!1),n=Buffer.concat([r.update(e),r.final()]);return n.copy(e),n}decryptCBC(e){let t=Buffer.alloc(16,0),r=o.createDecipheriv("aes-128-cbc",this.key,t).setAutoPadding(!1),n=Buffer.concat([r.update(e),r.final()]);return n.copy(e),n}stringhash(e){let t=[0,0,0,0];for(let r=0;r<e.length;r+=4)if(e.length-r<4){let n=e.length-r;t[r/4&3]^=e.readIntBE(r,n)<<(4-n)*8}else t[r/4&3]^=e.readInt32BE(r);let r=Buffer.allocUnsafe(16);for(let e=0;e<4;e++)r.writeInt32BE(t[e],4*e,!0);let n=o.createCipheriv("aes-128-ecb",this.key,Buffer.alloc(0));for(let e=16384;e--;)r=n.update(r);let i=Buffer.allocUnsafe(8);return r.copy(i,0,0,4),r.copy(i,4,8,12),i}encryptECB(e){let t=o.createCipheriv("aes-128-ecb",this.key,Buffer.alloc(0)).setAutoPadding(!1).update(e);return t.copy(e),t}decryptECB(e){let t=o.createDecipheriv("aes-128-ecb",this.key,Buffer.alloc(0)).setAutoPadding(!1).update(e);return t.copy(e),t}},y=class{constructor(e,t,r=0){this.key=e.key,this.nonce=t.slice(0,8);let n=Buffer.alloc(16);this.nonce.copy(n,0),0!==r&&this.incrementCTRBuffer(n,r/16),this.encrypt=e=>(this.encryptCipher=o.createCipheriv("aes-128-ctr",this.key,n),this.encrypt=this._encrypt,this.encrypt(e)),this.decrypt=e=>(this.decryptCipher=o.createDecipheriv("aes-128-ctr",this.key,n),this.decrypt=this._decrypt,this.decrypt(e))}_encrypt(e){return this.encryptCipher.update(e).copy(e),e}_decrypt(e){return this.decryptCipher.update(e).copy(e),e}incrementCTRBuffer(e,t){let r;let n=e.length,i=n-1;for(;0!==t;)r=(t+e[i])%256,t=Math.floor((t+e[i])/256),e[i]=r,(i-=1)<0&&(i=n-1)}},g=class{constructor(e,t){this.key=e.key,this.nonce=t.slice(0,8),this.macCipher=o.createCipheriv("aes-128-ecb",this.key,Buffer.alloc(0)),this.posNext=this.increment=131072,this.pos=0,this.macs=[],this.mac=Buffer.alloc(16),this.nonce.copy(this.mac,0),this.nonce.copy(this.mac,8)}condense(){this.mac&&(this.macs.push(this.mac),this.mac=void 0);let e=Buffer.alloc(16,0);for(let t of this.macs){for(let r=0;r<16;r++)e[r]^=t[r];e=this.macCipher.update(e)}let t=Buffer.allocUnsafe(8);return t.writeInt32BE(e.readInt32BE(0)^e.readInt32BE(4),0),t.writeInt32BE(e.readInt32BE(8)^e.readInt32BE(12),4),t}update(e){for(let t=0;t<e.length;t+=16){for(let r=0;r<16;r++)this.mac[r]^=e[t+r];this.mac=this.macCipher.update(this.mac),this.checkBounding()}}checkBounding(){this.pos+=16,this.pos>=this.posNext&&(this.macs.push(Buffer.from(this.mac)),this.nonce.copy(this.mac,0),this.nonce.copy(this.mac,8),this.increment<1048576&&(this.increment+=131072),this.posNext+=this.increment)}};function b(e){return"string"==typeof e?w(e):e}function m(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function w(e){return Buffer.from(e,"base64")}function v(e){return new p(_(e).slice(0,16))}function _(e){let t=Buffer.alloc(32);e.copy(t);for(let e=0;e<16;e++)t.writeUInt8(t.readUInt8(e)^t.readUInt8(16+e,!0),e);return t}var E={},S=Math.log(2);function k(e){let t=[];for(;e-- >0;)t[e]=0;return t}function R(e){let t=e.length;if(e[t-1])return e;for(;t>1&&0===e[t-1];)t--;return e.slice(0,t)}function A(e,t){let r;let n=e.length,i=t.length;if(i>n)return[];if(i===n){if(t[i-1]>e[i-1])return[];if(1===i)return[e[0]-t[0]]}let o=[],s=0;for(r=0;r<i;r++)s+=e[r]-t[r],o[r]=0xfffffff&s,s>>=28;for(;r<n;r++)s+=e[r],o[r]=0xfffffff&s,s>>=28;return s?[]:R(o)}function T(e,t,r,n,i){let o=16383&r,s=r>>14,a=16383&n,l=n>>14,u=s*a+l*o,h=o*a+((16383&u)<<14)+e[t]+i;return e[t]=0xfffffff&h,i=s*l+(u>>14)+(h>>28)}function x(e,t){let r,n,i;let o=e.length,s=t.length,a=k(o+s-1);for(n=0;n<s;n++){for(i=0,r=0;i<o;i++)r=T(a,n+i,e[i],t[n],r);a[n+o]=r}return R(a)}function O(e,t,r){let n=0;for(;t>=0&&r-- >0;)n=0x10000000*n+e[t--];return n}function C(e,t){let r,n,i,o,s,a,l=e.length-1,u=t.length-1,h=l-u;if(l<u||l===u&&(e[l]<t[l]||l>0&&e[l]===t[l]&&e[l-1]<t[l-1]))return E.q=[0],E.mod=e,E;if(l===u&&O(e,u,2)/O(t,u,2)<4){for(r=e.concat(),n=0;0!==(i=A(r,t)).length;)r=i,n++;return E.q=[n],E.mod=r,E}let f=Math.floor(Math.log(t[u])/S)+1,d=28-f;r=e.concat();let c=t.concat();if(d){for(o=u;o>0;o--)c[o]=c[o]<<d&0xfffffff|c[o-1]>>f;for(c[0]=c[0]<<d&0xfffffff,r[l]&(0xfffffff<<f&0xfffffff)&&(r[++l]=0,h++),o=l;o>0;o--)r[o]=r[o]<<d&0xfffffff|r[o-1]>>f;r[0]=r[0]<<d&0xfffffff}let p=k(h+1),y=k(h).concat(c);for(;0!==(s=A(r,y)).length;)p[h]++,r=s;let g=c[u],b=O(c,u,2);for(o=l;o>u;o--){a=o-u-1,o>=r.length?p[a]=1:r[o]===g?p[a]=0xfffffff:p[a]=Math.floor(O(r,o,2)/g);let e=O(r,o,3);for(;p[a]*b>e;)p[a]--;y=y.slice(1),0===(s=A(r,x([p[a]],y))).length&&(p[a]--,s=A(r,x([p[a]],y))),r=s}if(d){for(o=0;o<r.length-1;o++)r[o]=r[o]>>d|r[o+1]<<f&0xfffffff;r[r.length-1]>>=d}return E.q=R(p),E.mod=R(r),E}function M(e,t){if(1===t.length){if(1===e.length)return[e[0]%t[0]];if(t[0]<16383)return[function(e,t){let r,n=0;for(let i=e.length-1;i>=0;i--)n=(((r=e[i])>>14)+(n<<14))%t,n=((16383&r)+(n<<14))%t;return n}(e,t[0])]}return C(e,t).mod}function I(e,t,r){let n;let i=e.length-(t.length<<1);if(i>0)return I(e.slice(0,i).concat(I(e.slice(i),t,r)),t,r);let o=t.length+1,s=t.length-1,a=x(e.slice(s),r).slice(o),l=e.slice(0,o),u=x(a,t).slice(0,o),h=A(l,u);0===h.length&&(l[o]=1,h=A(l,u));for(let e=0;0!==(n=A(h,t)).length;e++)if(h=n,e>=3)return I(h,t,r);return h}function P(e,t,r){var n;let i,o,s=e.concat(),a=t.length-1,l=2*r.length,u=k(l+1);for(u[l]=1,u=C(u,r).q,n=t[a],o=1,0!=(i=n>>>16)&&(n=i,o+=16),0!=(i=n>>8)&&(n=i,o+=8),0!=(i=n>>4)&&(n=i,o+=4),0!=(i=n>>2)&&(n=i,o+=2),0!=(i=n>>1)&&(n=i,o+=1),l=o-2;a>=0;a--){for(;l>=0;l-=1)s=I(function(e){let t,r;let n=e.length,i=k(2*n),o=0;for(t=0;t<n;t++){for(o=T(i,2*t,e[t],e[t],0),r=t+1;r<n;r++)o=T(i,t+r,2*e[r],e[t],o);i[t+n]=o}return R(i)}(s),r,u),t[a]&1<<l&&(s=I(x(s,e),r,u));l=27}return s}function B(e){let t,r=1,n=[0],i=0,o=256,s=e.length;if(s<2)return 0;let a=(s-2)*8,l=256*e.charCodeAt(0)+e.charCodeAt(1);if(l>a||l<a-8)return 0;for(let l=0;l<a;l++)(o<<=1)>255&&(o=1,t=e.charCodeAt(--s)),r>0xfffffff&&(r=1,n[++i]=0),t&o&&(n[i]|=r),r<<=1;return n}function j(e,t){let r=function(e){let t,r=1,n=0,i=[0],o=1,s=0,a=28*e.length,l="";for(t=0;t<a;t++)e[n]&r&&(i[s]|=o),(o<<=1)>255&&(o=1,i[++s]=0),(r<<=1)>0xfffffff&&(r=1,n++);for(;s>=0&&0===i[s];)s--;for(t=0;t<=s;t++)l=String.fromCharCode(i[t])+l;return l}(function(e,t,r,n,i){let o=P(M(e,r),M(t,A(r,[1])),r),s=P(M(e,n),M(t,A(n,[1])),n),a=A(s,o);return 0===a.length?(a=M(x(a=A(o,s),i),n),a=A(n,a)):a=M(x(a,i),n),function e(t,r){let n=t.length,i=r.length;if(n<i)return e(r,t);let o=[],s=0,a=0;for(;a<i;a++)s+=t[a]+r[a],o[a]=0xfffffff&s,s>>>=28;for(;a<n;a++)s+=t[a],o[a]=0xfffffff&s,s>>>=28;return s&&(o[a]=s),o}(x(a,r),o)}(B(e.toString("binary")),t[2],t[0],t[1],t[3]));return Buffer.from(r,"binary")}var L=globalThis.AbortController||u,N={1:"EINTERNAL (-1): An internal error has occurred. Please submit a bug report, detailing the exact circumstances in which this error occurred.",2:"EARGS (-2): You have passed invalid arguments to this command.",3:"EAGAIN (-3): A temporary congestion or server malfunction prevented your request from being processed. No data was altered. Retried 4 times.",4:"ERATELIMIT (-4): You have exceeded your command weight per time quota. Please wait a few seconds, then try again (this should never happen in sane real-life applications).",5:"EFAILED (-5): The upload failed. Please restart it from scratch.",6:"ETOOMANY (-6): Too many concurrent IP addresses are accessing this upload target URL.",7:"ERANGE (-7): The upload file packet is out of range or not starting and ending on a chunk boundary.",8:"EEXPIRED (-8): The upload target URL you are trying to access has expired. Please request a fresh one.",9:"ENOENT (-9): Object (typically, node or user) not found. Wrong password?",10:"ECIRCULAR (-10): Circular linkage attempted",11:"EACCESS (-11): Access violation (e.g., trying to write to a read-only share)",12:"EEXIST (-12): Trying to create an object that already exists",13:"EINCOMPLETE (-13): Trying to access an incomplete resource",14:"EKEY (-14): A decryption operation failed (never returned by the API)",15:"ESID (-15): Invalid or expired user session, please relogin",16:"EBLOCKED (-16): User blocked",17:"EOVERQUOTA (-17): Request over quota",18:"ETEMPUNAVAIL (-18): Resource temporarily not available, please try again later",19:"ETOOMANYCONNECTIONS (-19)",24:"EGOINGOVERQUOTA (-24)",25:"EROLLEDBACK (-25)",26:"EMFAREQUIRED (-26): Multi-Factor Authentication Required",27:"EMASTERONLY (-27)",28:"EBUSINESSPASTDUE (-28)",29:"EPAYWALL (-29): ODQ paywall state",400:"ETOOERR (-400)",401:"ESHAREROVERQUOTA (-401)"},D=new a.Agent({keepAlive:!0}),U=new l.Agent({keepAlive:!0}),q=class e extends s.EventEmitter{constructor(t,r={}){super(),this.keepalive=t,this.counterId=Math.random().toString().substr(2,10),this.gateway=r.gateway||"https://g.api.mega.co.nz/";let n=e.getShouldAvoidUA();this.userAgent=null===r.userAgent||n?null:`${r.userAgent||""} megajs/1.3.4`.trim(),this.httpAgent=r.httpAgent||D,this.httpsAgent=r.httpsAgent||U,this.fetch=r.fetch||this.defaultFetch.bind(this),this.closed=!1}async defaultFetch(t,r){if(r||(r={}),r.agent||(r.agent=e=>"http:"===e.protocol?this.httpAgent:this.httpsAgent),this.userAgent&&(r.headers||(r.headers={}),r.headers["user-agent"]||(r.headers["user-agent"]=this.userAgent)),!e.fetchModule){if("function"==typeof globalThis.fetch)e.fetchModule=globalThis.fetch.bind(globalThis);else throw Error("globalThis.fetch not found!")}return e.fetchModule(t,r)}request(e,t,r=0){let n="sml"===e.a;if(this.closed&&!n)throw Error("API is closed");let[i,o]=c(t),s={id:(this.counterId++).toString()};return this.sid&&(s.sid=this.sid),"object"==typeof e._querystring&&(Object.assign(s,e._querystring),delete e._querystring),this.fetch(`${this.gateway}cs?${new URLSearchParams(s)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([e])}).then(F).then(t=>{let o;if(!this.closed||n){if(!t)return i(Error("Empty response"));if(t.length&&(t=t[0]),"number"==typeof t&&t<0){if(-3===t&&r<4)return setTimeout(()=>{this.request(e,i,r+1)},1e3*Math.pow(2,r+1));o=Error(N[-t])}else this.keepalive&&t&&t.sn&&this.pull(t.sn);i(o,t)}}).catch(e=>{i(e)}),o}pull(t,r=0){let n=new L,i=e.handleForceHttps()?1:0;this.sn=n,this.fetch(`${this.gateway}sc?${new URLSearchParams({sn:t,ssl:i,sid:this.sid})}`,{method:"POST",signal:n.signal}).then(F).then(e=>{if(this.sn=void 0,!this.closed){if("number"==typeof e&&e<0){if(-3===e&&r<4)return setTimeout(()=>{this.pull(t,r+1)},1e3*Math.pow(2,r+1));this.emit("error",Error(N[-e]))}e.w?this.wait(e.w,t):e.sn&&(e.a&&this.emit("sc",e.a),this.pull(e.sn))}}).catch(W).catch(e=>{this.emit("error",e)})}wait(e,t){let r=new L;this.sn=r,this.fetch(e,{method:"POST",signal:r.signal}).catch(()=>{}).then(()=>{this.sn=void 0,this.pull(t)})}close(){this.sn&&this.sn.abort(),this.closed=!0}static getGlobalApi(){return e.globalApi||(e.globalApi=new e),e.globalApi}static handleForceHttps(e){return null!=e?e:!!globalThis.isSecureContext}static getShouldAvoidUA(){let e;try{globalThis.Headers()}catch(t){e=t.message}return!(38===(globalThis.fetch+"").length&&e.includes("Headers"))}};function F(e){if("Server Too Busy"===e.statusText)return -3;if(!e.ok)throw Error(`Server returned error: ${e.statusText}`);return e.json()}function W(e){if("AbortError"!==e.name)throw e}var $=["","red","orange","yellow","green","blue","purple","grey"],H=class e extends s.EventEmitter{constructor(e){if(super(),this.checkConstructorArgument(e.downloadId),this.checkConstructorArgument(e.key),this.checkConstructorArgument(e.loadedFile),this.downloadId=e.downloadId,this.key=e.key?b(e.key):null,this.type=e.directory?1:0,this.directory=!!e.directory,this.directory&&!this.children&&(this.children=[]),this.api=e.api||q.getGlobalApi(),!(this.api instanceof q))throw Error("api must be a instance of API");this.loadedFile=e.loadedFile}get createdAt(){if(void 0!==this.timestamp)return 1e3*this.timestamp}checkConstructorArgument(e){if("string"==typeof e&&!/^[\w-]+$/.test(e))throw Error(`Invalid argument: "${e}"`)}loadMetadata(e,t){if(this.size=t.s||0,this.timestamp=t.ts||0,this.type=t.t,this.directory=!!t.t,this.owner=t.u,this.name=null,this.directory&&!this.children&&(this.children=[]),!e||!t.k)return;let r=t.k.split(":");this.key=b(r[r.length-1]),this.key.length<=32?e.decryptECB(this.key):this.storage?this.key=this.storage.decryptRsaKey(this.key).slice(0,this.directory?16:32):this.key=null,t.a&&this.decryptAttributes(t.a)}decryptAttributes(t){if(!this.key)return this;t=w(t),v(this.key).decryptCBC(t);let r=e.unpackAttributes(t);r&&this.parseAttributes(r)}parseAttributes(e){this.attributes=e,this.name=e.n,this.label=$[e.lbl||0],this.favorited=!!e.fav}loadAttributes(t){let[r,n]=c(t),i=this.directory?{a:"f",c:1,ca:1,r:1,_querystring:{n:this.downloadId}}:{a:"g",p:this.downloadId};return this.api.request(i,(t,n)=>{if(t)return r(t);if(this.directory){let t=Object.create(null),i=n.f,o=i.find(e=>e.k&&e.h===e.k.split(":")[0]),s=this.key?new p(this.key):null;for(let r of(this.nodeId=o.h,this.timestamp=o.ts,t[o.h]=this,i)){if(r===o)continue;let n=new e(r,this.storage);n.loadMetadata(s,r),n.downloadId=[this.downloadId,r.h],t[r.h]=n}for(let e of i){let r=t[e.p];if(r){let n=t[e.h];r.children.push(n),n.parent=r}}if(this.loadMetadata(s,o),this.key&&!this.attributes)return r(Error("Attributes could not be decrypted with provided key."));if(this.loadedFile){let e=t[this.loadedFile];void 0===e?r(Error("Node (file or folder) not found in folder")):r(null,e)}else r(null,this)}else{if(this.size=n.s,this.decryptAttributes(n.at),this.key&&!this.attributes)return r(Error("Attributes could not be decrypted with provided key."));r(null,this)}}),n}download(t,r){"function"==typeof t&&(r=t,t={}),t||(t={});let o=t.start||0,s=t.returnCiphertext?o:o-o%16,a=t.end||null,l=t.maxConnections||4,u=t.initialChunkSize||131072,c=t.chunkSizeIncrement||131072,p=t.maxChunkSize||1048576,m={a:"g",g:1,ssl:q.handleForceHttps(t.forceHttps)?2:0};if(this.nodeId?m.n=this.nodeId:Array.isArray(this.downloadId)?(m._querystring={n:this.downloadId[0]},m.n=this.downloadId[1]):m.p=this.downloadId,this.directory)throw Error("Can't download: folder download isn't supported");if(!this.key&&!t.returnCiphertext)throw Error("Can't download: key isn't defined");let w=this.key&&!t.returnCiphertext?function(e,t={}){let r=t.start||0;if(0!==r&&(t.disableVerification=!0),r%16!=0)throw Error("start argument of megaDecrypt must be a multiple of 16");(e=b(e))instanceof Buffer||(e=Buffer.from(e));let o=v(e),s=new y(o,e.slice(16),r),a=!t.disableVerification&&new g(o,e.slice(16)),l=new n.Transform({transform(e,t,r){let n=s.decrypt(e);a&&a.update(n),r(null,Buffer.from(n))},flush(r){if(a&&(l.mac=a.condense()),!t.disableVerification&&!l.mac.equals(e.slice(24))){r(Error("MAC verification failed"));return}r()}});return l=i(d(16),l)}(this.key,{start:s,disableVerification:0!==s||null!==a}):new n.PassThrough,_=s===o?w:w.pipe(new h({skip:o-s})),E=t.handleRetries||e.defaultHandleRetries;return this.api.request(m,(e,t)=>{if(e)return _.emit("error",e);if("string"!=typeof t.g||"http"!==t.g.substr(0,4))return _.emit("error",Error("MEGA servers returned an invalid response, maybe caused by rate limit"));if(0===t.s)return _.end();if(a||(a=t.s-1),o>a)return _.emit("error",Error("You can't download past the end of the file."));function r(e){if(200!==e.status){if(509===e.status){let t=e.headers.get("x-mega-time-left"),r=Error("Bandwidth limit reached: "+t+" seconds until it resets");r.timeLimit=t,_.emit("error",r);return}_.emit("error",Error("MEGA returned a "+e.status+" status code"))}}function n(e){_.emit("error",e)}let i=0;if(_.on("data",e=>{i+=e.length,_.emit("progress",{bytesLoaded:i,bytesTotal:t.s})}),1===l){let e=new L;_.on("close",()=>{e.abort()}),this.api.fetch(t.g+"/"+s+"-"+a,{signal:e.signal}).then(e=>{r(e);let t=e.body;if(t){if(t.pipe)e.body.pipe(w);else if(t.getReader){let e=t.getReader(),r=({done:t,value:n})=>{if(!t)return w.write(n),e.read().then(r);w.end()};e.read().then(r)}else throw Error("Single connection streaming not supported by fetch")}else throw Error("Missing response body")}).catch(n);return}let h={},f=0,d=0,y=!1,g=s,b=u;_.on("error",()=>{y=!0}),_.on("close",()=>{y=!0});let m=()=>{if(g>a){y=!0,f===d&&w.end();return}let e=g,i=Math.min(a,e+b-1),o=f++,s=0,l=()=>{s++,this.api.fetch(t.g+"/"+e+"-"+i).then(e=>(r(e),e.arrayBuffer())).then(e=>{let t=Buffer.from(e);h[o]=t,d===o&&v()},e=>{E(s,e,e=>{e?n(e):l()})})};l(),g=i+1,b<p&&(b+=c)},v=()=>{let e;for(;;){let t=h[d];if(!t||(e=!w.write(t),delete h[d],d++,e))break}y&&f===d&&w.end(),e?w.once("drain",v):m()};for(let e=0;e<l;e++)m()}),r&&f(_,r),_}downloadBuffer(e,t){let[r,n]=c(t);return this.download(e,r),n}link(e,t){1==arguments.length&&"function"==typeof e&&(t=e,e={noKey:!1});let[r,n]=c(t);"boolean"==typeof e&&(e={noKey:e});let i=`https://mega.nz/${this.directory?"folder":"file"}/${this.downloadId}`;return!e.noKey&&this.key&&(i+=`#${m(this.key)}`),!e.noKey&&this.loadedFile&&(i+=`/file/${this.loadedFile}`),r(null,i),n}find(e,t){if(!this.children)throw Error("You can only call .find on directories");if("string"==typeof e){let t=e;e=e=>e.name===t}else if(Array.isArray(e)){let t=e;e=e=>t.includes(e.name)}if("function"!=typeof e)throw Error("Query must be a file matching function, an array of valid file names or a string with a file name");return this.children.reduce((r,n)=>r||(e(n)?n:n.children&&t?n.find(e,t):null),null)}filter(e,t){if(!this.children)throw Error("You can only call .filter on directories");if("string"==typeof e){let t=e;e=e=>e.name===t}else if(Array.isArray(e)){let t=e;e=e=>t.includes(e.name)}if("function"!=typeof e)throw Error("Query must be a file matching function, an array of valid file names or a string with a file name");return this.children.reduce((r,n)=>(e(n)&&r.push(n),n.children&&t)?r.concat(n.filter(e,t)):r,[])}navigate(e){if(!this.children)throw Error("You can only call .navigate on directories");if("string"==typeof e)e=e.split("/");else if(!Array.isArray(e))throw Error("Query must be an array or a string");return e.reduce((e,t)=>e&&e.children&&e.children.find(e=>e.name===t),this)}static fromURL(t,r={}){if("object"==typeof t)return new e(t);let n=new URL(t);if("mega.nz"!==n.hostname&&"mega.co.nz"!==n.hostname)throw Error("Invalid URL: wrong hostname");if(!n.hash)throw Error("Invalid URL: no hash");if(null!==n.pathname.match(/\/(file|folder)\//)){let t=n.hash.substr(1).split("/file/"),i=n.pathname.substring(n.pathname.lastIndexOf("/")+1,n.pathname.length+1),o=t[0];if(i&&!o||!i&&o)throw Error("Invalid URL: too few arguments");return new e({downloadId:i,key:o,directory:n.pathname.indexOf("/folder/")>=0,loadedFile:t[1],...r})}{let t=n.hash.split("!");if("#"!==t[0]&&"#F"!==t[0])throw Error("Invalid URL: format not recognized");if(t.length<=1)throw Error("Invalid URL: too few arguments");if(t.length>=("#"===t[0]?4:5))throw Error("Invalid URL: too many arguments");return new e({downloadId:t[1],key:t[2],directory:"#F"===t[0],loadedFile:t[3],...r})}}static unpackAttributes(e){let t=0;for(;t<e.length&&e.readUInt8(t);)t++;if('MEGA{"'===(e=e.slice(0,t).toString()).substr(0,6))try{return JSON.parse(e.substr(4))}catch(e){}}static defaultHandleRetries(e,t,r){e>8?r(t):setTimeout(r,1e3*Math.pow(2,e))}},K={},V=class e extends H{constructor(e,t){if(super(e),this.storage=t,this.api=t.api,this.nodeId=e.h,this.timestamp=e.ts,this.type=e.t,this.directory=!!this.type,this.directory&&!this.children&&(this.children=[]),e.k){let r=e.k.split("/"),n=t.aes;for(let i of r){let r=i.split(":")[0];if(r===t.user){e.k=i;break}let o=t.shareKeys[r];if(o){e.k=i,(n=K[r])||(n=K[r]=new p(o));break}}this.loadMetadata(n,e)}}loadAttributes(){throw Error("This is not needed for files loaded from logged in sessions")}mkdir(t,r){if(!this.directory)throw Error("node isn't a directory");let[n,i]=c(r);if("string"==typeof t&&(t={name:t}),t.attributes||(t.attributes={}),t.name&&(t.attributes.n=t.name),!t.attributes.n)throw Error("file name is required");if(t.target||(t.target=this),t.key||(t.key=Buffer.from(globalThis.crypto.getRandomValues(new Uint8Array(16)))),16!==t.key.length)throw Error("wrong key length, must be 128bit");let o=t.key,s=e.packAttributes(t.attributes);v(o).encryptCBC(s);let a=Buffer.from(o);this.storage.aes.encryptECB(a);let l={a:"p",t:t.target.nodeId?t.target.nodeId:t.target,n:[{h:"xxxxxxxx",t:1,a:m(s),k:m(a)}]},u=z(this.storage.shareKeys,this);return u.length>0&&(l.cr=G(this.storage,[{nodeId:"xxxxxxxx",key:o}],u)),this.api.request(l,(e,t)=>{if(e)return n(e);let r=this.storage._importFile(t.f[0]);this.storage.emit("add",r),n(null,r)}),i}upload(t,r,n){let i;if(!this.directory)throw Error("node is not a directory");2==arguments.length&&"function"==typeof r&&([n,r]=[r,null]);let[o,s]=c(n);if("string"==typeof t&&(t={name:t}),t.attributes||(t.attributes={}),t.name&&(t.attributes.n=t.name),!t.attributes.n)throw Error("File name is required.");if(!("number"==typeof t.size&&t.size>=0)&&!(r&&"function"!=typeof r.pipe&&"number"==typeof r.length)&&!t.allowUploadBuffering)throw Error("Specify a file size or set allowUploadBuffering to true");t.target||(t.target=this);let a=b(t.key);a||(a=globalThis.crypto.getRandomValues(new Uint8Array(24))),a instanceof Buffer||(a=Buffer.from(a));let l=t.uploadCiphertext?32:24;if(a.length!==l)throw Error("Wrong key length. Key must be 192bit");t.uploadCiphertext&&(i=a,a=_(a).slice(0,24)),t.key=a;let u=[],h=(r,n,s,a)=>{if(r)return d(r);if(!s||0===s.length){d(Error("Server returned a invalid response while uploading"));return}let l=Number(s.toString());if(l<0){d(Error("Server returned error "+l+" while uploading"));return}if(u[n]=s,0!==n||i||(i=a.key),t.thumbnailImage&&!u[1]||t.previewImage&&!u[2]||!u[0])return;let h=e.packAttributes(t.attributes);v(i).encryptCBC(h);let c=Buffer.from(i);this.storage.aes.encryptECB(c);let p={h:m(u[0]),t:0,a:m(h),k:m(c)};1!==u.length&&(p.fa=u.slice(1).map((e,t)=>t+"*"+m(e)).filter(e=>e).join("/"));let y={a:"p",t:t.target.nodeId?t.target.nodeId:t.target,n:[p]},g=z(this.storage.shareKeys,this);g.length>0&&(y.cr=G(this.storage,[{nodeId:p.h,key:i}],g)),this.api.request(y,(e,t)=>{if(e)return d(e);let r=this.storage._importFile(t.f[0]);this.storage.emit("add",r),f.emit("complete",r),o&&o(null,r)})};t.thumbnailImage&&this._uploadAttribute(t,t.thumbnailImage,1,h),t.previewImage&&this._uploadAttribute(t,t.previewImage,2,h);let f=this._upload(t,r,0,h);function d(e){f.listenerCount("error")?f.emit("error",e):o(e)}return f.complete=s,f}_upload(e,t,r,o){let s=e.uploadCiphertext?new n.PassThrough:function(e,t={}){let r=t.start||0;if(0!==r)throw Error("Encryption cannot start midstream otherwise MAC verification will fail.");(e=b(e))||(e=globalThis.crypto.getRandomValues(new Uint8Array(24))),e instanceof Buffer||(e=Buffer.from(e));let o=new n.Transform({transform(e,t,r){l.update(e);let n=a.encrypt(e);r(null,Buffer.from(n))},flush(t){o.mac=l.condense(),o.key=function(e,t){let r=Buffer.alloc(32);e.copy(r),t.copy(r,24);for(let e=0;e<16;e++)r.writeUInt8(r.readUInt8(e)^r.readUInt8(16+e),e);return r}(e,o.mac),t()}});if(24!==e.length)throw Error("Wrong key length. Key must be 192bit.");let s=new p(e.slice(0,16)),a=new y(s,e.slice(16),r),l=new g(s,e.slice(16));return o=i(d(16),o)}(e.key),a=s,l=e.size;return t&&"function"!=typeof t.pipe&&(l=t.length,a.end(t)),null!=l?(0===l&&s.end(),this._uploadWithSize(a,l,s,r,e,o)):a=function(e,t){let r=[],i=0;return new n.Transform({transform(e,t,n){r.push(e),i+=e.length,n()},flush(n){t(i),function t(){for(;r.length;)if(!e.write(r.shift()))return e.once("drain",t);e.end(),n()}()}})}(a,t=>{this._uploadWithSize(a,t,s,r,e,o)}),t&&"function"==typeof t.pipe&&t.pipe(a),a}_uploadAttribute(e,t,r,i){let o=(t,o)=>{if(t)return i(t);let s=o.length,a=16*Math.ceil(s/16)-s;0!==a&&(o=Buffer.concat([o,Buffer.alloc(a)])),(e.handle?v(e.key):new p(e.key.slice(0,16))).encryptCBC(o);let l=new n.PassThrough;l.end(o),this._uploadWithSize(l,o.length,l,r,e,i)};if(t instanceof Buffer){o(null,t);return}f(t,o)}_uploadWithSize(e,t,r,n,i,o){let s,a,l,u,h;let f=q.handleForceHttps(i.forceHttps)?2:0,d=0===n?{a:"u",ssl:f,s:t,ms:0,r:0,e:0,v:2}:{a:"ufa",ssl:f,s:t};i.handle&&(d.h=i.handle);let c=0===n?i.initialChunkSize||131072:t,p=i.chunkSizeIncrement||131072,y=i.maxChunkSize||1048576,g=i.maxConnections||4,b=i.handleRetries||H.defaultHandleRetries,m=c,w=0,v=!1,_=0,E=0,S=()=>{u=Math.min(m,t-_),a=Buffer.alloc(u),w++,m<y&&(m+=p),h=0,s&&(s.copy(a),h=Math.min(s.length,u),s=s.length>u?s.slice(u):null),h===u?k():(v=!0,A())},k=()=>{let i=_,s=a,h=0,f=()=>{h++,this.api.fetch(l+"/"+(0===n?i:n-1),{method:"POST",body:s,headers:{"content-length":s.length}}).then(e=>{if(200!==e.status)throw Error("MEGA returned a "+e.status+" status code");return e.arrayBuffer()}).then(i=>{E+=s.length,e.emit("progress",{bytesLoaded:R,bytesUploaded:E,bytesTotal:t});let a=Buffer.from(i);a.length>0?(r.end(),process.nextTick(()=>{o(null,n,a,r)})):_<t&&!v&&S()},t=>{b(h,t,t=>{t?e.emit("error",t):f()})})};f(),a=null,(_+=u)<t&&!v&&w<g&&S()},R=0,A=()=>{for(;;){let e=r.read();if(null===e){r.once("readable",A);break}if(R+=e.length,e.copy(a,h),(h+=e.length)>=u){v=!1,s=e.slice(e.length-(h-u)),k();break}}};r.on("end",()=>{t&&R!==t&&e.emit("error",Error("Specified data size does not match: "+t+" !== "+R))}),this.api.request(d,(e,t)=>{if(e)return o(e);l=t.p,S()})}uploadAttribute(e,t,r){let[n,i]=c(r);if("string"==typeof e&&(e=["thumbnail","preview"].indexOf(e)),0!==e&&1!==e)throw Error("Invalid attribute type");return this._uploadAttribute({key:this.key,handle:this.nodeId},t,e+1,(t,r,i,o)=>{if(t)return n(t);let s={a:"pfa",n:this.nodeId,fa:e+"*"+m(i)};this.api.request(s,(e,t)=>{if(e)return n(e);n(null,this)})}),i}delete(e,t){return("function"==typeof e&&(t=e,e=void 0),void 0===e&&(e=this.parent===this.storage.trash),e)?this.api.request({a:"d",n:this.nodeId},t):this.moveTo(this.storage.trash,t)}moveTo(e,t){if("string"==typeof e&&(e=this.storage.files[e]),!(e instanceof H))throw Error("target must be a folder or a nodeId");let r={a:"m",n:this.nodeId,t:e.nodeId},n=z(this.storage.shareKeys,e);return n.length>0&&(r.cr=G(this.storage,[this],n)),this.api.request(r,t)}setAttributes(t,r){let[n,i]=c(r);Object.assign(this.attributes,t);let o=e.packAttributes(this.attributes);return v(this.key).encryptCBC(o),this.api.request({a:"a",n:this.nodeId,at:m(o)},e=>{this.parseAttributes(this.attributes),n(e)}),i}rename(e,t){return this.setAttributes({n:e},t)}setLabel(e,t){if("string"==typeof e&&(e=$.indexOf(e)),"number"!=typeof e||Math.floor(e)!==e||e<0||e>7)throw Error("label must be a integer between 0 and 7 or a valid label name");return this.setAttributes({lbl:e},t)}setFavorite(e,t){return this.setAttributes({fav:e?1:0},t)}link(e,t){1==arguments.length&&"function"==typeof e&&(t=e,e={noKey:!1}),"boolean"==typeof e&&(e={noKey:e}),e||(e={});let r=e.__folderKey;if(this.directory&&!r)return this.shareFolder(e,t);let[n,i]=c(t);return this.api.request({a:"l",n:this.nodeId},(t,i)=>{if(t)return n(t);let o=`https://mega.nz/${r?"folder":"file"}/${i}`;!e.noKey&&this.key&&(o+=`#${m(r||this.key)}`),n(null,o)}),i}shareFolder(e,t){if(!this.directory)throw Error("node isn't a folder");let r=this.nodeId,n=this.storage.shareKeys[r];if(n)return this.link(Object.assign({__folderKey:n},e),t);let i=b(e.key);i||(i=globalThis.crypto.getRandomValues(new Uint8Array(16))),i instanceof Buffer||(i=Buffer.from(i));let[o,s]=c(t);if(16!==i.length)return o(Error("share key must be 16 byte / 22 characters")),s;this.storage.shareKeys[r]=i;let a=Buffer.from(r+r);this.storage.aes.encryptECB(a);let l={a:"s2",n:r,s:[{u:"EXP",r:0}],ok:m(this.storage.aes.encryptECB(Buffer.from(i))),ha:m(a),cr:G(this.storage,this)};return this.api.request(l,t=>{if(t)return o(t);this.link(Object.assign({__folderKey:i},e),o)}),s}unshare(e){return this.directory?this.unshareFolder(e):this.api.request({a:"l",n:this.nodeId,d:1},e)}unshareFolder(e){if(!this.directory)throw Error("node isn't a folder");return delete this.storage.shareKeys[this.nodeId],this.api.request({a:"s2",n:this.nodeId,s:[{u:"EXP",r:""}]},e)}importFile(t,r){let[n,i]=c(r);if(!this.directory)throw Error("importFile can only be called on directories");if("string"==typeof t&&(t=H.fromURL(t)),!(t instanceof H))throw Error("First argument of importFile should be a File or a URL string");if(!t.key)return n(Error("Can't import files without encryption keys")),i;let o=(t,r)=>{if(t)return n(t);let i=e.packAttributes(r.attributes);v(r.key).encryptCBC(i);let o=Array.isArray(r.downloadId)?r.downloadId[1]:r.downloadId,s={a:"p",t:this.nodeId,n:[{ph:o,t:0,a:m(i),k:m(this.storage.aes.encryptECB(r.key))}]};this.api.request(s,(e,t)=>{if(e)return n(e);let r=this.storage._importFile(t.f[0]);this.storage.emit("add",r),n(null,r)})};return t.attributes?o(null,t):t.loadAttributes(o),i}static packAttributes(e){let t=JSON.stringify(e);t=Buffer.from(`MEGA${t}`);let r=Buffer.alloc(16*Math.ceil(t.length/16));return t.copy(r),r}};function G(e,t,r){let n=e.shareKeys;Array.isArray(t)||(t=function e(t){return[t].concat((t.children||[]).map(e).reduce((e,t)=>e.concat(t),[]))}(t)),r||(r=t.map(e=>z(n,e)).reduce((e,t)=>e.concat(t)).filter((e,t,r)=>t===r.indexOf(e)));let i=[r,t.map(e=>e.nodeId),[]];for(let e=r.length;e--;){let o=new p(n[r[e]]);for(let r=t.length;r--;){let n=Buffer.from(t[r].key);n&&(32===n.length||16===n.length)&&i[2].push(e,r,m(o.encryptECB(n)))}}return i}function z(e,t){let r=t.nodeId,n=t.parent,i=[];return e[r]&&i.push(r),n?i.concat(z(e,n)):i}var Y=class e extends s.EventEmitter{constructor(e,t){super(),1==arguments.length&&"function"==typeof e&&(t=e,e={});let[r,n]=c(t);this.ready=n,e.keepalive=void 0===e.keepalive||!!e.keepalive,e.autoload=void 0===e.autoload||!!e.autoload,e.autologin=void 0===e.autologin||!!e.autologin,this.api=new q(e.keepalive,e),this.files={},this.options=e,this.status="closed",e.autologin?this.login(r):process.nextTick(()=>{r(null,this)})}login(e){let[t,r]=c(e);if("string"!=typeof this.options.email)return process.nextTick(()=>{t(Error("starting a session without credentials isn't supported"))}),r;let n=()=>{this.status="ready",t(null,this),this.emit("ready",this)},i=e=>{this.api.request({a:"ug"},(t,r)=>{if(t)return e(t);this.name=r.name,this.user=r.u,this.options.autoload?this.reload(!0,t=>{if(t)return e(t);n()}):n()})};this.email=this.options.email.toLowerCase();let s=()=>{let e=new p(function(e){let t,r,n;let i=Buffer.from([147,196,103,227,125,176,199,164,209,190,63,129,1,82,203,86]);for(n=65536;n--;)for(r=0;r<e.length;r+=16){let n=Buffer.alloc(16);for(t=0;t<16;t+=4)t+r<e.length&&e.copy(n,t,t+r,t+r+4);i=o.createCipheriv("aes-128-ecb",n,Buffer.alloc(0)).setAutoPadding(!1).update(i)}return i}(Buffer.from(this.options.password))),t=m(e.stringhash(Buffer.from(this.email)));l({a:"us",user:this.email,uh:t},e)},a=e=>{!function(e,t,r){let n=Buffer.from(t.s,"base64");o.pbkdf2(e,n,1e5,32,"sha512",r)}(Buffer.from(this.options.password),e,(e,r)=>{if(e)return t(e);let n=new p(r.slice(0,16)),i=m(r.slice(16));l({a:"us",user:this.email,uh:i},n)})},l=(e,r)=>{delete this.options.password,this.options.secondFactorCode&&(e.mfa=this.options.secondFactorCode.toString()),this.api.request(e,(e,n)=>{if(e)return t(e);this.key=b(n.k),r.decryptECB(this.key),this.aes=new p(this.key);let o=b(n.csid),s=function(e){let t=[];for(let r=0;r<4;r++){let n=(256*e[0]+e[1]+7>>3)+2;if(t[r]=B(e.toString("binary").substr(0,n)),"number"==typeof t[r]){if(4!==r||e.length>=16)return!1;break}e=e.slice(n)}return t}(this.aes.decryptECB(b(n.privk)));if(!s)throw Error("invalid credentials");let a=m(j(o,s).slice(0,43));this.api.sid=this.sid=a,this.RSAPrivateKey=s,i(t)})};return this.api.request({a:"us0",user:this.email},(e,r)=>e?t(e):1===r.v?s():2===r.v?a(r):void t(Error("Account version not supported"))),this.status="connecting",r}reload(e,t){"function"==typeof e&&([e,t]=[t,e]);let[r,n]=c(t);return"connecting"!==this.status||e?(this.mounts=[],this.api.request({a:"f",c:1},(e,t)=>{if(e)return r(e);for(let e of(this.shareKeys=t.ok.reduce((e,t)=>{let r=t.h,n=this.aes.encryptECB(Buffer.from(r+r));return function(e,t){if(e.length!==t.length)return!1;let r=e.length,n=0;for(let i=0;i<r;i++)n|=e[i]^t[i];return 0===n}(b(t.ha),n)&&(e[r]=this.aes.decryptECB(b(t.k))),e},{}),t.f))if(e=this._importFile(e),void 0!==t.ph&&(e.shareId=t.ph.find(t=>t.h===e.nodeId)?.ph,e.shared=!!e.shareId,e.shared)){e.shareURL=`https://mega.nz/${e.directory?"folder":"file"}/${e.shareId}`;let t=e.directory?this.shareKeys[e.nodeId]:e.key;t&&(e.shareURL+="#"+m(t))}r(null,this.mounts)}),this.api.on("sc",e=>{let t={};e.forEach(e=>{if("u"===e.a){let t=this.files[e.n];t&&(t.timestamp=e.ts,t.decryptAttributes(e.at),t.emit("update"),this.emit("update",t))}else"d"===e.a?t[e.n]=!0:"t"===e.a&&e.t.f.forEach(e=>{let r=this.files[e.h];if(r){delete t[e.h];let n=r.parent;if(n.nodeId===e.p)return;n.children.splice(n.children.indexOf(r),1),r.parent=this.files[e.p],r.parent.children.push(r),r.emit("move",n),this.emit("move",r,n)}else this.emit("add",this._importFile(e))})}),Object.keys(t).forEach(e=>{let t=this.files[e],r=t.parent;r.children.splice(r.children.indexOf(t),1),this.emit("delete",t),t.emit("delete")})})):this.once("ready",()=>{this.reload(e,r)}),n}_importFile(e){if(!this.files[e.h]){let t=this.files[e.h]=new V(e,this);if(2===e.t&&(this.root=t,t.name="Cloud Drive"),4===e.t&&(this.trash=t,t.name="Rubbish Bin"),3===e.t&&(this.inbox=t,t.name="Inbox"),e.t>1&&this.mounts.push(t),e.p){let r=this.files[e.p];r&&(r.children.push(t),t.parent=r)}}return this.files[e.h]}mkdir(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.mkdir(e,t)}upload(e,t,r){if("ready"!==this.status)throw Error("storage is not ready");return this.root.upload(e,t,r)}find(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.find(e,t)}filter(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.filter(e,t)}navigate(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.navigate(e,t)}close(e){return this.status="closed",this.api.close(),this.api.request({a:"sml"},e)}getAccountInfo(e){let[t,r]=c(e);return this.api.request({a:"uq",strg:1,xfer:1,pro:1},(e,r)=>{e&&t(e);let n={};n.type=r.utype,n.spaceUsed=r.cstrg,n.spaceTotal=r.mstrg,n.downloadBandwidthTotal=r.mxfer||0x28000000000000,n.downloadBandwidthUsed=r.caxfer||0,n.sharedBandwidthUsed=r.csxfer||0,n.sharedBandwidthLimit=r.srvratio,t(null,n)}),r}toJSON(){return{key:m(this.key),sid:this.sid,name:this.name,user:this.user,options:this.options}}static fromJSON(t){let r=new e(Object.assign(t.options,{autoload:!1,autologin:!1}));return r.key=w(t.key),r.aes=new p(r.key),r.api.sid=r.sid=t.sid,r.name=t.name,r.user=t.user,r}decryptRsaKey(e){return j(e,this.RSAPrivateKey)}};H.fromURL}};
|