UNPKG

lightview

Version:

Small, simple, powerful web UI and micro front end creation ... Great ideas from Svelte, React, Vue and Riot combined.

8 lines 298 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.git=e():t.git=e()}(self,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=155)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(24);function i(t,e){if(void 0===e)throw new n.a(t)}},function(t,e,r){"use strict";function n(t){return t.replace(/\/\.\//g,"/").replace(/\/{2,}/g,"/").replace(/^\/\.$/,"/").replace(/^\.\/$/,".").replace(/^\.\//,"").replace(/\/\.$/,"").replace(/(.+)\/$/,"$1").replace(/^$/,".")}function i(...t){return n(t.map(n).join("/"))}r.d(e,"a",(function(){return i}))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var n=r(20),i=r.n(n),o=r(32),a=r(26),s=r(100);function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}class f{constructor(t){if(void 0!==t._original_unwrapped_fs)return t;const e=Object.getOwnPropertyDescriptor(t,"promises");e&&e.enumerable?(this._readFile=t.promises.readFile.bind(t.promises),this._writeFile=t.promises.writeFile.bind(t.promises),this._mkdir=t.promises.mkdir.bind(t.promises),t.promises.rm?this._rm=t.promises.rm.bind(t.promises):t.promises.rmdir.length>1?this._rm=t.promises.rmdir.bind(t.promises):this._rm=s.a.bind(null,this),this._rmdir=t.promises.rmdir.bind(t.promises),this._unlink=t.promises.unlink.bind(t.promises),this._stat=t.promises.stat.bind(t.promises),this._lstat=t.promises.lstat.bind(t.promises),this._readdir=t.promises.readdir.bind(t.promises),this._readlink=t.promises.readlink.bind(t.promises),this._symlink=t.promises.symlink.bind(t.promises)):(this._readFile=i()(t.readFile.bind(t)),this._writeFile=i()(t.writeFile.bind(t)),this._mkdir=i()(t.mkdir.bind(t)),t.rm?this._rm=i()(t.rm.bind(t)):t.rmdir.length>2?this._rm=i()(t.rmdir.bind(t)):this._rm=s.a.bind(null,this),this._rmdir=i()(t.rmdir.bind(t)),this._unlink=i()(t.unlink.bind(t)),this._stat=i()(t.stat.bind(t)),this._lstat=i()(t.lstat.bind(t)),this._readdir=i()(t.readdir.bind(t)),this._readlink=i()(t.readlink.bind(t)),this._symlink=i()(t.symlink.bind(t))),this._original_unwrapped_fs=t}exists(t,e={}){var r=this;return u((function*(){try{return yield r._stat(t),!0}catch(t){if("ENOENT"===t.code||"ENOTDIR"===t.code)return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',t),t}}))()}read(e,r={}){var n=this;return u((function*(){try{let i=yield n._readFile(e,r);return"string"!=typeof i&&(i=t.from(i)),i}catch(t){return null}}))()}write(t,e,r={}){var n=this;return u((function*(){try{return void(yield n._writeFile(t,e,r))}catch(i){yield n.mkdir(Object(a.a)(t)),yield n._writeFile(t,e,r)}}))()}mkdir(t,e=!1){var r=this;return u((function*(){try{return void(yield r._mkdir(t))}catch(n){if(null===n)return;if("EEXIST"===n.code)return;if(e)throw n;if("ENOENT"===n.code){const e=Object(a.a)(t);if("."===e||"/"===e||e===t)throw n;yield r.mkdir(e),yield r.mkdir(t,!0)}}}))()}rm(t){var e=this;return u((function*(){try{yield e._unlink(t)}catch(t){if("ENOENT"!==t.code)throw t}}))()}rmdir(t,e){var r=this;return u((function*(){try{e&&e.recursive?yield r._rm(t,e):yield r._rmdir(t)}catch(t){if("ENOENT"!==t.code)throw t}}))()}readdir(t){var e=this;return u((function*(){try{const r=yield e._readdir(t);return r.sort(o.a),r}catch(t){return"ENOTDIR"===t.code?null:[]}}))()}readdirDeep(t){var e=this;return u((function*(){const r=yield e._readdir(t);return(yield Promise.all(r.map(function(){var r=u((function*(r){const n=t+"/"+r;return(yield e._stat(n)).isDirectory()?e.readdirDeep(n):n}));return function(t){return r.apply(this,arguments)}}()))).reduce((t,e)=>t.concat(e),[])}))()}lstat(t){var e=this;return u((function*(){try{return yield e._lstat(t)}catch(t){if("ENOENT"===t.code)return null;throw t}}))()}readlink(e,r={encoding:"buffer"}){var n=this;return u((function*(){try{const i=yield n._readlink(e,r);return t.isBuffer(i)?i:t.from(i)}catch(t){if("ENOENT"===t.code)return null;throw t}}))()}writelink(t,e){var r=this;return u((function*(){return r._symlink(e.toString("utf8"),t)}))()}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n extends Error{constructor(t){super(t),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){const e=new n(t.message);return e.code=t.code,e.data=t.data,e.caller=t.caller,e.stack=t.stack,e}get isIsomorphicGitError(){return!0}}},function(t,e,r){"use strict";var n=r(28),i=r(64),o=r(9);class a{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let e=null;this.parsedConfig=t.trim().split("\n").map(t=>{if(/^\s*#/.test(t))return{line:t,comment:!0};const r=t.indexOf(" ");if(t.startsWith("^")){const r=t.slice(1);return this.refs.set(e+"^{}",r),{line:t,ref:e,peeled:r}}{const n=t.slice(0,r);return e=t.slice(r+1),this.refs.set(e,n),{line:t,ref:e,oid:n}}})}return this}static from(t){return new a(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(e=>e.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join("\n")+"\n"}}var s=r(95);function c(t,e){const r=t.replace(/\^\{\}$/,""),n=e.replace(/\^\{\}$/,""),i=-(r<n)||+(r>n);return 0===i?t.endsWith("^{}")?1:-1:i}var u=r(1),f=r(13);function l(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}r.d(e,"a",(function(){return y}));const h=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],p=["config","description","index","shallow","commondir"];class y{static updateRemoteRefs({fs:t,gitdir:e,remote:r,refs:o,symrefs:a,tags:c,refspecs:l,prune:h=!1,pruneTags:p=!1}){return d((function*(){for(const t of o.values())if(!t.match(/[0-9a-f]{40}/))throw new n.a(t);const d=yield f.a.get({fs:t,gitdir:e});if(!l){if(0===(l=yield d.getall(`remote.${r}.fetch`)).length)throw new i.a(r);l.unshift(`+HEAD:refs/remotes/${r}/HEAD`)}const g=s.a.from(l),v=new Map;if(p){const r=yield y.listRefs({fs:t,gitdir:e,filepath:"refs/tags"});yield y.deleteRefs({fs:t,gitdir:e,refs:r.map(t=>`refs/tags/${t}`)})}if(c)for(const r of o.keys())if(r.startsWith("refs/tags")&&!r.endsWith("^{}")&&!(yield y.exists({fs:t,gitdir:e,ref:r}))){const t=o.get(r);v.set(r,t)}const m=g.translate([...o.keys()]);for(const[t,e]of m){const r=o.get(t);v.set(e,r)}const w=g.translate([...a.keys()]);for(const[t,e]of w){const r=a.get(t),n=g.translateOne(r);n&&v.set(e,`ref: ${n}`)}const b=[];if(h){for(const r of g.localNamespaces()){const n=(yield y.listRefs({fs:t,gitdir:e,filepath:r})).map(t=>`${r}/${t}`);for(const t of n)v.has(t)||b.push(t)}b.length>0&&(yield y.deleteRefs({fs:t,gitdir:e,refs:b}))}for(const[r,n]of v)yield t.write(Object(u.a)(e,r),`${n.trim()}\n`,"utf8");return{pruned:b}}))()}static writeRef({fs:t,gitdir:e,ref:r,value:i}){return d((function*(){if(!i.match(/[0-9a-f]{40}/))throw new n.a(i);yield t.write(Object(u.a)(e,r),`${i.trim()}\n`,"utf8")}))()}static writeSymbolicRef({fs:t,gitdir:e,ref:r,value:n}){return d((function*(){yield t.write(Object(u.a)(e,r),"ref: "+`${n.trim()}\n`,"utf8")}))()}static deleteRef({fs:t,gitdir:e,ref:r}){return d((function*(){return y.deleteRefs({fs:t,gitdir:e,refs:[r]})}))()}static deleteRefs({fs:t,gitdir:e,refs:r}){return d((function*(){yield Promise.all(r.map(r=>t.rm(Object(u.a)(e,r))));let n=yield t.read(`${e}/packed-refs`,{encoding:"utf8"});const i=a.from(n),o=i.refs.size;for(const t of r)i.refs.has(t)&&i.delete(t);i.refs.size<o&&(n=i.toString(),yield t.write(`${e}/packed-refs`,n,{encoding:"utf8"}))}))()}static resolve({fs:t,gitdir:e,ref:r,depth:n}){return d((function*(){if(void 0!==n&&-1===--n)return r;let i;if(r.startsWith("ref: "))return r=r.slice("ref: ".length),y.resolve({fs:t,gitdir:e,ref:r,depth:n});if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const a=yield y.packedRefs({fs:t,gitdir:e}),s=h(r).filter(t=>!p.includes(t));for(const r of s)if(i=(yield t.read(`${e}/${r}`,{encoding:"utf8"}))||a.get(r),i)return y.resolve({fs:t,gitdir:e,ref:i.trim(),depth:n});throw new o.a(r)}))()}static exists({fs:t,gitdir:e,ref:r}){return d((function*(){try{return yield y.expand({fs:t,gitdir:e,ref:r}),!0}catch(t){return!1}}))()}static expand({fs:t,gitdir:e,ref:r}){return d((function*(){if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const n=yield y.packedRefs({fs:t,gitdir:e}),i=h(r);for(const r of i){if(yield t.exists(`${e}/${r}`))return r;if(n.has(r))return r}throw new o.a(r)}))()}static expandAgainstMap({ref:t,map:e}){return d((function*(){const r=h(t);for(const t of r)if(yield e.has(t))return t;throw new o.a(t)}))()}static resolveAgainstMap({ref:t,fullref:e=t,depth:r,map:n}){if(void 0!==r&&-1===--r)return{fullref:e,oid:t};if(t.startsWith("ref: "))return t=t.slice("ref: ".length),y.resolveAgainstMap({ref:t,fullref:e,depth:r,map:n});if(40===t.length&&/[0-9a-f]{40}/.test(t))return{fullref:e,oid:t};const i=h(t);for(const t of i){const e=n.get(t);if(e)return y.resolveAgainstMap({ref:e.trim(),fullref:t,depth:r,map:n})}throw new o.a(t)}static packedRefs({fs:t,gitdir:e}){return d((function*(){const r=yield t.read(`${e}/packed-refs`,{encoding:"utf8"});return a.from(r).refs}))()}static listRefs({fs:t,gitdir:e,filepath:r}){return d((function*(){const n=y.packedRefs({fs:t,gitdir:e});let i=null;try{i=yield t.readdirDeep(`${e}/${r}`),i=i.map(t=>t.replace(`${e}/${r}/`,""))}catch(t){i=[]}for(let t of(yield n).keys())t.startsWith(r)&&(t=t.replace(r+"/",""),i.includes(t)||i.push(t));return i.sort(c),i}))()}static listBranches({fs:t,gitdir:e,remote:r}){return d((function*(){return r?y.listRefs({fs:t,gitdir:e,filepath:`refs/remotes/${r}`}):y.listRefs({fs:t,gitdir:e,filepath:"refs/heads"})}))()}static listTags({fs:t,gitdir:e}){return d((function*(){return(yield y.listRefs({fs:t,gitdir:e,filepath:"refs/tags"})).filter(t=>!t.endsWith("^{}"))}))()}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3);class i extends n.a{constructor(t){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${t}`),this.code=this.name=i.code,this.data={message:t}}}i.code="InternalError"},,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var n=r(5),i=r(9),o=r(23),a=r(119),s=r(120),c=r(75),u=r(17);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:e,cache:r,gitdir:f,oid:l,format:h="content"}){const p=t=>d({fs:e,cache:r,gitdir:f,oid:t});let y;if("4b825dc642cb6eb9a060e54bf8d69288fbee4904"===l&&(y={format:"wrapped",object:t.from("tree 0\0")}),y||(y=yield Object(a.a)({fs:e,gitdir:f,oid:l})),y||(y=yield Object(s.a)({fs:e,cache:r,gitdir:f,oid:l,getExternalRefDelta:p})),!y)throw new i.a(l);if("deflated"===h)return y;if("deflated"===y.format&&(y.object=t.from(yield Object(c.a)(y.object)),y.format="wrapped"),"wrapped"===y.format){if("wrapped"===h&&"wrapped"===y.format)return y;const t=yield Object(u.a)(y.object);if(t!==l)throw new n.a(`SHA check failed! Expected ${l}, computed ${t}`);const{object:e,type:r}=o.a.unwrap(y.object);y.type=r,y.object=e,y.format="content"}if("content"===y.format)return"content"===h?y:void 0;throw new n.a(`invalid format "${y.format}"`)}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(74),i=r(43);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class a{static flush(){return t.from("0000","utf8")}static delim(){return t.from("0001","utf8")}static encode(e){"string"==typeof e&&(e=t.from(e));const r=e.length+4,n=Object(i.a)(4,r);return t.concat([t.from(n,"utf8"),e])}static streamReader(t){const e=new n.a(t);return(function(){var t,r=(t=function*(){try{let t=yield e.read(4);if(null==t)return!0;if(t=parseInt(t.toString("utf8"),16),0===t)return null;if(1===t)return null;const r=yield e.read(t-4);return null==r||r}catch(t){return console.log("error",t),!0}},function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))});return function(){return r.apply(this,arguments)}}())}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3);class i extends n.a{constructor(t){super(`Could not find ${t}.`),this.code=this.name=i.code,this.data={what:t}}}i.code="NotFoundError"},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <http://feross.org> * @license MIT */ var n=r(134),i=r(135),o=r(136);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=d(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|h(e.length);return 0===(t=s(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|h(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function d(t,e){var r=e.length<0?0:0|h(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,a=1,s=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===c)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){for(var l=!0,d=0;d<c;d++)if(u(t,o+d)!==u(e,d)){l=!1;break}if(l)return o}return-1}function w(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function b(t,e,r,n){return H(M(e,t.length-r),t,r,n)}function _(t,e,r,n){return H(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function O(t,e,r,n){return _(t,e,r,n)}function j(t,e,r,n){return H(F(e),t,r,n)}function x(t,e,r,n){return H(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,c,u=t[i],f=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return l(null,t)},c.allocUnsafeSlow=function(t){return l(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(n,i),f=t.slice(e,r),l=0;l<s;++l)if(u[l]!==f[l]){o=u[l],a=f[l];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return O(this,t,e,r);case"base64":return j(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=N(t[o]);return i}function $(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function T(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(t,e,r,n,o){return o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,o){return o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):T(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):T(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=c.isBuffer(t)?t:M(new c(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(133))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(5),i=r(38),o=r(52),a=r(118);function s(t){switch(t){case"040000":return"tree";case"100644":case"100755":case"120000":return"blob";case"160000":return"commit"}throw new n.a(`Unexpected GitTree entry mode: ${t}`)}function c(t){return!t.oid&&t.sha&&(t.oid=t.sha),t.mode=function(t){if("number"==typeof t&&(t=t.toString(8)),t.match(/^0?4.*/))return"040000";if(t.match(/^1006.*/))return"100644";if(t.match(/^1007.*/))return"100755";if(t.match(/^120.*/))return"120000";if(t.match(/^160.*/))return"160000";throw new n.a(`Could not understand file mode: ${t}`)}(t.mode),t.type||(t.type=s(t.mode)),t}class u{constructor(e){if(t.isBuffer(e))this._entries=function(t){const e=[];let r=0;for(;r<t.length;){const o=t.indexOf(32,r);if(-1===o)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);const a=t.indexOf(0,r);if(-1===a)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let c=t.slice(r,o).toString("utf8");"40000"===c&&(c="040000");const u=s(c),f=t.slice(o+1,a).toString("utf8");if(f.includes("\\")||f.includes("/"))throw new i.a(f);const l=t.slice(a+1,a+21).toString("hex");r=a+21,e.push({mode:c,path:f,oid:l,type:u})}return e}(e);else{if(!Array.isArray(e))throw new n.a("invalid type passed to GitTree constructor");this._entries=e.map(c)}this._entries.sort(o.a)}static from(t){return new u(t)}render(){return this._entries.map(t=>`${t.mode} ${t.type} ${t.oid} ${t.path}`).join("\n")}toObject(){const e=[...this._entries];return e.sort(a.a),t.concat(e.map(e=>{const r=t.from(e.mode.replace(/^0/,"")),n=t.from(" "),i=t.from(e.path,"utf8"),o=t.from([0]),a=t.from(e.oid,"hex");return t.concat([r,n,i,o,a])}))}entries(){return this._entries}*[Symbol.iterator](){for(const t of this._entries)yield t}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var n=r(5),i=r(58),o=r(80),a=r(21),s=r(124),c=r(44);function u(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class f{constructor(e){if("string"==typeof e)this._commit=e;else if(t.isBuffer(e))this._commit=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitCommit constructor");this._commit=f.render(e)}}static fromPayloadSignature({payload:t,signature:e}){const r=f.justHeaders(t),n=f.justMessage(t),i=Object(a.a)(r+"\ngpgsig"+Object(o.a)(e)+"\n"+n);return new f(i)}static from(t){return new f(t)}toObject(){return t.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return f.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return Object(a.a)(t.slice(t.indexOf("\n\n")+2))}static justHeaders(t){return t.slice(0,t.indexOf("\n\n"))}parseHeaders(){const t=f.justHeaders(this._commit).split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={parent:[]};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.author&&(r.author=Object(c.a)(r.author)),r.committer&&(r.committer=Object(c.a)(r.committer)),r}static renderHeaders(t){let e="";if(t.tree?e+=`tree ${t.tree}\n`:e+="tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n",t.parent){if(void 0===t.parent.length)throw new n.a("commit 'parent' property should be an array");for(const r of t.parent)e+=`parent ${r}\n`}const r=t.author;e+=`author ${Object(i.a)(r)}\n`;const a=t.committer||t.author;return e+=`committer ${Object(i.a)(a)}\n`,t.gpgsig&&(e+="gpgsig"+Object(o.a)(t.gpgsig)),e}static render(t){return f.renderHeaders(t)+"\n"+Object(a.a)(t.message)}render(){return this._commit}withoutSignature(){const t=Object(a.a)(this._commit);if(-1===t.indexOf("\ngpgsig"))return t;const e=t.slice(0,t.indexOf("\ngpgsig")),r=t.slice(t.indexOf("-----END PGP SIGNATURE-----\n")+"-----END PGP SIGNATURE-----\n".length);return Object(a.a)(e+"\n"+r)}isolateSignature(){const t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(s.a)(t)}static sign(t,e,r){return(n=function*(){const n=t.withoutSignature(),i=f.justMessage(t._commit);let{signature:s}=yield e({payload:n,secretKey:r});s=Object(a.a)(s);const c=f.justHeaders(t._commit)+"\ngpgsig"+Object(o.a)(s)+"\n"+i;return f.from(c)},function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)}))})();var n}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(94);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}class a{static get({fs:t,gitdir:e}){return o((function*(){const r=yield t.read(`${e}/config`,{encoding:"utf8"});return n.a.from(r)}))()}static save({fs:t,gitdir:e,config:r}){return o((function*(){yield t.write(`${e}/config`,r.toString(),{encoding:"utf8"})}))()}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3);class i extends n.a{constructor(t,e,r,n){super(`Object ${t} ${n?`at ${n}`:""}was anticipated to be a ${r} but it is a ${e}.`),this.code=this.name=i.code,this.data={oid:t,actual:e,expected:r,filepath:n}}}i.code="ObjectTypeError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(5),i=r(58),o=r(21),a=r(44);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class c{constructor(e){if("string"==typeof e)this._tag=e;else if(t.isBuffer(e))this._tag=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitAnnotatedTag constructor");this._tag=c.render(e)}}static from(t){return new c(t)}static render(t){return`object ${t.object}\ntype ${t.type}\ntag ${t.tag}\ntagger ${Object(i.a)(t.tagger)}\n\n${t.message}\n${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf("\n\n"))}message(){const t=this.withoutSignature();return t.slice(t.indexOf("\n\n")+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){const t=this.justHeaders().split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.tagger&&(r.tagger=Object(a.a)(r.tagger)),r.committer&&(r.committer=Object(a.a)(r.committer)),r}withoutSignature(){const t=Object(o.a)(this._tag);return-1===t.indexOf("\n-----BEGIN PGP SIGNATURE-----")?t:t.slice(0,t.lastIndexOf("\n-----BEGIN PGP SIGNATURE-----"))}gpgsig(){if(-1===this._tag.indexOf("\n-----BEGIN PGP SIGNATURE-----"))return;const t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(o.a)(t)}payload(){return this.withoutSignature()+"\n"}toObject(){return t.from(this._tag,"utf8")}static sign(t,e,r){return(n=function*(){const n=t.payload();let{signature:i}=yield e({payload:n,secretKey:r});i=Object(o.a)(i);const a=n+i;return c.from(a)},function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,c,"next",t)}function c(t){s(o,r,i,a,c,"throw",t)}a(void 0)}))})();var n}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(23),i=r(126),o=r(76),a=r(17);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,c,"next",t)}function c(t){s(o,n,i,a,c,"throw",t)}a(void 0)}))}}function u(t){return f.apply(this,arguments)}function f(){return(f=c((function*({fs:e,gitdir:r,type:s,object:c,format:u="content",oid:f,dryRun:l=!1}){return"deflated"!==u&&("wrapped"!==u&&(c=n.a.wrap({type:s,object:c})),f=yield Object(a.a)(c),c=t.from(yield Object(o.a)(c))),l||(yield Object(i.a)({fs:e,gitdir:r,object:c,format:"deflated",oid:f})),f}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";var n=r(70),i=r.n(n);function o(t){let e="";for(const r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}r.d(e,"a",(function(){return u}));let c=null;function u(t){return f.apply(this,arguments)}function f(){return(f=s((function*(t){return null===c&&(c=yield p()),c?d(t):l(t)}))).apply(this,arguments)}function l(t){return(new i.a).update(t).digest("hex")}function d(t){return h.apply(this,arguments)}function h(){return(h=s((function*(t){return o(yield crypto.subtle.digest("SHA-1",t))}))).apply(this,arguments)}function p(){return y.apply(this,arguments)}function y(){return(y=s((function*(){try{if("da39a3ee5e6b4b0d3255bfef95601890afd80709"===(yield d(new Uint8Array([]))))return!0}catch(t){}return!1}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var n=r(57),i=r.n(n),o=r(92),a=r(61);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,c,"next",t)}function c(t){s(o,n,i,a,c,"throw",t)}a(void 0)}))}}let u=null;const f=Symbol("IndexCache");function l(){return(l=c((function*(t,e,r){const n=yield t.lstat(e),i=yield t.read(e),a=yield o.a.from(i);r.map.set(e,a),r.stats.set(e,n)}))).apply(this,arguments)}function d(){return(d=c((function*(t,e,r){const n=r.stats.get(e);if(void 0===n)return!0;const i=yield t.lstat(e);return null!==n&&(null!==i&&Object(a.a)(n,i))}))).apply(this,arguments)}class h{static acquire({fs:t,gitdir:e,cache:r},n){return c((function*(){r[f]||(r[f]={map:new Map,stats:new Map});const o=`${e}/index`;let a;return null===u&&(u=new i.a({maxPending:1/0})),yield u.acquire(o,c((function*(){(yield function(t,e,r){return d.apply(this,arguments)}(t,o,r[f]))&&(yield function(t,e,r){return l.apply(this,arguments)}(t,o,r[f]));const e=r[f].map.get(o);if(a=yield n(e),e._dirty){const n=yield e.toObject();yield t.write(o,n),r[f].stats.set(o,yield t.lstat(o)),e._dirty=!1}}))),a}))()}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n{constructor(t){this.buffer=t,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){const e=this.buffer.slice(this._start,this._start+t);return this._start+=t,e}toString(t,e){const r=this.buffer.toString(t,this._start,this._start+e);return this._start+=e,r}write(t,e,r){const n=this.buffer.write(t,this._start,e,r);return this._start+=e,n}copy(t,e,r){const n=t.copy(this.buffer,this._start,e,r);return this._start+=n,n}readUInt8(){const t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){const e=this.buffer.writeUInt8(t,this._start);return this._start+=1,e}readUInt16BE(){const t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){const e=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,e}readUInt32BE(){const t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){const e=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,e}}},function(t,e,r){"use strict";const n=(t,e)=>function(...r){return new(0,e.promiseModule)((n,i)=>{e.multiArgs?r.push((...t)=>{e.errorFirst?t[0]?i(t):(t.shift(),n(t)):n(t)}):e.errorFirst?r.push((t,e)=>{t?i(t):n(e)}):r.push(n),t.apply(this,r)})};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=typeof t;if(null===t||"object"!==r&&"function"!==r)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":r}\``);const i=t=>{const r=e=>"string"==typeof e?t===e:e.test(t);return e.include?e.include.some(r):!e.exclude.some(r)};let o;o="function"===r?function(...r){return e.excludeMain?t(...r):n(t,e).apply(this,r)}:Object.create(Object.getPrototypeOf(t));for(const r in t){const a=t[r];o[r]="function"==typeof a&&i(r)?n(a,e):a}return o}},function(t,e,r){"use strict";function n(t){return t=(t=(t=t.replace(/\r/g,"")).replace(/^\n+/,"")).replace(/\n+$/,"")+"\n"}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3);class i extends n.a{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=i.code,this.data={role:t}}}i.code="MissingNameError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return i}));var n=r(5);class i{static wrap({type:e,object:r}){return t.concat([t.from(`${e} ${r.byteLength.toString()}\0`),t.from(r)])}static unwrap(e){const r=e.indexOf(32),i=e.indexOf(0),o=e.slice(0,r).toString("utf8"),a=e.slice(r+1,i).toString("utf8"),s=e.length-(i+1);if(parseInt(a)!==s)throw new n.a(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:o,object:t.from(e.slice(i+1))}}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3);class i extends n.a{constructor(t){super(`The function requires a "${t}" parameter but none was provided.`),this.code=this.name=i.code,this.data={parameter:t}}}i.code="MissingParameterError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3);class i extends n.a{constructor(t,e,r=!0){super(`Failed to create ${t} at ${e} because it already exists.${r?` (Hint: use 'force: true' parameter to overwrite existing ${t}.)`:""}`),this.code=this.name=i.code,this.data={noun:t,where:e,canForce:r}}}i.code="AlreadyExistsError"},function(t,e,r){"use strict";function n(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===e?".":0===e?"/":t.slice(0,e)}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,a;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(a=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],a.set(o,i),i+=o.length;return a}},a={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,a))},e.setTyped(n)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3);class i extends n.a{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=i.code,this.data={value:t}}}i.