@koobiq/cli 19.3.0 → 19.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@
11
11
  * Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
12
12
  *
13
13
  * MIT Licensed
14
- */(),s=process.binding("constants"),c=o(),l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,d=3,p=(s.O_CREAT||s.fs.O_CREAT)|(s.O_EXCL||s.fs.O_EXCL)|(s.O_RDWR||s.fs.O_RDWR),_=s.EBADF||s.os.errno.EBADF,f=s.ENOENT||s.os.errno.ENOENT,m=[];var h=!1,g=!1;function y(e){var t=[],n=null;try{n=i.randomBytes(e)}catch(t){n=i.pseudoRandomBytes(e)}for(var r=0;r<e;r++)t.push(l[n[r]%l.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 x(e){if(e.name)return t.join(e.dir||c,e.name);if(e.template)return e.template.replace(u,y(6));const n=[e.prefix||"tmp-",process.pid,y(12),e.postfix||""].join("");return t.join(e.dir||c,n)}function S(t,n){var r=b(t,n),i=r[0],o=r[1],a=i.name?1:i.tries||d;return isNaN(a)||a<0?o(new Error("Invalid tries")):i.template&&!i.template.match(u)?o(new Error("Invalid template provided")):void function t(){const n=x(i);e.stat(n,(function(e){if(!e)return a-- >0?t():o(new Error("Could not get a unique tmp filename, max tries reached "+n));o(null,n)}))}()}function k(t){var n=b(t)[0],r=n.name?1:n.tries||d;if(isNaN(r)||r<0)throw new Error("Invalid tries");if(n.template&&!n.template.match(u))throw new Error("Invalid template provided");do{const t=x(n);try{e.statSync(t)}catch(e){return t}}while(r-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function T(n){const r=[n];do{for(var i=r.pop(),o=!1,a=e.readdirSync(i),s=0,c=a.length;s<c;s++){var l=t.join(i,a[s]);e.lstatSync(l).isDirectory()?(o||(o=!0,r.push(i)),r.push(l)):e.unlinkSync(l)}o||e.rmdirSync(i)}while(0!==r.length)}function w(t,n,r){const i=D((function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!function(e){return F(e,-_,"EBADF")}(e)&&!N(e))throw e}try{e.unlinkSync(t[1])}catch(e){if(!N(e))throw e}}),[n,t]);return r.keep||m.unshift(i),i}function C(t,n){const r=D(n.unsafeCleanup?T:e.rmdirSync.bind(e),t);return n.keep||m.unshift(r),r}function D(e,t){var n=!1;return function r(i){if(!n){const i=m.indexOf(r);i>=0&&m.splice(i,1),n=!0,e(t)}i&&i(null)}}function E(){if(!g||h)for(;m.length;)try{m[0].call(null)}catch(e){}}function N(e){return F(e,-f,"ENOENT")}function F(e,t,n){return e.code==t||e.code==n}const P=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));return 0===P[0]&&(P[1]<9||9===P[1]&&P[2]<5)&&process.addListener("uncaughtException",(function(e){throw g=!0,E(),e})),process.addListener("exit",(function(e){e&&(g=!0),E()})),tk.tmpdir=c,tk.dir=function(t,n){var r=b(t,n),i=r[0],o=r[1];S(i,(function(t,n){if(t)return o(t);e.mkdir(n,i.mode||448,(function(e){if(e)return o(e);o(null,n,C(n,i))}))}))},tk.dirSync=function(t){var n=b(t)[0];const r=k(n);return e.mkdirSync(r,n.mode||448),{name:r,removeCallback:C(r,n)}},tk.file=function(t,n){var r=b(t,n),i=r[0],o=r[1];i.postfix=v(i.postfix)?".tmp":i.postfix,S(i,(function(t,n){if(t)return o(t);e.open(n,p,i.mode||384,(function(t,r){return t?o(t):i.discardDescriptor?e.close(r,(function(t){if(t){try{e.unlinkSync(n)}catch(e){N(e)||(t=e)}return o(t)}o(null,n,void 0,w(n,-1,i))})):i.detachDescriptor?o(null,n,r,w(n,-1,i)):void o(null,n,r,w(n,r,i))}))}))},tk.fileSync=function(t){var n=b(t)[0];n.postfix=n.postfix||".tmp";const r=n.discardDescriptor||n.detachDescriptor,i=k(n);var o=e.openSync(i,p,n.mode||384);return n.discardDescriptor&&(e.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:w(i,r?-1:o,n)}},tk.tmpName=S,tk.tmpNameSync=k,tk.setGracefulCleanup=function(){h=!0},tk}var rk,ik={};var ok,ak={};var sk,ck={};var lk,uk,dk,pk,_k={};function fk(){if(uk)return Wx;uk=1,Object.defineProperty(Wx,"__esModule",{value:!0});var e=function(){if(oS)return $x;oS=1;var e=r,t=Hx(),n=Qx(),i=eS(),o=rS(),a=sS(),s=k,c=[new t,new n.UTF_16BE,new n.UTF_16LE,new n.UTF_32BE,new n.UTF_32LE,new i.sjis,new i.big5,new i.euc_jp,new i.euc_kr,new i.gb_18030,new a.ISO_2022_JP,new a.ISO_2022_KR,new a.ISO_2022_CN,new o.ISO_8859_1,new o.ISO_8859_2,new o.ISO_8859_5,new o.ISO_8859_6,new o.ISO_8859_7,new o.ISO_8859_8,new o.ISO_8859_9,new o.windows_1251,new o.windows_1256,new o.KOI8_R];return $x.detect=function(e,t){for(var n=[],r=0;r<256;r++)n[r]=0;for(r=e.length-1;r>=0;r--)n[255&e[r]]++;var i=!1;for(r=128;r<=159;r+=1)if(0!=n[r]){i=!0;break}var o={fByteStats:n,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},a=c.map((function(e){return e.match(o)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?a:a.length>0?a[0].name:null},$x.detectFile=function(t,n,r){var i;"function"==typeof n&&(r=n,n=void 0);var o=function(t,o){if(i&&e.closeSync(i),t)return r(t,null);r(null,s.detect(o,n))};if(n&&n.sampleSize)return i=e.openSync(t,"r"),sample=Buffer.allocUnsafe(n.sampleSize),void e.read(i,sample,0,n.sampleSize,null,(function(e){o(e,sample)}));e.readFile(t,o)},$x.detectFileSync=function(t,n){if(n&&n.sampleSize){var r=e.openSync(t,"r"),i=Buffer.allocUnsafe(n.sampleSize);return e.readSync(r,i,0,n.sampleSize),e.closeSync(r),s.detect(i,n)}return s.detect(e.readFileSync(t),n)},$x.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detect(e,t)},$x.detectFileAll=function(e,t,n){"function"==typeof t&&(n=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFile(e,t,n)},$x.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFileSync(e,t)},$x}(),n=t,i=r,o=QS(),a=nk(),s=function(){if(rk)return ik;rk=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ik,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed to create temporary file for editor")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return ik.CreateFileError=t,ik}();Wx.CreateFileError=s.CreateFileError;var c=function(){if(ok)return ak;ok=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ak,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed launch editor")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return ak.LaunchEditorError=t,ak}();Wx.LaunchEditorError=c.LaunchEditorError;var l=function(){if(sk)return ck;sk=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ck,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed to read temporary file")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return ck.ReadFileError=t,ck}();Wx.ReadFileError=l.ReadFileError;var u=function(){if(lk)return _k;lk=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(_k,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed to cleanup temporary file")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return _k.RemoveFileError=t,_k}();Wx.RemoveFileError=u.RemoveFileError,Wx.edit=function(e,t){void 0===e&&(e="");var n=new d(e,t);return n.run(),n.cleanup(),n.text},Wx.editAsync=function(e,t,n){void 0===e&&(e="");var r=new d(e,n);r.runAsync((function(e,n){if(e)setImmediate(t,e,null);else try{r.cleanup(),setImmediate(t,null,n)}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=[],n="",r=0;r<e.length;r++){var i=e[r];r>0&&" "===i&&"\\"!==e[r-1]&&n.length>0?(t.push(n),n=""):n+=i}return n.length>0&&t.push(n),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",n=t.splitStringBySpace(e).map((function(e){return e.replace("\\ "," ")})),r=n.shift();this.editor={args:n,bin:r}},t.prototype.createTemporaryFile=function(){try{this.tempFile=a.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 n=e.detect(t).toString();o.encodingExists(n)||(n="utf8"),this.text=o.decode(t,n)}}catch(e){throw new l.ReadFileError(e)}},t.prototype.removeTemporaryFile=function(){try{i.unlinkSync(this.tempFile)}catch(e){throw new u.RemoveFileError(e)}},t.prototype.launchEditor=function(){try{var e=n.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{n.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(n){t.lastExitStatus=n,setImmediate(e)}))}catch(e){throw new c.LaunchEditorError(e)}},t}();return Wx.ExternalEditor=d,Wx}!function(e){var t=nr.exports;t.prompts={},t.Separator=fr,t.ui={BottomBar:bd,Prompt:Uy},t.createPromptModule=function(e){var n=function(r,i){var o;try{o=new t.ui.Prompt(n.prompts,e)}catch(e){return Promise.reject(e)}var a=o.run(r,i);return a.ui=o,a};return n.prompts={},n.registerPrompt=function(e,t){return n.prompts[e]=t,this},n.restoreDefaultPrompts=function(){this.registerPrompt("list",Px()),this.registerPrompt("input",Ax()),this.registerPrompt("number",function(){if(qb)return Ub;qb=1;var e=Ax();return Ub=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}},Ub}()),this.registerPrompt("confirm",function(){if(Hb)return Gb;Hb=1;var e={extend:Wo(),isBoolean:Ix()},t=_,{take:n,takeUntil:r}=og,i=Cx(),o=Dx();return Gb=class extends i{constructor(t,n,r){super(t,n,r);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=o(this.rl);return t.keypress.pipe(r(t.line)).forEach(this.onKeypress.bind(this)),t.line.pipe(n(1)).forEach(this.onEnd.bind(this)),this.render(),this}render(e){var n=this.getQuestion();return n+="boolean"==typeof e?t.cyan(e?"Yes":"No"):this.rl.line,this.screen.render(n),this}onEnd(e){this.status="answered";var t=this.opt.filter(e);this.render(t),this.screen.done(),this.done(t)}onKeypress(){this.render()}},Gb}()),this.registerPrompt("rawlist",Ox()),this.registerPrompt("expand",Bx()),this.registerPrompt("checkbox",Vx()),this.registerPrompt("password",function(){if(bx)return vx;bx=1;var e=_,{map:t,takeUntil:n}=og,r=Cx(),i=Dx();function o(e,t){return t="string"==typeof t?t:"*",0===(e=String(e)).length?"":new Array(e.length+1).join(t)}return vx=class extends r{_run(e){this.done=e;var r=i(this.rl),o=r.line.pipe(t(this.filterInput.bind(this))),a=this.handleSubmitEvents(o);return a.success.forEach(this.onEnd.bind(this)),a.error.forEach(this.onError.bind(this)),r.keypress.pipe(n(a.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(t){var n=this.getQuestion(),r="";"answered"===this.status?n+=this.opt.mask?e.cyan(o(this.answer,this.opt.mask)):e.italic.dim("[hidden]"):this.opt.mask?n+=o(this.rl.line||"",this.opt.mask):n+=e.italic.dim("[input is hidden] "),t&&(r="\n"+e.red(">> ")+t),this.screen.render(n,r)}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()}},vx}()),this.registerPrompt("editor",function(){if(pk)return dk;pk=1;var e=_,t=fk().editAsync,n=Cx(),r=Dx(),{Subject:i}=df;return dk=class extends n{_run(e){this.done=e,this.editorResult=new i;var t=r(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));var n=this.handleSubmitEvents(this.editorResult);return n.success.forEach(this.onEnd.bind(this)),n.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(t){var n="",r=this.getQuestion();"answered"===this.status?r+=e.dim("Received"):r+=e.dim("Press <enter> to launch your preferred editor."),t&&(n=e.red(">> ")+t),this.screen.render(r,n)}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)}},dk}())},n.restoreDefaultPrompts(),n},t.prompt=t.createPromptModule(),t.registerPrompt=function(e,n){t.prompt.registerPrompt(e,n)},t.restoreDefaultPrompts=function(){t.prompt.restoreDefaultPrompts()}}();var mk=T(nr.exports);const{red:hk,italic:gk,yellow:yk,green:vk}=_,{prompt:bk}=mk;class xk{constructor(e,t){this.git=e,this.config=t,this.packageJsonPath=n.join(t.projectDir,"package.json"),this.packageJson=JSON.parse(r.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),n=this.git.getCurrentBranch();if(t.includes(n))return console.log(vk(` ✓ Using the "${gk(n)}" branch.`)),n;1!==t.length&&(console.warn(yk(" ✘ You are not on an allowed publish branch.")),console.warn(yk(` Please switch to one of the following branches: ${t.join(", ")}`)),process.exit(0));const r=t[0];this.git.checkoutBranch(r)||(console.error(hk(` ✘ Could not switch to the "${gk(r)}" branch.`)),console.error(hk(" Please ensure that the branch exists or manually switch to the branch.")),process.exit(1)),console.log(vk(` ✓ Switched to the "${gk(r)}" branch.`))}verifyLocalCommitsMatchUpstream(e){this.git.getRemoteCommitSha(e),this.git.getLocalCommitSha("HEAD")}verifyNoUncommittedChanges(){this.git.hasUncommittedChanges()}async promptConfirm(e){return(await bk({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(hk(" ✘ Release config did not find in the package.json file.")),process.exit(1))}runReleaseCommands(e){var r,i,o,a;const s={cwd:n.join(this.config.projectDir,"node_modules/.bin"),stdio:"inherit"},c=null!==(a=null===(o=null===(i=null===(r=this.packageJson)||void 0===r?void 0:r.release)||void 0===i?void 0:i.hooks)||void 0===o?void 0:o[e])&&void 0!==a?a:[];for(const e of c)t.execSync(e,s)}}const Sk="CHANGELOG.md";function kk(e,t){const n=r.readFileSync(e,"utf8"),i=t.replace(new RegExp("\\.","g"),"\\."),o=new RegExp(`##? (${i} "?.*?"?.\\(.*?\\))(.*?)##? \\d+\\.\\d+`,"s").exec(n);return o?{releaseTitle:o[1],releaseNotes:o[2].trim()}:null}class Tk{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","-s",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,n=!0){return t.spawnSync("git",e,{cwd:this.projectDir,stdio:["pipe","pipe",n?"inherit":"pipe"],encoding:"utf8"})}}const{green:wk,red:Ck,cyan:Dk}=_;function Ek(e,t){e?console.info(wk(" ✓ Notification is posted in Mattermost.")):(console.error(Ck(" ✘ Could not post notification in Mattermost.")),t&&console.error(t.message))}async function Nk(e){console.log(wk("Start MM notification"));const t=function(){const e=process.env.MATTERMOST_ENDPOINT_URL,t=process.env.MATTERMOST_CHANNEL;return e&&t?{url:e,channel:t}:null}();if(!t)return void console.error(Ck(" ✘ MATTERMOST_ENDPOINT_URL or MATTERMOST_CHANNEL not found."));const n={channel:`${t.channel}`,username:"Wall-e",short:!1,text:`## ${e.releaseTitle}\n${e.releaseNotes}`};try{await async function(e,t){const n={"Content-Type":"application/json"},r={method:"POST",headers:n,body:JSON.stringify(t)};console.info(Dk("POST notification:",{url:e,headers:n,body:JSON.stringify(t)}));const i=await fetch(e,r);if(!i.ok)throw new Error(`Failed to post notification: ${i.status} ${i.statusText}`)}(t.url,n),Ek(!0)}catch(e){Ek(!1,e)}}function Fk(e,n){const r=["publish","--access","public","--tag",n];process.env.DEBUG&&r.push("--dry-run");const i=t.spawnSync("npm",r,{cwd:e,shell:!0});if(0!==i.status)return i.stderr.toString()}function Pk(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 Ak,Ik,Ok={exports:{}},Lk={exports:{}},jk={},Rk={},Mk={},Bk={};function Vk(){if(Ak)return Bk;Ak=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Bk.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},Bk.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},Bk}function Jk(){if(Ik)return Mk;Ik=1;var e=Vk();return Mk.encode=function(t){var n,r="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(t);do{n=31&i,(i>>>=5)>0&&(n|=32),r+=e.encode(n)}while(i>0);return r},Mk.decode=function(t,n,r){var i,o,a,s,c=t.length,l=0,u=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=e.decode(t.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+t.charAt(n-1));i=!!(32&o),l+=(o&=31)<<u,u+=5}while(i);r.value=(s=(a=l)>>1,1&~a?s:-s),r.rest=n},Mk}var zk,Uk={};function qk(){return zk||(zk=1,function(e){e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[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 o(t){var n=t,o=r(t);if(o){if(!o.path)return t;n=o.path}for(var a,s=e.isAbsolute(n),c=n.split(/\/+/),l=0,u=c.length-1;u>=0;u--)"."===(a=c[u])?c.splice(u,1):".."===a?l++:l>0&&(""===a?(c.splice(u+1,l),l=0):(c.splice(u,2),l--));return""===(n=c.join("/"))&&(n=s?"/":"."),o?(o.path=n,i(o)):n}function a(e,t){""===e&&(e="."),""===t&&(t=".");var a=r(t),s=r(e);if(s&&(e=s.path||"/"),a&&!a.scheme)return s&&(a.scheme=s.scheme),i(a);if(a||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,i(s)):c}e.urlParse=r,e.urlGenerate=i,e.normalize=o,e.join=a,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function c(e){return e}function l(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 n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=s?c:function(e){return l(e)?"$"+e:e},e.fromSetString=s?c:function(e){return l(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=u(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=u(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var s=r(n);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=a(i(s),t)}return o(t)}}(Uk)),Uk}var Wk,$k={};function Gk(){if(Wk)return $k;Wk=1;var e=qk(),t=Object.prototype.hasOwnProperty,n="undefined"!=typeof Map;function r(){this._array=[],this._set=n?new Map:Object.create(null)}return r.fromArray=function(e,t){for(var n=new r,i=0,o=e.length;i<o;i++)n.add(e[i],t);return n},r.prototype.size=function(){return n?this._set.size:Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(r,i){var o=n?r:e.toSetString(r),a=n?this.has(r):t.call(this._set,o),s=this._array.length;a&&!i||this._array.push(r),a||(n?this._set.set(r,s):this._set[o]=s)},r.prototype.has=function(r){if(n)return this._set.has(r);var i=e.toSetString(r);return t.call(this._set,i)},r.prototype.indexOf=function(r){if(n){var i=this._set.get(r);if(i>=0)return i}else{var o=e.toSetString(r);if(t.call(this._set,o))return this._set[o]}throw new Error('"'+r+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},$k.ArraySet=r,$k}var Hk,Kk,Xk={};function Qk(){if(Hk)return Xk;Hk=1;var e=qk();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 n,r,i,o,a,s;n=this._last,r=t,i=n.generatedLine,o=r.generatedLine,a=n.generatedColumn,s=r.generatedColumn,o>i||o==i&&s>=a||e.compareByGeneratedPositionsInflated(n,r)<=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},Xk.MappingList=t,Xk}function Yk(){if(Kk)return Rk;Kk=1;var e=Jk(),t=qk(),n=Gk().ArraySet,r=Qk().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 n,this._names=new n,this._mappings=new r,this._sourcesContents=null}return i.prototype._version=3,i.fromSourceMap=function(e){var n=e.sourceRoot,r=new i({file:e.file,sourceRoot:n});return e.eachMapping((function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(i.source=e.source,null!=n&&(i.source=t.relative(n,i.source)),i.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(i.name=e.name)),r.addMapping(i)})),e.sources.forEach((function(i){var o=i;null!==n&&(o=t.relative(n,i)),r._sources.has(o)||r._sources.add(o);var a=e.sourceContentFor(i);null!=a&&r.setSourceContent(i,a)})),r},i.prototype.addMapping=function(e){var n=t.getArg(e,"generated"),r=t.getArg(e,"original",null),i=t.getArg(e,"source",null),o=t.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,i,o),null!=i&&(i=String(i),this._sources.has(i)||this._sources.add(i)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:i,name:o})},i.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=t.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,r,i){var o=r;if(null==r){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.');o=e.file}var a=this._sourceRoot;null!=a&&(o=t.relative(a,o));var s=new n,c=new n;this._mappings.unsortedForEach((function(n){if(n.source===o&&null!=n.originalLine){var r=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=r.source&&(n.source=r.source,null!=i&&(n.source=t.join(i,n.source)),null!=a&&(n.source=t.relative(a,n.source)),n.originalLine=r.line,n.originalColumn=r.column,null!=r.name&&(n.name=r.name))}var l=n.source;null==l||s.has(l)||s.add(l);var u=n.name;null==u||c.has(u)||c.add(u)}),this),this._sources=s,this._names=c,e.sources.forEach((function(n){var r=e.sourceContentFor(n);null!=r&&(null!=i&&(n=t.join(i,n)),null!=a&&(n=t.relative(a,n)),this.setSourceContent(n,r))}),this)},i.prototype._validateMapping=function(e,t,n,r){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||n||r)&&!(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&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},i.prototype._serializeMappings=function(){for(var n,r,i,o,a=0,s=1,c=0,l=0,u=0,d=0,p="",_=this._mappings.toArray(),f=0,m=_.length;f<m;f++){if(n="",(r=_[f]).generatedLine!==s)for(a=0;r.generatedLine!==s;)n+=";",s++;else if(f>0){if(!t.compareByGeneratedPositionsInflated(r,_[f-1]))continue;n+=","}n+=e.encode(r.generatedColumn-a),a=r.generatedColumn,null!=r.source&&(o=this._sources.indexOf(r.source),n+=e.encode(o-d),d=o,n+=e.encode(r.originalLine-1-l),l=r.originalLine-1,n+=e.encode(r.originalColumn-c),c=r.originalColumn,null!=r.name&&(i=this._names.indexOf(r.name),n+=e.encode(i-u),u=i)),p+=n}return p},i.prototype._generateSourcesContent=function(e,n){return e.map((function(e){if(!this._sourcesContents)return null;null!=n&&(e=t.relative(n,e));var r=t.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]: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())},Rk.SourceMapGenerator=i,Rk}var Zk,eT={},tT={};function nT(){return Zk||(Zk=1,function(e){function t(n,r,i,o,a,s){var c=Math.floor((r-n)/2)+n,l=a(i,o[c],!0);return 0===l?c:l>0?r-c>1?t(c,r,i,o,a,s):s==e.LEAST_UPPER_BOUND?r<o.length?r:-1:c:c-n>1?t(n,c,i,o,a,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(n,r,i,o){if(0===r.length)return-1;var a=t(-1,r.length,n,r,i,o||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(r[a],r[a-1],!0);)--a;return a}}(tT)),tT}var rT,iT,oT={};function aT(){if(rT)return oT;function e(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function t(n,r,i,o){if(i<o){var a=i-1;e(n,(u=i,d=o,Math.round(u+Math.random()*(d-u))),o);for(var s=n[o],c=i;c<o;c++)r(n[c],s)<=0&&e(n,a+=1,c);e(n,a+1,c);var l=a+1;t(n,r,i,l-1),t(n,r,l+1,o)}var u,d}return rT=1,oT.quickSort=function(e,n){t(e,n,0,e.length-1)},oT}var sT,cT,lT,uT,dT,pT={};function _T(){return cT||(cT=1,jk.SourceMapGenerator=Yk().SourceMapGenerator,jk.SourceMapConsumer=function(){if(iT)return eT;iT=1;var e=qk(),t=nT(),n=Gk().ArraySet,r=Jk(),i=aT().quickSort;function o(t,n){var r=t;return"string"==typeof t&&(r=e.parseSourceMapInput(t)),null!=r.sections?new c(r,n):new a(r,n)}function a(t,r){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var o=e.getArg(i,"version"),a=e.getArg(i,"sources"),s=e.getArg(i,"names",[]),c=e.getArg(i,"sourceRoot",null),l=e.getArg(i,"sourcesContent",null),u=e.getArg(i,"mappings"),d=e.getArg(i,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);c&&(c=e.normalize(c)),a=a.map(String).map(e.normalize).map((function(t){return c&&e.isAbsolute(c)&&e.isAbsolute(t)?e.relative(c,t):t})),this._names=n.fromArray(s.map(String),!0),this._sources=n.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map((function(t){return e.computeSourceURL(c,t,r)})),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=r,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,r){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var a=e.getArg(i,"version"),s=e.getArg(i,"sections");if(a!=this._version)throw new Error("Unsupported version: "+a);this._sources=new n,this._names=new n;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 n=e.getArg(t,"offset"),i=e.getArg(n,"line"),a=e.getArg(n,"column");if(i<c.line||i===c.line&&a<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=n,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(e.getArg(t,"map"),r)}}))}return o.fromSourceMap=function(e,t){return a.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},o.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(t,n,r){var i,a=n||null;switch(r||o.GENERATED_ORDER){case o.GENERATED_ORDER:i=this._generatedMappings;break;case o.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;i.map((function(t){var n=null===t.source?null:this._sources.at(t.source);return{source:n=e.computeSourceURL(s,n,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,a)},o.prototype.allGeneratedPositionsFor=function(n){var r=e.getArg(n,"line"),i={source:e.getArg(n,"source"),originalLine:r,originalColumn:e.getArg(n,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var o=[],a=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(a>=0){var s=this._originalMappings[a];if(void 0===n.column)for(var c=s.originalLine;s&&s.originalLine===c;)o.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)o.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return o},eT.SourceMapConsumer=o,a.prototype=Object.create(o.prototype),a.prototype.consumer=o,a.prototype._findSourceIndex=function(t){var n,r=t;if(null!=this.sourceRoot&&(r=e.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1},a.fromSourceMap=function(t,r){var o=Object.create(a.prototype),c=o._names=n.fromArray(t._names.toArray(),!0),l=o._sources=n.fromArray(t._sources.toArray(),!0);o.sourceRoot=t._sourceRoot,o.sourcesContent=t._generateSourcesContent(o._sources.toArray(),o.sourceRoot),o.file=t._file,o._sourceMapURL=r,o._absoluteSources=o._sources.toArray().map((function(t){return e.computeSourceURL(o.sourceRoot,t,r)}));for(var u=t._mappings.toArray().slice(),d=o.__generatedMappings=[],p=o.__originalMappings=[],_=0,f=u.length;_<f;_++){var m=u[_],h=new s;h.generatedLine=m.generatedLine,h.generatedColumn=m.generatedColumn,m.source&&(h.source=l.indexOf(m.source),h.originalLine=m.originalLine,h.originalColumn=m.originalColumn,m.name&&(h.name=c.indexOf(m.name)),p.push(h)),d.push(h)}return i(o.__originalMappings,e.compareByOriginalPositions),o},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),a.prototype._parseMappings=function(t,n){for(var o,a,c,l,u,d=1,p=0,_=0,f=0,m=0,h=0,g=t.length,y=0,v={},b={},x=[],S=[];y<g;)if(";"===t.charAt(y))d++,y++,p=0;else if(","===t.charAt(y))y++;else{for((o=new s).generatedLine=d,l=y;l<g&&!this._charIsMappingSeparator(t,l);l++);if(c=v[a=t.slice(y,l)])y+=a.length;else{for(c=[];y<l;)r.decode(t,y,b),u=b.value,y=b.rest,c.push(u);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[a]=c}o.generatedColumn=p+c[0],p=o.generatedColumn,c.length>1&&(o.source=m+c[1],m+=c[1],o.originalLine=_+c[2],_=o.originalLine,o.originalLine+=1,o.originalColumn=f+c[3],f=o.originalColumn,c.length>4&&(o.name=h+c[4],h+=c[4])),S.push(o),"number"==typeof o.originalLine&&x.push(o)}i(S,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,i(x,e.compareByOriginalPositions),this.__originalMappings=x},a.prototype._findMapping=function(e,n,r,i,o,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return t.search(e,n,o,a)},a.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},a.prototype.originalPositionFor=function(t){var n={generatedLine:e.getArg(t,"line"),generatedColumn:e.getArg(t,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(t,"bias",o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=e.getArg(i,"source",null);null!==a&&(a=this._sources.at(a),a=e.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=e.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:a,line:e.getArg(i,"originalLine",null),column:e.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},a.prototype.sourceContentFor=function(t,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var i,o=t;if(null!=this.sourceRoot&&(o=e.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(i=e.urlParse(this.sourceRoot))){var a=o.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!i.path||"/"==i.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(n)return null;throw new Error('"'+o+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(t){var n=e.getArg(t,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:e.getArg(t,"line"),originalColumn:e.getArg(t,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(t,"bias",o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},eT.BasicSourceMapConsumer=a,c.prototype=Object.create(o.prototype),c.prototype.constructor=o,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),c.prototype.originalPositionFor=function(n){var r={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},i=t.search(r,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),o=this._sections[i];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:n.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 n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(-1!==r.consumer._findSourceIndex(e.getArg(t,"source"))){var i=r.consumer.generatedPositionFor(t);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},c.prototype._parseMappings=function(t,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var o=this._sections[r],a=o.consumer._generatedMappings,s=0;s<a.length;s++){var c=a[s],l=o.consumer._sources.at(c.source);l=e.computeSourceURL(o.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=o.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(o.generatedOffset.generatedLine===c.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}i(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),i(this.__originalMappings,e.compareByOriginalPositions)},eT.IndexedSourceMapConsumer=c,eT}().SourceMapConsumer,jk.SourceNode=function(){if(sT)return pT;sT=1;var e=Yk().SourceMapGenerator,t=qk(),n=/(\r?\n)/,r="$$$isSourceNode$$$";function i(e,t,n,i,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[r]=!0,null!=i&&this.add(i)}return i.fromStringWithSourceMap=function(e,r,o){var a=new i,s=e.split(n),c=0,l=function(){return e()+(e()||"");function e(){return c<s.length?s[c++]:void 0}},u=1,d=0,p=null;return r.eachMapping((function(e){if(null!==p){if(!(u<e.generatedLine)){var t=(n=s[c]||"").substr(0,e.generatedColumn-d);return s[c]=n.substr(e.generatedColumn-d),d=e.generatedColumn,_(p,t),void(p=e)}_(p,l()),u++,d=0}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var n=s[c]||"";a.add(n.substr(0,e.generatedColumn)),s[c]=n.substr(e.generatedColumn),d=e.generatedColumn}p=e}),this),c<s.length&&(p&&_(p,l()),a.add(s.splice(c).join(""))),r.sources.forEach((function(e){var n=r.sourceContentFor(e);null!=n&&(null!=o&&(e=t.join(o,e)),a.setSourceContent(e,n))})),a;function _(e,n){if(null===e||void 0===e.source)a.add(n);else{var r=o?t.join(o,e.source):e.source;a.add(new i(e.originalLine,e.originalColumn,r,n,e.name))}}},i.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[r]&&"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[r]&&"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,n=0,i=this.children.length;n<i;n++)(t=this.children[n])[r]?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,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},i.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[r]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},i.prototype.setSourceContent=function(e,n){this.sourceContents[t.toSetString(e)]=n},i.prototype.walkSourceContents=function(e){for(var n=0,i=this.children.length;n<i;n++)this.children[n][r]&&this.children[n].walkSourceContents(e);var o=Object.keys(this.sourceContents);for(n=0,i=o.length;n<i;n++)e(t.fromSetString(o[n]),this.sourceContents[o[n]])},i.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},i.prototype.toStringWithSourceMap=function(t){var n={code:"",line:1,column:0},r=new e(t),i=!1,o=null,a=null,s=null,c=null;return this.walk((function(e,t){n.code+=e,null!==t.source&&null!==t.line&&null!==t.column?(o===t.source&&a===t.line&&s===t.column&&c===t.name||r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,a=t.line,s=t.column,c=t.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var l=0,u=e.length;l<u;l++)10===e.charCodeAt(l)?(n.line++,n.column=0,l+1===u?(o=null,i=!1):i&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++})),this.walkSourceContents((function(e,t){r.setSourceContent(e,t)})),{code:n.code,map:r}},pT.SourceNode=i,pT}().SourceNode),jk}function fT(){if(uT)return lT;uT=1;var e=Object.prototype.toString,t="undefined"!=typeof Buffer&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;return lT=function(n,r,i){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return function(t){return"ArrayBuffer"===e.call(t).slice(8,-1)}(n)?function(e,n,r){n>>>=0;var i=e.byteLength-n;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===r)r=i;else if((r>>>=0)>i)throw new RangeError("'length' is out of bounds");return t?Buffer.from(e.slice(n,n+r)):new Buffer(new Uint8Array(e.slice(n,n+r)))}(n,r,i):"string"==typeof n?function(e,n){if("string"==typeof n&&""!==n||(n="utf8"),!Buffer.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return t?Buffer.from(e,n):new Buffer(e,n)}(n,r):t?Buffer.from(n):new Buffer(n)},lT}function mT(){return dT||(dT=1,function(e,t){var r,i=_T().SourceMapConsumer,o=n;try{(r=require("fs")).existsSync&&r.readFileSync||(r=null)}catch(e){}var a=fT();function s(e,t){return e.require(t)}var c=!1,l=!1,u=!1,d="auto",p={},_={},f=/^data:application\/json[^,]+base64,/,m=[],h=[];function g(){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 n=0;n<e.length;n++){var r=e[n](t);if(r)return r}return null}}var v=y(m);function b(e,t){if(!e)return t;var n=o.dirname(e),r=/^\w+:\/\/[^\/]*/.exec(n),i=r?r[0]:"",a=n.slice(i.length);return i&&/^\/\w\:/.test(a)?(i+="/")+o.resolve(n.slice(i.length),t).replace(/\\/g,"/"):i+o.resolve(n.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(r)r.existsSync(e)&&(t=r.readFileSync(e,"utf8"));else{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),4===n.readyState&&200===n.status&&(t=n.responseText)}}catch(e){}return p[e]=t}));var x=y(h);function S(e){var t=_[e.source];if(!t){var n=x(e.source);n?(t=_[e.source]={url:n.url,map:new i(n.map)}).map.sourcesContent&&t.map.sources.forEach((function(e,n){var r=t.map.sourcesContent[n];if(r){var i=b(t.url,e);p[i]=r}})):t=_[e.source]={url:null,map:null}}if(t&&t.map&&"function"==typeof t.map.originalPositionFor){var r=t.map.originalPositionFor(e);if(null!==r.source)return r.source=b(t.url,r.source),r}return e}function k(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var n=S({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+n.source+":"+n.line+":"+(n.column+1)+")"}return(t=/^eval at ([^(]+) \((.+)\)$/.exec(e))?"eval at "+t[1]+" ("+k(t[2])+")":e}function T(){var e,t="";if(this.isNative())t="native";else{!(e=this.getScriptNameOrSourceURL())&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),t+=e||"<anonymous>";var n=this.getLineNumber();if(null!=n){t+=":"+n;var r=this.getColumnNumber();r&&(t+=":"+r)}}var i="",o=this.getFunctionName(),a=!0,s=this.isConstructor();if(!(this.isToplevel()||s)){var c=this.getTypeName();"[object Object]"===c&&(c="null");var l=this.getMethodName();o?(c&&0!=o.indexOf(c)&&(i+=c+"."),i+=o,l&&o.indexOf("."+l)!=o.length-l.length-1&&(i+=" [as "+l+"]")):i+=c+"."+(l||"<anonymous>")}else s?i+="new "+(o||"<anonymous>"):o?i+=o:(i+=t,a=!1);return a&&(i+=" ("+t+")"),i}function w(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){t[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]})),t.toString=T,t}function C(e,t){if(void 0===t&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var r=e.getLineNumber(),i=e.getColumnNumber()-1,o=/^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===r&&i>o&&!g()&&!e.isEval()&&(i-=o);var a=S({source:n,line:r,column:i});t.curPosition=a;var s=(e=w(e)).getFunctionName;return e.getFunctionName=function(){return null==t.nextPosition?s():t.nextPosition.name||s()},e.getFileName=function(){return a.source},e.getLineNumber=function(){return a.line},e.getColumnNumber=function(){return a.column+1},e.getScriptNameOrSourceURL=function(){return a.source},e}var c=e.isEval()&&e.getEvalOrigin();return c?(c=k(c),(e=w(e)).getEvalOrigin=function(){return c},e):e}function D(e,t){u&&(p={},_={});for(var n=(e.name||"Error")+": "+(e.message||""),r={nextPosition:null,curPosition:null},i=[],o=t.length-1;o>=0;o--)i.push("\n at "+C(t[o],r)),r.nextPosition=r.curPosition;return r.curPosition=r.nextPosition=null,n+i.reverse().join("")}function E(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var n=t[1],i=+t[2],o=+t[3],a=p[n];if(!a&&r&&r.existsSync(n))try{a=r.readFileSync(n,"utf8")}catch(e){a=""}if(a){var s=a.split(/(?:\r\n|\r|\n)/)[i-1];if(s)return n+":"+i+"\n"+s+"\n"+new Array(o).join(" ")+"^"}}return null}function N(e){var t=E(e),n=function(){if("object"==typeof process&&null!==process)return process.stderr}();n&&n._handle&&n._handle.setBlocking&&n._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)}h.push((function(e){var t,n=function(e){var t;if(g())try{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),t=4===n.readyState?n.responseText:null;var r=n.getResponseHeader("SourceMap")||n.getResponseHeader("X-SourceMap");if(r)return r}catch(e){}t=v(e);for(var i,o,a=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;o=a.exec(t);)i=o;return i?i[1]:null}(e);if(!n)return null;if(f.test(n)){var r=n.slice(n.indexOf(",")+1);t=a(r,"base64").toString(),n=e}else n=b(e,n),t=v(n);return t?{url:n,map:t}:null}));var F=m.slice(0),P=h.slice(0);t.wrapCallSite=C,t.getErrorSource=E,t.mapSourcePosition=S,t.retrieveSourceMap=x,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&&(h.length=0),h.unshift(t.retrieveSourceMap)),t.hookRequire&&!g()){var n=s(e,"module"),r=n.prototype._compile;r.__sourceMapSupport||(n.prototype._compile=function(e,t){return p[t]=e,_[t]=void 0,r.call(this,e,t)},n.prototype._compile.__sourceMapSupport=!0)}if(u||(u="emptyCacheBetweenOperations"in t&&t.emptyCacheBetweenOperations),c||(c=!0,Error.prepareStackTrace=D),!l){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&&(l=!0,o=process.emit,process.emit=function(e){if("uncaughtException"===e){var t=arguments[1]&&arguments[1].stack,n=this.listeners(e).length>0;if(t&&!n)return N(arguments[1])}return o.apply(this,arguments)})}var o},t.resetRetrieveHandlers=function(){m.length=0,h.length=0,m=F.slice(0),h=P.slice(0),x=y(h),v=y(m)}}(Lk,Lk.exports)),Lk.exports}
14
+ */(),s=process.binding("constants"),c=o(),l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,d=3,p=(s.O_CREAT||s.fs.O_CREAT)|(s.O_EXCL||s.fs.O_EXCL)|(s.O_RDWR||s.fs.O_RDWR),_=s.EBADF||s.os.errno.EBADF,f=s.ENOENT||s.os.errno.ENOENT,m=[];var h=!1,g=!1;function y(e){var t=[],n=null;try{n=i.randomBytes(e)}catch(t){n=i.pseudoRandomBytes(e)}for(var r=0;r<e;r++)t.push(l[n[r]%l.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 x(e){if(e.name)return t.join(e.dir||c,e.name);if(e.template)return e.template.replace(u,y(6));const n=[e.prefix||"tmp-",process.pid,y(12),e.postfix||""].join("");return t.join(e.dir||c,n)}function S(t,n){var r=b(t,n),i=r[0],o=r[1],a=i.name?1:i.tries||d;return isNaN(a)||a<0?o(new Error("Invalid tries")):i.template&&!i.template.match(u)?o(new Error("Invalid template provided")):void function t(){const n=x(i);e.stat(n,(function(e){if(!e)return a-- >0?t():o(new Error("Could not get a unique tmp filename, max tries reached "+n));o(null,n)}))}()}function k(t){var n=b(t)[0],r=n.name?1:n.tries||d;if(isNaN(r)||r<0)throw new Error("Invalid tries");if(n.template&&!n.template.match(u))throw new Error("Invalid template provided");do{const t=x(n);try{e.statSync(t)}catch(e){return t}}while(r-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function T(n){const r=[n];do{for(var i=r.pop(),o=!1,a=e.readdirSync(i),s=0,c=a.length;s<c;s++){var l=t.join(i,a[s]);e.lstatSync(l).isDirectory()?(o||(o=!0,r.push(i)),r.push(l)):e.unlinkSync(l)}o||e.rmdirSync(i)}while(0!==r.length)}function w(t,n,r){const i=D((function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!function(e){return F(e,-_,"EBADF")}(e)&&!N(e))throw e}try{e.unlinkSync(t[1])}catch(e){if(!N(e))throw e}}),[n,t]);return r.keep||m.unshift(i),i}function C(t,n){const r=D(n.unsafeCleanup?T:e.rmdirSync.bind(e),t);return n.keep||m.unshift(r),r}function D(e,t){var n=!1;return function r(i){if(!n){const i=m.indexOf(r);i>=0&&m.splice(i,1),n=!0,e(t)}i&&i(null)}}function E(){if(!g||h)for(;m.length;)try{m[0].call(null)}catch(e){}}function N(e){return F(e,-f,"ENOENT")}function F(e,t,n){return e.code==t||e.code==n}const P=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));return 0===P[0]&&(P[1]<9||9===P[1]&&P[2]<5)&&process.addListener("uncaughtException",(function(e){throw g=!0,E(),e})),process.addListener("exit",(function(e){e&&(g=!0),E()})),tk.tmpdir=c,tk.dir=function(t,n){var r=b(t,n),i=r[0],o=r[1];S(i,(function(t,n){if(t)return o(t);e.mkdir(n,i.mode||448,(function(e){if(e)return o(e);o(null,n,C(n,i))}))}))},tk.dirSync=function(t){var n=b(t)[0];const r=k(n);return e.mkdirSync(r,n.mode||448),{name:r,removeCallback:C(r,n)}},tk.file=function(t,n){var r=b(t,n),i=r[0],o=r[1];i.postfix=v(i.postfix)?".tmp":i.postfix,S(i,(function(t,n){if(t)return o(t);e.open(n,p,i.mode||384,(function(t,r){return t?o(t):i.discardDescriptor?e.close(r,(function(t){if(t){try{e.unlinkSync(n)}catch(e){N(e)||(t=e)}return o(t)}o(null,n,void 0,w(n,-1,i))})):i.detachDescriptor?o(null,n,r,w(n,-1,i)):void o(null,n,r,w(n,r,i))}))}))},tk.fileSync=function(t){var n=b(t)[0];n.postfix=n.postfix||".tmp";const r=n.discardDescriptor||n.detachDescriptor,i=k(n);var o=e.openSync(i,p,n.mode||384);return n.discardDescriptor&&(e.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:w(i,r?-1:o,n)}},tk.tmpName=S,tk.tmpNameSync=k,tk.setGracefulCleanup=function(){h=!0},tk}var rk,ik={};var ok,ak={};var sk,ck={};var lk,uk,dk,pk,_k={};function fk(){if(uk)return Wx;uk=1,Object.defineProperty(Wx,"__esModule",{value:!0});var e=function(){if(oS)return $x;oS=1;var e=r,t=Hx(),n=Qx(),i=eS(),o=rS(),a=sS(),s=k,c=[new t,new n.UTF_16BE,new n.UTF_16LE,new n.UTF_32BE,new n.UTF_32LE,new i.sjis,new i.big5,new i.euc_jp,new i.euc_kr,new i.gb_18030,new a.ISO_2022_JP,new a.ISO_2022_KR,new a.ISO_2022_CN,new o.ISO_8859_1,new o.ISO_8859_2,new o.ISO_8859_5,new o.ISO_8859_6,new o.ISO_8859_7,new o.ISO_8859_8,new o.ISO_8859_9,new o.windows_1251,new o.windows_1256,new o.KOI8_R];return $x.detect=function(e,t){for(var n=[],r=0;r<256;r++)n[r]=0;for(r=e.length-1;r>=0;r--)n[255&e[r]]++;var i=!1;for(r=128;r<=159;r+=1)if(0!=n[r]){i=!0;break}var o={fByteStats:n,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},a=c.map((function(e){return e.match(o)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?a:a.length>0?a[0].name:null},$x.detectFile=function(t,n,r){var i;"function"==typeof n&&(r=n,n=void 0);var o=function(t,o){if(i&&e.closeSync(i),t)return r(t,null);r(null,s.detect(o,n))};if(n&&n.sampleSize)return i=e.openSync(t,"r"),sample=Buffer.allocUnsafe(n.sampleSize),void e.read(i,sample,0,n.sampleSize,null,(function(e){o(e,sample)}));e.readFile(t,o)},$x.detectFileSync=function(t,n){if(n&&n.sampleSize){var r=e.openSync(t,"r"),i=Buffer.allocUnsafe(n.sampleSize);return e.readSync(r,i,0,n.sampleSize),e.closeSync(r),s.detect(i,n)}return s.detect(e.readFileSync(t),n)},$x.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detect(e,t)},$x.detectFileAll=function(e,t,n){"function"==typeof t&&(n=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFile(e,t,n)},$x.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,s.detectFileSync(e,t)},$x}(),n=t,i=r,o=QS(),a=nk(),s=function(){if(rk)return ik;rk=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ik,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed to create temporary file for editor")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return ik.CreateFileError=t,ik}();Wx.CreateFileError=s.CreateFileError;var c=function(){if(ok)return ak;ok=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ak,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed launch editor")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return ak.LaunchEditorError=t,ak}();Wx.LaunchEditorError=c.LaunchEditorError;var l=function(){if(sk)return ck;sk=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ck,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed to read temporary file")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return ck.ReadFileError=t,ck}();Wx.ReadFileError=l.ReadFileError;var u=function(){if(lk)return _k;lk=1;var e=k&&k.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(_k,"__esModule",{value:!0});var t=function(t){function n(e){var n=this.constructor,r=t.call(this,"Failed to cleanup temporary file")||this;r.originalError=e;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=n.prototype,r}return e(n,t),n}(Error);return _k.RemoveFileError=t,_k}();Wx.RemoveFileError=u.RemoveFileError,Wx.edit=function(e,t){void 0===e&&(e="");var n=new d(e,t);return n.run(),n.cleanup(),n.text},Wx.editAsync=function(e,t,n){void 0===e&&(e="");var r=new d(e,n);r.runAsync((function(e,n){if(e)setImmediate(t,e,null);else try{r.cleanup(),setImmediate(t,null,n)}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=[],n="",r=0;r<e.length;r++){var i=e[r];r>0&&" "===i&&"\\"!==e[r-1]&&n.length>0?(t.push(n),n=""):n+=i}return n.length>0&&t.push(n),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",n=t.splitStringBySpace(e).map((function(e){return e.replace("\\ "," ")})),r=n.shift();this.editor={args:n,bin:r}},t.prototype.createTemporaryFile=function(){try{this.tempFile=a.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 n=e.detect(t).toString();o.encodingExists(n)||(n="utf8"),this.text=o.decode(t,n)}}catch(e){throw new l.ReadFileError(e)}},t.prototype.removeTemporaryFile=function(){try{i.unlinkSync(this.tempFile)}catch(e){throw new u.RemoveFileError(e)}},t.prototype.launchEditor=function(){try{var e=n.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{n.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(n){t.lastExitStatus=n,setImmediate(e)}))}catch(e){throw new c.LaunchEditorError(e)}},t}();return Wx.ExternalEditor=d,Wx}!function(e){var t=nr.exports;t.prompts={},t.Separator=fr,t.ui={BottomBar:bd,Prompt:Uy},t.createPromptModule=function(e){var n=function(r,i){var o;try{o=new t.ui.Prompt(n.prompts,e)}catch(e){return Promise.reject(e)}var a=o.run(r,i);return a.ui=o,a};return n.prompts={},n.registerPrompt=function(e,t){return n.prompts[e]=t,this},n.restoreDefaultPrompts=function(){this.registerPrompt("list",Px()),this.registerPrompt("input",Ax()),this.registerPrompt("number",function(){if(qb)return Ub;qb=1;var e=Ax();return Ub=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}},Ub}()),this.registerPrompt("confirm",function(){if(Hb)return Gb;Hb=1;var e={extend:Wo(),isBoolean:Ix()},t=_,{take:n,takeUntil:r}=og,i=Cx(),o=Dx();return Gb=class extends i{constructor(t,n,r){super(t,n,r);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=o(this.rl);return t.keypress.pipe(r(t.line)).forEach(this.onKeypress.bind(this)),t.line.pipe(n(1)).forEach(this.onEnd.bind(this)),this.render(),this}render(e){var n=this.getQuestion();return n+="boolean"==typeof e?t.cyan(e?"Yes":"No"):this.rl.line,this.screen.render(n),this}onEnd(e){this.status="answered";var t=this.opt.filter(e);this.render(t),this.screen.done(),this.done(t)}onKeypress(){this.render()}},Gb}()),this.registerPrompt("rawlist",Ox()),this.registerPrompt("expand",Bx()),this.registerPrompt("checkbox",Vx()),this.registerPrompt("password",function(){if(bx)return vx;bx=1;var e=_,{map:t,takeUntil:n}=og,r=Cx(),i=Dx();function o(e,t){return t="string"==typeof t?t:"*",0===(e=String(e)).length?"":new Array(e.length+1).join(t)}return vx=class extends r{_run(e){this.done=e;var r=i(this.rl),o=r.line.pipe(t(this.filterInput.bind(this))),a=this.handleSubmitEvents(o);return a.success.forEach(this.onEnd.bind(this)),a.error.forEach(this.onError.bind(this)),r.keypress.pipe(n(a.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(t){var n=this.getQuestion(),r="";"answered"===this.status?n+=this.opt.mask?e.cyan(o(this.answer,this.opt.mask)):e.italic.dim("[hidden]"):this.opt.mask?n+=o(this.rl.line||"",this.opt.mask):n+=e.italic.dim("[input is hidden] "),t&&(r="\n"+e.red(">> ")+t),this.screen.render(n,r)}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()}},vx}()),this.registerPrompt("editor",function(){if(pk)return dk;pk=1;var e=_,t=fk().editAsync,n=Cx(),r=Dx(),{Subject:i}=df;return dk=class extends n{_run(e){this.done=e,this.editorResult=new i;var t=r(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));var n=this.handleSubmitEvents(this.editorResult);return n.success.forEach(this.onEnd.bind(this)),n.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(t){var n="",r=this.getQuestion();"answered"===this.status?r+=e.dim("Received"):r+=e.dim("Press <enter> to launch your preferred editor."),t&&(n=e.red(">> ")+t),this.screen.render(r,n)}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)}},dk}())},n.restoreDefaultPrompts(),n},t.prompt=t.createPromptModule(),t.registerPrompt=function(e,n){t.prompt.registerPrompt(e,n)},t.restoreDefaultPrompts=function(){t.prompt.restoreDefaultPrompts()}}();var mk=T(nr.exports);const{red:hk,italic:gk,yellow:yk,green:vk}=_,{prompt:bk}=mk;class xk{constructor(e,t){this.git=e,this.config=t,this.packageJsonPath=n.join(t.projectDir,"package.json"),this.packageJson=JSON.parse(r.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),n=this.git.getCurrentBranch();if(t.includes(n))return console.log(vk(` ✓ Using the "${gk(n)}" branch.`)),n;1!==t.length&&(console.warn(yk(" ✘ You are not on an allowed publish branch.")),console.warn(yk(` Please switch to one of the following branches: ${t.join(", ")}`)),process.exit(0));const r=t[0];this.git.checkoutBranch(r)||(console.error(hk(` ✘ Could not switch to the "${gk(r)}" branch.`)),console.error(hk(" Please ensure that the branch exists or manually switch to the branch.")),process.exit(1)),console.log(vk(` ✓ Switched to the "${gk(r)}" branch.`))}verifyLocalCommitsMatchUpstream(e){this.git.getRemoteCommitSha(e),this.git.getLocalCommitSha("HEAD")}verifyNoUncommittedChanges(){this.git.hasUncommittedChanges()}async promptConfirm(e){return(await bk({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(hk(" ✘ Release config did not find in the package.json file.")),process.exit(1))}runReleaseCommands(e){var r,i,o,a;const s={cwd:n.join(this.config.projectDir,"node_modules/.bin"),stdio:"inherit"},c=null!==(a=null===(o=null===(i=null===(r=this.packageJson)||void 0===r?void 0:r.release)||void 0===i?void 0:i.hooks)||void 0===o?void 0:o[e])&&void 0!==a?a:[];for(const e of c)t.execSync(e,s)}}const Sk="CHANGELOG.md";function kk(e,t){const n=r.readFileSync(e,"utf8"),i=t.replace(new RegExp("\\.","g"),"\\."),o=new RegExp(`##? (${i} \\(\\d{4}-\\d{2}-\\d{2}\\)\n\n### .+?)\n\n([\\s\\S]*?)(?=\n# )`).exec(n);return o?{releaseTitle:o[1],releaseNotes:o[2]}:null}class Tk{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","-s",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,n=!0){return t.spawnSync("git",e,{cwd:this.projectDir,stdio:["pipe","pipe",n?"inherit":"pipe"],encoding:"utf8"})}}const{green:wk,red:Ck,cyan:Dk}=_;function Ek(e,t){e?console.info(wk(" ✓ Notification is posted in Mattermost.")):(console.error(Ck(" ✘ Could not post notification in Mattermost.")),t&&console.error(t.message))}async function Nk(e){console.log(wk("Start MM notification"));const t=function(){const e=process.env.MATTERMOST_ENDPOINT_URL,t=process.env.MATTERMOST_CHANNEL;return e&&t?{url:e,channel:t}:null}();if(!t)return void console.error(Ck(" ✘ MATTERMOST_ENDPOINT_URL or MATTERMOST_CHANNEL not found."));const n={channel:`${t.channel}`,username:"Wall-e",short:!1,text:`## ${e.releaseTitle}\n${e.releaseNotes}`};try{await async function(e,t){const n={"Content-Type":"application/json"},r={method:"POST",headers:n,body:JSON.stringify(t)};console.info(Dk("POST notification:",{url:e,headers:n,body:JSON.stringify(t)}));const i=await fetch(e,r);if(!i.ok)throw new Error(`Failed to post notification: ${i.status} ${i.statusText}`)}(t.url,n),Ek(!0)}catch(e){Ek(!1,e)}}function Fk(e,n){const r=["publish","--access","public","--tag",n];process.env.DEBUG&&r.push("--dry-run");const i=t.spawnSync("npm",r,{cwd:e,shell:!0});if(0!==i.status)return i.stderr.toString()}function Pk(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 Ak,Ik,Ok={exports:{}},Lk={exports:{}},jk={},Rk={},Mk={},Bk={};function Vk(){if(Ak)return Bk;Ak=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Bk.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},Bk.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},Bk}function Jk(){if(Ik)return Mk;Ik=1;var e=Vk();return Mk.encode=function(t){var n,r="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(t);do{n=31&i,(i>>>=5)>0&&(n|=32),r+=e.encode(n)}while(i>0);return r},Mk.decode=function(t,n,r){var i,o,a,s,c=t.length,l=0,u=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=e.decode(t.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+t.charAt(n-1));i=!!(32&o),l+=(o&=31)<<u,u+=5}while(i);r.value=(s=(a=l)>>1,1&~a?s:-s),r.rest=n},Mk}var zk,Uk={};function qk(){return zk||(zk=1,function(e){e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[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 o(t){var n=t,o=r(t);if(o){if(!o.path)return t;n=o.path}for(var a,s=e.isAbsolute(n),c=n.split(/\/+/),l=0,u=c.length-1;u>=0;u--)"."===(a=c[u])?c.splice(u,1):".."===a?l++:l>0&&(""===a?(c.splice(u+1,l),l=0):(c.splice(u,2),l--));return""===(n=c.join("/"))&&(n=s?"/":"."),o?(o.path=n,i(o)):n}function a(e,t){""===e&&(e="."),""===t&&(t=".");var a=r(t),s=r(e);if(s&&(e=s.path||"/"),a&&!a.scheme)return s&&(a.scheme=s.scheme),i(a);if(a||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,i(s)):c}e.urlParse=r,e.urlGenerate=i,e.normalize=o,e.join=a,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function c(e){return e}function l(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 n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=s?c:function(e){return l(e)?"$"+e:e},e.fromSetString=s?c:function(e){return l(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=u(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=u(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var s=r(n);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=a(i(s),t)}return o(t)}}(Uk)),Uk}var Wk,$k={};function Gk(){if(Wk)return $k;Wk=1;var e=qk(),t=Object.prototype.hasOwnProperty,n="undefined"!=typeof Map;function r(){this._array=[],this._set=n?new Map:Object.create(null)}return r.fromArray=function(e,t){for(var n=new r,i=0,o=e.length;i<o;i++)n.add(e[i],t);return n},r.prototype.size=function(){return n?this._set.size:Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(r,i){var o=n?r:e.toSetString(r),a=n?this.has(r):t.call(this._set,o),s=this._array.length;a&&!i||this._array.push(r),a||(n?this._set.set(r,s):this._set[o]=s)},r.prototype.has=function(r){if(n)return this._set.has(r);var i=e.toSetString(r);return t.call(this._set,i)},r.prototype.indexOf=function(r){if(n){var i=this._set.get(r);if(i>=0)return i}else{var o=e.toSetString(r);if(t.call(this._set,o))return this._set[o]}throw new Error('"'+r+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},$k.ArraySet=r,$k}var Hk,Kk,Xk={};function Qk(){if(Hk)return Xk;Hk=1;var e=qk();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 n,r,i,o,a,s;n=this._last,r=t,i=n.generatedLine,o=r.generatedLine,a=n.generatedColumn,s=r.generatedColumn,o>i||o==i&&s>=a||e.compareByGeneratedPositionsInflated(n,r)<=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},Xk.MappingList=t,Xk}function Yk(){if(Kk)return Rk;Kk=1;var e=Jk(),t=qk(),n=Gk().ArraySet,r=Qk().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 n,this._names=new n,this._mappings=new r,this._sourcesContents=null}return i.prototype._version=3,i.fromSourceMap=function(e){var n=e.sourceRoot,r=new i({file:e.file,sourceRoot:n});return e.eachMapping((function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(i.source=e.source,null!=n&&(i.source=t.relative(n,i.source)),i.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(i.name=e.name)),r.addMapping(i)})),e.sources.forEach((function(i){var o=i;null!==n&&(o=t.relative(n,i)),r._sources.has(o)||r._sources.add(o);var a=e.sourceContentFor(i);null!=a&&r.setSourceContent(i,a)})),r},i.prototype.addMapping=function(e){var n=t.getArg(e,"generated"),r=t.getArg(e,"original",null),i=t.getArg(e,"source",null),o=t.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,i,o),null!=i&&(i=String(i),this._sources.has(i)||this._sources.add(i)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:i,name:o})},i.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=t.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,r,i){var o=r;if(null==r){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.');o=e.file}var a=this._sourceRoot;null!=a&&(o=t.relative(a,o));var s=new n,c=new n;this._mappings.unsortedForEach((function(n){if(n.source===o&&null!=n.originalLine){var r=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=r.source&&(n.source=r.source,null!=i&&(n.source=t.join(i,n.source)),null!=a&&(n.source=t.relative(a,n.source)),n.originalLine=r.line,n.originalColumn=r.column,null!=r.name&&(n.name=r.name))}var l=n.source;null==l||s.has(l)||s.add(l);var u=n.name;null==u||c.has(u)||c.add(u)}),this),this._sources=s,this._names=c,e.sources.forEach((function(n){var r=e.sourceContentFor(n);null!=r&&(null!=i&&(n=t.join(i,n)),null!=a&&(n=t.relative(a,n)),this.setSourceContent(n,r))}),this)},i.prototype._validateMapping=function(e,t,n,r){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||n||r)&&!(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&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},i.prototype._serializeMappings=function(){for(var n,r,i,o,a=0,s=1,c=0,l=0,u=0,d=0,p="",_=this._mappings.toArray(),f=0,m=_.length;f<m;f++){if(n="",(r=_[f]).generatedLine!==s)for(a=0;r.generatedLine!==s;)n+=";",s++;else if(f>0){if(!t.compareByGeneratedPositionsInflated(r,_[f-1]))continue;n+=","}n+=e.encode(r.generatedColumn-a),a=r.generatedColumn,null!=r.source&&(o=this._sources.indexOf(r.source),n+=e.encode(o-d),d=o,n+=e.encode(r.originalLine-1-l),l=r.originalLine-1,n+=e.encode(r.originalColumn-c),c=r.originalColumn,null!=r.name&&(i=this._names.indexOf(r.name),n+=e.encode(i-u),u=i)),p+=n}return p},i.prototype._generateSourcesContent=function(e,n){return e.map((function(e){if(!this._sourcesContents)return null;null!=n&&(e=t.relative(n,e));var r=t.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]: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())},Rk.SourceMapGenerator=i,Rk}var Zk,eT={},tT={};function nT(){return Zk||(Zk=1,function(e){function t(n,r,i,o,a,s){var c=Math.floor((r-n)/2)+n,l=a(i,o[c],!0);return 0===l?c:l>0?r-c>1?t(c,r,i,o,a,s):s==e.LEAST_UPPER_BOUND?r<o.length?r:-1:c:c-n>1?t(n,c,i,o,a,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(n,r,i,o){if(0===r.length)return-1;var a=t(-1,r.length,n,r,i,o||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(r[a],r[a-1],!0);)--a;return a}}(tT)),tT}var rT,iT,oT={};function aT(){if(rT)return oT;function e(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function t(n,r,i,o){if(i<o){var a=i-1;e(n,(u=i,d=o,Math.round(u+Math.random()*(d-u))),o);for(var s=n[o],c=i;c<o;c++)r(n[c],s)<=0&&e(n,a+=1,c);e(n,a+1,c);var l=a+1;t(n,r,i,l-1),t(n,r,l+1,o)}var u,d}return rT=1,oT.quickSort=function(e,n){t(e,n,0,e.length-1)},oT}var sT,cT,lT,uT,dT,pT={};function _T(){return cT||(cT=1,jk.SourceMapGenerator=Yk().SourceMapGenerator,jk.SourceMapConsumer=function(){if(iT)return eT;iT=1;var e=qk(),t=nT(),n=Gk().ArraySet,r=Jk(),i=aT().quickSort;function o(t,n){var r=t;return"string"==typeof t&&(r=e.parseSourceMapInput(t)),null!=r.sections?new c(r,n):new a(r,n)}function a(t,r){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var o=e.getArg(i,"version"),a=e.getArg(i,"sources"),s=e.getArg(i,"names",[]),c=e.getArg(i,"sourceRoot",null),l=e.getArg(i,"sourcesContent",null),u=e.getArg(i,"mappings"),d=e.getArg(i,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);c&&(c=e.normalize(c)),a=a.map(String).map(e.normalize).map((function(t){return c&&e.isAbsolute(c)&&e.isAbsolute(t)?e.relative(c,t):t})),this._names=n.fromArray(s.map(String),!0),this._sources=n.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map((function(t){return e.computeSourceURL(c,t,r)})),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=r,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,r){var i=t;"string"==typeof t&&(i=e.parseSourceMapInput(t));var a=e.getArg(i,"version"),s=e.getArg(i,"sections");if(a!=this._version)throw new Error("Unsupported version: "+a);this._sources=new n,this._names=new n;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 n=e.getArg(t,"offset"),i=e.getArg(n,"line"),a=e.getArg(n,"column");if(i<c.line||i===c.line&&a<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=n,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(e.getArg(t,"map"),r)}}))}return o.fromSourceMap=function(e,t){return a.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},o.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(t,n,r){var i,a=n||null;switch(r||o.GENERATED_ORDER){case o.GENERATED_ORDER:i=this._generatedMappings;break;case o.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;i.map((function(t){var n=null===t.source?null:this._sources.at(t.source);return{source:n=e.computeSourceURL(s,n,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,a)},o.prototype.allGeneratedPositionsFor=function(n){var r=e.getArg(n,"line"),i={source:e.getArg(n,"source"),originalLine:r,originalColumn:e.getArg(n,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var o=[],a=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(a>=0){var s=this._originalMappings[a];if(void 0===n.column)for(var c=s.originalLine;s&&s.originalLine===c;)o.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)o.push({line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return o},eT.SourceMapConsumer=o,a.prototype=Object.create(o.prototype),a.prototype.consumer=o,a.prototype._findSourceIndex=function(t){var n,r=t;if(null!=this.sourceRoot&&(r=e.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1},a.fromSourceMap=function(t,r){var o=Object.create(a.prototype),c=o._names=n.fromArray(t._names.toArray(),!0),l=o._sources=n.fromArray(t._sources.toArray(),!0);o.sourceRoot=t._sourceRoot,o.sourcesContent=t._generateSourcesContent(o._sources.toArray(),o.sourceRoot),o.file=t._file,o._sourceMapURL=r,o._absoluteSources=o._sources.toArray().map((function(t){return e.computeSourceURL(o.sourceRoot,t,r)}));for(var u=t._mappings.toArray().slice(),d=o.__generatedMappings=[],p=o.__originalMappings=[],_=0,f=u.length;_<f;_++){var m=u[_],h=new s;h.generatedLine=m.generatedLine,h.generatedColumn=m.generatedColumn,m.source&&(h.source=l.indexOf(m.source),h.originalLine=m.originalLine,h.originalColumn=m.originalColumn,m.name&&(h.name=c.indexOf(m.name)),p.push(h)),d.push(h)}return i(o.__originalMappings,e.compareByOriginalPositions),o},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),a.prototype._parseMappings=function(t,n){for(var o,a,c,l,u,d=1,p=0,_=0,f=0,m=0,h=0,g=t.length,y=0,v={},b={},x=[],S=[];y<g;)if(";"===t.charAt(y))d++,y++,p=0;else if(","===t.charAt(y))y++;else{for((o=new s).generatedLine=d,l=y;l<g&&!this._charIsMappingSeparator(t,l);l++);if(c=v[a=t.slice(y,l)])y+=a.length;else{for(c=[];y<l;)r.decode(t,y,b),u=b.value,y=b.rest,c.push(u);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[a]=c}o.generatedColumn=p+c[0],p=o.generatedColumn,c.length>1&&(o.source=m+c[1],m+=c[1],o.originalLine=_+c[2],_=o.originalLine,o.originalLine+=1,o.originalColumn=f+c[3],f=o.originalColumn,c.length>4&&(o.name=h+c[4],h+=c[4])),S.push(o),"number"==typeof o.originalLine&&x.push(o)}i(S,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,i(x,e.compareByOriginalPositions),this.__originalMappings=x},a.prototype._findMapping=function(e,n,r,i,o,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return t.search(e,n,o,a)},a.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},a.prototype.originalPositionFor=function(t){var n={generatedLine:e.getArg(t,"line"),generatedColumn:e.getArg(t,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(t,"bias",o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=e.getArg(i,"source",null);null!==a&&(a=this._sources.at(a),a=e.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=e.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:a,line:e.getArg(i,"originalLine",null),column:e.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},a.prototype.sourceContentFor=function(t,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var i,o=t;if(null!=this.sourceRoot&&(o=e.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(i=e.urlParse(this.sourceRoot))){var a=o.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!i.path||"/"==i.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(n)return null;throw new Error('"'+o+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(t){var n=e.getArg(t,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:e.getArg(t,"line"),originalColumn:e.getArg(t,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(t,"bias",o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},eT.BasicSourceMapConsumer=a,c.prototype=Object.create(o.prototype),c.prototype.constructor=o,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),c.prototype.originalPositionFor=function(n){var r={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},i=t.search(r,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),o=this._sections[i];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:n.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 n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(-1!==r.consumer._findSourceIndex(e.getArg(t,"source"))){var i=r.consumer.generatedPositionFor(t);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},c.prototype._parseMappings=function(t,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var o=this._sections[r],a=o.consumer._generatedMappings,s=0;s<a.length;s++){var c=a[s],l=o.consumer._sources.at(c.source);l=e.computeSourceURL(o.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=o.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(o.generatedOffset.generatedLine===c.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}i(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),i(this.__originalMappings,e.compareByOriginalPositions)},eT.IndexedSourceMapConsumer=c,eT}().SourceMapConsumer,jk.SourceNode=function(){if(sT)return pT;sT=1;var e=Yk().SourceMapGenerator,t=qk(),n=/(\r?\n)/,r="$$$isSourceNode$$$";function i(e,t,n,i,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[r]=!0,null!=i&&this.add(i)}return i.fromStringWithSourceMap=function(e,r,o){var a=new i,s=e.split(n),c=0,l=function(){return e()+(e()||"");function e(){return c<s.length?s[c++]:void 0}},u=1,d=0,p=null;return r.eachMapping((function(e){if(null!==p){if(!(u<e.generatedLine)){var t=(n=s[c]||"").substr(0,e.generatedColumn-d);return s[c]=n.substr(e.generatedColumn-d),d=e.generatedColumn,_(p,t),void(p=e)}_(p,l()),u++,d=0}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var n=s[c]||"";a.add(n.substr(0,e.generatedColumn)),s[c]=n.substr(e.generatedColumn),d=e.generatedColumn}p=e}),this),c<s.length&&(p&&_(p,l()),a.add(s.splice(c).join(""))),r.sources.forEach((function(e){var n=r.sourceContentFor(e);null!=n&&(null!=o&&(e=t.join(o,e)),a.setSourceContent(e,n))})),a;function _(e,n){if(null===e||void 0===e.source)a.add(n);else{var r=o?t.join(o,e.source):e.source;a.add(new i(e.originalLine,e.originalColumn,r,n,e.name))}}},i.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[r]&&"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[r]&&"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,n=0,i=this.children.length;n<i;n++)(t=this.children[n])[r]?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,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},i.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[r]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},i.prototype.setSourceContent=function(e,n){this.sourceContents[t.toSetString(e)]=n},i.prototype.walkSourceContents=function(e){for(var n=0,i=this.children.length;n<i;n++)this.children[n][r]&&this.children[n].walkSourceContents(e);var o=Object.keys(this.sourceContents);for(n=0,i=o.length;n<i;n++)e(t.fromSetString(o[n]),this.sourceContents[o[n]])},i.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},i.prototype.toStringWithSourceMap=function(t){var n={code:"",line:1,column:0},r=new e(t),i=!1,o=null,a=null,s=null,c=null;return this.walk((function(e,t){n.code+=e,null!==t.source&&null!==t.line&&null!==t.column?(o===t.source&&a===t.line&&s===t.column&&c===t.name||r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,a=t.line,s=t.column,c=t.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var l=0,u=e.length;l<u;l++)10===e.charCodeAt(l)?(n.line++,n.column=0,l+1===u?(o=null,i=!1):i&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++})),this.walkSourceContents((function(e,t){r.setSourceContent(e,t)})),{code:n.code,map:r}},pT.SourceNode=i,pT}().SourceNode),jk}function fT(){if(uT)return lT;uT=1;var e=Object.prototype.toString,t="undefined"!=typeof Buffer&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;return lT=function(n,r,i){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return function(t){return"ArrayBuffer"===e.call(t).slice(8,-1)}(n)?function(e,n,r){n>>>=0;var i=e.byteLength-n;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===r)r=i;else if((r>>>=0)>i)throw new RangeError("'length' is out of bounds");return t?Buffer.from(e.slice(n,n+r)):new Buffer(new Uint8Array(e.slice(n,n+r)))}(n,r,i):"string"==typeof n?function(e,n){if("string"==typeof n&&""!==n||(n="utf8"),!Buffer.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return t?Buffer.from(e,n):new Buffer(e,n)}(n,r):t?Buffer.from(n):new Buffer(n)},lT}function mT(){return dT||(dT=1,function(e,t){var r,i=_T().SourceMapConsumer,o=n;try{(r=require("fs")).existsSync&&r.readFileSync||(r=null)}catch(e){}var a=fT();function s(e,t){return e.require(t)}var c=!1,l=!1,u=!1,d="auto",p={},_={},f=/^data:application\/json[^,]+base64,/,m=[],h=[];function g(){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 n=0;n<e.length;n++){var r=e[n](t);if(r)return r}return null}}var v=y(m);function b(e,t){if(!e)return t;var n=o.dirname(e),r=/^\w+:\/\/[^\/]*/.exec(n),i=r?r[0]:"",a=n.slice(i.length);return i&&/^\/\w\:/.test(a)?(i+="/")+o.resolve(n.slice(i.length),t).replace(/\\/g,"/"):i+o.resolve(n.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(r)r.existsSync(e)&&(t=r.readFileSync(e,"utf8"));else{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),4===n.readyState&&200===n.status&&(t=n.responseText)}}catch(e){}return p[e]=t}));var x=y(h);function S(e){var t=_[e.source];if(!t){var n=x(e.source);n?(t=_[e.source]={url:n.url,map:new i(n.map)}).map.sourcesContent&&t.map.sources.forEach((function(e,n){var r=t.map.sourcesContent[n];if(r){var i=b(t.url,e);p[i]=r}})):t=_[e.source]={url:null,map:null}}if(t&&t.map&&"function"==typeof t.map.originalPositionFor){var r=t.map.originalPositionFor(e);if(null!==r.source)return r.source=b(t.url,r.source),r}return e}function k(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var n=S({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+n.source+":"+n.line+":"+(n.column+1)+")"}return(t=/^eval at ([^(]+) \((.+)\)$/.exec(e))?"eval at "+t[1]+" ("+k(t[2])+")":e}function T(){var e,t="";if(this.isNative())t="native";else{!(e=this.getScriptNameOrSourceURL())&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),t+=e||"<anonymous>";var n=this.getLineNumber();if(null!=n){t+=":"+n;var r=this.getColumnNumber();r&&(t+=":"+r)}}var i="",o=this.getFunctionName(),a=!0,s=this.isConstructor();if(!(this.isToplevel()||s)){var c=this.getTypeName();"[object Object]"===c&&(c="null");var l=this.getMethodName();o?(c&&0!=o.indexOf(c)&&(i+=c+"."),i+=o,l&&o.indexOf("."+l)!=o.length-l.length-1&&(i+=" [as "+l+"]")):i+=c+"."+(l||"<anonymous>")}else s?i+="new "+(o||"<anonymous>"):o?i+=o:(i+=t,a=!1);return a&&(i+=" ("+t+")"),i}function w(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){t[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]})),t.toString=T,t}function C(e,t){if(void 0===t&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var r=e.getLineNumber(),i=e.getColumnNumber()-1,o=/^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===r&&i>o&&!g()&&!e.isEval()&&(i-=o);var a=S({source:n,line:r,column:i});t.curPosition=a;var s=(e=w(e)).getFunctionName;return e.getFunctionName=function(){return null==t.nextPosition?s():t.nextPosition.name||s()},e.getFileName=function(){return a.source},e.getLineNumber=function(){return a.line},e.getColumnNumber=function(){return a.column+1},e.getScriptNameOrSourceURL=function(){return a.source},e}var c=e.isEval()&&e.getEvalOrigin();return c?(c=k(c),(e=w(e)).getEvalOrigin=function(){return c},e):e}function D(e,t){u&&(p={},_={});for(var n=(e.name||"Error")+": "+(e.message||""),r={nextPosition:null,curPosition:null},i=[],o=t.length-1;o>=0;o--)i.push("\n at "+C(t[o],r)),r.nextPosition=r.curPosition;return r.curPosition=r.nextPosition=null,n+i.reverse().join("")}function E(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var n=t[1],i=+t[2],o=+t[3],a=p[n];if(!a&&r&&r.existsSync(n))try{a=r.readFileSync(n,"utf8")}catch(e){a=""}if(a){var s=a.split(/(?:\r\n|\r|\n)/)[i-1];if(s)return n+":"+i+"\n"+s+"\n"+new Array(o).join(" ")+"^"}}return null}function N(e){var t=E(e),n=function(){if("object"==typeof process&&null!==process)return process.stderr}();n&&n._handle&&n._handle.setBlocking&&n._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)}h.push((function(e){var t,n=function(e){var t;if(g())try{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),t=4===n.readyState?n.responseText:null;var r=n.getResponseHeader("SourceMap")||n.getResponseHeader("X-SourceMap");if(r)return r}catch(e){}t=v(e);for(var i,o,a=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;o=a.exec(t);)i=o;return i?i[1]:null}(e);if(!n)return null;if(f.test(n)){var r=n.slice(n.indexOf(",")+1);t=a(r,"base64").toString(),n=e}else n=b(e,n),t=v(n);return t?{url:n,map:t}:null}));var F=m.slice(0),P=h.slice(0);t.wrapCallSite=C,t.getErrorSource=E,t.mapSourcePosition=S,t.retrieveSourceMap=x,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&&(h.length=0),h.unshift(t.retrieveSourceMap)),t.hookRequire&&!g()){var n=s(e,"module"),r=n.prototype._compile;r.__sourceMapSupport||(n.prototype._compile=function(e,t){return p[t]=e,_[t]=void 0,r.call(this,e,t)},n.prototype._compile.__sourceMapSupport=!0)}if(u||(u="emptyCacheBetweenOperations"in t&&t.emptyCacheBetweenOperations),c||(c=!0,Error.prepareStackTrace=D),!l){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&&(l=!0,o=process.emit,process.emit=function(e){if("uncaughtException"===e){var t=arguments[1]&&arguments[1].stack,n=this.listeners(e).length>0;if(t&&!n)return N(arguments[1])}return o.apply(this,arguments)})}var o},t.resetRetrieveHandlers=function(){m.length=0,h.length=0,m=F.slice(0),h=P.slice(0),x=y(h),v=y(m)}}(Lk,Lk.exports)),Lk.exports}
15
15
  /*! *****************************************************************************
16
16
  Copyright (c) Microsoft Corporation. All rights reserved.
17
17
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use