@koobiq/cli 16.0.0-beta.6 → 16.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +1 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ function Qe(e){return"[object Object]"===Object.prototype.toString.call(e)}var Z
18
18
  * Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
19
19
  *
20
20
  * MIT Licensed
21
- */(),o=process.binding("constants"),s=a(),c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,l=3,d=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),p=o.EBADF||o.os.errno.EBADF,f=o.ENOENT||o.os.errno.ENOENT,_=[];var m=!1,g=!1;function h(e){var t=[],r=null;try{r=i.randomBytes(e)}catch(t){r=i.pseudoRandomBytes(e)}for(var n=0;n<e;n++)t.push(c[r[n]%c.length]);return t.join("")}function v(e){return void 0===e}function b(e,t){return"function"==typeof e?[t||{},e]:v(e)?[{},t]:[e,t]}function D(e){if(e.name)return t.join(e.dir||s,e.name);if(e.template)return e.template.replace(u,h(6));const r=[e.prefix||"tmp-",process.pid,h(12),e.postfix||""].join("");return t.join(e.dir||s,r)}function x(t,r){var n=b(t,r),i=n[0],a=n[1],o=i.name?1:i.tries||l;return isNaN(o)||o<0?a(new Error("Invalid tries")):i.template&&!i.template.match(u)?a(new Error("Invalid template provided")):void function t(){const r=D(i);e.stat(r,(function(e){if(!e)return o-- >0?t():a(new Error("Could not get a unique tmp filename, max tries reached "+r));a(null,r)}))}()}function S(t){var r=b(t)[0],n=r.name?1:r.tries||l;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(r.template&&!r.template.match(u))throw new Error("Invalid template provided");do{const t=D(r);try{e.statSync(t)}catch(e){return t}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function E(r){const n=[r];do{for(var i=n.pop(),a=!1,o=e.readdirSync(i),s=0,c=o.length;s<c;s++){var u=t.join(i,o[s]);e.lstatSync(u).isDirectory()?(a||(a=!0,n.push(i)),n.push(u)):e.unlinkSync(u)}a||e.rmdirSync(i)}while(0!==n.length)}function T(t,r,n){const i=k((function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!function(e){return A(e,-p,"EBADF")}(e)&&!N(e))throw e}try{e.unlinkSync(t[1])}catch(e){if(!N(e))throw e}}),[r,t]);return n.keep||_.unshift(i),i}function C(t,r){const n=k(r.unsafeCleanup?E:e.rmdirSync.bind(e),t);return r.keep||_.unshift(n),n}function k(e,t){var r=!1;return function n(i){if(!r){const i=_.indexOf(n);i>=0&&_.splice(i,1),r=!0,e(t)}i&&i(null)}}function w(){if(!g||m)for(;_.length;)try{_[0].call(null)}catch(e){}}function N(e){return A(e,-f,"ENOENT")}function A(e,t,r){return e.code==t||e.code==r}const F=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));return 0===F[0]&&(F[1]<9||9===F[1]&&F[2]<5)&&process.addListener("uncaughtException",(function(e){throw g=!0,w(),e})),process.addListener("exit",(function(e){e&&(g=!0),w()})),VS.tmpdir=s,VS.dir=function(t,r){var n=b(t,r),i=n[0],a=n[1];x(i,(function(t,r){if(t)return a(t);e.mkdir(r,i.mode||448,(function(e){if(e)return a(e);a(null,r,C(r,i))}))}))},VS.dirSync=function(t){var r=b(t)[0];const n=S(r);return e.mkdirSync(n,r.mode||448),{name:n,removeCallback:C(n,r)}},VS.file=function(t,r){var n=b(t,r),i=n[0],a=n[1];i.postfix=v(i.postfix)?".tmp":i.postfix,x(i,(function(t,r){if(t)return a(t);e.open(r,d,i.mode||384,(function(t,n){return t?a(t):i.discardDescriptor?e.close(n,(function(t){if(t){try{e.unlinkSync(r)}catch(e){N(e)||(t=e)}return a(t)}a(null,r,void 0,T(r,-1,i))})):i.detachDescriptor?a(null,r,n,T(r,-1,i)):void a(null,r,n,T(r,n,i))}))}))},VS.fileSync=function(t){var r=b(t)[0];r.postfix=r.postfix||".tmp";const n=r.discardDescriptor||r.detachDescriptor,i=S(r);var a=e.openSync(i,d,r.mode||384);return r.discardDescriptor&&(e.closeSync(a),a=void 0),{name:i,fd:a,removeCallback:T(i,n?-1:a,r)}},VS.tmpName=x,VS.tmpNameSync=S,VS.setGracefulCleanup=function(){m=!0},VS}var qS,KS={};var WS,GS={};var HS,$S={};var YS,XS,QS,ZS,eE={};function tE(){if(XS)return Px;XS=1,Object.defineProperty(Px,"__esModule",{value:!0});var e=function(){if(Wx)return Ix;Wx=1;var e=n,t=Mx(),r=jx(),i=Jx(),a=qx(),o=Hx(),s=x,c=[new t,new r.UTF_16BE,new r.UTF_16LE,new r.UTF_32BE,new r.UTF_32LE,new i.sjis,new i.big5,new i.euc_jp,new i.euc_kr,new i.gb_18030,new o.ISO_2022_JP,new o.ISO_2022_KR,new o.ISO_2022_CN,new a.ISO_8859_1,new a.ISO_8859_2,new a.ISO_8859_5,new a.ISO_8859_6,new a.ISO_8859_7,new a.ISO_8859_8,new a.ISO_8859_9,new a.windows_1251,new a.windows_1256,new a.KOI8_R];return Ix.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var i=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){i=!0;break}var a={fByteStats:r,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},o=c.map((function(e){return e.match(a)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?o:o.length>0?o[0].name:null},Ix.detectFile=function(t,r,n){var i;"function"==typeof r&&(n=r,r=void 0);var a=function(t,a){if(i&&e.closeSync(i),t)return n(t,null);n(null,s.detect(a,r))};if(r&&r.sampleSize)return i=e.openSync(t,"r"),sample=Buffer.allocUnsafe(r.sampleSize),void e.read(i,sample,0,r.sampleSize,null,(function(e){a(e,sample)}));e.readFile(t,a)},Ix.detectFileSync=function(t,r){if(r&&r.sampleSize){var n=e.openSync(t,"r"),i=Buffer.allocUnsafe(r.sampleSize);return e.readSync(n,i,0,r.sampleSize),e.closeSync(n),s.detect(i,r)}return s.detect(e.readFileSync(t),r)},Ix.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detect(e,t)},Ix.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFile(e,t,r)},Ix.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFileSync(e,t)},Ix}(),r=t,i=n,a=jS(),o=zS(),s=function(){if(qS)return KS;qS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(KS,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to create temporary file for editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return KS.CreateFileError=t,KS}();Px.CreateFileError=s.CreateFileError;var c=function(){if(WS)return GS;WS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(GS,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed launch editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return GS.LaunchEditorError=t,GS}();Px.LaunchEditorError=c.LaunchEditorError;var u=function(){if(HS)return $S;HS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($S,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to read temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return $S.ReadFileError=t,$S}();Px.ReadFileError=u.ReadFileError;var l=function(){if(YS)return eE;YS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(eE,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to cleanup temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return eE.RemoveFileError=t,eE}();Px.RemoveFileError=l.RemoveFileError,Px.edit=function(e,t){void 0===e&&(e="");var r=new d(e,t);return r.run(),r.cleanup(),r.text},Px.editAsync=function(e,t,r){void 0===e&&(e="");var n=new d(e,r);n.runAsync((function(e,r){if(e)setImmediate(t,e,null);else try{n.cleanup(),setImmediate(t,null,r)}catch(e){setImmediate(t,e,null)}}))};var d=function(){function t(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return t.splitStringBySpace=function(e){for(var t=[],r="",n=0;n<e.length;n++){var i=e[n];n>0&&" "===i&&"\\"!==e[n-1]&&r.length>0?(t.push(r),r=""):r+=i}return r.length>0&&t.push(r),t},Object.defineProperty(t.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),t.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},t.prototype.runAsync=function(e){var t=this;try{this.launchEditorAsync((function(){try{t.readTemporaryFile(),setImmediate(e,null,t.text)}catch(t){setImmediate(e,t,null)}}))}catch(t){setImmediate(e,t,null)}},t.prototype.cleanup=function(){this.removeTemporaryFile()},t.prototype.determineEditor=function(){var e=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",r=t.splitStringBySpace(e).map((function(e){return e.replace("\\ "," ")})),n=r.shift();this.editor={args:r,bin:n}},t.prototype.createTemporaryFile=function(){try{this.tempFile=o.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),i.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new s.CreateFileError(e)}},t.prototype.readTemporaryFile=function(){try{var t=i.readFileSync(this.tempFile);if(0===t.length)this.text="";else{var r=e.detect(t).toString();a.encodingExists(r)||(r="utf8"),this.text=a.decode(t,r)}}catch(e){throw new u.ReadFileError(e)}},t.prototype.removeTemporaryFile=function(){try{i.unlinkSync(this.tempFile)}catch(e){throw new l.RemoveFileError(e)}},t.prototype.launchEditor=function(){try{var e=r.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new c.LaunchEditorError(e)}},t.prototype.launchEditorAsync=function(e){var t=this;try{r.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(r){t.lastExitStatus=r,setImmediate(e)}))}catch(e){throw new c.LaunchEditorError(e)}},t}();return Px.ExternalEditor=d,Px}!function(e){var t=Un.exports;t.prompts={},t.Separator=Qn,t.ui={BottomBar:dp,Prompt:Fv},t.createPromptModule=function(e){var r=function(n,i){var a;try{a=new t.ui.Prompt(r.prompts,e)}catch(e){return Promise.reject(e)}var o=a.run(n,i);return o.ui=a,o};return r.prompts={},r.registerPrompt=function(e,t){return r.prompts[e]=t,this},r.restoreDefaultPrompts=function(){this.registerPrompt("list",yx()),this.registerPrompt("input",vx()),this.registerPrompt("number",function(){if(FD)return AD;FD=1;var e=vx();return AD=class extends e{filterInput(e){if(e&&"string"==typeof e){let t=(e=e.trim()).match(/(^-?\d+|^\d+\.\d*|^\d*\.\d+)(e\d+)?$/);if(t)return Number(t[0])}return null==this.opt.default?NaN:this.opt.default}},AD}()),this.registerPrompt("confirm",function(){if(MD)return OD;MD=1;var e={extend:Ao(),isBoolean:bx()},t=jn,{take:r,takeUntil:n}=Xh,i=fx(),a=_x();return OD=class extends i{constructor(t,r,n){super(t,r,n);var i=!0;e.extend(this.opt,{filter:function(e){var t=i;return null!=e&&""!==e&&(t=/^y(es)?/i.test(e)),t}}),e.isBoolean(this.opt.default)&&(i=this.opt.default),this.opt.default=i?"Y/n":"y/N"}_run(e){this.done=e;var t=a(this.rl);return t.keypress.pipe(n(t.line)).forEach(this.onKeypress.bind(this)),t.line.pipe(r(1)).forEach(this.onEnd.bind(this)),this.render(),this}render(e){var r=this.getQuestion();return r+="boolean"==typeof e?t.cyan(e?"Yes":"No"):this.rl.line,this.screen.render(r),this}onEnd(e){this.status="answered";var t=this.opt.filter(e);this.render(t),this.screen.done(),this.done(t)}onKeypress(){this.render()}},OD}()),this.registerPrompt("rawlist",Dx()),this.registerPrompt("expand",Cx()),this.registerPrompt("checkbox",kx()),this.registerPrompt("password",function(){if(sx)return ox;sx=1;var e=jn,{map:t,takeUntil:r}=Xh,n=fx(),i=_x();function a(e,t){return t="string"==typeof t?t:"*",0===(e=String(e)).length?"":new Array(e.length+1).join(t)}return ox=class extends n{_run(e){this.done=e;var n=i(this.rl),a=n.line.pipe(t(this.filterInput.bind(this))),o=this.handleSubmitEvents(a);return o.success.forEach(this.onEnd.bind(this)),o.error.forEach(this.onError.bind(this)),n.keypress.pipe(r(o.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(t){var r=this.getQuestion(),n="";"answered"===this.status?r+=this.opt.mask?e.cyan(a(this.answer,this.opt.mask)):e.italic.dim("[hidden]"):this.opt.mask?r+=a(this.rl.line||"",this.opt.mask):r+=e.italic.dim("[input is hidden] "),t&&(n="\n"+e.red(">> ")+t),this.screen.render(r,n)}filterInput(e){return e||(null==this.opt.default?"":this.opt.default)}onEnd(e){this.status="answered",this.answer=e.value,this.render(),this.screen.done(),this.done(e.value)}onError(e){this.render(e.isValid)}onKeypress(){this.opt.default&&(this.opt.default=void 0),this.render()}},ox}()),this.registerPrompt("editor",function(){if(ZS)return QS;ZS=1;var e=jn,t=tE().editAsync,r=fx(),n=_x(),{Subject:i}=nm;return QS=class extends r{_run(e){this.done=e,this.editorResult=new i;var t=n(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));var r=this.handleSubmitEvents(this.editorResult);return r.success.forEach(this.onEnd.bind(this)),r.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(t){var r="",n=this.getQuestion();"answered"===this.status?n+=e.dim("Received"):n+=e.dim("Press <enter> to launch your preferred editor."),t&&(r=e.red(">> ")+t),this.screen.render(n,r)}startExternalEditor(){this.rl.pause(),t(this.currentText,this.endExternalEditor.bind(this))}endExternalEditor(e,t){this.rl.resume(),e?this.editorResult.error(e):this.editorResult.next(t)}onEnd(e){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=e.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(e){this.render(e.isValid)}},QS}())},r.restoreDefaultPrompts(),r},t.prompt=t.createPromptModule(),t.registerPrompt=function(e,r){t.prompt.registerPrompt(e,r)},t.restoreDefaultPrompts=function(){t.prompt.restoreDefaultPrompts()}}();var rE=S(Un.exports);const{red:nE,italic:iE,yellow:aE,green:oE}=Bn,{prompt:sE}=rE;class cE{constructor(e,t){this.git=e,this.config=t,this.packageJsonPath=r.join(t.projectDir,"package.json"),this.packageJson=JSON.parse(n.readFileSync(this.packageJsonPath,"utf-8"))}switchToPublishBranch(e){const t=function(e){const t=function(e){return 0===e.minor&&0===e.patch?"major":0===e.patch?"minor":"patch"}(e);return"major"===t?["master"]:"minor"===t||"patch"===t?[`${e.major}.${e.minor}.x`]:void 0}(e),r=this.git.getCurrentBranch();if(t.includes(r))return console.log(oE(` ✓ Using the "${iE(r)}" branch.`)),r;1!==t.length&&(console.warn(aE(" ✘ You are not on an allowed publish branch.")),console.warn(aE(` Please switch to one of the following branches: ${t.join(", ")}`)),process.exit(0));const n=t[0];this.git.checkoutBranch(n)||(console.error(nE(` ✘ Could not switch to the "${iE(n)}" branch.`)),console.error(nE(" Please ensure that the branch exists or manually switch to the branch.")),process.exit(1)),console.log(oE(` ✓ Switched to the "${iE(n)}" branch.`))}verifyLocalCommitsMatchUpstream(e){this.git.getRemoteCommitSha(e),this.git.getLocalCommitSha("HEAD")}verifyNoUncommittedChanges(){this.git.hasUncommittedChanges()}async promptConfirm(e){return(await sE({type:"confirm",name:"result",message:e})).result}checkReleaseConfiguration(){var e,t;(null===(t=null===(e=this.packageJson)||void 0===e?void 0:e.release)||void 0===t?void 0:t.packages)||(console.error(nE(" ✘ Release config did not find in the package.json file.")),process.exit(1))}runReleaseCommands(e){var n,i,a,o;const s={cwd:r.join(this.config.projectDir,"node_modules/.bin"),stdio:"inherit"},c=null!==(o=null===(a=null===(i=null===(n=this.packageJson)||void 0===n?void 0:n.release)||void 0===i?void 0:i.hooks)||void 0===a?void 0:a[e])&&void 0!==o?o:[];for(const e of c)t.execSync(e,s)}}const uE="CHANGELOG.md";function lE(e,t){const r=n.readFileSync(e,"utf8"),i=t.replace(".","\\."),a=new RegExp(`(##? ${i} "(.*?)" \\(.*?)##? \\d+\\.\\d+`,"s").exec(r);return a?{releaseTitle:a[2],releaseNotes:a[1].trim()}:null}class dE{constructor(e,t){this.projectDir=e,this.remoteGitUrl=t}getCurrentBranch(){return this.spawnGitProcess(["symbolic-ref","--short","HEAD"]).stdout.trim()}getRemoteCommitSha(e){return this.spawnGitProcess(["ls-remote",this.remoteGitUrl,"-h",`refs/heads/${e}`]).stdout.split("\t")[0].trim()}getLocalCommitSha(e){return this.spawnGitProcess(["rev-parse",e]).stdout.trim()}hasUncommittedChanges(){return 0!==this.spawnGitProcess(["diff-index","--quiet","HEAD"]).status}checkoutBranch(e){return 0===this.spawnGitProcess(["checkout",e]).status}checkoutNewBranch(e){return 0===this.spawnGitProcess(["checkout","-b",e]).status}stageAllChanges(){return 0===this.spawnGitProcess(["add","-A"]).status}getCommitTitle(e){return this.spawnGitProcess(["log","-n1",'--format="%s"',e]).stdout.trim()}getCommitterUserName(){return this.spawnGitProcess(["--no-pager","show","-s","--format='%cN'","HEAD"]).stdout.trim()}getCommitterUserEmail(){return this.spawnGitProcess(["--no-pager","show","-s","--format='%cE'","HEAD"]).stdout.trim()}createNewCommit(e){return 0===this.spawnGitProcess(["commit","-m",e]).status}createTag(e,t){return 0===this.spawnGitProcess(["tag",e,"-m",t]).status}hasLocalTag(e){return 0===this.spawnGitProcess(["rev-parse",`refs/tags/${e}`],!1).status}getShaOfLocalTag(e){return this.spawnGitProcess(["rev-parse",`refs/tags/${e}^{}`]).stdout.trim()}getShaOfRemoteTag(e){return this.spawnGitProcess(["ls-remote",this.remoteGitUrl,"-t",`refs/tags/${e}^{}`]).stdout.split("\t")[0].trim()}pushTagToRemote(e,t=this.remoteGitUrl){return 0===this.spawnGitProcess(["push",t,`refs/tags/${e}`]).status}pushBranchToRemote(e,t){return 0===this.spawnGitProcess(["push",e,t]).status}hasRemote(e){return 0===this.spawnGitProcess(["remote","get-url",e],!1).status}getAvailableRemotes(){return this.spawnGitProcess(["remote"]).stdout.trim().split("\n")}spawnGitProcess(e,r=!0){return t.spawnSync("git",e,{cwd:this.projectDir,stdio:["pipe","pipe",r?"inherit":"pipe"],encoding:"utf8"})}}const{green:pE,red:fE}=Bn;async function _E(e){if(console.log(pE("Start MM notification")),!process.env.MATTERMOST_ENDPOINT_URL||!process.env.MATTERMOST_CHANNEL)return;const t=process.env.MATTERMOST_ENDPOINT_URL,r={"Content-Type":"application/json"},n={channel:`${process.env.MATTERMOST_CHANNEL}`,username:"Wall-e",short:!1,text:`## ${e.releaseTitle}\n ${e.releaseNotes}`};console.log("POST notification: ",{url:t,headers:r,body:JSON.stringify(n)});try{const e=await fetch(t,{method:"post",body:JSON.stringify(n),headers:r});e.ok?console.info(pE(" ✓ Notification is posted in Mattermost.")):(console.error(fE(" ✘ Could not post notification in Mattermost.")),console.log(e.status,e.statusText))}catch(e){console.error(fE(" ✘ Could not post notification in Mattermost.")),console.log(e)}}function mE(e,r){const n=["publish","--access","public","--tag",r];process.env.DEBUG&&n.push("--dry-run");const i=t.spawnSync("npm",n,{cwd:e,shell:!0});if(0!==i.status)return i.stderr.toString()}function gE(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}Object.assign(Object.assign({},process.env),{npm_config_registry:"https://registry.npmjs.org"});var hE,yE,vE={exports:{}},bE={exports:{}},DE={},xE={},SE={},EE={};function TE(){if(hE)return EE;hE=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return EE.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},EE.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1},EE}function CE(){if(yE)return SE;yE=1;var e=TE();return SE.encode=function(t){var r,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(t);do{r=31&i,(i>>>=5)>0&&(r|=32),n+=e.encode(r)}while(i>0);return n},SE.decode=function(t,r,n){var i,a,o,s,c=t.length,u=0,l=0;do{if(r>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=e.decode(t.charCodeAt(r++))))throw new Error("Invalid base64 digit: "+t.charAt(r-1));i=!!(32&a),u+=(a&=31)<<l,l+=5}while(i);n.value=(s=(o=u)>>1,1==(1&o)?-s:s),n.rest=r},SE}var kE,wE={};function NE(){return kE||(kE=1,function(e){e.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function n(e){var r=e.match(t);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(t){var r=t,a=n(t);if(a){if(!a.path)return t;r=a.path}for(var o,s=e.isAbsolute(r),c=r.split(/\/+/),u=0,l=c.length-1;l>=0;l--)"."===(o=c[l])?c.splice(l,1):".."===o?u++:u>0&&(""===o?(c.splice(l+1,u),u=0):(c.splice(l,2),u--));return""===(r=c.join("/"))&&(r=s?"/":"."),a?(a.path=r,i(a)):r}function o(e,t){""===e&&(e="."),""===t&&(t=".");var o=n(t),s=n(e);if(s&&(e=s.path||"/"),o&&!o.scheme)return s&&(o.scheme=s.scheme),i(o);if(o||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var c="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,i(s)):c}e.urlParse=n,e.urlGenerate=i,e.normalize=a,e.join=o,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function l(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=s?c:function(e){return u(e)?"$"+e:e},e.fromSetString=s?c:function(e){return u(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,r){var n=l(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)||r||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:l(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||r||0!==(n=l(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:l(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=l(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:l(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var s=n(r);if(!s)throw new Error("sourceMapURL could not be parsed");if(s.path){var c=s.path.lastIndexOf("/");c>=0&&(s.path=s.path.substring(0,c+1))}t=o(i(s),t)}return a(t)}}(wE)),wE}var AE,FE={};function PE(){if(AE)return FE;AE=1;var e=NE(),t=Object.prototype.hasOwnProperty,r="undefined"!=typeof Map;function n(){this._array=[],this._set=r?new Map:Object.create(null)}return n.fromArray=function(e,t){for(var r=new n,i=0,a=e.length;i<a;i++)r.add(e[i],t);return r},n.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(n,i){var a=r?n:e.toSetString(n),o=r?this.has(n):t.call(this._set,a),s=this._array.length;o&&!i||this._array.push(n),o||(r?this._set.set(n,s):this._set[a]=s)},n.prototype.has=function(n){if(r)return this._set.has(n);var i=e.toSetString(n);return t.call(this._set,i)},n.prototype.indexOf=function(n){if(r){var i=this._set.get(n);if(i>=0)return i}else{var a=e.toSetString(n);if(t.call(this._set,a))return this._set[a]}throw new Error('"'+n+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},FE.ArraySet=n,FE}var IE,OE,ME={};function LE(){if(IE)return ME;IE=1;var e=NE();function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},t.prototype.add=function(t){var r,n,i,a,o,s;r=this._last,n=t,i=r.generatedLine,a=n.generatedLine,o=r.generatedColumn,s=n.generatedColumn,a>i||a==i&&s>=o||e.compareByGeneratedPositionsInflated(r,n)<=0?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},ME.MappingList=t,ME}function RE(){if(OE)return xE;OE=1;var e=CE(),t=NE(),r=PE().ArraySet,n=LE().MappingList;function i(e){e||(e={}),this._file=t.getArg(e,"file",null),this._sourceRoot=t.getArg(e,"sourceRoot",null),this._skipValidation=t.getArg(e,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new n,this._sourcesContents=null}return i.prototype._version=3,i.fromSourceMap=function(e){var r=e.sourceRoot,n=new i({file:e.file,sourceRoot:r});return e.eachMapping((function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(i.source=e.source,null!=r&&(i.source=t.relative(r,i.source)),i.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(i.name=e.name)),n.addMapping(i)})),e.sources.forEach((function(i){var a=i;null!==r&&(a=t.relative(r,i)),n._sources.has(a)||n._sources.add(a);var o=e.sourceContentFor(i);null!=o&&n.setSourceContent(i,o)})),n},i.prototype.addMapping=function(e){var r=t.getArg(e,"generated"),n=t.getArg(e,"original",null),i=t.getArg(e,"source",null),a=t.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,a),null!=i&&(i=String(i),this._sources.has(i)||this._sources.add(i)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:i,name:a})},i.prototype.setSourceContent=function(e,r){var n=e;null!=this._sourceRoot&&(n=t.relative(this._sourceRoot,n)),null!=r?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,n,i){var a=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');a=e.file}var o=this._sourceRoot;null!=o&&(a=t.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach((function(r){if(r.source===a&&null!=r.originalLine){var n=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});null!=n.source&&(r.source=n.source,null!=i&&(r.source=t.join(i,r.source)),null!=o&&(r.source=t.relative(o,r.source)),r.originalLine=n.line,r.originalColumn=n.column,null!=n.name&&(r.name=n.name))}var u=r.source;null==u||s.has(u)||s.add(u);var l=r.name;null==l||c.has(l)||c.add(l)}),this),this._sources=s,this._names=c,e.sources.forEach((function(r){var n=e.sourceContentFor(r);null!=n&&(null!=i&&(r=t.join(i,r)),null!=o&&(r=t.relative(o,r)),this.setSourceContent(r,n))}),this)},i.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},i.prototype._serializeMappings=function(){for(var r,n,i,a,o=0,s=1,c=0,u=0,l=0,d=0,p="",f=this._mappings.toArray(),_=0,m=f.length;_<m;_++){if(r="",(n=f[_]).generatedLine!==s)for(o=0;n.generatedLine!==s;)r+=";",s++;else if(_>0){if(!t.compareByGeneratedPositionsInflated(n,f[_-1]))continue;r+=","}r+=e.encode(n.generatedColumn-o),o=n.generatedColumn,null!=n.source&&(a=this._sources.indexOf(n.source),r+=e.encode(a-d),d=a,r+=e.encode(n.originalLine-1-u),u=n.originalLine-1,r+=e.encode(n.originalColumn-c),c=n.originalColumn,null!=n.name&&(i=this._names.indexOf(n.name),r+=e.encode(i-l),l=i)),p+=r}return p},i.prototype._generateSourcesContent=function(e,r){return e.map((function(e){if(!this._sourcesContents)return null;null!=r&&(e=t.relative(r,e));var n=t.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},xE.SourceMapGenerator=i,xE}var jE,BE={},UE={};function JE(){return jE||(jE=1,function(e){function t(r,n,i,a,o,s){var c=Math.floor((n-r)/2)+r,u=o(i,a[c],!0);return 0===u?c:u>0?n-c>1?t(c,n,i,a,o,s):s==e.LEAST_UPPER_BOUND?n<a.length?n:-1:c:c-r>1?t(r,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:r<0?-1:r}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(r,n,i,a){if(0===n.length)return-1;var o=t(-1,n.length,r,n,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(n[o],n[o-1],!0);)--o;return o}}(UE)),UE}var VE,zE,qE={};function KE(){if(VE)return qE;function e(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function t(r,n,i,a){if(i<a){var o=i-1;e(r,(l=i,d=a,Math.round(l+Math.random()*(d-l))),a);for(var s=r[a],c=i;c<a;c++)n(r[c],s)<=0&&e(r,o+=1,c);e(r,o+1,c);var u=o+1;t(r,n,i,u-1),t(r,n,u+1,a)}var l,d}return VE=1,qE.quickSort=function(e,r){t(e,r,0,e.length-1)},qE}var WE,GE,HE,$E,YE,XE={};function QE(){return GE||(GE=1,DE.SourceMapGenerator=RE().SourceMapGenerator,DE.SourceMapConsumer=function(){if(zE)return BE;zE=1;var e=NE(),t=JE(),r=PE().ArraySet,n=CE(),i=KE().quickSort;function a(t,r){var n=t;return"string"==typeof t&&(n=e.parseSourceMapInput(t)),null!=n.sections?new c(n,r):new o(n,r)}function o(t,n){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var a=e.getArg(i,"version"),o=e.getArg(i,"sources"),s=e.getArg(i,"names",[]),c=e.getArg(i,"sourceRoot",null),u=e.getArg(i,"sourcesContent",null),l=e.getArg(i,"mappings"),d=e.getArg(i,"file",null);if(a!=this._version)throw new Error("Unsupported version: "+a);c&&(c=e.normalize(c)),o=o.map(String).map(e.normalize).map((function(t){return c&&e.isAbsolute(c)&&e.isAbsolute(t)?e.relative(c,t):t})),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map((function(t){return e.computeSourceURL(c,t,n)})),this.sourceRoot=c,this.sourcesContent=u,this._mappings=l,this._sourceMapURL=n,this.file=d}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(t,n){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var o=e.getArg(i,"version"),s=e.getArg(i,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map((function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var r=e.getArg(t,"offset"),i=e.getArg(r,"line"),o=e.getArg(r,"column");if(i<c.line||i===c.line&&o<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:o+1},consumer:new a(e.getArg(t,"map"),n)}}))}return a.fromSourceMap=function(e,t){return o.fromSourceMap(e,t)},a.prototype._version=3,a.prototype.__generatedMappings=null,Object.defineProperty(a.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),a.prototype.__originalMappings=null,Object.defineProperty(a.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),a.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},a.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},a.GENERATED_ORDER=1,a.ORIGINAL_ORDER=2,a.GREATEST_LOWER_BOUND=1,a.LEAST_UPPER_BOUND=2,a.prototype.eachMapping=function(t,r,n){var i,o=r||null;switch(n||a.GENERATED_ORDER){case a.GENERATED_ORDER:i=this._generatedMappings;break;case a.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;i.map((function(t){var r=null===t.source?null:this._sources.at(t.source);return{source:r=e.computeSourceURL(s,r,this._sourceMapURL),generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}}),this).forEach(t,o)},a.prototype.allGeneratedPositionsFor=function(r){var n=e.getArg(r,"line"),i={source:e.getArg(r,"source"),originalLine:n,originalColumn:e.getArg(r,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(void 0===r.column)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var u=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==u;)a.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return a},BE.SourceMapConsumer=a,o.prototype=Object.create(a.prototype),o.prototype.consumer=a,o.prototype._findSourceIndex=function(t){var r,n=t;if(null!=this.sourceRoot&&(n=e.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1},o.fromSourceMap=function(t,n){var a=Object.create(o.prototype),c=a._names=r.fromArray(t._names.toArray(),!0),u=a._sources=r.fromArray(t._sources.toArray(),!0);a.sourceRoot=t._sourceRoot,a.sourcesContent=t._generateSourcesContent(a._sources.toArray(),a.sourceRoot),a.file=t._file,a._sourceMapURL=n,a._absoluteSources=a._sources.toArray().map((function(t){return e.computeSourceURL(a.sourceRoot,t,n)}));for(var l=t._mappings.toArray().slice(),d=a.__generatedMappings=[],p=a.__originalMappings=[],f=0,_=l.length;f<_;f++){var m=l[f],g=new s;g.generatedLine=m.generatedLine,g.generatedColumn=m.generatedColumn,m.source&&(g.source=u.indexOf(m.source),g.originalLine=m.originalLine,g.originalColumn=m.originalColumn,m.name&&(g.name=c.indexOf(m.name)),p.push(g)),d.push(g)}return i(a.__originalMappings,e.compareByOriginalPositions),a},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),o.prototype._parseMappings=function(t,r){for(var a,o,c,u,l,d=1,p=0,f=0,_=0,m=0,g=0,h=t.length,y=0,v={},b={},D=[],x=[];y<h;)if(";"===t.charAt(y))d++,y++,p=0;else if(","===t.charAt(y))y++;else{for((a=new s).generatedLine=d,u=y;u<h&&!this._charIsMappingSeparator(t,u);u++);if(c=v[o=t.slice(y,u)])y+=o.length;else{for(c=[];y<u;)n.decode(t,y,b),l=b.value,y=b.rest,c.push(l);if(2===c.length)throw new Error("Found a source, but no line and column");if(3===c.length)throw new Error("Found a source and line, but no column");v[o]=c}a.generatedColumn=p+c[0],p=a.generatedColumn,c.length>1&&(a.source=m+c[1],m+=c[1],a.originalLine=f+c[2],f=a.originalLine,a.originalLine+=1,a.originalColumn=_+c[3],_=a.originalColumn,c.length>4&&(a.name=g+c[4],g+=c[4])),x.push(a),"number"==typeof a.originalLine&&D.push(a)}i(x,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,i(D,e.compareByOriginalPositions),this.__originalMappings=D},o.prototype._findMapping=function(e,r,n,i,a,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return t.search(e,r,a,o)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(t){var r={generatedLine:e.getArg(t,"line"),generatedColumn:e.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(t,"bias",a.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=e.getArg(i,"source",null);null!==o&&(o=this._sources.at(o),o=e.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=e.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:o,line:e.getArg(i,"originalLine",null),column:e.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},o.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i,a=t;if(null!=this.sourceRoot&&(a=e.relative(this.sourceRoot,a)),null!=this.sourceRoot&&(i=e.urlParse(this.sourceRoot))){var o=a.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||"/"==i.path)&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(r)return null;throw new Error('"'+a+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(t){var r=e.getArg(t,"source");if((r=this._findSourceIndex(r))<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:e.getArg(t,"line"),originalColumn:e.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(t,"bias",a.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:e.getArg(o,"generatedLine",null),column:e.getArg(o,"generatedColumn",null),lastColumn:e.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},BE.BasicSourceMapConsumer=o,c.prototype=Object.create(a.prototype),c.prototype.constructor=a,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),c.prototype.originalPositionFor=function(r){var n={generatedLine:e.getArg(r,"line"),generatedColumn:e.getArg(r,"column")},i=t.search(n,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),a=this._sections[i];return a?a.consumer.originalPositionFor({line:n.generatedLine-(a.generatedOffset.generatedLine-1),column:n.generatedColumn-(a.generatedOffset.generatedLine===n.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:r.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},c.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(-1!==n.consumer._findSourceIndex(e.getArg(t,"source"))){var i=n.consumer.generatedPositionFor(t);if(i)return{line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},c.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var a=this._sections[n],o=a.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],u=a.consumer._sources.at(c.source);u=e.computeSourceURL(a.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var l=null;c.name&&(l=a.consumer._names.at(c.name),this._names.add(l),l=this._names.indexOf(l));var d={source:u,generatedLine:c.generatedLine+(a.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(a.generatedOffset.generatedLine===c.generatedLine?a.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:l};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}i(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),i(this.__originalMappings,e.compareByOriginalPositions)},BE.IndexedSourceMapConsumer=c,BE}().SourceMapConsumer,DE.SourceNode=function(){if(WE)return XE;WE=1;var e=RE().SourceMapGenerator,t=NE(),r=/(\r?\n)/,n="$$$isSourceNode$$$";function i(e,t,r,i,a){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==a?null:a,this[n]=!0,null!=i&&this.add(i)}return i.fromStringWithSourceMap=function(e,n,a){var o=new i,s=e.split(r),c=0,u=function(){return e()+(e()||"");function e(){return c<s.length?s[c++]:void 0}},l=1,d=0,p=null;return n.eachMapping((function(e){if(null!==p){if(!(l<e.generatedLine)){var t=(r=s[c]||"").substr(0,e.generatedColumn-d);return s[c]=r.substr(e.generatedColumn-d),d=e.generatedColumn,f(p,t),void(p=e)}f(p,u()),l++,d=0}for(;l<e.generatedLine;)o.add(u()),l++;if(d<e.generatedColumn){var r=s[c]||"";o.add(r.substr(0,e.generatedColumn)),s[c]=r.substr(e.generatedColumn),d=e.generatedColumn}p=e}),this),c<s.length&&(p&&f(p,u()),o.add(s.splice(c).join(""))),n.sources.forEach((function(e){var r=n.sourceContentFor(e);null!=r&&(null!=a&&(e=t.join(a,e)),o.setSourceContent(e,r))})),o;function f(e,r){if(null===e||void 0===e.source)o.add(r);else{var n=a?t.join(a,e.source):e.source;o.add(new i(e.originalLine,e.originalColumn,n,r,e.name))}}},i.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[n]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},i.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[n]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},i.prototype.walk=function(e){for(var t,r=0,i=this.children.length;r<i;r++)(t=this.children[r])[n]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},i.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},i.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[n]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},i.prototype.setSourceContent=function(e,r){this.sourceContents[t.toSetString(e)]=r},i.prototype.walkSourceContents=function(e){for(var r=0,i=this.children.length;r<i;r++)this.children[r][n]&&this.children[r].walkSourceContents(e);var a=Object.keys(this.sourceContents);for(r=0,i=a.length;r<i;r++)e(t.fromSetString(a[r]),this.sourceContents[a[r]])},i.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},i.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new e(t),i=!1,a=null,o=null,s=null,c=null;return this.walk((function(e,t){r.code+=e,null!==t.source&&null!==t.line&&null!==t.column?(a===t.source&&o===t.line&&s===t.column&&c===t.name||n.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column},name:t.name}),a=t.source,o=t.line,s=t.column,c=t.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),a=null,i=!1);for(var u=0,l=e.length;u<l;u++)10===e.charCodeAt(u)?(r.line++,r.column=0,u+1===l?(a=null,i=!1):i&&n.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column},name:t.name})):r.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:r.code,map:n}},XE.SourceNode=i,XE}().SourceNode),DE}function ZE(){if($E)return HE;$E=1;var e=Object.prototype.toString,t="undefined"!=typeof Buffer&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;return HE=function(r,n,i){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return function(t){return"ArrayBuffer"===e.call(t).slice(8,-1)}(r)?function(e,r,n){r>>>=0;var i=e.byteLength-r;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=i;else if((n>>>=0)>i)throw new RangeError("'length' is out of bounds");return t?Buffer.from(e.slice(r,r+n)):new Buffer(new Uint8Array(e.slice(r,r+n)))}(r,n,i):"string"==typeof r?function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');return t?Buffer.from(e,r):new Buffer(e,r)}(r,n):t?Buffer.from(r):new Buffer(r)},HE}function eT(){return YE||(YE=1,function(e,t){var n,i=QE().SourceMapConsumer,a=r;try{(n=require("fs")).existsSync&&n.readFileSync||(n=null)}catch(e){}var o=ZE();function s(e,t){return e.require(t)}var c=!1,u=!1,l=!1,d="auto",p={},f={},_=/^data:application\/json[^,]+base64,/,m=[],g=[];function h(){return"browser"===d||"node"!==d&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function y(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}var v=y(m);function b(e,t){if(!e)return t;var r=a.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),i=n?n[0]:"",o=r.slice(i.length);return i&&/^\/\w\:/.test(o)?(i+="/")+a.resolve(r.slice(i.length),t).replace(/\\/g,"/"):i+a.resolve(r.slice(i.length),t)}m.push((function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,(function(e,t){return t?"":"/"}))),e in p)return p[e];var t="";try{if(n)n.existsSync(e)&&(t=n.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),4===r.readyState&&200===r.status&&(t=r.responseText)}}catch(e){}return p[e]=t}));var D=y(g);function x(e){var t=f[e.source];if(!t){var r=D(e.source);r?(t=f[e.source]={url:r.url,map:new i(r.map)}).map.sourcesContent&&t.map.sources.forEach((function(e,r){var n=t.map.sourcesContent[r];if(n){var i=b(t.url,e);p[i]=n}})):t=f[e.source]={url:null,map:null}}if(t&&t.map&&"function"==typeof t.map.originalPositionFor){var n=t.map.originalPositionFor(e);if(null!==n.source)return n.source=b(t.url,n.source),n}return e}function S(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var r=x({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return(t=/^eval at ([^(]+) \((.+)\)$/.exec(e))?"eval at "+t[1]+" ("+S(t[2])+")":e}function E(){var e,t="";if(this.isNative())t="native";else{!(e=this.getScriptNameOrSourceURL())&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),t+=e||"<anonymous>";var r=this.getLineNumber();if(null!=r){t+=":"+r;var n=this.getColumnNumber();n&&(t+=":"+n)}}var i="",a=this.getFunctionName(),o=!0,s=this.isConstructor();if(!(this.isToplevel()||s)){var c=this.getTypeName();"[object Object]"===c&&(c="null");var u=this.getMethodName();a?(c&&0!=a.indexOf(c)&&(i+=c+"."),i+=a,u&&a.indexOf("."+u)!=a.length-u.length-1&&(i+=" [as "+u+"]")):i+=c+"."+(u||"<anonymous>")}else s?i+="new "+(a||"<anonymous>"):a?i+=a:(i+=t,o=!1);return o&&(i+=" ("+t+")"),i}function T(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(r){t[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]})),t.toString=E,t}function C(e,t){if(void 0===t&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber(),i=e.getColumnNumber()-1,a=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/.test("object"==typeof process&&null!==process?process.version:"")?0:62;1===n&&i>a&&!h()&&!e.isEval()&&(i-=a);var o=x({source:r,line:n,column:i});t.curPosition=o;var s=(e=T(e)).getFunctionName;return e.getFunctionName=function(){return null==t.nextPosition?s():t.nextPosition.name||s()},e.getFileName=function(){return o.source},e.getLineNumber=function(){return o.line},e.getColumnNumber=function(){return o.column+1},e.getScriptNameOrSourceURL=function(){return o.source},e}var c=e.isEval()&&e.getEvalOrigin();return c?(c=S(c),(e=T(e)).getEvalOrigin=function(){return c},e):e}function k(e,t){l&&(p={},f={});for(var r=(e.name||"Error")+": "+(e.message||""),n={nextPosition:null,curPosition:null},i=[],a=t.length-1;a>=0;a--)i.push("\n at "+C(t[a],n)),n.nextPosition=n.curPosition;return n.curPosition=n.nextPosition=null,r+i.reverse().join("")}function w(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],i=+t[2],a=+t[3],o=p[r];if(!o&&n&&n.existsSync(r))try{o=n.readFileSync(r,"utf8")}catch(e){o=""}if(o){var s=o.split(/(?:\r\n|\r|\n)/)[i-1];if(s)return r+":"+i+"\n"+s+"\n"+new Array(a).join(" ")+"^"}}return null}function N(e){var t=w(e),r=function(){if("object"==typeof process&&null!==process)return process.stderr}();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),function(e){if("object"==typeof process&&null!==process&&"function"==typeof process.exit)process.exit(e)}(1)}g.push((function(e){var t,r=function(e){var t;if(h())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=4===r.readyState?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch(e){}t=v(e);for(var i,a,o=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}(e);if(!r)return null;if(_.test(r)){var n=r.slice(r.indexOf(",")+1);t=o(n,"base64").toString(),r=e}else r=b(e,r),t=v(r);return t?{url:r,map:t}:null}));var A=m.slice(0),F=g.slice(0);t.wrapCallSite=C,t.getErrorSource=w,t.mapSourcePosition=x,t.retrieveSourceMap=D,t.install=function(t){if((t=t||{}).environment&&(d=t.environment,-1===["node","browser","auto"].indexOf(d)))throw new Error("environment "+d+" was unknown. Available options are {auto, browser, node}");if(t.retrieveFile&&(t.overrideRetrieveFile&&(m.length=0),m.unshift(t.retrieveFile)),t.retrieveSourceMap&&(t.overrideRetrieveSourceMap&&(g.length=0),g.unshift(t.retrieveSourceMap)),t.hookRequire&&!h()){var r=s(e,"module"),n=r.prototype._compile;n.__sourceMapSupport||(r.prototype._compile=function(e,t){return p[t]=e,f[t]=void 0,n.call(this,e,t)},r.prototype._compile.__sourceMapSupport=!0)}if(l||(l="emptyCacheBetweenOperations"in t&&t.emptyCacheBetweenOperations),c||(c=!0,Error.prepareStackTrace=k),!u){var i=!("handleUncaughtExceptions"in t)||t.handleUncaughtExceptions;try{!1===s(e,"worker_threads").isMainThread&&(i=!1)}catch(e){}i&&"object"==typeof process&&null!==process&&"function"==typeof process.on&&(u=!0,a=process.emit,process.emit=function(e){if("uncaughtException"===e){var t=arguments[1]&&arguments[1].stack,r=this.listeners(e).length>0;if(t&&!r)return N(arguments[1])}return a.apply(this,arguments)})}var a},t.resetRetrieveHandlers=function(){m.length=0,g.length=0,m=A.slice(0),g=F.slice(0),D=y(g),v=y(m)}}(bE,bE.exports)),bE.exports}
21
+ */(),o=process.binding("constants"),s=a(),c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,l=3,d=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),p=o.EBADF||o.os.errno.EBADF,f=o.ENOENT||o.os.errno.ENOENT,_=[];var m=!1,g=!1;function h(e){var t=[],r=null;try{r=i.randomBytes(e)}catch(t){r=i.pseudoRandomBytes(e)}for(var n=0;n<e;n++)t.push(c[r[n]%c.length]);return t.join("")}function v(e){return void 0===e}function b(e,t){return"function"==typeof e?[t||{},e]:v(e)?[{},t]:[e,t]}function D(e){if(e.name)return t.join(e.dir||s,e.name);if(e.template)return e.template.replace(u,h(6));const r=[e.prefix||"tmp-",process.pid,h(12),e.postfix||""].join("");return t.join(e.dir||s,r)}function x(t,r){var n=b(t,r),i=n[0],a=n[1],o=i.name?1:i.tries||l;return isNaN(o)||o<0?a(new Error("Invalid tries")):i.template&&!i.template.match(u)?a(new Error("Invalid template provided")):void function t(){const r=D(i);e.stat(r,(function(e){if(!e)return o-- >0?t():a(new Error("Could not get a unique tmp filename, max tries reached "+r));a(null,r)}))}()}function S(t){var r=b(t)[0],n=r.name?1:r.tries||l;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(r.template&&!r.template.match(u))throw new Error("Invalid template provided");do{const t=D(r);try{e.statSync(t)}catch(e){return t}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function E(r){const n=[r];do{for(var i=n.pop(),a=!1,o=e.readdirSync(i),s=0,c=o.length;s<c;s++){var u=t.join(i,o[s]);e.lstatSync(u).isDirectory()?(a||(a=!0,n.push(i)),n.push(u)):e.unlinkSync(u)}a||e.rmdirSync(i)}while(0!==n.length)}function T(t,r,n){const i=k((function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!function(e){return A(e,-p,"EBADF")}(e)&&!N(e))throw e}try{e.unlinkSync(t[1])}catch(e){if(!N(e))throw e}}),[r,t]);return n.keep||_.unshift(i),i}function C(t,r){const n=k(r.unsafeCleanup?E:e.rmdirSync.bind(e),t);return r.keep||_.unshift(n),n}function k(e,t){var r=!1;return function n(i){if(!r){const i=_.indexOf(n);i>=0&&_.splice(i,1),r=!0,e(t)}i&&i(null)}}function w(){if(!g||m)for(;_.length;)try{_[0].call(null)}catch(e){}}function N(e){return A(e,-f,"ENOENT")}function A(e,t,r){return e.code==t||e.code==r}const F=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));return 0===F[0]&&(F[1]<9||9===F[1]&&F[2]<5)&&process.addListener("uncaughtException",(function(e){throw g=!0,w(),e})),process.addListener("exit",(function(e){e&&(g=!0),w()})),VS.tmpdir=s,VS.dir=function(t,r){var n=b(t,r),i=n[0],a=n[1];x(i,(function(t,r){if(t)return a(t);e.mkdir(r,i.mode||448,(function(e){if(e)return a(e);a(null,r,C(r,i))}))}))},VS.dirSync=function(t){var r=b(t)[0];const n=S(r);return e.mkdirSync(n,r.mode||448),{name:n,removeCallback:C(n,r)}},VS.file=function(t,r){var n=b(t,r),i=n[0],a=n[1];i.postfix=v(i.postfix)?".tmp":i.postfix,x(i,(function(t,r){if(t)return a(t);e.open(r,d,i.mode||384,(function(t,n){return t?a(t):i.discardDescriptor?e.close(n,(function(t){if(t){try{e.unlinkSync(r)}catch(e){N(e)||(t=e)}return a(t)}a(null,r,void 0,T(r,-1,i))})):i.detachDescriptor?a(null,r,n,T(r,-1,i)):void a(null,r,n,T(r,n,i))}))}))},VS.fileSync=function(t){var r=b(t)[0];r.postfix=r.postfix||".tmp";const n=r.discardDescriptor||r.detachDescriptor,i=S(r);var a=e.openSync(i,d,r.mode||384);return r.discardDescriptor&&(e.closeSync(a),a=void 0),{name:i,fd:a,removeCallback:T(i,n?-1:a,r)}},VS.tmpName=x,VS.tmpNameSync=S,VS.setGracefulCleanup=function(){m=!0},VS}var qS,KS={};var WS,GS={};var HS,$S={};var YS,XS,QS,ZS,eE={};function tE(){if(XS)return Px;XS=1,Object.defineProperty(Px,"__esModule",{value:!0});var e=function(){if(Wx)return Ix;Wx=1;var e=n,t=Mx(),r=jx(),i=Jx(),a=qx(),o=Hx(),s=x,c=[new t,new r.UTF_16BE,new r.UTF_16LE,new r.UTF_32BE,new r.UTF_32LE,new i.sjis,new i.big5,new i.euc_jp,new i.euc_kr,new i.gb_18030,new o.ISO_2022_JP,new o.ISO_2022_KR,new o.ISO_2022_CN,new a.ISO_8859_1,new a.ISO_8859_2,new a.ISO_8859_5,new a.ISO_8859_6,new a.ISO_8859_7,new a.ISO_8859_8,new a.ISO_8859_9,new a.windows_1251,new a.windows_1256,new a.KOI8_R];return Ix.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var i=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){i=!0;break}var a={fByteStats:r,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},o=c.map((function(e){return e.match(a)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?o:o.length>0?o[0].name:null},Ix.detectFile=function(t,r,n){var i;"function"==typeof r&&(n=r,r=void 0);var a=function(t,a){if(i&&e.closeSync(i),t)return n(t,null);n(null,s.detect(a,r))};if(r&&r.sampleSize)return i=e.openSync(t,"r"),sample=Buffer.allocUnsafe(r.sampleSize),void e.read(i,sample,0,r.sampleSize,null,(function(e){a(e,sample)}));e.readFile(t,a)},Ix.detectFileSync=function(t,r){if(r&&r.sampleSize){var n=e.openSync(t,"r"),i=Buffer.allocUnsafe(r.sampleSize);return e.readSync(n,i,0,r.sampleSize),e.closeSync(n),s.detect(i,r)}return s.detect(e.readFileSync(t),r)},Ix.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detect(e,t)},Ix.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFile(e,t,r)},Ix.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFileSync(e,t)},Ix}(),r=t,i=n,a=jS(),o=zS(),s=function(){if(qS)return KS;qS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(KS,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to create temporary file for editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return KS.CreateFileError=t,KS}();Px.CreateFileError=s.CreateFileError;var c=function(){if(WS)return GS;WS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(GS,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed launch editor")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return GS.LaunchEditorError=t,GS}();Px.LaunchEditorError=c.LaunchEditorError;var u=function(){if(HS)return $S;HS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($S,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to read temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return $S.ReadFileError=t,$S}();Px.ReadFileError=u.ReadFileError;var l=function(){if(YS)return eE;YS=1;var e=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(eE,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to cleanup temporary file")||this;n.originalError=e;var i=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return eE.RemoveFileError=t,eE}();Px.RemoveFileError=l.RemoveFileError,Px.edit=function(e,t){void 0===e&&(e="");var r=new d(e,t);return r.run(),r.cleanup(),r.text},Px.editAsync=function(e,t,r){void 0===e&&(e="");var n=new d(e,r);n.runAsync((function(e,r){if(e)setImmediate(t,e,null);else try{n.cleanup(),setImmediate(t,null,r)}catch(e){setImmediate(t,e,null)}}))};var d=function(){function t(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return t.splitStringBySpace=function(e){for(var t=[],r="",n=0;n<e.length;n++){var i=e[n];n>0&&" "===i&&"\\"!==e[n-1]&&r.length>0?(t.push(r),r=""):r+=i}return r.length>0&&t.push(r),t},Object.defineProperty(t.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),t.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},t.prototype.runAsync=function(e){var t=this;try{this.launchEditorAsync((function(){try{t.readTemporaryFile(),setImmediate(e,null,t.text)}catch(t){setImmediate(e,t,null)}}))}catch(t){setImmediate(e,t,null)}},t.prototype.cleanup=function(){this.removeTemporaryFile()},t.prototype.determineEditor=function(){var e=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",r=t.splitStringBySpace(e).map((function(e){return e.replace("\\ "," ")})),n=r.shift();this.editor={args:r,bin:n}},t.prototype.createTemporaryFile=function(){try{this.tempFile=o.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),i.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new s.CreateFileError(e)}},t.prototype.readTemporaryFile=function(){try{var t=i.readFileSync(this.tempFile);if(0===t.length)this.text="";else{var r=e.detect(t).toString();a.encodingExists(r)||(r="utf8"),this.text=a.decode(t,r)}}catch(e){throw new u.ReadFileError(e)}},t.prototype.removeTemporaryFile=function(){try{i.unlinkSync(this.tempFile)}catch(e){throw new l.RemoveFileError(e)}},t.prototype.launchEditor=function(){try{var e=r.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new c.LaunchEditorError(e)}},t.prototype.launchEditorAsync=function(e){var t=this;try{r.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(r){t.lastExitStatus=r,setImmediate(e)}))}catch(e){throw new c.LaunchEditorError(e)}},t}();return Px.ExternalEditor=d,Px}!function(e){var t=Un.exports;t.prompts={},t.Separator=Qn,t.ui={BottomBar:dp,Prompt:Fv},t.createPromptModule=function(e){var r=function(n,i){var a;try{a=new t.ui.Prompt(r.prompts,e)}catch(e){return Promise.reject(e)}var o=a.run(n,i);return o.ui=a,o};return r.prompts={},r.registerPrompt=function(e,t){return r.prompts[e]=t,this},r.restoreDefaultPrompts=function(){this.registerPrompt("list",yx()),this.registerPrompt("input",vx()),this.registerPrompt("number",function(){if(FD)return AD;FD=1;var e=vx();return AD=class extends e{filterInput(e){if(e&&"string"==typeof e){let t=(e=e.trim()).match(/(^-?\d+|^\d+\.\d*|^\d*\.\d+)(e\d+)?$/);if(t)return Number(t[0])}return null==this.opt.default?NaN:this.opt.default}},AD}()),this.registerPrompt("confirm",function(){if(MD)return OD;MD=1;var e={extend:Ao(),isBoolean:bx()},t=jn,{take:r,takeUntil:n}=Xh,i=fx(),a=_x();return OD=class extends i{constructor(t,r,n){super(t,r,n);var i=!0;e.extend(this.opt,{filter:function(e){var t=i;return null!=e&&""!==e&&(t=/^y(es)?/i.test(e)),t}}),e.isBoolean(this.opt.default)&&(i=this.opt.default),this.opt.default=i?"Y/n":"y/N"}_run(e){this.done=e;var t=a(this.rl);return t.keypress.pipe(n(t.line)).forEach(this.onKeypress.bind(this)),t.line.pipe(r(1)).forEach(this.onEnd.bind(this)),this.render(),this}render(e){var r=this.getQuestion();return r+="boolean"==typeof e?t.cyan(e?"Yes":"No"):this.rl.line,this.screen.render(r),this}onEnd(e){this.status="answered";var t=this.opt.filter(e);this.render(t),this.screen.done(),this.done(t)}onKeypress(){this.render()}},OD}()),this.registerPrompt("rawlist",Dx()),this.registerPrompt("expand",Cx()),this.registerPrompt("checkbox",kx()),this.registerPrompt("password",function(){if(sx)return ox;sx=1;var e=jn,{map:t,takeUntil:r}=Xh,n=fx(),i=_x();function a(e,t){return t="string"==typeof t?t:"*",0===(e=String(e)).length?"":new Array(e.length+1).join(t)}return ox=class extends n{_run(e){this.done=e;var n=i(this.rl),a=n.line.pipe(t(this.filterInput.bind(this))),o=this.handleSubmitEvents(a);return o.success.forEach(this.onEnd.bind(this)),o.error.forEach(this.onError.bind(this)),n.keypress.pipe(r(o.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(t){var r=this.getQuestion(),n="";"answered"===this.status?r+=this.opt.mask?e.cyan(a(this.answer,this.opt.mask)):e.italic.dim("[hidden]"):this.opt.mask?r+=a(this.rl.line||"",this.opt.mask):r+=e.italic.dim("[input is hidden] "),t&&(n="\n"+e.red(">> ")+t),this.screen.render(r,n)}filterInput(e){return e||(null==this.opt.default?"":this.opt.default)}onEnd(e){this.status="answered",this.answer=e.value,this.render(),this.screen.done(),this.done(e.value)}onError(e){this.render(e.isValid)}onKeypress(){this.opt.default&&(this.opt.default=void 0),this.render()}},ox}()),this.registerPrompt("editor",function(){if(ZS)return QS;ZS=1;var e=jn,t=tE().editAsync,r=fx(),n=_x(),{Subject:i}=nm;return QS=class extends r{_run(e){this.done=e,this.editorResult=new i;var t=n(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));var r=this.handleSubmitEvents(this.editorResult);return r.success.forEach(this.onEnd.bind(this)),r.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(t){var r="",n=this.getQuestion();"answered"===this.status?n+=e.dim("Received"):n+=e.dim("Press <enter> to launch your preferred editor."),t&&(r=e.red(">> ")+t),this.screen.render(n,r)}startExternalEditor(){this.rl.pause(),t(this.currentText,this.endExternalEditor.bind(this))}endExternalEditor(e,t){this.rl.resume(),e?this.editorResult.error(e):this.editorResult.next(t)}onEnd(e){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=e.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(e){this.render(e.isValid)}},QS}())},r.restoreDefaultPrompts(),r},t.prompt=t.createPromptModule(),t.registerPrompt=function(e,r){t.prompt.registerPrompt(e,r)},t.restoreDefaultPrompts=function(){t.prompt.restoreDefaultPrompts()}}();var rE=S(Un.exports);const{red:nE,italic:iE,yellow:aE,green:oE}=Bn,{prompt:sE}=rE;class cE{constructor(e,t){this.git=e,this.config=t,this.packageJsonPath=r.join(t.projectDir,"package.json"),this.packageJson=JSON.parse(n.readFileSync(this.packageJsonPath,"utf-8"))}switchToPublishBranch(e){const t=function(e){const t=function(e){return 0===e.minor&&0===e.patch?"major":0===e.patch?"minor":"patch"}(e);return"major"===t?["master"]:"minor"===t||"patch"===t?[`${e.major}.${e.minor}.x`]:void 0}(e),r=this.git.getCurrentBranch();if(t.includes(r))return console.log(oE(` ✓ Using the "${iE(r)}" branch.`)),r;1!==t.length&&(console.warn(aE(" ✘ You are not on an allowed publish branch.")),console.warn(aE(` Please switch to one of the following branches: ${t.join(", ")}`)),process.exit(0));const n=t[0];this.git.checkoutBranch(n)||(console.error(nE(` ✘ Could not switch to the "${iE(n)}" branch.`)),console.error(nE(" Please ensure that the branch exists or manually switch to the branch.")),process.exit(1)),console.log(oE(` ✓ Switched to the "${iE(n)}" branch.`))}verifyLocalCommitsMatchUpstream(e){this.git.getRemoteCommitSha(e),this.git.getLocalCommitSha("HEAD")}verifyNoUncommittedChanges(){this.git.hasUncommittedChanges()}async promptConfirm(e){return(await sE({type:"confirm",name:"result",message:e})).result}checkReleaseConfiguration(){var e,t;(null===(t=null===(e=this.packageJson)||void 0===e?void 0:e.release)||void 0===t?void 0:t.packages)||(console.error(nE(" ✘ Release config did not find in the package.json file.")),process.exit(1))}runReleaseCommands(e){var n,i,a,o;const s={cwd:r.join(this.config.projectDir,"node_modules/.bin"),stdio:"inherit"},c=null!==(o=null===(a=null===(i=null===(n=this.packageJson)||void 0===n?void 0:n.release)||void 0===i?void 0:i.hooks)||void 0===a?void 0:a[e])&&void 0!==o?o:[];for(const e of c)t.execSync(e,s)}}const uE="CHANGELOG.md";function lE(e,t){const r=n.readFileSync(e,"utf8"),i=t.replace(new RegExp("\\.","g"),"\\."),a=new RegExp(`##? (${i} "?.*?"?.\\(.*?\\))(.*?)##? \\d+\\.\\d+`,"s").exec(r);return a?{releaseTitle:a[1],releaseNotes:a[2].trim()}:null}class dE{constructor(e,t){this.projectDir=e,this.remoteGitUrl=t}getCurrentBranch(){return this.spawnGitProcess(["symbolic-ref","--short","HEAD"]).stdout.trim()}getRemoteCommitSha(e){return this.spawnGitProcess(["ls-remote",this.remoteGitUrl,"-h",`refs/heads/${e}`]).stdout.split("\t")[0].trim()}getLocalCommitSha(e){return this.spawnGitProcess(["rev-parse",e]).stdout.trim()}hasUncommittedChanges(){return 0!==this.spawnGitProcess(["diff-index","--quiet","HEAD"]).status}checkoutBranch(e){return 0===this.spawnGitProcess(["checkout",e]).status}checkoutNewBranch(e){return 0===this.spawnGitProcess(["checkout","-b",e]).status}stageAllChanges(){return 0===this.spawnGitProcess(["add","-A"]).status}getCommitTitle(e){return this.spawnGitProcess(["log","-n1",'--format="%s"',e]).stdout.trim()}getCommitterUserName(){return this.spawnGitProcess(["--no-pager","show","-s","--format='%cN'","HEAD"]).stdout.trim()}getCommitterUserEmail(){return this.spawnGitProcess(["--no-pager","show","-s","--format='%cE'","HEAD"]).stdout.trim()}createNewCommit(e){return 0===this.spawnGitProcess(["commit","-m",e]).status}createTag(e,t){return 0===this.spawnGitProcess(["tag",e,"-m",t]).status}hasLocalTag(e){return 0===this.spawnGitProcess(["rev-parse",`refs/tags/${e}`],!1).status}getShaOfLocalTag(e){return this.spawnGitProcess(["rev-parse",`refs/tags/${e}^{}`]).stdout.trim()}getShaOfRemoteTag(e){return this.spawnGitProcess(["ls-remote",this.remoteGitUrl,"-t",`refs/tags/${e}^{}`]).stdout.split("\t")[0].trim()}pushTagToRemote(e,t=this.remoteGitUrl){return 0===this.spawnGitProcess(["push",t,`refs/tags/${e}`]).status}pushBranchToRemote(e,t){return 0===this.spawnGitProcess(["push",e,t]).status}hasRemote(e){return 0===this.spawnGitProcess(["remote","get-url",e],!1).status}getAvailableRemotes(){return this.spawnGitProcess(["remote"]).stdout.trim().split("\n")}spawnGitProcess(e,r=!0){return t.spawnSync("git",e,{cwd:this.projectDir,stdio:["pipe","pipe",r?"inherit":"pipe"],encoding:"utf8"})}}const{green:pE,red:fE}=Bn;async function _E(e){if(console.log(pE("Start MM notification")),!process.env.MATTERMOST_ENDPOINT_URL||!process.env.MATTERMOST_CHANNEL)return;const t=process.env.MATTERMOST_ENDPOINT_URL,r={"Content-Type":"application/json"},n={channel:`${process.env.MATTERMOST_CHANNEL}`,username:"Wall-e",short:!1,text:`## ${e.releaseTitle}\n ${e.releaseNotes}`};console.log("POST notification: ",{url:t,headers:r,body:JSON.stringify(n)});try{const e=await fetch(t,{method:"post",body:JSON.stringify(n),headers:r});e.ok?console.info(pE(" ✓ Notification is posted in Mattermost.")):(console.error(fE(" ✘ Could not post notification in Mattermost.")),console.log(e.status,e.statusText))}catch(e){console.error(fE(" ✘ Could not post notification in Mattermost.")),console.log(e)}}function mE(e,r){const n=["publish","--access","public","--tag",r];process.env.DEBUG&&n.push("--dry-run");const i=t.spawnSync("npm",n,{cwd:e,shell:!0});if(0!==i.status)return i.stderr.toString()}function gE(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}Object.assign(Object.assign({},process.env),{npm_config_registry:"https://registry.npmjs.org"});var hE,yE,vE={exports:{}},bE={exports:{}},DE={},xE={},SE={},EE={};function TE(){if(hE)return EE;hE=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return EE.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},EE.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1},EE}function CE(){if(yE)return SE;yE=1;var e=TE();return SE.encode=function(t){var r,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(t);do{r=31&i,(i>>>=5)>0&&(r|=32),n+=e.encode(r)}while(i>0);return n},SE.decode=function(t,r,n){var i,a,o,s,c=t.length,u=0,l=0;do{if(r>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=e.decode(t.charCodeAt(r++))))throw new Error("Invalid base64 digit: "+t.charAt(r-1));i=!!(32&a),u+=(a&=31)<<l,l+=5}while(i);n.value=(s=(o=u)>>1,1==(1&o)?-s:s),n.rest=r},SE}var kE,wE={};function NE(){return kE||(kE=1,function(e){e.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function n(e){var r=e.match(t);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(t){var r=t,a=n(t);if(a){if(!a.path)return t;r=a.path}for(var o,s=e.isAbsolute(r),c=r.split(/\/+/),u=0,l=c.length-1;l>=0;l--)"."===(o=c[l])?c.splice(l,1):".."===o?u++:u>0&&(""===o?(c.splice(l+1,u),u=0):(c.splice(l,2),u--));return""===(r=c.join("/"))&&(r=s?"/":"."),a?(a.path=r,i(a)):r}function o(e,t){""===e&&(e="."),""===t&&(t=".");var o=n(t),s=n(e);if(s&&(e=s.path||"/"),o&&!o.scheme)return s&&(o.scheme=s.scheme),i(o);if(o||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var c="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,i(s)):c}e.urlParse=n,e.urlGenerate=i,e.normalize=a,e.join=o,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function l(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=s?c:function(e){return u(e)?"$"+e:e},e.fromSetString=s?c:function(e){return u(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,r){var n=l(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)||r||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:l(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||r||0!==(n=l(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:l(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=l(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:l(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var s=n(r);if(!s)throw new Error("sourceMapURL could not be parsed");if(s.path){var c=s.path.lastIndexOf("/");c>=0&&(s.path=s.path.substring(0,c+1))}t=o(i(s),t)}return a(t)}}(wE)),wE}var AE,FE={};function PE(){if(AE)return FE;AE=1;var e=NE(),t=Object.prototype.hasOwnProperty,r="undefined"!=typeof Map;function n(){this._array=[],this._set=r?new Map:Object.create(null)}return n.fromArray=function(e,t){for(var r=new n,i=0,a=e.length;i<a;i++)r.add(e[i],t);return r},n.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(n,i){var a=r?n:e.toSetString(n),o=r?this.has(n):t.call(this._set,a),s=this._array.length;o&&!i||this._array.push(n),o||(r?this._set.set(n,s):this._set[a]=s)},n.prototype.has=function(n){if(r)return this._set.has(n);var i=e.toSetString(n);return t.call(this._set,i)},n.prototype.indexOf=function(n){if(r){var i=this._set.get(n);if(i>=0)return i}else{var a=e.toSetString(n);if(t.call(this._set,a))return this._set[a]}throw new Error('"'+n+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},FE.ArraySet=n,FE}var IE,OE,ME={};function LE(){if(IE)return ME;IE=1;var e=NE();function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},t.prototype.add=function(t){var r,n,i,a,o,s;r=this._last,n=t,i=r.generatedLine,a=n.generatedLine,o=r.generatedColumn,s=n.generatedColumn,a>i||a==i&&s>=o||e.compareByGeneratedPositionsInflated(r,n)<=0?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},ME.MappingList=t,ME}function RE(){if(OE)return xE;OE=1;var e=CE(),t=NE(),r=PE().ArraySet,n=LE().MappingList;function i(e){e||(e={}),this._file=t.getArg(e,"file",null),this._sourceRoot=t.getArg(e,"sourceRoot",null),this._skipValidation=t.getArg(e,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new n,this._sourcesContents=null}return i.prototype._version=3,i.fromSourceMap=function(e){var r=e.sourceRoot,n=new i({file:e.file,sourceRoot:r});return e.eachMapping((function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(i.source=e.source,null!=r&&(i.source=t.relative(r,i.source)),i.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(i.name=e.name)),n.addMapping(i)})),e.sources.forEach((function(i){var a=i;null!==r&&(a=t.relative(r,i)),n._sources.has(a)||n._sources.add(a);var o=e.sourceContentFor(i);null!=o&&n.setSourceContent(i,o)})),n},i.prototype.addMapping=function(e){var r=t.getArg(e,"generated"),n=t.getArg(e,"original",null),i=t.getArg(e,"source",null),a=t.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,a),null!=i&&(i=String(i),this._sources.has(i)||this._sources.add(i)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:i,name:a})},i.prototype.setSourceContent=function(e,r){var n=e;null!=this._sourceRoot&&(n=t.relative(this._sourceRoot,n)),null!=r?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,n,i){var a=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');a=e.file}var o=this._sourceRoot;null!=o&&(a=t.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach((function(r){if(r.source===a&&null!=r.originalLine){var n=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});null!=n.source&&(r.source=n.source,null!=i&&(r.source=t.join(i,r.source)),null!=o&&(r.source=t.relative(o,r.source)),r.originalLine=n.line,r.originalColumn=n.column,null!=n.name&&(r.name=n.name))}var u=r.source;null==u||s.has(u)||s.add(u);var l=r.name;null==l||c.has(l)||c.add(l)}),this),this._sources=s,this._names=c,e.sources.forEach((function(r){var n=e.sourceContentFor(r);null!=n&&(null!=i&&(r=t.join(i,r)),null!=o&&(r=t.relative(o,r)),this.setSourceContent(r,n))}),this)},i.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},i.prototype._serializeMappings=function(){for(var r,n,i,a,o=0,s=1,c=0,u=0,l=0,d=0,p="",f=this._mappings.toArray(),_=0,m=f.length;_<m;_++){if(r="",(n=f[_]).generatedLine!==s)for(o=0;n.generatedLine!==s;)r+=";",s++;else if(_>0){if(!t.compareByGeneratedPositionsInflated(n,f[_-1]))continue;r+=","}r+=e.encode(n.generatedColumn-o),o=n.generatedColumn,null!=n.source&&(a=this._sources.indexOf(n.source),r+=e.encode(a-d),d=a,r+=e.encode(n.originalLine-1-u),u=n.originalLine-1,r+=e.encode(n.originalColumn-c),c=n.originalColumn,null!=n.name&&(i=this._names.indexOf(n.name),r+=e.encode(i-l),l=i)),p+=r}return p},i.prototype._generateSourcesContent=function(e,r){return e.map((function(e){if(!this._sourcesContents)return null;null!=r&&(e=t.relative(r,e));var n=t.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},xE.SourceMapGenerator=i,xE}var jE,BE={},UE={};function JE(){return jE||(jE=1,function(e){function t(r,n,i,a,o,s){var c=Math.floor((n-r)/2)+r,u=o(i,a[c],!0);return 0===u?c:u>0?n-c>1?t(c,n,i,a,o,s):s==e.LEAST_UPPER_BOUND?n<a.length?n:-1:c:c-r>1?t(r,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:r<0?-1:r}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(r,n,i,a){if(0===n.length)return-1;var o=t(-1,n.length,r,n,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(n[o],n[o-1],!0);)--o;return o}}(UE)),UE}var VE,zE,qE={};function KE(){if(VE)return qE;function e(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function t(r,n,i,a){if(i<a){var o=i-1;e(r,(l=i,d=a,Math.round(l+Math.random()*(d-l))),a);for(var s=r[a],c=i;c<a;c++)n(r[c],s)<=0&&e(r,o+=1,c);e(r,o+1,c);var u=o+1;t(r,n,i,u-1),t(r,n,u+1,a)}var l,d}return VE=1,qE.quickSort=function(e,r){t(e,r,0,e.length-1)},qE}var WE,GE,HE,$E,YE,XE={};function QE(){return GE||(GE=1,DE.SourceMapGenerator=RE().SourceMapGenerator,DE.SourceMapConsumer=function(){if(zE)return BE;zE=1;var e=NE(),t=JE(),r=PE().ArraySet,n=CE(),i=KE().quickSort;function a(t,r){var n=t;return"string"==typeof t&&(n=e.parseSourceMapInput(t)),null!=n.sections?new c(n,r):new o(n,r)}function o(t,n){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var a=e.getArg(i,"version"),o=e.getArg(i,"sources"),s=e.getArg(i,"names",[]),c=e.getArg(i,"sourceRoot",null),u=e.getArg(i,"sourcesContent",null),l=e.getArg(i,"mappings"),d=e.getArg(i,"file",null);if(a!=this._version)throw new Error("Unsupported version: "+a);c&&(c=e.normalize(c)),o=o.map(String).map(e.normalize).map((function(t){return c&&e.isAbsolute(c)&&e.isAbsolute(t)?e.relative(c,t):t})),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map((function(t){return e.computeSourceURL(c,t,n)})),this.sourceRoot=c,this.sourcesContent=u,this._mappings=l,this._sourceMapURL=n,this.file=d}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(t,n){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var o=e.getArg(i,"version"),s=e.getArg(i,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map((function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var r=e.getArg(t,"offset"),i=e.getArg(r,"line"),o=e.getArg(r,"column");if(i<c.line||i===c.line&&o<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:o+1},consumer:new a(e.getArg(t,"map"),n)}}))}return a.fromSourceMap=function(e,t){return o.fromSourceMap(e,t)},a.prototype._version=3,a.prototype.__generatedMappings=null,Object.defineProperty(a.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),a.prototype.__originalMappings=null,Object.defineProperty(a.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),a.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},a.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},a.GENERATED_ORDER=1,a.ORIGINAL_ORDER=2,a.GREATEST_LOWER_BOUND=1,a.LEAST_UPPER_BOUND=2,a.prototype.eachMapping=function(t,r,n){var i,o=r||null;switch(n||a.GENERATED_ORDER){case a.GENERATED_ORDER:i=this._generatedMappings;break;case a.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;i.map((function(t){var r=null===t.source?null:this._sources.at(t.source);return{source:r=e.computeSourceURL(s,r,this._sourceMapURL),generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}}),this).forEach(t,o)},a.prototype.allGeneratedPositionsFor=function(r){var n=e.getArg(r,"line"),i={source:e.getArg(r,"source"),originalLine:n,originalColumn:e.getArg(r,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(void 0===r.column)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var u=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==u;)a.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return a},BE.SourceMapConsumer=a,o.prototype=Object.create(a.prototype),o.prototype.consumer=a,o.prototype._findSourceIndex=function(t){var r,n=t;if(null!=this.sourceRoot&&(n=e.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1},o.fromSourceMap=function(t,n){var a=Object.create(o.prototype),c=a._names=r.fromArray(t._names.toArray(),!0),u=a._sources=r.fromArray(t._sources.toArray(),!0);a.sourceRoot=t._sourceRoot,a.sourcesContent=t._generateSourcesContent(a._sources.toArray(),a.sourceRoot),a.file=t._file,a._sourceMapURL=n,a._absoluteSources=a._sources.toArray().map((function(t){return e.computeSourceURL(a.sourceRoot,t,n)}));for(var l=t._mappings.toArray().slice(),d=a.__generatedMappings=[],p=a.__originalMappings=[],f=0,_=l.length;f<_;f++){var m=l[f],g=new s;g.generatedLine=m.generatedLine,g.generatedColumn=m.generatedColumn,m.source&&(g.source=u.indexOf(m.source),g.originalLine=m.originalLine,g.originalColumn=m.originalColumn,m.name&&(g.name=c.indexOf(m.name)),p.push(g)),d.push(g)}return i(a.__originalMappings,e.compareByOriginalPositions),a},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),o.prototype._parseMappings=function(t,r){for(var a,o,c,u,l,d=1,p=0,f=0,_=0,m=0,g=0,h=t.length,y=0,v={},b={},D=[],x=[];y<h;)if(";"===t.charAt(y))d++,y++,p=0;else if(","===t.charAt(y))y++;else{for((a=new s).generatedLine=d,u=y;u<h&&!this._charIsMappingSeparator(t,u);u++);if(c=v[o=t.slice(y,u)])y+=o.length;else{for(c=[];y<u;)n.decode(t,y,b),l=b.value,y=b.rest,c.push(l);if(2===c.length)throw new Error("Found a source, but no line and column");if(3===c.length)throw new Error("Found a source and line, but no column");v[o]=c}a.generatedColumn=p+c[0],p=a.generatedColumn,c.length>1&&(a.source=m+c[1],m+=c[1],a.originalLine=f+c[2],f=a.originalLine,a.originalLine+=1,a.originalColumn=_+c[3],_=a.originalColumn,c.length>4&&(a.name=g+c[4],g+=c[4])),x.push(a),"number"==typeof a.originalLine&&D.push(a)}i(x,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,i(D,e.compareByOriginalPositions),this.__originalMappings=D},o.prototype._findMapping=function(e,r,n,i,a,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return t.search(e,r,a,o)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(t){var r={generatedLine:e.getArg(t,"line"),generatedColumn:e.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(t,"bias",a.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=e.getArg(i,"source",null);null!==o&&(o=this._sources.at(o),o=e.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=e.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:o,line:e.getArg(i,"originalLine",null),column:e.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},o.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i,a=t;if(null!=this.sourceRoot&&(a=e.relative(this.sourceRoot,a)),null!=this.sourceRoot&&(i=e.urlParse(this.sourceRoot))){var o=a.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||"/"==i.path)&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(r)return null;throw new Error('"'+a+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(t){var r=e.getArg(t,"source");if((r=this._findSourceIndex(r))<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:e.getArg(t,"line"),originalColumn:e.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(t,"bias",a.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:e.getArg(o,"generatedLine",null),column:e.getArg(o,"generatedColumn",null),lastColumn:e.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},BE.BasicSourceMapConsumer=o,c.prototype=Object.create(a.prototype),c.prototype.constructor=a,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),c.prototype.originalPositionFor=function(r){var n={generatedLine:e.getArg(r,"line"),generatedColumn:e.getArg(r,"column")},i=t.search(n,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),a=this._sections[i];return a?a.consumer.originalPositionFor({line:n.generatedLine-(a.generatedOffset.generatedLine-1),column:n.generatedColumn-(a.generatedOffset.generatedLine===n.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:r.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},c.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(-1!==n.consumer._findSourceIndex(e.getArg(t,"source"))){var i=n.consumer.generatedPositionFor(t);if(i)return{line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},c.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var a=this._sections[n],o=a.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],u=a.consumer._sources.at(c.source);u=e.computeSourceURL(a.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var l=null;c.name&&(l=a.consumer._names.at(c.name),this._names.add(l),l=this._names.indexOf(l));var d={source:u,generatedLine:c.generatedLine+(a.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(a.generatedOffset.generatedLine===c.generatedLine?a.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:l};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}i(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),i(this.__originalMappings,e.compareByOriginalPositions)},BE.IndexedSourceMapConsumer=c,BE}().SourceMapConsumer,DE.SourceNode=function(){if(WE)return XE;WE=1;var e=RE().SourceMapGenerator,t=NE(),r=/(\r?\n)/,n="$$$isSourceNode$$$";function i(e,t,r,i,a){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==a?null:a,this[n]=!0,null!=i&&this.add(i)}return i.fromStringWithSourceMap=function(e,n,a){var o=new i,s=e.split(r),c=0,u=function(){return e()+(e()||"");function e(){return c<s.length?s[c++]:void 0}},l=1,d=0,p=null;return n.eachMapping((function(e){if(null!==p){if(!(l<e.generatedLine)){var t=(r=s[c]||"").substr(0,e.generatedColumn-d);return s[c]=r.substr(e.generatedColumn-d),d=e.generatedColumn,f(p,t),void(p=e)}f(p,u()),l++,d=0}for(;l<e.generatedLine;)o.add(u()),l++;if(d<e.generatedColumn){var r=s[c]||"";o.add(r.substr(0,e.generatedColumn)),s[c]=r.substr(e.generatedColumn),d=e.generatedColumn}p=e}),this),c<s.length&&(p&&f(p,u()),o.add(s.splice(c).join(""))),n.sources.forEach((function(e){var r=n.sourceContentFor(e);null!=r&&(null!=a&&(e=t.join(a,e)),o.setSourceContent(e,r))})),o;function f(e,r){if(null===e||void 0===e.source)o.add(r);else{var n=a?t.join(a,e.source):e.source;o.add(new i(e.originalLine,e.originalColumn,n,r,e.name))}}},i.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[n]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},i.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[n]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},i.prototype.walk=function(e){for(var t,r=0,i=this.children.length;r<i;r++)(t=this.children[r])[n]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},i.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},i.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[n]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},i.prototype.setSourceContent=function(e,r){this.sourceContents[t.toSetString(e)]=r},i.prototype.walkSourceContents=function(e){for(var r=0,i=this.children.length;r<i;r++)this.children[r][n]&&this.children[r].walkSourceContents(e);var a=Object.keys(this.sourceContents);for(r=0,i=a.length;r<i;r++)e(t.fromSetString(a[r]),this.sourceContents[a[r]])},i.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},i.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new e(t),i=!1,a=null,o=null,s=null,c=null;return this.walk((function(e,t){r.code+=e,null!==t.source&&null!==t.line&&null!==t.column?(a===t.source&&o===t.line&&s===t.column&&c===t.name||n.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column},name:t.name}),a=t.source,o=t.line,s=t.column,c=t.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),a=null,i=!1);for(var u=0,l=e.length;u<l;u++)10===e.charCodeAt(u)?(r.line++,r.column=0,u+1===l?(a=null,i=!1):i&&n.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column},name:t.name})):r.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:r.code,map:n}},XE.SourceNode=i,XE}().SourceNode),DE}function ZE(){if($E)return HE;$E=1;var e=Object.prototype.toString,t="undefined"!=typeof Buffer&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;return HE=function(r,n,i){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return function(t){return"ArrayBuffer"===e.call(t).slice(8,-1)}(r)?function(e,r,n){r>>>=0;var i=e.byteLength-r;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=i;else if((n>>>=0)>i)throw new RangeError("'length' is out of bounds");return t?Buffer.from(e.slice(r,r+n)):new Buffer(new Uint8Array(e.slice(r,r+n)))}(r,n,i):"string"==typeof r?function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');return t?Buffer.from(e,r):new Buffer(e,r)}(r,n):t?Buffer.from(r):new Buffer(r)},HE}function eT(){return YE||(YE=1,function(e,t){var n,i=QE().SourceMapConsumer,a=r;try{(n=require("fs")).existsSync&&n.readFileSync||(n=null)}catch(e){}var o=ZE();function s(e,t){return e.require(t)}var c=!1,u=!1,l=!1,d="auto",p={},f={},_=/^data:application\/json[^,]+base64,/,m=[],g=[];function h(){return"browser"===d||"node"!==d&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function y(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}var v=y(m);function b(e,t){if(!e)return t;var r=a.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),i=n?n[0]:"",o=r.slice(i.length);return i&&/^\/\w\:/.test(o)?(i+="/")+a.resolve(r.slice(i.length),t).replace(/\\/g,"/"):i+a.resolve(r.slice(i.length),t)}m.push((function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,(function(e,t){return t?"":"/"}))),e in p)return p[e];var t="";try{if(n)n.existsSync(e)&&(t=n.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),4===r.readyState&&200===r.status&&(t=r.responseText)}}catch(e){}return p[e]=t}));var D=y(g);function x(e){var t=f[e.source];if(!t){var r=D(e.source);r?(t=f[e.source]={url:r.url,map:new i(r.map)}).map.sourcesContent&&t.map.sources.forEach((function(e,r){var n=t.map.sourcesContent[r];if(n){var i=b(t.url,e);p[i]=n}})):t=f[e.source]={url:null,map:null}}if(t&&t.map&&"function"==typeof t.map.originalPositionFor){var n=t.map.originalPositionFor(e);if(null!==n.source)return n.source=b(t.url,n.source),n}return e}function S(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var r=x({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return(t=/^eval at ([^(]+) \((.+)\)$/.exec(e))?"eval at "+t[1]+" ("+S(t[2])+")":e}function E(){var e,t="";if(this.isNative())t="native";else{!(e=this.getScriptNameOrSourceURL())&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),t+=e||"<anonymous>";var r=this.getLineNumber();if(null!=r){t+=":"+r;var n=this.getColumnNumber();n&&(t+=":"+n)}}var i="",a=this.getFunctionName(),o=!0,s=this.isConstructor();if(!(this.isToplevel()||s)){var c=this.getTypeName();"[object Object]"===c&&(c="null");var u=this.getMethodName();a?(c&&0!=a.indexOf(c)&&(i+=c+"."),i+=a,u&&a.indexOf("."+u)!=a.length-u.length-1&&(i+=" [as "+u+"]")):i+=c+"."+(u||"<anonymous>")}else s?i+="new "+(a||"<anonymous>"):a?i+=a:(i+=t,o=!1);return o&&(i+=" ("+t+")"),i}function T(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(r){t[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]})),t.toString=E,t}function C(e,t){if(void 0===t&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber(),i=e.getColumnNumber()-1,a=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/.test("object"==typeof process&&null!==process?process.version:"")?0:62;1===n&&i>a&&!h()&&!e.isEval()&&(i-=a);var o=x({source:r,line:n,column:i});t.curPosition=o;var s=(e=T(e)).getFunctionName;return e.getFunctionName=function(){return null==t.nextPosition?s():t.nextPosition.name||s()},e.getFileName=function(){return o.source},e.getLineNumber=function(){return o.line},e.getColumnNumber=function(){return o.column+1},e.getScriptNameOrSourceURL=function(){return o.source},e}var c=e.isEval()&&e.getEvalOrigin();return c?(c=S(c),(e=T(e)).getEvalOrigin=function(){return c},e):e}function k(e,t){l&&(p={},f={});for(var r=(e.name||"Error")+": "+(e.message||""),n={nextPosition:null,curPosition:null},i=[],a=t.length-1;a>=0;a--)i.push("\n at "+C(t[a],n)),n.nextPosition=n.curPosition;return n.curPosition=n.nextPosition=null,r+i.reverse().join("")}function w(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],i=+t[2],a=+t[3],o=p[r];if(!o&&n&&n.existsSync(r))try{o=n.readFileSync(r,"utf8")}catch(e){o=""}if(o){var s=o.split(/(?:\r\n|\r|\n)/)[i-1];if(s)return r+":"+i+"\n"+s+"\n"+new Array(a).join(" ")+"^"}}return null}function N(e){var t=w(e),r=function(){if("object"==typeof process&&null!==process)return process.stderr}();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),function(e){if("object"==typeof process&&null!==process&&"function"==typeof process.exit)process.exit(e)}(1)}g.push((function(e){var t,r=function(e){var t;if(h())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=4===r.readyState?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch(e){}t=v(e);for(var i,a,o=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}(e);if(!r)return null;if(_.test(r)){var n=r.slice(r.indexOf(",")+1);t=o(n,"base64").toString(),r=e}else r=b(e,r),t=v(r);return t?{url:r,map:t}:null}));var A=m.slice(0),F=g.slice(0);t.wrapCallSite=C,t.getErrorSource=w,t.mapSourcePosition=x,t.retrieveSourceMap=D,t.install=function(t){if((t=t||{}).environment&&(d=t.environment,-1===["node","browser","auto"].indexOf(d)))throw new Error("environment "+d+" was unknown. Available options are {auto, browser, node}");if(t.retrieveFile&&(t.overrideRetrieveFile&&(m.length=0),m.unshift(t.retrieveFile)),t.retrieveSourceMap&&(t.overrideRetrieveSourceMap&&(g.length=0),g.unshift(t.retrieveSourceMap)),t.hookRequire&&!h()){var r=s(e,"module"),n=r.prototype._compile;n.__sourceMapSupport||(r.prototype._compile=function(e,t){return p[t]=e,f[t]=void 0,n.call(this,e,t)},r.prototype._compile.__sourceMapSupport=!0)}if(l||(l="emptyCacheBetweenOperations"in t&&t.emptyCacheBetweenOperations),c||(c=!0,Error.prepareStackTrace=k),!u){var i=!("handleUncaughtExceptions"in t)||t.handleUncaughtExceptions;try{!1===s(e,"worker_threads").isMainThread&&(i=!1)}catch(e){}i&&"object"==typeof process&&null!==process&&"function"==typeof process.on&&(u=!0,a=process.emit,process.emit=function(e){if("uncaughtException"===e){var t=arguments[1]&&arguments[1].stack,r=this.listeners(e).length>0;if(t&&!r)return N(arguments[1])}return a.apply(this,arguments)})}var a},t.resetRetrieveHandlers=function(){m.length=0,g.length=0,m=A.slice(0),g=F.slice(0),D=y(g),v=y(m)}}(bE,bE.exports)),bE.exports}
22
22
  /*! *****************************************************************************
23
23
  Copyright (c) Microsoft Corporation. All rights reserved.
24
24
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koobiq/cli",
3
- "version": "16.0.0-beta.6",
3
+ "version": "16.0.0-beta.7",
4
4
  "description": "Koobiq Terminal Interface",
5
5
  "license": "MIT",
6
6
  "bin": {