modernleft-docs/.obsidian/plugins/obsidian-git/main.js

414 lines
No EOL
727 KiB
JavaScript

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git)
*/
var BP=Object.create;var Oo=Object.defineProperty;var HP=Object.getOwnPropertyDescriptor;var UP=Object.getOwnPropertyNames;var GP=Object.getPrototypeOf,zP=Object.prototype.hasOwnProperty;var jv=e=>{throw TypeError(e)};var VP=(e,t,r)=>t in e?Oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var WP=(e,t)=>()=>(e&&(t=e(e=0)),t);var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qP=(e,t)=>{for(var r in t)Oo(e,r,{get:t[r],enumerable:!0})},Bv=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of UP(t))!zP.call(e,i)&&i!==r&&Oo(e,i,{get:()=>t[i],enumerable:!(n=HP(t,i))||n.enumerable});return e};var Ze=(e,t,r)=>(r=e!=null?BP(GP(e)):{},Bv(t||!e||!e.__esModule?Oo(r,"default",{value:e,enumerable:!0}):r,e)),YP=e=>Bv(Oo({},"__esModule",{value:!0}),e);var Tr=(e,t,r)=>VP(e,typeof t!="symbol"?t+"":t,r),Hv=(e,t,r)=>t.has(e)||jv("Cannot "+r);var Bt=(e,t,r)=>(Hv(e,t,"read from private field"),r?r.call(e):t.get(e)),Rc=(e,t,r)=>t.has(e)?jv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Mc=(e,t,r,n)=>(Hv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var zv=I(Oc=>{"use strict";g();Oc.byteLength=ZP;Oc.toByteArray=JP;Oc.fromByteArray=t5;var fn=[],Cr=[],XP=typeof Uint8Array!="undefined"?Uint8Array:Array,eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Xi=0,Uv=eh.length;Xi<Uv;++Xi)fn[Xi]=eh[Xi],Cr[eh.charCodeAt(Xi)]=Xi;var Xi,Uv;Cr[45]=62;Cr[95]=63;function Gv(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function ZP(e){var t=Gv(e),r=t[0],n=t[1];return(r+n)*3/4-n}function KP(e,t,r){return(t+r)*3/4-r}function JP(e){var t,r=Gv(e),n=r[0],i=r[1],a=new XP(KP(e,n,i)),s=0,o=i>0?n-4:n,c;for(c=0;c<o;c+=4)t=Cr[e.charCodeAt(c)]<<18|Cr[e.charCodeAt(c+1)]<<12|Cr[e.charCodeAt(c+2)]<<6|Cr[e.charCodeAt(c+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Cr[e.charCodeAt(c)]<<2|Cr[e.charCodeAt(c+1)]>>4,a[s++]=t&255),i===1&&(t=Cr[e.charCodeAt(c)]<<10|Cr[e.charCodeAt(c+1)]<<4|Cr[e.charCodeAt(c+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function QP(e){return fn[e>>18&63]+fn[e>>12&63]+fn[e>>6&63]+fn[e&63]}function e5(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(QP(n));return i.join("")}function t5(e){for(var t,r=e.length,n=r%3,i=[],a=16383,s=0,o=r-n;s<o;s+=a)i.push(e5(e,s,s+a>o?o:s+a));return n===1?(t=e[r-1],i.push(fn[t>>2]+fn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(fn[t>>10]+fn[t>>4&63]+fn[t<<2&63]+"=")),i.join("")}});var Vv=I(th=>{g();th.read=function(e,t,r,n,i){var a,s,o=i*8-n-1,c=(1<<o)-1,l=c>>1,u=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-u)-1,h>>=-u,u+=o;u>0;a=a*256+e[t+f],f+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=s*256+e[t+f],f+=d,u-=8);if(a===0)a=1-l;else{if(a===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-l}return(h?-1:1)*s*Math.pow(2,a-n)};th.write=function(e,t,r,n,i,a){var s,o,c,l=a*8-i-1,u=(1<<l)-1,f=u>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?t+=d/c:t+=d*Math.pow(2,1-f),t*c>=2&&(s++,c/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(t*c-1)*Math.pow(2,i),s=s+f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=o&255,h+=p,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[r+h]=s&255,h+=p,s/=256,l-=8);e[r+h-p]|=m*128}});var uh=I(Za=>{"use strict";g();var rh=zv(),Ya=Vv(),Wv=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Za.Buffer=M;Za.SlowBuffer=o5;Za.INSPECT_MAX_BYTES=50;var Ic=2147483647;Za.kMaxLength=Ic;M.TYPED_ARRAY_SUPPORT=r5();!M.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function r5(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}});Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}});function Ln(e){if(e>Ic)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,M.prototype),t}function M(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return sh(e)}return Zv(e,t,r)}M.poolSize=8192;function Zv(e,t,r){if(typeof e=="string")return i5(e,t);if(ArrayBuffer.isView(e))return a5(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(dn(e,ArrayBuffer)||e&&dn(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(dn(e,SharedArrayBuffer)||e&&dn(e.buffer,SharedArrayBuffer)))return ih(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return M.from(n,t,r);let i=s5(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return M.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}M.from=function(e,t,r){return Zv(e,t,r)};Object.setPrototypeOf(M.prototype,Uint8Array.prototype);Object.setPrototypeOf(M,Uint8Array);function Kv(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function n5(e,t,r){return Kv(e),e<=0?Ln(e):t!==void 0?typeof r=="string"?Ln(e).fill(t,r):Ln(e).fill(t):Ln(e)}M.alloc=function(e,t,r){return n5(e,t,r)};function sh(e){return Kv(e),Ln(e<0?0:oh(e)|0)}M.allocUnsafe=function(e){return sh(e)};M.allocUnsafeSlow=function(e){return sh(e)};function i5(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!M.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Jv(e,t)|0,n=Ln(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function nh(e){let t=e.length<0?0:oh(e.length)|0,r=Ln(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function a5(e){if(dn(e,Uint8Array)){let t=new Uint8Array(e);return ih(t.buffer,t.byteOffset,t.byteLength)}return nh(e)}function ih(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,M.prototype),n}function s5(e){if(M.isBuffer(e)){let t=oh(e.length)|0,r=Ln(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||ch(e.length)?Ln(0):nh(e);if(e.type==="Buffer"&&Array.isArray(e.data))return nh(e.data)}function oh(e){if(e>=Ic)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ic.toString(16)+" bytes");return e|0}function o5(e){return+e!=e&&(e=0),M.alloc(+e)}M.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==M.prototype};M.compare=function(t,r){if(dn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),dn(r,Uint8Array)&&(r=M.from(r,r.offset,r.byteLength)),!M.isBuffer(t)||!M.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,s=Math.min(n,i);a<s;++a)if(t[a]!==r[a]){n=t[a],i=r[a];break}return n<i?-1:i<n?1:0};M.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}};M.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return M.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=M.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){let s=t[n];if(dn(s,Uint8Array))a+s.length>i.length?(M.isBuffer(s)||(s=M.from(s)),s.copy(i,a)):Uint8Array.prototype.set.call(i,s,a);else if(M.isBuffer(s))s.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=s.length}return i};function Jv(e,t){if(M.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||dn(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ah(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return o1(e).length;default:if(i)return n?-1:ah(e).length;t=(""+t).toLowerCase(),i=!0}}M.byteLength=Jv;function l5(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return y5(this,t,r);case"utf8":case"utf-8":return e1(this,t,r);case"ascii":return g5(this,t,r);case"latin1":case"binary":return v5(this,t,r);case"base64":return p5(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w5(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}M.prototype._isBuffer=!0;function Zi(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}M.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)Zi(this,r,r+1);return this};M.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)Zi(this,r,r+3),Zi(this,r+1,r+2);return this};M.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)Zi(this,r,r+7),Zi(this,r+1,r+6),Zi(this,r+2,r+5),Zi(this,r+3,r+4);return this};M.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?e1(this,0,t):l5.apply(this,arguments)};M.prototype.toLocaleString=M.prototype.toString;M.prototype.equals=function(t){if(!M.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:M.compare(this,t)===0};M.prototype.inspect=function(){let t="",r=Za.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};Wv&&(M.prototype[Wv]=M.prototype.inspect);M.prototype.compare=function(t,r,n,i,a){if(dn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),!M.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let s=a-i,o=n-r,c=Math.min(s,o),l=this.slice(i,a),u=t.slice(r,n);for(let f=0;f<c;++f)if(l[f]!==u[f]){s=l[f],o=u[f];break}return s<o?-1:o<s?1:0};function Qv(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ch(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=M.from(t,n)),M.isBuffer(t))return t.length===0?-1:qv(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):qv(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function qv(e,t,r,n,i){let a=1,s=e.length,o=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,o/=2,r/=2}function c(u,f){return a===1?u[f]:u.readUInt16BE(f*a)}let l;if(i){let u=-1;for(l=r;l<s;l++)if(c(e,l)===c(t,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===o)return u*a}else u!==-1&&(l-=l-u),u=-1}else for(r+o>s&&(r=s-o),l=r;l>=0;l--){let u=!0;for(let f=0;f<o;f++)if(c(e,l+f)!==c(t,f)){u=!1;break}if(u)return l}return-1}M.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};M.prototype.indexOf=function(t,r,n){return Qv(this,t,r,n,!0)};M.prototype.lastIndexOf=function(t,r,n){return Qv(this,t,r,n,!1)};function c5(e,t,r,n){r=Number(r)||0;let i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let s;for(s=0;s<n;++s){let o=parseInt(t.substr(s*2,2),16);if(ch(o))return s;e[r+s]=o}return s}function u5(e,t,r,n){return Fc(ah(t,e.length-r),e,r,n)}function f5(e,t,r,n){return Fc(S5(t),e,r,n)}function d5(e,t,r,n){return Fc(o1(t),e,r,n)}function h5(e,t,r,n){return Fc(E5(t,e.length-r),e,r,n)}M.prototype.write=function(t,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return c5(this,t,r,n);case"utf8":case"utf-8":return u5(this,t,r,n);case"ascii":case"latin1":case"binary":return f5(this,t,r,n);case"base64":return d5(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h5(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function p5(e,t,r){return t===0&&r===e.length?rh.fromByteArray(e):rh.fromByteArray(e.slice(t,r))}function e1(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let a=e[i],s=null,o=a>239?4:a>223?3:a>191?2:1;if(i+o<=r){let c,l,u,f;switch(o){case 1:a<128&&(s=a);break;case 2:c=e[i+1],(c&192)===128&&(f=(a&31)<<6|c&63,f>127&&(s=f));break;case 3:c=e[i+1],l=e[i+2],(c&192)===128&&(l&192)===128&&(f=(a&15)<<12|(c&63)<<6|l&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],(c&192)===128&&(l&192)===128&&(u&192)===128&&(f=(a&15)<<18|(c&63)<<12|(l&63)<<6|u&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=o}return m5(n)}var Yv=4096;function m5(e){let t=e.length;if(t<=Yv)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Yv));return r}function g5(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function v5(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function y5(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let a=t;a<r;++a)i+=A5[e[a]];return i}function w5(e,t,r){let n=e.slice(t,r),i="";for(let a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}M.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let i=this.subarray(t,r);return Object.setPrototypeOf(i,M.prototype),i};function yt(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUintLE=M.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||yt(t,r,this.length);let i=this[t],a=1,s=0;for(;++s<r&&(a*=256);)i+=this[t+s]*a;return i};M.prototype.readUintBE=M.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||yt(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};M.prototype.readUint8=M.prototype.readUInt8=function(t,r){return t=t>>>0,r||yt(t,1,this.length),this[t]};M.prototype.readUint16LE=M.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||yt(t,2,this.length),this[t]|this[t+1]<<8};M.prototype.readUint16BE=M.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||yt(t,2,this.length),this[t]<<8|this[t+1]};M.prototype.readUint32LE=M.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};M.prototype.readUint32BE=M.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};M.prototype.readBigUInt64LE=ui(function(t){t=t>>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))});M.prototype.readBigUInt64BE=ui(function(t){t=t>>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(a)});M.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||yt(t,r,this.length);let i=this[t],a=1,s=0;for(;++s<r&&(a*=256);)i+=this[t+s]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};M.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||yt(t,r,this.length);let i=r,a=1,s=this[t+--i];for(;i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};M.prototype.readInt8=function(t,r){return t=t>>>0,r||yt(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};M.prototype.readInt16LE=function(t,r){t=t>>>0,r||yt(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};M.prototype.readInt16BE=function(t,r){t=t>>>0,r||yt(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};M.prototype.readInt32LE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};M.prototype.readInt32BE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};M.prototype.readBigInt64LE=ui(function(t){t=t>>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});M.prototype.readBigInt64BE=ui(function(t){t=t>>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});M.prototype.readFloatLE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),Ya.read(this,t,!0,23,4)};M.prototype.readFloatBE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),Ya.read(this,t,!1,23,4)};M.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||yt(t,8,this.length),Ya.read(this,t,!0,52,8)};M.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||yt(t,8,this.length),Ya.read(this,t,!1,52,8)};function Kt(e,t,r,n,i,a){if(!M.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}M.prototype.writeUintLE=M.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Kt(this,t,r,n,o,0)}let a=1,s=0;for(this[r]=t&255;++s<n&&(a*=256);)this[r+s]=t/a&255;return r+n};M.prototype.writeUintBE=M.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Kt(this,t,r,n,o,0)}let a=n-1,s=1;for(this[r+a]=t&255;--a>=0&&(s*=256);)this[r+a]=t/s&255;return r+n};M.prototype.writeUint8=M.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,1,255,0),this[r]=t&255,r+1};M.prototype.writeUint16LE=M.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeUint16BE=M.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeUint32LE=M.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};M.prototype.writeUint32BE=M.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function t1(e,t,r,n,i){s1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function r1(e,t,r,n,i){s1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}M.prototype.writeBigUInt64LE=ui(function(t,r=0){return t1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeBigUInt64BE=ui(function(t,r=0){return r1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Kt(this,t,r,n,c-1,-c)}let a=0,s=1,o=0;for(this[r]=t&255;++a<n&&(s*=256);)t<0&&o===0&&this[r+a-1]!==0&&(o=1),this[r+a]=(t/s>>0)-o&255;return r+n};M.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Kt(this,t,r,n,c-1,-c)}let a=n-1,s=1,o=0;for(this[r+a]=t&255;--a>=0&&(s*=256);)t<0&&o===0&&this[r+a+1]!==0&&(o=1),this[r+a]=(t/s>>0)-o&255;return r+n};M.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};M.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};M.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};M.prototype.writeBigInt64LE=ui(function(t,r=0){return t1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});M.prototype.writeBigInt64BE=ui(function(t,r=0){return r1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function n1(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function i1(e,t,r,n,i){return t=+t,r=r>>>0,i||n1(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ya.write(e,t,r,n,23,4),r+4}M.prototype.writeFloatLE=function(t,r,n){return i1(this,t,r,!0,n)};M.prototype.writeFloatBE=function(t,r,n){return i1(this,t,r,!1,n)};function a1(e,t,r,n,i){return t=+t,r=r>>>0,i||n1(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ya.write(e,t,r,n,52,8),r+8}M.prototype.writeDoubleLE=function(t,r,n){return a1(this,t,r,!0,n)};M.prototype.writeDoubleBE=function(t,r,n){return a1(this,t,r,!1,n)};M.prototype.copy=function(t,r,n,i){if(!M.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);let a=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),a};M.prototype.fill=function(t,r,n,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!M.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){let s=t.charCodeAt(0);(i==="utf8"&&s<128||i==="latin1")&&(t=s)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a<n;++a)this[a]=t;else{let s=M.isBuffer(t)?t:M.from(t,i),o=s.length;if(o===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=s[a%o]}return this};var qa={};function lh(e,t,r){qa[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}lh("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);lh("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);lh("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Xv(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Xv(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Xv(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function b5(e,t,r){Xa(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Io(t,e.length-(r+1))}function s1(e,t,r,n,i,a){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",o;throw a>3?t===0||t===BigInt(0)?o=`>= 0${s} and < 2${s} ** ${(a+1)*8}${s}`:o=`>= -(2${s} ** ${(a+1)*8-1}${s}) and < 2 ** ${(a+1)*8-1}${s}`:o=`>= ${t}${s} and <= ${r}${s}`,new qa.ERR_OUT_OF_RANGE("value",o,e)}b5(n,i,a)}function Xa(e,t){if(typeof e!="number")throw new qa.ERR_INVALID_ARG_TYPE(t,"number",e)}function Io(e,t,r){throw Math.floor(e)!==e?(Xa(e,r),new qa.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new qa.ERR_BUFFER_OUT_OF_BOUNDS:new qa.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var _5=/[^+/0-9A-Za-z-_]/g;function x5(e){if(e=e.split("=")[0],e=e.trim().replace(_5,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ah(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function S5(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function E5(e,t){let r,n,i,a=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function o1(e){return rh.toByteArray(x5(e))}function Fc(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function dn(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ch(e){return e!==e}var A5=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function ui(e){return typeof BigInt=="undefined"?k5:e}function k5(){throw new Error("BigInt not supported")}});var l1,fh,Buffer,g=WP(()=>{l1=require("obsidian");l1.Platform.isMobileApp?fh=uh().Buffer:fh=global.Buffer;Buffer=fh});var u1=I((qH,c1)=>{"use strict";g();var fr=function(e){if(e=e||{},this.Promise=e.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=e.domainReentrant||!1,this.domainReentrant){if(typeof process=="undefined"||typeof process.domain=="undefined")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=e.timeout||fr.DEFAULT_TIMEOUT,this.maxOccupationTime=e.maxOccupationTime||fr.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=e.maxExecutionTime||fr.DEFAULT_MAX_EXECUTION_TIME,e.maxPending===1/0||Number.isInteger(e.maxPending)&&e.maxPending>=0?this.maxPending=e.maxPending:this.maxPending=fr.DEFAULT_MAX_PENDING};fr.DEFAULT_TIMEOUT=0;fr.DEFAULT_MAX_OCCUPATION_TIME=0;fr.DEFAULT_MAX_EXECUTION_TIME=0;fr.DEFAULT_MAX_PENDING=1e3;fr.prototype.acquire=function(e,t,r,n){if(Array.isArray(e))return this._acquireBatch(e,t,r,n);if(typeof t!="function")throw new Error("You must pass a function to execute");var i=null,a=null,s=null;typeof r!="function"&&(n=r,r=null,s=new this.Promise(function(b,x){i=b,a=x})),n=n||{};var o=!1,c=null,l=null,u=null,f=this,d=function(b,x,E){l&&(clearTimeout(l),l=null),u&&(clearTimeout(u),u=null),b&&(f.queues[e]&&f.queues[e].length===0&&delete f.queues[e],f.domainReentrant&&delete f.domains[e]),o||(s?x?a(x):i(E):typeof r=="function"&&r(x,E),o=!0),b&&f.queues[e]&&f.queues[e].length>0&&f.queues[e].shift()()},h=function(b){if(o)return d(b);c&&(clearTimeout(c),c=null),f.domainReentrant&&b&&(f.domains[e]=process.domain);var x=n.maxExecutionTime||f.maxExecutionTime;if(x&&(u=setTimeout(function(){f.queues[e]&&d(b,new Error("Maximum execution time is exceeded "+e))},x)),t.length===1){var E=!1;try{t(function(_,k){E||(E=!0,d(b,_,k))})}catch(_){E||(E=!0,d(b,_))}}else f._promiseTry(function(){return t()}).then(function(_){d(b,void 0,_)},function(_){d(b,_)})};f.domainReentrant&&process.domain&&(h=process.domain.bind(h));var p=n.maxPending||f.maxPending;if(!f.queues[e])f.queues[e]=[],h(!0);else if(f.domainReentrant&&process.domain&&process.domain===f.domains[e])h(!1);else if(f.queues[e].length>=p)d(!1,new Error("Too many pending tasks in queue "+e));else{var m=function(){h(!0)};n.skipQueue?f.queues[e].unshift(m):f.queues[e].push(m);var v=n.timeout||f.timeout;v&&(c=setTimeout(function(){c=null,d(!1,new Error("async-lock timed out in queue "+e))},v))}var y=n.maxOccupationTime||f.maxOccupationTime;if(y&&(l=setTimeout(function(){f.queues[e]&&d(!1,new Error("Maximum occupation time is exceeded in queue "+e))},y)),s)return s};fr.prototype._acquireBatch=function(e,t,r,n){typeof r!="function"&&(n=r,r=null);var i=this,a=function(o,c){return function(l){i.acquire(o,c,l,n)}},s=e.reduceRight(function(o,c){return a(c,o)},t);if(typeof r=="function")s(r);else return new this.Promise(function(o,c){s.length===1?s(function(l,u){l?c(l):o(u)}):o(s())})};fr.prototype.isBusy=function(e){return e?!!this.queues[e]:Object.keys(this.queues).length>0};fr.prototype._promiseTry=function(e){try{return this.Promise.resolve(e())}catch(t){return this.Promise.reject(t)}};c1.exports=fr});var d1=I((XH,f1)=>{"use strict";g();f1.exports=u1()});var h1=I((KH,dh)=>{g();typeof Object.create=="function"?dh.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:dh.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var ph=I((hh,m1)=>{g();var $c=uh(),hn=$c.Buffer;function p1(e,t){for(var r in e)t[r]=e[r]}hn.from&&hn.alloc&&hn.allocUnsafe&&hn.allocUnsafeSlow?m1.exports=$c:(p1($c,hh),hh.Buffer=Ki);function Ki(e,t,r){return hn(e,t,r)}Ki.prototype=Object.create(hn.prototype);p1(hn,Ki);Ki.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return hn(e,t,r)};Ki.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=hn(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Ki.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return hn(e)};Ki.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return $c.SlowBuffer(e)}});var y1=I((eU,v1)=>{g();var g1=ph().Buffer;function Lc(e,t){this._block=g1.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Lc.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=g1.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,a=this._len,s=0;s<i;){for(var o=a%n,c=Math.min(i-s,n-o),l=0;l<c;l++)r[o+l]=e[s+l];a+=c,s+=c,a%n===0&&this._update(r)}return this._len+=i,this};Lc.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a};Lc.prototype._update=function(){throw new Error("_update must be implemented by subclass")};v1.exports=Lc});var _1=I((rU,b1)=>{g();var T5=h1(),w1=y1(),C5=ph().Buffer,P5=[1518500249,1859775393,-1894007588,-899497514],R5=new Array(80);function Fo(){this.init(),this._w=R5,w1.call(this,64,56)}T5(Fo,w1);Fo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function M5(e){return e<<1|e>>>31}function O5(e){return e<<5|e>>>27}function I5(e){return e<<30|e>>>2}function F5(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Fo.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,s=this._e|0,o=0;o<16;++o)t[o]=e.readInt32BE(o*4);for(;o<80;++o)t[o]=M5(t[o-3]^t[o-8]^t[o-14]^t[o-16]);for(var c=0;c<80;++c){var l=~~(c/20),u=O5(r)+F5(l,n,i,a)+s+t[c]+P5[l]|0;s=a,a=i,i=I5(n),n=r,r=u}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0};Fo.prototype._hash=function(){var e=C5.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};b1.exports=Fo});var S1=I(mh=>{g();var x1;(function(e){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof mh=="object"?e(mh):typeof define=="function"&&define.amd?define(function(){var t={};return e(t),t}):e(x1={}):e(x1={})})(function(e){e.version="1.2.2";function t(){for(var w=0,A=new Array(256),S=0;S!=256;++S)w=S,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,A[S]=w;return typeof Int32Array!="undefined"?new Int32Array(A):A}var r=t();function n(w){var A=0,S=0,T=0,P=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(T=0;T!=256;++T)P[T]=w[T];for(T=0;T!=256;++T)for(S=w[T],A=256+T;A<4096;A+=256)S=P[A]=S>>>8^w[S&255];var O=[];for(T=1;T!=16;++T)O[T-1]=typeof Int32Array!="undefined"?P.subarray(T*256,T*256+256):P.slice(T*256,T*256+256);return O}var i=n(r),a=i[0],s=i[1],o=i[2],c=i[3],l=i[4],u=i[5],f=i[6],d=i[7],h=i[8],p=i[9],m=i[10],v=i[11],y=i[12],b=i[13],x=i[14];function E(w,A){for(var S=A^-1,T=0,P=w.length;T<P;)S=S>>>8^r[(S^w.charCodeAt(T++))&255];return~S}function _(w,A){for(var S=A^-1,T=w.length-15,P=0;P<T;)S=x[w[P++]^S&255]^b[w[P++]^S>>8&255]^y[w[P++]^S>>16&255]^v[w[P++]^S>>>24]^m[w[P++]]^p[w[P++]]^h[w[P++]]^d[w[P++]]^f[w[P++]]^u[w[P++]]^l[w[P++]]^c[w[P++]]^o[w[P++]]^s[w[P++]]^a[w[P++]]^r[w[P++]];for(T+=15;P<T;)S=S>>>8^r[(S^w[P++])&255];return~S}function k(w,A){for(var S=A^-1,T=0,P=w.length,O=0,j=0;T<P;)O=w.charCodeAt(T++),O<128?S=S>>>8^r[(S^O)&255]:O<2048?(S=S>>>8^r[(S^(192|O>>6&31))&255],S=S>>>8^r[(S^(128|O&63))&255]):O>=55296&&O<57344?(O=(O&1023)+64,j=w.charCodeAt(T++)&1023,S=S>>>8^r[(S^(240|O>>8&7))&255],S=S>>>8^r[(S^(128|O>>2&63))&255],S=S>>>8^r[(S^(128|j>>6&15|(O&3)<<4))&255],S=S>>>8^r[(S^(128|j&63))&255]):(S=S>>>8^r[(S^(224|O>>12&15))&255],S=S>>>8^r[(S^(128|O>>6&63))&255],S=S>>>8^r[(S^(128|O&63))&255]);return~S}e.table=r,e.bstr=E,e.buf=_,e.str=k})});var Dn=I(Ht=>{"use strict";g();var $5=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function L5(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ht.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)L5(r,n)&&(e[n]=r[n])}}return e};Ht.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var D5={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,s;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a=e[t],s.set(a,i),i+=a.length;return s}},N5={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};Ht.setTyped=function(e){e?(Ht.Buf8=Uint8Array,Ht.Buf16=Uint16Array,Ht.Buf32=Int32Array,Ht.assign(Ht,D5)):(Ht.Buf8=Array,Ht.Buf16=Array,Ht.Buf32=Array,Ht.assign(Ht,N5))};Ht.setTyped($5)});var W1=I(Qa=>{"use strict";g();var j5=Dn(),B5=4,E1=0,A1=1,H5=2;function Ja(e){for(var t=e.length;--t>=0;)e[t]=0}var U5=0,M1=1,G5=2,z5=3,V5=258,xh=29,Bo=256,Lo=Bo+1+xh,Ka=30,Sh=19,O1=2*Lo+1,Ji=15,gh=16,W5=7,Eh=256,I1=16,F1=17,$1=18,bh=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Dc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],q5=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L1=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y5=512,Nn=new Array((Lo+2)*2);Ja(Nn);var $o=new Array(Ka*2);Ja($o);var Do=new Array(Y5);Ja(Do);var No=new Array(V5-z5+1);Ja(No);var Ah=new Array(xh);Ja(Ah);var Nc=new Array(Ka);Ja(Nc);function vh(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var D1,N1,j1;function yh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function B1(e){return e<256?Do[e]:Do[256+(e>>>7)]}function jo(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Jt(e,t,r){e.bi_valid>gh-r?(e.bi_buf|=t<<e.bi_valid&65535,jo(e,e.bi_buf),e.bi_buf=t>>gh-e.bi_valid,e.bi_valid+=r-gh):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function pn(e,t,r){Jt(e,r[t*2],r[t*2+1])}function H1(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function X5(e){e.bi_valid===16?(jo(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Z5(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,f,d,h,p,m=0;for(d=0;d<=Ji;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<O1;l++)u=e.heap[l],d=r[r[u*2+1]*2+1]+1,d>c&&(d=c,m++),r[u*2+1]=d,!(u>n)&&(e.bl_count[d]++,h=0,u>=o&&(h=s[u-o]),p=r[u*2],e.opt_len+=p*(d+h),a&&(e.static_len+=p*(i[u*2+1]+h)));if(m!==0){do{for(d=c-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(d=c;d!==0;d--)for(u=e.bl_count[d];u!==0;)f=e.heap[--l],!(f>n)&&(r[f*2+1]!==d&&(e.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),u--)}}function U1(e,t,r){var n=new Array(Ji+1),i=0,a,s;for(a=1;a<=Ji;a++)n[a]=i=i+r[a-1]<<1;for(s=0;s<=t;s++){var o=e[s*2+1];o!==0&&(e[s*2]=H1(n[o]++,o))}}function K5(){var e,t,r,n,i,a=new Array(Ji+1);for(r=0,n=0;n<xh-1;n++)for(Ah[n]=r,e=0;e<1<<bh[n];e++)No[r++]=n;for(No[r-1]=n,i=0,n=0;n<16;n++)for(Nc[n]=i,e=0;e<1<<Dc[n];e++)Do[i++]=n;for(i>>=7;n<Ka;n++)for(Nc[n]=i<<7,e=0;e<1<<Dc[n]-7;e++)Do[256+i++]=n;for(t=0;t<=Ji;t++)a[t]=0;for(e=0;e<=143;)Nn[e*2+1]=8,e++,a[8]++;for(;e<=255;)Nn[e*2+1]=9,e++,a[9]++;for(;e<=279;)Nn[e*2+1]=7,e++,a[7]++;for(;e<=287;)Nn[e*2+1]=8,e++,a[8]++;for(U1(Nn,Lo+1,a),e=0;e<Ka;e++)$o[e*2+1]=5,$o[e*2]=H1(e,5);D1=new vh(Nn,bh,Bo+1,Lo,Ji),N1=new vh($o,Dc,0,Ka,Ji),j1=new vh(new Array(0),q5,0,Sh,W5)}function G1(e){var t;for(t=0;t<Lo;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ka;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Sh;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Eh*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function z1(e){e.bi_valid>8?jo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function J5(e,t,r,n){z1(e),n&&(jo(e,r),jo(e,~r)),j5.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function k1(e,t,r,n){var i=t*2,a=r*2;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function wh(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&k1(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k1(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function T1(e,t,r){var n,i,a=0,s,o;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,n===0?pn(e,i,t):(s=No[i],pn(e,s+Bo+1,t),o=bh[s],o!==0&&(i-=Ah[s],Jt(e,i,o)),n--,s=B1(n),pn(e,s,r),o=Dc[s],o!==0&&(n-=Nc[s],Jt(e,n,o)));while(a<e.last_lit);pn(e,Eh,t)}function _h(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,s,o,c=-1,l;for(e.heap_len=0,e.heap_max=O1,s=0;s<a;s++)r[s*2]!==0?(e.heap[++e.heap_len]=c=s,e.depth[s]=0):r[s*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,r[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=n[l*2+1]);for(t.max_code=c,s=e.heap_len>>1;s>=1;s--)wh(e,r,s);l=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],wh(e,r,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,r[l*2]=r[s*2]+r[o*2],e.depth[l]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,r[s*2+1]=r[o*2+1]=l,e.heap[1]=l++,wh(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Z5(e,t),U1(r,c,e.bl_count)}function C1(e,t,r){var n,i=-1,a,s=t[0*2+1],o=0,c=7,l=4;for(s===0&&(c=138,l=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=t[(n+1)*2+1],!(++o<c&&a===s)&&(o<l?e.bl_tree[a*2]+=o:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[I1*2]++):o<=10?e.bl_tree[F1*2]++:e.bl_tree[$1*2]++,o=0,i=a,s===0?(c=138,l=3):a===s?(c=6,l=3):(c=7,l=4))}function P1(e,t,r){var n,i=-1,a,s=t[0*2+1],o=0,c=7,l=4;for(s===0&&(c=138,l=3),n=0;n<=r;n++)if(a=s,s=t[(n+1)*2+1],!(++o<c&&a===s)){if(o<l)do pn(e,a,e.bl_tree);while(--o!==0);else a!==0?(a!==i&&(pn(e,a,e.bl_tree),o--),pn(e,I1,e.bl_tree),Jt(e,o-3,2)):o<=10?(pn(e,F1,e.bl_tree),Jt(e,o-3,3)):(pn(e,$1,e.bl_tree),Jt(e,o-11,7));o=0,i=a,s===0?(c=138,l=3):a===s?(c=6,l=3):(c=7,l=4)}}function Q5(e){var t;for(C1(e,e.dyn_ltree,e.l_desc.max_code),C1(e,e.dyn_dtree,e.d_desc.max_code),_h(e,e.bl_desc),t=Sh-1;t>=3&&e.bl_tree[L1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function eR(e,t,r,n){var i;for(Jt(e,t-257,5),Jt(e,r-1,5),Jt(e,n-4,4),i=0;i<n;i++)Jt(e,e.bl_tree[L1[i]*2+1],3);P1(e,e.dyn_ltree,t-1),P1(e,e.dyn_dtree,r-1)}function tR(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return E1;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return A1;for(r=32;r<Bo;r++)if(e.dyn_ltree[r*2]!==0)return A1;return E1}var R1=!1;function rR(e){R1||(K5(),R1=!0),e.l_desc=new yh(e.dyn_ltree,D1),e.d_desc=new yh(e.dyn_dtree,N1),e.bl_desc=new yh(e.bl_tree,j1),e.bi_buf=0,e.bi_valid=0,G1(e)}function V1(e,t,r,n){Jt(e,(U5<<1)+(n?1:0),3),J5(e,t,r,!0)}function nR(e){Jt(e,M1<<1,3),pn(e,Eh,Nn),X5(e)}function iR(e,t,r,n){var i,a,s=0;e.level>0?(e.strm.data_type===H5&&(e.strm.data_type=tR(e)),_h(e,e.l_desc),_h(e,e.d_desc),s=Q5(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?V1(e,t,r,n):e.strategy===B5||a===i?(Jt(e,(M1<<1)+(n?1:0),3),T1(e,Nn,$o)):(Jt(e,(G5<<1)+(n?1:0),3),eR(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),T1(e,e.dyn_ltree,e.dyn_dtree)),G1(e),n&&z1(e)}function aR(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(No[r]+Bo+1)*2]++,e.dyn_dtree[B1(t)*2]++),e.last_lit===e.lit_bufsize-1}Qa._tr_init=rR;Qa._tr_stored_block=V1;Qa._tr_flush_block=iR;Qa._tr_tally=aR;Qa._tr_align=nR});var kh=I((uU,q1)=>{"use strict";g();function sR(e,t,r,n){for(var i=e&65535|0,a=e>>>16&65535|0,s=0;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+t[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}q1.exports=sR});var Th=I((dU,Y1)=>{"use strict";g();function oR(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var lR=oR();function cR(e,t,r,n){var i=lR,a=n+r;e^=-1;for(var s=n;s<a;s++)e=e>>>8^i[(e^t[s])&255];return e^-1}Y1.exports=cR});var jc=I((pU,X1)=>{"use strict";g();X1.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var iy=I(vn=>{"use strict";g();var Ut=Dn(),Pr=W1(),Q1=kh(),fi=Th(),uR=jc(),ra=0,fR=1,dR=3,gi=4,Z1=5,gn=0,K1=1,Rr=-2,hR=-3,Ch=-5,pR=-1,mR=1,Bc=2,gR=3,vR=4,yR=0,wR=2,zc=8,bR=9,_R=15,xR=8,SR=29,ER=256,Rh=ER+1+SR,AR=30,kR=19,TR=2*Rh+1,CR=15,we=3,pi=258,Xr=pi+we+1,PR=32,Vc=42,Mh=69,Hc=73,Uc=91,Gc=103,Qi=113,Uo=666,pt=1,Go=2,ea=3,rs=4,RR=3;function mi(e,t){return e.msg=uR[t],t}function J1(e){return(e<<1)-(e>4?9:0)}function hi(e){for(var t=e.length;--t>=0;)e[t]=0}function di(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Ut.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function xt(e,t){Pr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,di(e.strm)}function Ae(e,t){e.pending_buf[e.pending++]=t}function Ho(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function MR(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,Ut.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Q1(e.adler,t,i,r):e.state.wrap===2&&(e.adler=fi(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function ey(e,t){var r=e.max_chain_length,n=e.strstart,i,a,s=e.prev_length,o=e.nice_match,c=e.strstart>e.w_size-Xr?e.strstart-(e.w_size-Xr):0,l=e.window,u=e.w_mask,f=e.prev,d=e.strstart+pi,h=l[n+s-1],p=l[n+s];e.prev_length>=e.good_match&&(r>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=t,!(l[i+s]!==p||l[i+s-1]!==h||l[i]!==l[n]||l[++i]!==l[n+1])){n+=2,i++;do;while(l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&n<d);if(a=pi-(d-n),n=d-pi,a>s){if(e.match_start=t,s=a,a>=o)break;h=l[n+s-1],p=l[n+s]}}while((t=f[t&u])>c&&--r!==0);return s<=e.lookahead?s:e.lookahead}function ta(e){var t=e.w_size,r,n,i,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Xr)){Ut.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=MR(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=we)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+we-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<we)););}while(e.lookahead<Xr&&e.strm.avail_in!==0)}function OR(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ta(e),e.lookahead===0&&t===ra)return pt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,xt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Xr&&(xt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):(e.strstart>e.block_start&&(xt(e,!1),e.strm.avail_out===0),pt)}function Ph(e,t){for(var r,n;;){if(e.lookahead<Xr){if(ta(e),e.lookahead<Xr&&t===ra)return pt;if(e.lookahead===0)break}if(r=0,e.lookahead>=we&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+we-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Xr&&(e.match_length=ey(e,r)),e.match_length>=we)if(n=Pr._tr_tally(e,e.strstart-e.match_start,e.match_length-we),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=we){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+we-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Pr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(xt(e,!1),e.strm.avail_out===0))return pt}return e.insert=e.strstart<we-1?e.strstart:we-1,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?pt:Go}function es(e,t){for(var r,n,i;;){if(e.lookahead<Xr){if(ta(e),e.lookahead<Xr&&t===ra)return pt;if(e.lookahead===0)break}if(r=0,e.lookahead>=we&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+we-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=we-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Xr&&(e.match_length=ey(e,r),e.match_length<=5&&(e.strategy===mR||e.match_length===we&&e.strstart-e.match_start>4096)&&(e.match_length=we-1)),e.prev_length>=we&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-we,n=Pr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-we),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+we-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=we-1,e.strstart++,n&&(xt(e,!1),e.strm.avail_out===0))return pt}else if(e.match_available){if(n=Pr._tr_tally(e,0,e.window[e.strstart-1]),n&&xt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return pt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Pr._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<we-1?e.strstart:we-1,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?pt:Go}function IR(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=pi){if(ta(e),e.lookahead<=pi&&t===ra)return pt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=we&&e.strstart>0&&(i=e.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=e.strstart+pi;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);e.match_length=pi-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=we?(r=Pr._tr_tally(e,1,e.match_length-we),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Pr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(xt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?pt:Go}function FR(e,t){for(var r;;){if(e.lookahead===0&&(ta(e),e.lookahead===0)){if(t===ra)return pt;break}if(e.match_length=0,r=Pr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(xt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?pt:Go}function mn(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var ts;ts=[new mn(0,0,0,0,OR),new mn(4,4,8,4,Ph),new mn(4,5,16,8,Ph),new mn(4,6,32,32,Ph),new mn(4,4,16,16,es),new mn(8,16,32,32,es),new mn(8,16,128,128,es),new mn(8,32,128,256,es),new mn(32,128,258,1024,es),new mn(32,258,258,4096,es)];function $R(e){e.window_size=2*e.w_size,hi(e.head),e.max_lazy_match=ts[e.level].max_lazy,e.good_match=ts[e.level].good_length,e.nice_match=ts[e.level].nice_length,e.max_chain_length=ts[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=we-1,e.match_available=0,e.ins_h=0}function LR(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=zc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ut.Buf16(TR*2),this.dyn_dtree=new Ut.Buf16((2*AR+1)*2),this.bl_tree=new Ut.Buf16((2*kR+1)*2),hi(this.dyn_ltree),hi(this.dyn_dtree),hi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ut.Buf16(CR+1),this.heap=new Ut.Buf16(2*Rh+1),hi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ut.Buf16(2*Rh+1),hi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ty(e){var t;return!e||!e.state?mi(e,Rr):(e.total_in=e.total_out=0,e.data_type=wR,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Vc:Qi,e.adler=t.wrap===2?0:1,t.last_flush=ra,Pr._tr_init(t),gn)}function ry(e){var t=ty(e);return t===gn&&$R(e.state),t}function DR(e,t){return!e||!e.state||e.state.wrap!==2?Rr:(e.state.gzhead=t,gn)}function ny(e,t,r,n,i,a){if(!e)return Rr;var s=1;if(t===pR&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>bR||r!==zc||n<8||n>15||t<0||t>9||a<0||a>vR)return mi(e,Rr);n===8&&(n=9);var o=new LR;return e.state=o,o.strm=e,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+we-1)/we),o.window=new Ut.Buf8(o.w_size*2),o.head=new Ut.Buf16(o.hash_size),o.prev=new Ut.Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Ut.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=a,o.method=r,ry(e)}function NR(e,t){return ny(e,t,zc,_R,xR,yR)}function jR(e,t){var r,n,i,a;if(!e||!e.state||t>Z1||t<0)return e?mi(e,Rr):Rr;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Uo&&t!==gi)return mi(e,e.avail_out===0?Ch:Rr);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===Vc)if(n.wrap===2)e.adler=0,Ae(n,31),Ae(n,139),Ae(n,8),n.gzhead?(Ae(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Ae(n,n.gzhead.time&255),Ae(n,n.gzhead.time>>8&255),Ae(n,n.gzhead.time>>16&255),Ae(n,n.gzhead.time>>24&255),Ae(n,n.level===9?2:n.strategy>=Bc||n.level<2?4:0),Ae(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Ae(n,n.gzhead.extra.length&255),Ae(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=fi(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Mh):(Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,n.level===9?2:n.strategy>=Bc||n.level<2?4:0),Ae(n,RR),n.status=Qi);else{var s=zc+(n.w_bits-8<<4)<<8,o=-1;n.strategy>=Bc||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,s|=o<<6,n.strstart!==0&&(s|=PR),s+=31-s%31,n.status=Qi,Ho(n,s),n.strstart!==0&&(Ho(n,e.adler>>>16),Ho(n,e.adler&65535)),e.adler=1}if(n.status===Mh)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),di(e),i=n.pending,n.pending===n.pending_buf_size));)Ae(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Hc)}else n.status=Hc;if(n.status===Hc)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),di(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Ae(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=Uc)}else n.status=Uc;if(n.status===Uc)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),di(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Ae(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=Gc)}else n.status=Gc;if(n.status===Gc&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&di(e),n.pending+2<=n.pending_buf_size&&(Ae(n,e.adler&255),Ae(n,e.adler>>8&255),e.adler=0,n.status=Qi)):n.status=Qi),n.pending!==0){if(di(e),e.avail_out===0)return n.last_flush=-1,gn}else if(e.avail_in===0&&J1(t)<=J1(r)&&t!==gi)return mi(e,Ch);if(n.status===Uo&&e.avail_in!==0)return mi(e,Ch);if(e.avail_in!==0||n.lookahead!==0||t!==ra&&n.status!==Uo){var c=n.strategy===Bc?FR(n,t):n.strategy===gR?IR(n,t):ts[n.level].func(n,t);if((c===ea||c===rs)&&(n.status=Uo),c===pt||c===ea)return e.avail_out===0&&(n.last_flush=-1),gn;if(c===Go&&(t===fR?Pr._tr_align(n):t!==Z1&&(Pr._tr_stored_block(n,0,0,!1),t===dR&&(hi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),di(e),e.avail_out===0))return n.last_flush=-1,gn}return t!==gi?gn:n.wrap<=0?K1:(n.wrap===2?(Ae(n,e.adler&255),Ae(n,e.adler>>8&255),Ae(n,e.adler>>16&255),Ae(n,e.adler>>24&255),Ae(n,e.total_in&255),Ae(n,e.total_in>>8&255),Ae(n,e.total_in>>16&255),Ae(n,e.total_in>>24&255)):(Ho(n,e.adler>>>16),Ho(n,e.adler&65535)),di(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?gn:K1)}function BR(e){var t;return!e||!e.state?Rr:(t=e.state.status,t!==Vc&&t!==Mh&&t!==Hc&&t!==Uc&&t!==Gc&&t!==Qi&&t!==Uo?mi(e,Rr):(e.state=null,t===Qi?mi(e,hR):gn))}function HR(e,t){var r=t.length,n,i,a,s,o,c,l,u;if(!e||!e.state||(n=e.state,s=n.wrap,s===2||s===1&&n.status!==Vc||n.lookahead))return Rr;for(s===1&&(e.adler=Q1(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(s===0&&(hi(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new Ut.Buf8(n.w_size),Ut.arraySet(u,t,r-n.w_size,n.w_size,0),t=u,r=n.w_size),o=e.avail_in,c=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,ta(n);n.lookahead>=we;){i=n.strstart,a=n.lookahead-(we-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+we-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--a);n.strstart=i,n.lookahead=we-1,ta(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=we-1,n.match_available=0,e.next_in=c,e.input=l,e.avail_in=o,n.wrap=s,gn}vn.deflateInit=NR;vn.deflateInit2=ny;vn.deflateReset=ry;vn.deflateResetKeep=ty;vn.deflateSetHeader=DR;vn.deflate=jR;vn.deflateEnd=BR;vn.deflateSetDictionary=HR;vn.deflateInfo="pako deflate (from Nodeca project)"});var Oh=I(ns=>{"use strict";g();var Wc=Dn(),ay=!0,sy=!0;try{String.fromCharCode.apply(null,[0])}catch(e){ay=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){sy=!1}var zo=new Wc.Buf8(256);for(jn=0;jn<256;jn++)zo[jn]=jn>=252?6:jn>=248?5:jn>=240?4:jn>=224?3:jn>=192?2:1;var jn;zo[254]=zo[254]=1;ns.string2buf=function(e){var t,r,n,i,a,s=e.length,o=0;for(i=0;i<s;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<s&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Wc.Buf8(o),a=0,i=0;a<o;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<s&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function oy(e,t){if(t<65534&&(e.subarray&&sy||!e.subarray&&ay))return String.fromCharCode.apply(null,Wc.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}ns.buf2binstring=function(e){return oy(e,e.length)};ns.binstring2buf=function(e){for(var t=new Wc.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};ns.buf2string=function(e,t){var r,n,i,a,s=t||e.length,o=new Array(s*2);for(n=0,r=0;r<s;){if(i=e[r++],i<128){o[n++]=i;continue}if(a=zo[i],a>4){o[n++]=65533,r+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&r<s;)i=i<<6|e[r++]&63,a--;if(a>1){o[n++]=65533;continue}i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|i&1023)}return oy(o,n)};ns.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+zo[e[r]]>t?r:t}});var Ih=I((bU,ly)=>{"use strict";g();function UR(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}ly.exports=UR});var dy=I(qo=>{"use strict";g();var Vo=iy(),Wo=Dn(),$h=Oh(),Lh=jc(),GR=Ih(),fy=Object.prototype.toString,zR=0,Fh=4,is=0,cy=1,uy=2,VR=-1,WR=0,qR=8;function na(e){if(!(this instanceof na))return new na(e);this.options=Wo.assign({level:VR,method:qR,chunkSize:16384,windowBits:15,memLevel:8,strategy:WR,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new GR,this.strm.avail_out=0;var r=Vo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==is)throw new Error(Lh[r]);if(t.header&&Vo.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=$h.string2buf(t.dictionary):fy.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Vo.deflateSetDictionary(this.strm,n),r!==is)throw new Error(Lh[r]);this._dict_set=!0}}na.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?Fh:zR,typeof e=="string"?r.input=$h.string2buf(e):fy.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Wo.Buf8(n),r.next_out=0,r.avail_out=n),i=Vo.deflate(r,a),i!==cy&&i!==is)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===Fh||a===uy))&&(this.options.to==="string"?this.onData($h.buf2binstring(Wo.shrinkBuf(r.output,r.next_out))):this.onData(Wo.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==cy);return a===Fh?(i=Vo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===is):(a===uy&&(this.onEnd(is),r.avail_out=0),!0)};na.prototype.onData=function(e){this.chunks.push(e)};na.prototype.onEnd=function(e){e===is&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Wo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Dh(e,t){var r=new na(t);if(r.push(e,!0),r.err)throw r.msg||Lh[r.err];return r.result}function YR(e,t){return t=t||{},t.raw=!0,Dh(e,t)}function XR(e,t){return t=t||{},t.gzip=!0,Dh(e,t)}qo.Deflate=na;qo.deflate=Dh;qo.deflateRaw=YR;qo.gzip=XR});var py=I((EU,hy)=>{"use strict";g();var qc=30,ZR=12;hy.exports=function(t,r){var n,i,a,s,o,c,l,u,f,d,h,p,m,v,y,b,x,E,_,k,w,A,S,T,P;n=t.state,i=t.next_in,T=t.input,a=i+(t.avail_in-5),s=t.next_out,P=t.output,o=s-(r-t.avail_out),c=s+(t.avail_out-257),l=n.dmax,u=n.wsize,f=n.whave,d=n.wnext,h=n.window,p=n.hold,m=n.bits,v=n.lencode,y=n.distcode,b=(1<<n.lenbits)-1,x=(1<<n.distbits)-1;e:do{m<15&&(p+=T[i++]<<m,m+=8,p+=T[i++]<<m,m+=8),E=v[p&b];t:for(;;){if(_=E>>>24,p>>>=_,m-=_,_=E>>>16&255,_===0)P[s++]=E&65535;else if(_&16){k=E&65535,_&=15,_&&(m<_&&(p+=T[i++]<<m,m+=8),k+=p&(1<<_)-1,p>>>=_,m-=_),m<15&&(p+=T[i++]<<m,m+=8,p+=T[i++]<<m,m+=8),E=y[p&x];r:for(;;){if(_=E>>>24,p>>>=_,m-=_,_=E>>>16&255,_&16){if(w=E&65535,_&=15,m<_&&(p+=T[i++]<<m,m+=8,m<_&&(p+=T[i++]<<m,m+=8)),w+=p&(1<<_)-1,w>l){t.msg="invalid distance too far back",n.mode=qc;break e}if(p>>>=_,m-=_,_=s-o,w>_){if(_=w-_,_>f&&n.sane){t.msg="invalid distance too far back",n.mode=qc;break e}if(A=0,S=h,d===0){if(A+=u-_,_<k){k-=_;do P[s++]=h[A++];while(--_);A=s-w,S=P}}else if(d<_){if(A+=u+d-_,_-=d,_<k){k-=_;do P[s++]=h[A++];while(--_);if(A=0,d<k){_=d,k-=_;do P[s++]=h[A++];while(--_);A=s-w,S=P}}}else if(A+=d-_,_<k){k-=_;do P[s++]=h[A++];while(--_);A=s-w,S=P}for(;k>2;)P[s++]=S[A++],P[s++]=S[A++],P[s++]=S[A++],k-=3;k&&(P[s++]=S[A++],k>1&&(P[s++]=S[A++]))}else{A=s-w;do P[s++]=P[A++],P[s++]=P[A++],P[s++]=P[A++],k-=3;while(k>2);k&&(P[s++]=P[A++],k>1&&(P[s++]=P[A++]))}}else if(_&64){t.msg="invalid distance code",n.mode=qc;break e}else{E=y[(E&65535)+(p&(1<<_)-1)];continue r}break}}else if(_&64)if(_&32){n.mode=ZR;break e}else{t.msg="invalid literal/length code",n.mode=qc;break e}else{E=v[(E&65535)+(p&(1<<_)-1)];continue t}break}}while(i<a&&s<c);k=m>>3,i-=k,m-=k<<3,p&=(1<<m)-1,t.next_in=i,t.next_out=s,t.avail_in=i<a?5+(a-i):5-(i-a),t.avail_out=s<c?257+(c-s):257-(s-c),n.hold=p,n.bits=m}});var _y=I((kU,by)=>{"use strict";g();var my=Dn(),as=15,gy=852,vy=592,yy=0,Nh=1,wy=2,KR=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],JR=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],QR=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],e6=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];by.exports=function(t,r,n,i,a,s,o,c){var l=c.bits,u=0,f=0,d=0,h=0,p=0,m=0,v=0,y=0,b=0,x=0,E,_,k,w,A,S=null,T=0,P,O=new my.Buf16(as+1),j=new my.Buf16(as+1),D=null,Q=0,de,ee,J;for(u=0;u<=as;u++)O[u]=0;for(f=0;f<i;f++)O[r[n+f]]++;for(p=l,h=as;h>=1&&O[h]===0;h--);if(p>h&&(p=h),h===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,c.bits=1,0;for(d=1;d<h&&O[d]===0;d++);for(p<d&&(p=d),y=1,u=1;u<=as;u++)if(y<<=1,y-=O[u],y<0)return-1;if(y>0&&(t===yy||h!==1))return-1;for(j[1]=0,u=1;u<as;u++)j[u+1]=j[u]+O[u];for(f=0;f<i;f++)r[n+f]!==0&&(o[j[r[n+f]]++]=f);if(t===yy?(S=D=o,P=19):t===Nh?(S=KR,T-=257,D=JR,Q-=257,P=256):(S=QR,D=e6,P=-1),x=0,f=0,u=d,A=s,m=p,v=0,k=-1,b=1<<p,w=b-1,t===Nh&&b>gy||t===wy&&b>vy)return 1;for(;;){de=u-v,o[f]<P?(ee=0,J=o[f]):o[f]>P?(ee=D[Q+o[f]],J=S[T+o[f]]):(ee=96,J=0),E=1<<u-v,_=1<<m,d=_;do _-=E,a[A+(x>>v)+_]=de<<24|ee<<16|J|0;while(_!==0);for(E=1<<u-1;x&E;)E>>=1;if(E!==0?(x&=E-1,x+=E):x=0,f++,--O[u]===0){if(u===h)break;u=r[n+o[f]]}if(u>p&&(x&w)!==k){for(v===0&&(v=p),A+=d,m=u-v,y=1<<m;m+v<h&&(y-=O[m+v],!(y<=0));)m++,y<<=1;if(b+=1<<m,t===Nh&&b>gy||t===wy&&b>vy)return 1;k=x&w,a[k]=p<<24|m<<16|A-s|0}}return x!==0&&(a[A+x]=u-v<<24|64<<16|0),c.bits=p,0}});var rw=I(Zr=>{"use strict";g();var dr=Dn(),zh=kh(),yn=Th(),t6=py(),Yo=_y(),r6=0,qy=1,Yy=2,xy=4,n6=5,Yc=6,ia=0,i6=1,a6=2,Mr=-2,Xy=-3,Vh=-4,s6=-5,Sy=8,Zy=1,Ey=2,Ay=3,ky=4,Ty=5,Cy=6,Py=7,Ry=8,My=9,Oy=10,Kc=11,Bn=12,jh=13,Iy=14,Bh=15,Fy=16,$y=17,Ly=18,Dy=19,Xc=20,Zc=21,Ny=22,jy=23,By=24,Hy=25,Uy=26,Hh=27,Gy=28,zy=29,je=30,Wh=31,o6=32,l6=852,c6=592,u6=15,f6=u6;function Vy(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function d6(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new dr.Buf16(320),this.work=new dr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ky(e){var t;return!e||!e.state?Mr:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Zy,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new dr.Buf32(l6),t.distcode=t.distdyn=new dr.Buf32(c6),t.sane=1,t.back=-1,ia)}function Jy(e){var t;return!e||!e.state?Mr:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Ky(e))}function Qy(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Mr:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Jy(e))}function ew(e,t){var r,n;return e?(n=new d6,e.state=n,n.window=null,r=Qy(e,t),r!==ia&&(e.state=null),r):Mr}function h6(e){return ew(e,f6)}var Wy=!0,Uh,Gh;function p6(e){if(Wy){var t;for(Uh=new dr.Buf32(512),Gh=new dr.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Yo(qy,e.lens,0,288,Uh,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Yo(Yy,e.lens,0,32,Gh,0,e.work,{bits:5}),Wy=!1}e.lencode=Uh,e.lenbits=9,e.distcode=Gh,e.distbits=5}function tw(e,t,r,n){var i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new dr.Buf8(a.wsize)),n>=a.wsize?(dr.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),dr.arraySet(a.window,t,r-n,i,a.wnext),n-=i,n?(dr.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function m6(e,t){var r,n,i,a,s,o,c,l,u,f,d,h,p,m,v=0,y,b,x,E,_,k,w,A,S=new dr.Buf8(4),T,P,O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Mr;r=e.state,r.mode===Bn&&(r.mode=jh),s=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,l=r.hold,u=r.bits,f=o,d=c,A=ia;e:for(;;)switch(r.mode){case Zy:if(r.wrap===0){r.mode=jh;break}for(;u<16;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(r.wrap&2&&l===35615){r.check=0,S[0]=l&255,S[1]=l>>>8&255,r.check=yn(r.check,S,2,0),l=0,u=0,r.mode=Ey;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=je;break}if((l&15)!==Sy){e.msg="unknown compression method",r.mode=je;break}if(l>>>=4,u-=4,w=(l&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){e.msg="invalid window size",r.mode=je;break}r.dmax=1<<w,e.adler=r.check=1,r.mode=l&512?Oy:Bn,l=0,u=0;break;case Ey:for(;u<16;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(r.flags=l,(r.flags&255)!==Sy){e.msg="unknown compression method",r.mode=je;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=je;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&(S[0]=l&255,S[1]=l>>>8&255,r.check=yn(r.check,S,2,0)),l=0,u=0,r.mode=Ay;case Ay:for(;u<32;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}r.head&&(r.head.time=l),r.flags&512&&(S[0]=l&255,S[1]=l>>>8&255,S[2]=l>>>16&255,S[3]=l>>>24&255,r.check=yn(r.check,S,4,0)),l=0,u=0,r.mode=ky;case ky:for(;u<16;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}r.head&&(r.head.xflags=l&255,r.head.os=l>>8),r.flags&512&&(S[0]=l&255,S[1]=l>>>8&255,r.check=yn(r.check,S,2,0)),l=0,u=0,r.mode=Ty;case Ty:if(r.flags&1024){for(;u<16;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}r.length=l,r.head&&(r.head.extra_len=l),r.flags&512&&(S[0]=l&255,S[1]=l>>>8&255,r.check=yn(r.check,S,2,0)),l=0,u=0}else r.head&&(r.head.extra=null);r.mode=Cy;case Cy:if(r.flags&1024&&(h=r.length,h>o&&(h=o),h&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),dr.arraySet(r.head.extra,n,a,h,w)),r.flags&512&&(r.check=yn(r.check,n,h,a)),o-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=Py;case Py:if(r.flags&2048){if(o===0)break e;h=0;do w=n[a+h++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&h<o);if(r.flags&512&&(r.check=yn(r.check,n,h,a)),o-=h,a+=h,w)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=Ry;case Ry:if(r.flags&4096){if(o===0)break e;h=0;do w=n[a+h++],r.head&&w&&r.length<65536&&(r.head.comment+=String.fromCharCode(w));while(w&&h<o);if(r.flags&512&&(r.check=yn(r.check,n,h,a)),o-=h,a+=h,w)break e}else r.head&&(r.head.comment=null);r.mode=My;case My:if(r.flags&512){for(;u<16;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(l!==(r.check&65535)){e.msg="header crc mismatch",r.mode=je;break}l=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Bn;break;case Oy:for(;u<32;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}e.adler=r.check=Vy(l),l=0,u=0,r.mode=Kc;case Kc:if(r.havedict===0)return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,r.hold=l,r.bits=u,a6;e.adler=r.check=1,r.mode=Bn;case Bn:if(t===n6||t===Yc)break e;case jh:if(r.last){l>>>=u&7,u-=u&7,r.mode=Hh;break}for(;u<3;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}switch(r.last=l&1,l>>>=1,u-=1,l&3){case 0:r.mode=Iy;break;case 1:if(p6(r),r.mode=Xc,t===Yc){l>>>=2,u-=2;break e}break;case 2:r.mode=$y;break;case 3:e.msg="invalid block type",r.mode=je}l>>>=2,u-=2;break;case Iy:for(l>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",r.mode=je;break}if(r.length=l&65535,l=0,u=0,r.mode=Bh,t===Yc)break e;case Bh:r.mode=Fy;case Fy:if(h=r.length,h){if(h>o&&(h=o),h>c&&(h=c),h===0)break e;dr.arraySet(i,n,a,h,s),o-=h,a+=h,c-=h,s+=h,r.length-=h;break}r.mode=Bn;break;case $y:for(;u<14;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(r.nlen=(l&31)+257,l>>>=5,u-=5,r.ndist=(l&31)+1,l>>>=5,u-=5,r.ncode=(l&15)+4,l>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=je;break}r.have=0,r.mode=Ly;case Ly:for(;r.have<r.ncode;){for(;u<3;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}r.lens[O[r.have++]]=l&7,l>>>=3,u-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},A=Yo(r6,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid code lengths set",r.mode=je;break}r.have=0,r.mode=Dy;case Dy:for(;r.have<r.nlen+r.ndist;){for(;v=r.lencode[l&(1<<r.lenbits)-1],y=v>>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(x<16)l>>>=y,u-=y,r.lens[r.have++]=x;else{if(x===16){for(P=y+2;u<P;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(l>>>=y,u-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=je;break}w=r.lens[r.have-1],h=3+(l&3),l>>>=2,u-=2}else if(x===17){for(P=y+3;u<P;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}l>>>=y,u-=y,w=0,h=3+(l&7),l>>>=3,u-=3}else{for(P=y+7;u<P;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}l>>>=y,u-=y,w=0,h=11+(l&127),l>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=je;break}for(;h--;)r.lens[r.have++]=w}}if(r.mode===je)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=je;break}if(r.lenbits=9,T={bits:r.lenbits},A=Yo(qy,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid literal/lengths set",r.mode=je;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},A=Yo(Yy,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,A){e.msg="invalid distances set",r.mode=je;break}if(r.mode=Xc,t===Yc)break e;case Xc:r.mode=Zc;case Zc:if(o>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,r.hold=l,r.bits=u,t6(e,d),s=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,l=r.hold,u=r.bits,r.mode===Bn&&(r.back=-1);break}for(r.back=0;v=r.lencode[l&(1<<r.lenbits)-1],y=v>>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(b&&!(b&240)){for(E=y,_=b,k=x;v=r.lencode[k+((l&(1<<E+_)-1)>>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}l>>>=E,u-=E,r.back+=E}if(l>>>=y,u-=y,r.back+=y,r.length=x,b===0){r.mode=Uy;break}if(b&32){r.back=-1,r.mode=Bn;break}if(b&64){e.msg="invalid literal/length code",r.mode=je;break}r.extra=b&15,r.mode=Ny;case Ny:if(r.extra){for(P=r.extra;u<P;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=jy;case jy:for(;v=r.distcode[l&(1<<r.distbits)-1],y=v>>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(!(b&240)){for(E=y,_=b,k=x;v=r.distcode[k+((l&(1<<E+_)-1)>>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}l>>>=E,u-=E,r.back+=E}if(l>>>=y,u-=y,r.back+=y,b&64){e.msg="invalid distance code",r.mode=je;break}r.offset=x,r.extra=b&15,r.mode=By;case By:if(r.extra){for(P=r.extra;u<P;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=je;break}r.mode=Hy;case Hy:if(c===0)break e;if(h=d-c,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=je;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=i,p=s-r.offset,h=r.length;h>c&&(h=c),c-=h,r.length-=h;do i[s++]=m[p++];while(--h);r.length===0&&(r.mode=Zc);break;case Uy:if(c===0)break e;i[s++]=r.length,c--,r.mode=Zc;break;case Hh:if(r.wrap){for(;u<32;){if(o===0)break e;o--,l|=n[a++]<<u,u+=8}if(d-=c,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?yn(r.check,i,d,s-d):zh(r.check,i,d,s-d)),d=c,(r.flags?l:Vy(l))!==r.check){e.msg="incorrect data check",r.mode=je;break}l=0,u=0}r.mode=Gy;case Gy:if(r.wrap&&r.flags){for(;u<32;){if(o===0)break e;o--,l+=n[a++]<<u,u+=8}if(l!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=je;break}l=0,u=0}r.mode=zy;case zy:A=i6;break e;case je:A=Xy;break e;case Wh:return Vh;case o6:default:return Mr}return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,r.hold=l,r.bits=u,(r.wsize||d!==e.avail_out&&r.mode<je&&(r.mode<Hh||t!==xy))&&tw(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Wh,Vh):(f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?yn(r.check,i,d,e.next_out-d):zh(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Bn?128:0)+(r.mode===Xc||r.mode===Bh?256:0),(f===0&&d===0||t===xy)&&A===ia&&(A=s6),A)}function g6(e){if(!e||!e.state)return Mr;var t=e.state;return t.window&&(t.window=null),e.state=null,ia}function v6(e,t){var r;return!e||!e.state||(r=e.state,!(r.wrap&2))?Mr:(r.head=t,t.done=!1,ia)}function y6(e,t){var r=t.length,n,i,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==Kc)?Mr:n.mode===Kc&&(i=1,i=zh(i,t,r,0),i!==n.check)?Xy:(a=tw(e,t,r,r),a?(n.mode=Wh,Vh):(n.havedict=1,ia))}Zr.inflateReset=Jy;Zr.inflateReset2=Qy;Zr.inflateResetKeep=Ky;Zr.inflateInit=h6;Zr.inflateInit2=ew;Zr.inflate=m6;Zr.inflateEnd=g6;Zr.inflateGetHeader=v6;Zr.inflateSetDictionary=y6;Zr.inflateInfo="pako inflate (from Nodeca project)"});var qh=I((RU,nw)=>{"use strict";g();nw.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var aw=I((OU,iw)=>{"use strict";g();function w6(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}iw.exports=w6});var ow=I(Zo=>{"use strict";g();var ss=rw(),Xo=Dn(),Jc=Oh(),et=qh(),Yh=jc(),b6=Ih(),_6=aw(),sw=Object.prototype.toString;function aa(e){if(!(this instanceof aa))return new aa(e);this.options=Xo.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b6,this.strm.avail_out=0;var r=ss.inflateInit2(this.strm,t.windowBits);if(r!==et.Z_OK)throw new Error(Yh[r]);if(this.header=new _6,ss.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Jc.string2buf(t.dictionary):sw.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ss.inflateSetDictionary(this.strm,t.dictionary),r!==et.Z_OK)))throw new Error(Yh[r])}aa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,s,o,c,l,u=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?et.Z_FINISH:et.Z_NO_FLUSH,typeof e=="string"?r.input=Jc.binstring2buf(e):sw.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Xo.Buf8(n),r.next_out=0,r.avail_out=n),a=ss.inflate(r,et.Z_NO_FLUSH),a===et.Z_NEED_DICT&&i&&(a=ss.inflateSetDictionary(this.strm,i)),a===et.Z_BUF_ERROR&&u===!0&&(a=et.Z_OK,u=!1),a!==et.Z_STREAM_END&&a!==et.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===et.Z_STREAM_END||r.avail_in===0&&(s===et.Z_FINISH||s===et.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=Jc.utf8border(r.output,r.next_out),c=r.next_out-o,l=Jc.buf2string(r.output,o),r.next_out=c,r.avail_out=n-c,c&&Xo.arraySet(r.output,r.output,o,c,0),this.onData(l)):this.onData(Xo.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==et.Z_STREAM_END);return a===et.Z_STREAM_END&&(s=et.Z_FINISH),s===et.Z_FINISH?(a=ss.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===et.Z_OK):(s===et.Z_SYNC_FLUSH&&(this.onEnd(et.Z_OK),r.avail_out=0),!0)};aa.prototype.onData=function(e){this.chunks.push(e)};aa.prototype.onEnd=function(e){e===et.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Xo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Xh(e,t){var r=new aa(t);if(r.push(e,!0),r.err)throw r.msg||Yh[r.err];return r.result}function x6(e,t){return t=t||{},t.raw=!0,Xh(e,t)}Zo.Inflate=aa;Zo.inflate=Xh;Zo.inflateRaw=x6;Zo.ungzip=Xh});var uw=I((LU,cw)=>{"use strict";g();var S6=Dn().assign,E6=dy(),A6=ow(),k6=qh(),lw={};S6(lw,E6,A6,k6);cw.exports=lw});var hw=I((NU,dw)=>{"use strict";g();var fw=(e,t)=>function(...r){let n=t.promiseModule;return new n((i,a)=>{t.multiArgs?r.push((...s)=>{t.errorFirst?s[0]?a(s):(s.shift(),i(s)):i(s)}):t.errorFirst?r.push((s,o)=>{s?a(s):i(o)}):r.push(i),e.apply(this,r)})};dw.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=typeof e;if(!(e!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${e===null?"null":r}\``);let n=a=>{let s=o=>typeof o=="string"?a===o:o.test(a);return t.include?t.include.some(s):!t.exclude.some(s)},i;r==="function"?i=function(...a){return t.excludeMain?e(...a):fw(e,t).apply(this,a)}:i=Object.create(Object.getPrototypeOf(e));for(let a in e){let s=e[a];i[a]=typeof s=="function"&&n(a)?fw(s,t):s}return i}});var xw=I((BU,_w)=>{g();function pw(e){return Array.isArray(e)?e:[e]}var Jh="",mw=" ",Zh="\\",T6=/^\s+$/,C6=/(?:[^\\]|^)\\$/,P6=/^\\!/,R6=/^\\#/,M6=/\r?\n/g,O6=/^\.*\/|^\.+$/,Kh="/",yw="node-ignore";typeof Symbol!="undefined"&&(yw=Symbol.for("node-ignore"));var gw=yw,I6=(e,t,r)=>Object.defineProperty(e,t,{value:r}),F6=/([0-z])-([0-z])/g,ww=()=>!1,$6=e=>e.replace(F6,(t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:Jh),L6=e=>{let{length:t}=e;return e.slice(0,t-t%2)},D6=[[/^\uFEFF/,()=>Jh],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?mw:Jh)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+mw}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let n=r.replace(/\\\*/g,"[^\\/]*");return t+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Zh],[/\\\\/g,()=>Zh],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,n,i)=>t===Zh?`\\[${r}${L6(n)}${i}`:i==="]"&&n.length%2===0?`[${$6(r)}${n}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],vw=Object.create(null),N6=(e,t)=>{let r=vw[e];return r||(r=D6.reduce((n,[i,a])=>n.replace(i,a.bind(e)),e),vw[e]=r),t?new RegExp(r,"i"):new RegExp(r)},tp=e=>typeof e=="string",j6=e=>e&&tp(e)&&!T6.test(e)&&!C6.test(e)&&e.indexOf("#")!==0,B6=e=>e.split(M6),Qh=class{constructor(t,r,n,i){this.origin=t,this.pattern=r,this.negative=n,this.regex=i}},H6=(e,t)=>{let r=e,n=!1;e.indexOf("!")===0&&(n=!0,e=e.substr(1)),e=e.replace(P6,"!").replace(R6,"#");let i=N6(e,t);return new Qh(r,e,n,i)},U6=(e,t)=>{throw new t(e)},Hn=(e,t,r)=>tp(e)?e?Hn.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),bw=e=>O6.test(e);Hn.isNotRelative=bw;Hn.convert=e=>e;var ep=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:n=!1}={}){I6(this,gw,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[gw]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(j6(t)){let r=H6(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,pw(tp(t)?B6(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let n=!1,i=!1;return this._rules.forEach(a=>{let{negative:s}=a;if(i===s&&n!==i||s&&!n&&!i&&!r)return;a.regex.test(t)&&(n=!s,i=s)}),{ignored:n,unignored:i}}_test(t,r,n,i){let a=t&&Hn.convert(t);return Hn(a,t,this._allowRelativePaths?ww:U6),this._t(a,r,n,i)}_t(t,r,n,i){if(t in r)return r[t];if(i||(i=t.split(Kh)),i.pop(),!i.length)return r[t]=this._testOne(t,n);let a=this._t(i.join(Kh)+Kh,r,n,i);return r[t]=a.ignored?a:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return pw(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},Qc=e=>new ep(e),G6=e=>Hn(e&&Hn.convert(e),e,ww);Qc.isPathValid=G6;Qc.default=Qc;_w.exports=Qc;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Hn.convert=e;let t=/^[a-z]:\//i;Hn.isNotRelative=r=>t.test(r)||bw(r)}});var Ew=I((UU,Sw)=>{"use strict";g();function z6(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wn(e,t,r){return t=t instanceof RegExp?t:new RegExp(z6(t),"g"),e.replace(t,r)}var V6={clean:function(t){if(typeof t!="string")throw new Error("Expected a string, received: "+t);return t=wn(t,"./","/"),t=wn(t,"..","."),t=wn(t," ","-"),t=wn(t,/^[~^:?*\\\-]/g,""),t=wn(t,/[~^:?*\\]/g,"-"),t=wn(t,/[~^:?*\\\-]$/g,""),t=wn(t,"@{","-"),t=wn(t,/\.$/g,""),t=wn(t,/\/$/g,""),t=wn(t,/\.lock$/g,""),t}};Sw.exports=V6});var kw=I((zU,Aw)=>{g();Aw.exports=function(e,t){var r=e,n=t,i=r.length,a=n.length,s=!1,o=null,c=i+1,l=[],u=[],f=[],d="",h=-1,p=0,m=1,v,y,b=function(){i>=a&&(v=r,y=i,r=n,n=v,i=a,a=y,s=!0,c=i+1)},x=function(w,A,S){return{x:w,y:A,k:S}},E=function(w,A){return{elem:w,t:A}},_=function(w,A,S){var T,P,O;for(A>S?T=l[w-1+c]:T=l[w+1+c],O=Math.max(A,S),P=O-w;P<i&&O<a&&r[P]===n[O];)++P,++O;return l[w+c]=u.length,u[u.length]=new x(P,O,T),O},k=function(w){var A,S,T,P,O;for(A=S=1,T=P=0,O=w.length-1;O>=0;--O)for(;T<w[O].x||P<w[O].y;)w[O].y-w[O].x>P-T?(s?f[f.length]=new E(n[P],h):f[f.length]=new E(n[P],m),++S,++P):w[O].y-w[O].x<P-T?(s?f[f.length]=new E(r[T],m):f[f.length]=new E(r[T],h),++A,++T):(f[f.length]=new E(r[T],p),d+=r[T],++A,++S,++T,++P)};return b(),{SES_DELETE:-1,SES_COMMON:0,SES_ADD:1,editdistance:function(){return o},getlcs:function(){return d},getses:function(){return f},compose:function(){var w,A,S,T,P,O,j,D;for(w=a-i,A=i+a+3,S={},j=0;j<A;++j)S[j]=-1,l[j]=-1;T=-1;do{for(++T,D=-T;D<=w-1;++D)S[D+c]=_(D,S[D-1+c]+1,S[D+1+c]);for(D=w+T;D>=w+1;--D)S[D+c]=_(D,S[D-1+c]+1,S[D+1+c]);S[w+c]=_(w,S[w-1+c]+1,S[w+1+c])}while(S[w+c]!==a);for(o=w+2*T,P=l[w+c],O=[];P!==-1;)O[O.length]=new x(u[P].x,u[P].y,null),P=u[P].k;k(O)}}}});var Pw=I((WU,Cw)=>{g();var W6=kw();function q6(e,t){var r=new W6(e,t);r.compose();for(var n=r.getses(),i,a,s=e.length-1,o=t.length-1,c=n.length-1;c>=0;--c)n[c].t===r.SES_COMMON?(a?(a.chain={file1index:s,file2index:o,chain:null},a=a.chain):(i={file1index:s,file2index:o,chain:null},a=i),s--,o--):n[c].t===r.SES_DELETE?s--:n[c].t===r.SES_ADD&&o--;var l={file1index:-1,file2index:-1,chain:null};return a?(a.chain=l,i):l}function Tw(e,t){for(var r=[],n=e.length,i=t.length,a=q6(e,t);a!==null;a=a.chain){var s=n-a.file1index-1,o=i-a.file2index-1;n=a.file1index,i=a.file2index,(s||o)&&r.push({file1:[n+1,s],file2:[i+1,o]})}return r.reverse(),r}function Y6(e,t,r){var n,i=Tw(t,e),a=Tw(t,r),s=[];function o(j,D){s.push([j.file1[0],D,j.file1[1],j.file2[0],j.file2[1]])}for(n=0;n<i.length;n++)o(i[n],0);for(n=0;n<a.length;n++)o(a[n],2);s.sort(function(j,D){return j[0]-D[0]});var c=[],l=0;function u(j){j>l&&(c.push([1,l,j-l]),l=j)}for(var f=0;f<s.length;f++){for(var d=f,h=s[f],p=h[0],m=p+h[2];f<s.length-1;){var v=s[f+1],y=v[0];if(y>m)break;m=Math.max(m,y+v[2]),f++}if(u(p),d==f)h[4]>0&&c.push([h[1],h[3],h[4]]);else{var b={0:[e.length,-1,t.length,-1],2:[r.length,-1,t.length,-1]};for(n=d;n<=f;n++){h=s[n];var x=h[1],E=b[x],_=h[0],k=_+h[2],w=h[3],A=w+h[4];E[0]=Math.min(w,E[0]),E[1]=Math.max(A,E[1]),E[2]=Math.min(_,E[2]),E[3]=Math.max(k,E[3])}var S=b[0][0]+(p-b[0][2]),T=b[0][1]+(m-b[0][3]),P=b[2][0]+(p-b[2][2]),O=b[2][1]+(m-b[2][3]);c.push([-1,S,T-S,p,m-p,P,O-P])}l=m}return u(t.length),c}function X6(e,t,r){var n=[],i=[e,t,r],a=Y6(e,t,r),s=[];function o(){s.length&&n.push({ok:s}),s=[]}function c(h){for(var p=0;p<h.length;p++)s.push(h[p])}function l(h){if(h[2]!=h[6])return!0;for(var p=h[1],m=h[5],v=0;v<h[2];v++)if(e[v+p]!=r[v+m])return!0;return!1}for(var u=0;u<a.length;u++){var f=a[u],d=f[0];d==-1?l(f)?(o(),n.push({conflict:{a:e.slice(f[1],f[1]+f[2]),aIndex:f[1],o:t.slice(f[3],f[3]+f[4]),oIndex:f[3],b:r.slice(f[5],f[5]+f[6]),bIndex:f[5]}})):c(i[0].slice(f[1],f[1]+f[2])):c(i[d].slice(f[1],f[1]+f[2]))}return o(),n}Cw.exports=X6});var I2=I((QU,O2)=>{g();var Es=1e3,As=Es*60,ks=As*60,da=ks*24,J8=da*7,Q8=da*365.25;O2.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return eI(e);if(r==="number"&&isFinite(e))return t.long?rI(e):tI(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function eI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Q8;case"weeks":case"week":case"w":return r*J8;case"days":case"day":case"d":return r*da;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ks;case"minutes":case"minute":case"mins":case"min":case"m":return r*As;case"seconds":case"second":case"secs":case"sec":case"s":return r*Es;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function tI(e){var t=Math.abs(e);return t>=da?Math.round(e/da)+"d":t>=ks?Math.round(e/ks)+"h":t>=As?Math.round(e/As)+"m":t>=Es?Math.round(e/Es)+"s":e+"ms"}function rI(e){var t=Math.abs(e);return t>=da?bu(e,t,da,"day"):t>=ks?bu(e,t,ks,"hour"):t>=As?bu(e,t,As,"minute"):t>=Es?bu(e,t,Es,"second"):e+" ms"}function bu(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var $2=I((tG,F2)=>{g();function nI(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=s,r.humanize=I2(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let f=0;for(let d=0;d<u.length;d++)f=(f<<5)-f+u.charCodeAt(d),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(u){let f,d=null,h,p;function m(...v){if(!m.enabled)return;let y=m,b=Number(new Date),x=b-(f||b);y.diff=x,y.prev=f,y.curr=b,f=b,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let E=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(k,w)=>{if(k==="%%")return"%";E++;let A=r.formatters[w];if(typeof A=="function"){let S=v[E];k=A.call(y,S),v.splice(E,1),E--}return k}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return m.namespace=u,m.useColors=r.useColors(),m.color=r.selectColor(u),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,p=r.enabled(u)),p),set:v=>{d=v}}),typeof r.init=="function"&&r.init(m),m}function n(u,f){let d=r(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),h=d.length;for(f=0;f<h;f++)d[f]&&(u=d[f].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function a(){let u=[...r.names.map(o),...r.skips.map(o).map(f=>"-"+f)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let f,d;for(f=0,d=r.skips.length;f<d;f++)if(r.skips[f].test(u))return!1;for(f=0,d=r.names.length;f<d;f++)if(r.names[f].test(u))return!0;return!1}function o(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}F2.exports=nI});var xu=I((mr,_u)=>{g();mr.formatArgs=aI;mr.save=sI;mr.load=oI;mr.useColors=iI;mr.storage=lI();mr.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();mr.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function iI(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function aI(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+_u.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}mr.log=console.debug||console.log||(()=>{});function sI(e){try{e?mr.storage.setItem("debug",e):mr.storage.removeItem("debug")}catch(t){}}function oI(){let e;try{e=mr.storage.getItem("debug")}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}function lI(){try{return localStorage}catch(e){}}_u.exports=$2()(mr);var{formatters:cI}=_u.exports;cI.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var L2=I(gr=>{"use strict";g();var uI=gr&&gr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gr,"__esModule",{value:!0});var fI=require("fs"),dI=uI(xu()),Ts=dI.default("@kwsites/file-exists");function hI(e,t,r){Ts("checking %s",e);try{let n=fI.statSync(e);return n.isFile()&&t?(Ts("[OK] path represents a file"),!0):n.isDirectory()&&r?(Ts("[OK] path represents a directory"),!0):(Ts("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Ts("[FAIL] path is not accessible: %o",n),!1;throw Ts("[FATAL] %o",n),n}}function pI(e,t=gr.READABLE){return hI(e,(t&gr.FILE)>0,(t&gr.FOLDER)>0)}gr.exists=pI;gr.FILE=1;gr.FOLDER=2;gr.READABLE=gr.FILE+gr.FOLDER});var D2=I(Su=>{"use strict";g();function mI(e){for(var t in e)Su.hasOwnProperty(t)||(Su[t]=e[t])}Object.defineProperty(Su,"__esModule",{value:!0});mI(L2())});var Mp=I(ha=>{"use strict";g();Object.defineProperty(ha,"__esModule",{value:!0});ha.createDeferred=ha.deferred=void 0;function Rp(){let e,t,r="pending";return{promise:new Promise((i,a)=>{e=i,t=a}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}ha.deferred=Rp;ha.createDeferred=Rp;ha.default=Rp});var kx=I((qG,Ax)=>{"use strict";g();Ax.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Cx=I((XG,Tx)=>{g();var Sm={px:{px:1,cm:37.79527559055118,mm:3.7795275590551185,in:96,pt:1.3333333333333333,pc:16},cm:{px:.026458333333333334,cm:1,mm:.1,in:2.54,pt:.035277777777777776,pc:.42333333333333334},mm:{px:.26458333333333334,cm:10,mm:1,in:25.4,pt:.35277777777777775,pc:4.233333333333333},in:{px:.010416666666666666,cm:.39370078740157477,mm:.03937007874015748,in:1,pt:.013888888888888888,pc:.16666666666666666},pt:{px:.75,cm:28.346456692913385,mm:2.834645669291339,in:72,pt:1,pc:12},pc:{px:.0625,cm:2.3622047244094486,mm:.2362204724409449,in:6,pt:.08333333333333333,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:1.1111111111111112,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:.002777777777777778,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:.39370078740157477,dppx:.010416666666666666},dpcm:{dpi:2.54,dpcm:1,dppx:.026458333333333334},dppx:{dpi:96,dpcm:37.79527559055118,dppx:1}};Tx.exports=function(e,t,r,n){if(!Sm.hasOwnProperty(r))throw new Error("Cannot convert to "+r);if(!Sm[r].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+r);var i=Sm[r][t]*e;return n!==!1?(n=Math.pow(10,parseInt(n)||5),Math.round(i*n)/n):i}});var Ux=I(Wn=>{"use strict";g();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.fromRgba=Fs;Wn.fromRgb=Em;Wn.fromHsla=Yu;Wn.fromHsl=Bx;Wn.fromString=Hx;Wn.default=void 0;var Px=Ox(kx()),T$=Ox(Cx());function Ox(e){return e&&e.__esModule?e:{default:e}}function C$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rx(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P$(e,t,r){return t&&Rx(e.prototype,t),r&&Rx(e,r),e}function Wt(e,t){return I$(e)||O$(e,t)||M$(e,t)||R$()}function R$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M$(e,t){if(e){if(typeof e=="string")return Mx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mx(e,t)}}function Mx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O$(e,t){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),o;!(n=(o=s.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function I$(e){if(Array.isArray(e))return e}var Ix=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?$/,Fx=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])?$/,$x=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,Lx=/^rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,Dx=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,Nx=/^rgba?\(\s*(\d+%)\s+(\d+%)\s+(\d+%)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,jx=/^hsla?\(\s*(\d+)(deg|rad|grad|turn)?\s*,\s*(\d+)%\s*,\s*(\d+)%(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/;function Ol(e,t){return e.indexOf(t)>-1}function F$(e,t,r){var n=e/255,i=t/255,a=r/255,s=Math.max(n,i,a),o=Math.min(n,i,a),c=s-o,l=(s+o)/2;if(c===0)return[0,0,l*100];var u=c/(1-Math.abs(2*l-1)),f=function(){switch(s){case n:return(i-a)/c%6;case i:return(a-n)/c+2;default:return(n-i)/c+4}}();return[f*60,u*100,l*100]}function $$(e,t,r){var n=e/60,i=t/100,a=r/100,s=(1-Math.abs(2*a-1))*i,o=s*(1-Math.abs(n%2-1)),c=a-s/2,l=function(){return n<1?[s,o,0]:n<2?[o,s,0]:n<3?[0,s,o]:n<4?[0,o,s]:n<5?[o,0,s]:[s,0,o]}(),u=Wt(l,3),f=u[0],d=u[1],h=u[2];return[(f+c)*255,(d+c)*255,(h+c)*255]}var L$=function(){function e(t){var r=Wt(t,4),n=r[0],i=r[1],a=r[2],s=r[3];C$(this,e),this.values=[Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(a,10),255),0),s==null?1:Math.max(Math.min(parseFloat(s),255),0)]}return P$(e,[{key:"toRgbString",value:function(){var r=Wt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return s===1?"rgb(".concat(n,", ").concat(i,", ").concat(a,")"):"rgba(".concat(n,", ").concat(i,", ").concat(a,", ").concat(s,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),n=Wt(r,4),i=n[0],a=n[1],s=n[2],o=n[3];return o===1?"hsl(".concat(i,", ").concat(a,"%, ").concat(s,"%)"):"hsla(".concat(i,", ").concat(a,"%, ").concat(s,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=Wt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return n=Number(n).toString(16).padStart(2,"0"),i=Number(i).toString(16).padStart(2,"0"),a=Number(a).toString(16).padStart(2,"0"),s=s<1?parseInt(s*255,10).toString(16).padStart(2,"0"):"","#".concat(n).concat(i).concat(a).concat(s)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=Wt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3],o=F$(n,i,a),c=Wt(o,3),l=c[0],u=c[1],f=c[2];return[l,u,f,s]}}]),e}();function Fs(e){var t=Wt(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return new L$([r,n,i,a])}function Em(e){var t=Wt(e,3),r=t[0],n=t[1],i=t[2];return Fs([r,n,i,1])}function Yu(e){var t=Wt(e,4),r=t[0],n=t[1],i=t[2],a=t[3],s=$$(r,n,i),o=Wt(s,3),c=o[0],l=o[1],u=o[2];return Fs([c,l,u,a])}function Bx(e){var t=Wt(e,3),r=t[0],n=t[1],i=t[2];return Yu([r,n,i,1])}function D$(e){var t=Ix.exec(e)||Fx.exec(e),r=Wt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=parseInt(n.length<2?n.repeat(2):n,16),i=parseInt(i.length<2?i.repeat(2):i,16),a=parseInt(a.length<2?a.repeat(2):a,16),s=s&&(parseInt(s.length<2?s.repeat(2):s,16)/255).toPrecision(1)||1,Fs([n,i,a,s])}function N$(e){var t=$x.exec(e)||Dx.exec(e)||Lx.exec(e)||Nx.exec(e),r=Wt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=Ol(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),i=Ol(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),a=Ol(a,"%")>0?parseInt(a,10)*255/100:parseInt(a,10),s=s===void 0?1:parseFloat(s)/(Ol(s,"%")?100:1),Fs([n,i,a,s])}function j$(e){var t=jx.exec(e),r=Wt(t,6),n=r[1],i=r[2],a=r[3],s=r[4],o=r[5];return i=i||"deg",n=(0,T$.default)(parseFloat(n),i,"deg"),a=parseFloat(a),s=parseFloat(s),o=o===void 0?1:parseFloat(o)/(Ol(o,"%")?100:1),Yu([n,a,s,o])}function Hx(e){return Px.default[e]?Em(Px.default[e]):Ix.test(e)||Fx.test(e)?D$(e):$x.test(e)||Dx.test(e)||Lx.test(e)||Nx.test(e)?N$(e):jx.test(e)?j$(e):null}var B$={fromString:Hx,fromRgb:Em,fromRgba:Fs,fromHsl:Bx,fromHsla:Yu};Wn.default=B$});var Am=I((QG,zx)=>{"use strict";g();var Gx=Object.prototype.toString;zx.exports=function(t){var r=Gx.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Gx.call(t.callee)==="[object Function]"),n}});var Qx=I((tz,Jx)=>{"use strict";g();var Kx;Object.keys||(Il=Object.prototype.hasOwnProperty,km=Object.prototype.toString,Vx=Am(),Tm=Object.prototype.propertyIsEnumerable,Wx=!Tm.call({toString:null},"toString"),qx=Tm.call(function(){},"prototype"),Fl=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Xu=function(e){var t=e.constructor;return t&&t.prototype===e},Yx={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Xx=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!Yx["$"+e]&&Il.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Xu(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),Zx=function(e){if(typeof window=="undefined"||!Xx)return Xu(e);try{return Xu(e)}catch(t){return!1}},Kx=function(t){var r=t!==null&&typeof t=="object",n=km.call(t)==="[object Function]",i=Vx(t),a=r&&km.call(t)==="[object String]",s=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var o=qx&&n;if(a&&t.length>0&&!Il.call(t,0))for(var c=0;c<t.length;++c)s.push(String(c));if(i&&t.length>0)for(var l=0;l<t.length;++l)s.push(String(l));else for(var u in t)!(o&&u==="prototype")&&Il.call(t,u)&&s.push(String(u));if(Wx)for(var f=Zx(t),d=0;d<Fl.length;++d)!(f&&Fl[d]==="constructor")&&Il.call(t,Fl[d])&&s.push(Fl[d]);return s});var Il,km,Vx,Tm,Wx,qx,Fl,Xu,Yx,Xx,Zx;Jx.exports=Kx});var Ku=I((nz,rS)=>{"use strict";g();var H$=Array.prototype.slice,U$=Am(),eS=Object.keys,Zu=eS?function(t){return eS(t)}:Qx(),tS=Object.keys;Zu.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return U$(n)?tS(H$.call(n)):tS(n)})}else Object.keys=Zu;return Object.keys||Zu};rS.exports=Zu});var iS=I((az,nS)=>{"use strict";g();nS.exports=Error});var sS=I((oz,aS)=>{"use strict";g();aS.exports=EvalError});var lS=I((cz,oS)=>{"use strict";g();oS.exports=RangeError});var uS=I((fz,cS)=>{"use strict";g();cS.exports=ReferenceError});var Cm=I((hz,fS)=>{"use strict";g();fS.exports=SyntaxError});var qn=I((mz,dS)=>{"use strict";g();dS.exports=TypeError});var pS=I((vz,hS)=>{"use strict";g();hS.exports=URIError});var $l=I((wz,mS)=>{"use strict";g();mS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var Ju=I((_z,vS)=>{"use strict";g();var gS=typeof Symbol!="undefined"&&Symbol,G$=$l();vS.exports=function(){return typeof gS!="function"||typeof Symbol!="function"||typeof gS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:G$()}});var wS=I((Sz,yS)=>{"use strict";g();var Pm={__proto__:null,foo:{}},z$=Object;yS.exports=function(){return{__proto__:Pm}.foo===Pm.foo&&!(Pm instanceof z$)}});var xS=I((Az,_S)=>{"use strict";g();var V$="Function.prototype.bind called on incompatible ",W$=Object.prototype.toString,q$=Math.max,Y$="[object Function]",bS=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},X$=function(t,r){for(var n=[],i=r||0,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},Z$=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};_S.exports=function(t){var r=this;if(typeof r!="function"||W$.apply(r)!==Y$)throw new TypeError(V$+r);for(var n=X$(arguments,1),i,a=function(){if(this instanceof i){var u=r.apply(this,bS(n,arguments));return Object(u)===u?u:this}return r.apply(t,bS(n,arguments))},s=q$(0,r.length-n.length),o=[],c=0;c<s;c++)o[c]="$"+c;if(i=Function("binder","return function ("+Z$(o,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i}});var Qu=I((Tz,SS)=>{"use strict";g();var K$=xS();SS.exports=Function.prototype.bind||K$});var Rm=I((Pz,ES)=>{"use strict";g();var J$=Function.prototype.call,Q$=Object.prototype.hasOwnProperty,eL=Qu();ES.exports=eL.call(J$,Q$)});var Qr=I((Mz,PS)=>{"use strict";g();var ve,tL=iS(),rL=sS(),nL=lS(),iL=uS(),Ns=Cm(),Ds=qn(),aL=pS(),CS=Function,Mm=function(e){try{return CS('"use strict"; return ('+e+").constructor;")()}catch(t){}},va=Object.getOwnPropertyDescriptor;if(va)try{va({},"")}catch(e){va=null}var Om=function(){throw new Ds},sL=va?function(){try{return arguments.callee,Om}catch(e){try{return va(arguments,"callee").get}catch(t){return Om}}}():Om,$s=Ju()(),oL=wS()(),wt=Object.getPrototypeOf||(oL?function(e){return e.__proto__}:null),Ls={},lL=typeof Uint8Array=="undefined"||!wt?ve:wt(Uint8Array),ya={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?ve:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?ve:ArrayBuffer,"%ArrayIteratorPrototype%":$s&&wt?wt([][Symbol.iterator]()):ve,"%AsyncFromSyncIteratorPrototype%":ve,"%AsyncFunction%":Ls,"%AsyncGenerator%":Ls,"%AsyncGeneratorFunction%":Ls,"%AsyncIteratorPrototype%":Ls,"%Atomics%":typeof Atomics=="undefined"?ve:Atomics,"%BigInt%":typeof BigInt=="undefined"?ve:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?ve:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?ve:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?ve:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":tL,"%eval%":eval,"%EvalError%":rL,"%Float32Array%":typeof Float32Array=="undefined"?ve:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?ve:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?ve:FinalizationRegistry,"%Function%":CS,"%GeneratorFunction%":Ls,"%Int8Array%":typeof Int8Array=="undefined"?ve:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?ve:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?ve:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$s&&wt?wt(wt([][Symbol.iterator]())):ve,"%JSON%":typeof JSON=="object"?JSON:ve,"%Map%":typeof Map=="undefined"?ve:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!$s||!wt?ve:wt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?ve:Promise,"%Proxy%":typeof Proxy=="undefined"?ve:Proxy,"%RangeError%":nL,"%ReferenceError%":iL,"%Reflect%":typeof Reflect=="undefined"?ve:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?ve:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!$s||!wt?ve:wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?ve:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$s&&wt?wt(""[Symbol.iterator]()):ve,"%Symbol%":$s?Symbol:ve,"%SyntaxError%":Ns,"%ThrowTypeError%":sL,"%TypedArray%":lL,"%TypeError%":Ds,"%Uint8Array%":typeof Uint8Array=="undefined"?ve:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?ve:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?ve:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?ve:Uint32Array,"%URIError%":aL,"%WeakMap%":typeof WeakMap=="undefined"?ve:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?ve:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?ve:WeakSet};if(wt)try{null.error}catch(e){AS=wt(wt(e)),ya["%Error.prototype%"]=AS}var AS,cL=function e(t){var r;if(t==="%AsyncFunction%")r=Mm("async function () {}");else if(t==="%GeneratorFunction%")r=Mm("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Mm("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&wt&&(r=wt(i.prototype))}return ya[t]=r,r},kS={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ll=Qu(),ef=Rm(),uL=Ll.call(Function.call,Array.prototype.concat),fL=Ll.call(Function.apply,Array.prototype.splice),TS=Ll.call(Function.call,String.prototype.replace),tf=Ll.call(Function.call,String.prototype.slice),dL=Ll.call(Function.call,RegExp.prototype.exec),hL=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pL=/\\(\\)?/g,mL=function(t){var r=tf(t,0,1),n=tf(t,-1);if(r==="%"&&n!=="%")throw new Ns("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ns("invalid intrinsic syntax, expected opening `%`");var i=[];return TS(t,hL,function(a,s,o,c){i[i.length]=o?TS(c,pL,"$1"):s||a}),i},gL=function(t,r){var n=t,i;if(ef(kS,n)&&(i=kS[n],n="%"+i[0]+"%"),ef(ya,n)){var a=ya[n];if(a===Ls&&(a=cL(n)),typeof a=="undefined"&&!r)throw new Ds("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Ns("intrinsic "+t+" does not exist!")};PS.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Ds("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ds('"allowMissing" argument must be a boolean');if(dL(/^%?[^%]*%?$/,t)===null)throw new Ns("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=mL(t),i=n.length>0?n[0]:"",a=gL("%"+i+"%",r),s=a.name,o=a.value,c=!1,l=a.alias;l&&(i=l[0],fL(n,uL([0,1],l)));for(var u=1,f=!0;u<n.length;u+=1){var d=n[u],h=tf(d,0,1),p=tf(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Ns("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(c=!0),i+="."+d,s="%"+i+"%",ef(ya,s))o=ya[s];else if(o!=null){if(!(d in o)){if(!r)throw new Ds("base intrinsic for "+t+" exists, but the property is not available.");return}if(va&&u+1>=n.length){var m=va(o,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[d]}else f=ef(o,d),o=o[d];f&&!c&&(ya[s]=o)}}return o}});var nf=I((Iz,RS)=>{"use strict";g();var vL=Qr(),rf=vL("%Object.defineProperty%",!0)||!1;if(rf)try{rf({},"a",{value:1})}catch(e){rf=!1}RS.exports=rf});var sf=I(($z,MS)=>{"use strict";g();var yL=Qr(),af=yL("%Object.getOwnPropertyDescriptor%",!0);if(af)try{af([],"length")}catch(e){af=null}MS.exports=af});var of=I((Dz,FS)=>{"use strict";g();var OS=nf(),wL=Cm(),js=qn(),IS=sf();FS.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new js("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new js("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new js("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new js("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new js("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new js("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,c=!!IS&&IS(t,r);if(OS)OS(t,r,{configurable:s===null&&c?c.configurable:!s,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:a===null&&c?c.writable:!a});else if(o||!i&&!a&&!s)t[r]=n;else throw new wL("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var lf=I((jz,LS)=>{"use strict";g();var Im=nf(),$S=function(){return!!Im};$S.hasArrayLengthDefineBug=function(){if(!Im)return null;try{return Im([],"length",{value:1}).length!==1}catch(t){return!0}};LS.exports=$S});var Ti=I((Hz,BS)=>{"use strict";g();var bL=Ku(),_L=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",xL=Object.prototype.toString,SL=Array.prototype.concat,DS=of(),EL=function(e){return typeof e=="function"&&xL.call(e)==="[object Function]"},NS=lf()(),AL=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!EL(n)||!n())return}NS?DS(e,t,r,!0):DS(e,t,r)},jS=function(e,t){var r=arguments.length>2?arguments[2]:{},n=bL(t);_L&&(n=SL.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)AL(e,n[i],t[n[i]],r[n[i]])};jS.supportsDescriptors=!!NS;BS.exports=jS});var VS=I((Gz,zS)=>{"use strict";g();var kL=Qr(),HS=of(),TL=lf()(),US=sf(),GS=qn(),CL=kL("%Math.floor%");zS.exports=function(t,r){if(typeof t!="function")throw new GS("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||CL(r)!==r)throw new GS("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&US){var s=US(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(a=!1)}return(i||a||!n)&&(TL?HS(t,"length",r,!0,!0):HS(t,"length",r)),t}});var wa=I((Vz,cf)=>{"use strict";g();var Fm=Qu(),uf=Qr(),PL=VS(),RL=qn(),YS=uf("%Function.prototype.apply%"),XS=uf("%Function.prototype.call%"),ZS=uf("%Reflect.apply%",!0)||Fm.call(XS,YS),WS=nf(),ML=uf("%Math.max%");cf.exports=function(t){if(typeof t!="function")throw new RL("a function is required");var r=ZS(Fm,XS,arguments);return PL(r,1+ML(0,t.length-(arguments.length-1)),!0)};var qS=function(){return ZS(Fm,YS,arguments)};WS?WS(cf.exports,"apply",{value:qS}):cf.exports.apply=qS});var wr=I((qz,QS)=>{"use strict";g();var KS=Qr(),JS=wa(),OL=JS(KS("String.prototype.indexOf"));QS.exports=function(t,r){var n=KS(t,!!r);return typeof n=="function"&&OL(t,".prototype.")>-1?JS(n):n}});var $m=I((Xz,iE)=>{"use strict";g();var IL=Ku(),rE=$l()(),nE=wr(),eE=Object,FL=nE("Array.prototype.push"),tE=nE("Object.prototype.propertyIsEnumerable"),$L=rE?Object.getOwnPropertySymbols:null;iE.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=eE(t);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=eE(arguments[i]),s=IL(a),o=rE&&(Object.getOwnPropertySymbols||$L);if(o)for(var c=o(a),l=0;l<c.length;++l){var u=c[l];tE(a,u)&&FL(s,u)}for(var f=0;f<s.length;++f){var d=s[f];if(tE(a,d)){var h=a[d];n[d]=h}}}return n}});var Dm=I((Kz,aE)=>{"use strict";g();var Lm=$m(),LL=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),a="";for(var s in i)a+=s;return e!==a},DL=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return e[1]==="y"}return!1};aE.exports=function(){return!Object.assign||LL()||DL()?Lm:Object.assign}});var oE=I((Qz,sE)=>{"use strict";g();var NL=Ti(),jL=Dm();sE.exports=function(){var t=jL();return NL(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}});var fE=I((tV,uE)=>{"use strict";g();var BL=Ti(),HL=wa(),UL=$m(),lE=Dm(),GL=oE(),zL=HL.apply(lE()),cE=function(t,r){return zL(Object,arguments)};BL(cE,{getPolyfill:lE,implementation:UL,shim:GL});uE.exports=cE});var hE=I((nV,dE)=>{"use strict";g();var Nl=function(){return typeof function(){}.name=="string"},Dl=Object.getOwnPropertyDescriptor;if(Dl)try{Dl([],"length")}catch(e){Dl=null}Nl.functionsHaveConfigurableNames=function(){if(!Nl()||!Dl)return!1;var t=Dl(function(){},"name");return!!t&&!!t.configurable};var VL=Function.prototype.bind;Nl.boundFunctionsHaveNames=function(){return Nl()&&typeof VL=="function"&&function(){}.bind().name!==""};dE.exports=Nl});var gE=I((aV,mE)=>{"use strict";g();var pE=of(),WL=lf()(),qL=hE().functionsHaveConfigurableNames(),YL=qn();mE.exports=function(t,r){if(typeof t!="function")throw new YL("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||qL)&&(WL?pE(t,"name",r,!0,!0):pE(t,"name",r)),t}});var Nm=I((oV,vE)=>{"use strict";g();var XL=gE(),ZL=qn(),KL=Object;vE.exports=XL(function(){if(this==null||this!==KL(this))throw new ZL("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0)});var jm=I((cV,yE)=>{"use strict";g();var JL=Nm(),QL=Ti().supportsDescriptors,eD=Object.getOwnPropertyDescriptor;yE.exports=function(){if(QL&&/a/mig.flags==="gim"){var t=eD(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),t.get.call(n),r==="dy")return t.get}}return JL}});var _E=I((fV,bE)=>{"use strict";g();var tD=Ti().supportsDescriptors,rD=jm(),nD=Object.getOwnPropertyDescriptor,iD=Object.defineProperty,aD=TypeError,wE=Object.getPrototypeOf,sD=/a/;bE.exports=function(){if(!tD||!wE)throw new aD("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=rD(),r=wE(sD),n=nD(r,"flags");return(!n||n.get!==t)&&iD(r,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var AE=I((hV,EE)=>{"use strict";g();var oD=Ti(),lD=wa(),cD=Nm(),xE=jm(),uD=_E(),SE=lD(xE());oD(SE,{getPolyfill:xE,implementation:cD,shim:uD});EE.exports=SE});var Ci=I((mV,kE)=>{"use strict";g();var fD=$l();kE.exports=function(){return fD()&&!!Symbol.toStringTag}});var Hm=I((vV,CE)=>{"use strict";g();var dD=Ci()(),hD=wr(),Bm=hD("Object.prototype.toString"),ff=function(t){return dD&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Bm(t)==="[object Arguments]"},TE=function(t){return ff(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Bm(t)!=="[object Array]"&&Bm(t.callee)==="[object Function]"},pD=function(){return ff(arguments)}();ff.isLegacyArguments=TE;CE.exports=pD?ff:TE});var PE=I(()=>{g()});var XE=I((xV,YE)=>{g();var Km=typeof Map=="function"&&Map.prototype,Um=Object.getOwnPropertyDescriptor&&Km?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,hf=Km&&Um&&typeof Um.get=="function"?Um.get:null,RE=Km&&Map.prototype.forEach,Jm=typeof Set=="function"&&Set.prototype,Gm=Object.getOwnPropertyDescriptor&&Jm?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,pf=Jm&&Gm&&typeof Gm.get=="function"?Gm.get:null,ME=Jm&&Set.prototype.forEach,mD=typeof WeakMap=="function"&&WeakMap.prototype,Bl=mD?WeakMap.prototype.has:null,gD=typeof WeakSet=="function"&&WeakSet.prototype,Hl=gD?WeakSet.prototype.has:null,vD=typeof WeakRef=="function"&&WeakRef.prototype,OE=vD?WeakRef.prototype.deref:null,yD=Boolean.prototype.valueOf,wD=Object.prototype.toString,bD=Function.prototype.toString,_D=String.prototype.match,Qm=String.prototype.slice,Ri=String.prototype.replace,xD=String.prototype.toUpperCase,IE=String.prototype.toLowerCase,UE=RegExp.prototype.test,FE=Array.prototype.concat,En=Array.prototype.join,SD=Array.prototype.slice,$E=Math.floor,Wm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,zm=Object.getOwnPropertySymbols,qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Rt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Bs||!0)?Symbol.toStringTag:null,GE=Object.prototype.propertyIsEnumerable,LE=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function DE(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||UE.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-$E(-e):$E(e);if(n!==e){var i=String(n),a=Qm.call(t,i.length+1);return Ri.call(i,r,"$&_")+"."+Ri.call(Ri.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ri.call(t,r,"$&_")}var Ym=PE(),NE=Ym.custom,jE=VE(NE)?NE:null;YE.exports=function e(t,r,n,i){var a=r||{};if(Pi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Pi(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Pi(a,"customInspect")?a.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Pi(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Pi(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=a.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return qE(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return o?DE(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return o?DE(t,l):l}var u=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=u&&u>0&&typeof t=="object")return Xm(t)?"[Array]":"[Object]";var f=HD(a,n);if(typeof i=="undefined")i=[];else if(WE(i,t)>=0)return"[Circular]";function d(j,D,Q){if(D&&(i=SD.call(i),i.push(D)),Q){var de={depth:a.depth};return Pi(a,"quoteStyle")&&(de.quoteStyle=a.quoteStyle),e(j,de,n+1,i)}return e(j,a,n+1,i)}if(typeof t=="function"&&!BE(t)){var h=OD(t),p=df(t,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+En.call(p,", ")+" }":"")}if(VE(t)){var m=Bs?Ri.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):qm.call(t);return typeof t=="object"&&!Bs?jl(m):m}if(ND(t)){for(var v="<"+IE.call(String(t.nodeName)),y=t.attributes||[],b=0;b<y.length;b++)v+=" "+y[b].name+"="+zE(ED(y[b].value),"double",a);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+IE.call(String(t.nodeName))+">",v}if(Xm(t)){if(t.length===0)return"[]";var x=df(t,d);return f&&!BD(x)?"["+Zm(x,f)+"]":"[ "+En.call(x,", ")+" ]"}if(kD(t)){var E=df(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!GE.call(t,"cause")?"{ ["+String(t)+"] "+En.call(FE.call("[cause]: "+d(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+En.call(E,", ")+" }"}if(typeof t=="object"&&s){if(jE&&typeof t[jE]=="function"&&Ym)return Ym(t,{depth:u-n});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ID(t)){var _=[];return RE&&RE.call(t,function(j,D){_.push(d(D,t,!0)+" => "+d(j,t))}),HE("Map",hf.call(t),_,f)}if(LD(t)){var k=[];return ME&&ME.call(t,function(j){k.push(d(j,t))}),HE("Set",pf.call(t),k,f)}if(FD(t))return Vm("WeakMap");if(DD(t))return Vm("WeakSet");if($D(t))return Vm("WeakRef");if(CD(t))return jl(d(Number(t)));if(RD(t))return jl(d(Wm.call(t)));if(PD(t))return jl(yD.call(t));if(TD(t))return jl(d(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof global!="undefined"&&t===global)return"{ [object globalThis] }";if(!AD(t)&&!BE(t)){var w=df(t,d),A=LE?LE(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",T=!A&&Rt&&Object(t)===t&&Rt in t?Qm.call(Mi(t),8,-1):S?"Object":"",P=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",O=P+(T||S?"["+En.call(FE.call([],T||[],S||[]),": ")+"] ":"");return w.length===0?O+"{}":f?O+"{"+Zm(w,f)+"}":O+"{ "+En.call(w,", ")+" }"}return String(t)};function zE(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function ED(e){return Ri.call(String(e),/"/g,"&quot;")}function Xm(e){return Mi(e)==="[object Array]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function AD(e){return Mi(e)==="[object Date]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function BE(e){return Mi(e)==="[object RegExp]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function kD(e){return Mi(e)==="[object Error]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function TD(e){return Mi(e)==="[object String]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function CD(e){return Mi(e)==="[object Number]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function PD(e){return Mi(e)==="[object Boolean]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function VE(e){if(Bs)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!qm)return!1;try{return qm.call(e),!0}catch(t){}return!1}function RD(e){if(!e||typeof e!="object"||!Wm)return!1;try{return Wm.call(e),!0}catch(t){}return!1}var MD=Object.prototype.hasOwnProperty||function(e){return e in this};function Pi(e,t){return MD.call(e,t)}function Mi(e){return wD.call(e)}function OD(e){if(e.name)return e.name;var t=_D.call(bD.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function WE(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function ID(e){if(!hf||!e||typeof e!="object")return!1;try{hf.call(e);try{pf.call(e)}catch(t){return!0}return e instanceof Map}catch(t){}return!1}function FD(e){if(!Bl||!e||typeof e!="object")return!1;try{Bl.call(e,Bl);try{Hl.call(e,Hl)}catch(t){return!0}return e instanceof WeakMap}catch(t){}return!1}function $D(e){if(!OE||!e||typeof e!="object")return!1;try{return OE.call(e),!0}catch(t){}return!1}function LD(e){if(!pf||!e||typeof e!="object")return!1;try{pf.call(e);try{hf.call(e)}catch(t){return!0}return e instanceof Set}catch(t){}return!1}function DD(e){if(!Hl||!e||typeof e!="object")return!1;try{Hl.call(e,Hl);try{Bl.call(e,Bl)}catch(t){return!0}return e instanceof WeakSet}catch(t){}return!1}function ND(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function qE(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return qE(Qm.call(e,0,t.maxStringLength),t)+n}var i=Ri.call(Ri.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jD);return zE(i,"single",t)}function jD(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+xD.call(t.toString(16))}function jl(e){return"Object("+e+")"}function Vm(e){return e+" { ? }"}function HE(e,t,r,n){var i=n?Zm(r,n):En.call(r,", ");return e+" ("+t+") {"+i+"}"}function BD(e){for(var t=0;t<e.length;t++)if(WE(e[t],`
`)>=0)return!1;return!0}function HD(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=En.call(Array(e.indent+1)," ");else return null;return{base:r,prev:En.call(Array(t+1),r)}}function Zm(e,t){if(e.length===0)return"";var r=`
`+t.prev+t.base;return r+En.call(e,","+r)+`
`+t.prev}function df(e,t){var r=Xm(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=Pi(e,i)?t(e[i],e):""}var a=typeof zm=="function"?zm(e):[],s;if(Bs){s={};for(var o=0;o<a.length;o++)s["$"+a[o]]=a[o]}for(var c in e)Pi(e,c)&&(r&&String(Number(c))===c&&c<e.length||Bs&&s["$"+c]instanceof Symbol||(UE.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof zm=="function")for(var l=0;l<a.length;l++)GE.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}});var tg=I((EV,KE)=>{"use strict";g();var ZE=Qr(),Hs=wr(),UD=XE(),GD=qn(),mf=ZE("%WeakMap%",!0),gf=ZE("%Map%",!0),zD=Hs("WeakMap.prototype.get",!0),VD=Hs("WeakMap.prototype.set",!0),WD=Hs("WeakMap.prototype.has",!0),qD=Hs("Map.prototype.get",!0),YD=Hs("Map.prototype.set",!0),XD=Hs("Map.prototype.has",!0),eg=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},ZD=function(e,t){var r=eg(e,t);return r&&r.value},KD=function(e,t,r){var n=eg(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},JD=function(e,t){return!!eg(e,t)};KE.exports=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new GD("Side channel does not contain "+UD(a))},get:function(a){if(mf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return zD(t,a)}else if(gf){if(r)return qD(r,a)}else if(n)return ZD(n,a)},has:function(a){if(mf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return WD(t,a)}else if(gf){if(r)return XD(r,a)}else if(n)return JD(n,a);return!1},set:function(a,s){mf&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new mf),VD(t,a,s)):gf?(r||(r=new gf),YD(r,a,s)):(n||(n={key:{},next:null}),KD(n,a,s))}};return i}});var QE=I((kV,JE)=>{"use strict";g();var QD=Rm(),Ul=tg()(),Yn=qn(),rg={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");if(Ul.assert(e),!rg.has(e,t))throw new Yn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");var r=Ul.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");var r=Ul.get(e);return!!r&&QD(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");var n=Ul.get(e);n||(n={},Ul.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(rg);JE.exports=rg});var rA=I((CV,tA)=>{"use strict";g();var Gl=QE(),eN=SyntaxError,eA=typeof StopIteration=="object"?StopIteration:null;tA.exports=function(t){if(!eA)throw new eN("this environment lacks StopIteration");Gl.set(t,"[[Done]]",!1);var r={next:function(){var i=Gl.get(this,"[[Iterator]]"),a=Gl.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Gl.set(i,"[[Done]]",!0),s!==eA)throw s;return{done:!0,value:void 0}}}};return Gl.set(r,"[[Iterator]]",t),r}});var ng=I((RV,nA)=>{g();var tN={}.toString;nA.exports=Array.isArray||function(e){return tN.call(e)=="[object Array]"}});var ig=I((OV,iA)=>{"use strict";g();var rN=String.prototype.valueOf,nN=function(t){try{return rN.call(t),!0}catch(r){return!1}},iN=Object.prototype.toString,aN="[object String]",sN=Ci()();iA.exports=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:sN?nN(t):iN.call(t)===aN}});var sg=I((FV,oA)=>{"use strict";g();var ag=typeof Map=="function"&&Map.prototype?Map:null,oN=typeof Set=="function"&&Set.prototype?Set:null,vf;ag||(vf=function(t){return!1});var sA=ag?Map.prototype.has:null,aA=oN?Set.prototype.has:null;!vf&&!sA&&(vf=function(t){return!1});oA.exports=vf||function(t){if(!t||typeof t!="object")return!1;try{if(sA.call(t),aA)try{aA.call(t)}catch(r){return!0}return t instanceof ag}catch(r){}return!1}});var lg=I((LV,uA)=>{"use strict";g();var lN=typeof Map=="function"&&Map.prototype?Map:null,og=typeof Set=="function"&&Set.prototype?Set:null,yf;og||(yf=function(t){return!1});var lA=lN?Map.prototype.has:null,cA=og?Set.prototype.has:null;!yf&&!cA&&(yf=function(t){return!1});uA.exports=yf||function(t){if(!t||typeof t!="object")return!1;try{if(cA.call(t),lA)try{lA.call(t)}catch(r){return!0}return t instanceof og}catch(r){}return!1}});var xA=I((NV,_f)=>{"use strict";g();var fA=Hm(),dA=rA();Ju()()||$l()()?(wf=Symbol.iterator,_f.exports=function(t){if(t!=null&&typeof t[wf]!="undefined")return t[wf]();if(fA(t))return Array.prototype[wf].call(t)}):(hA=ng(),pA=ig(),cg=Qr(),mA=cg("%Map%",!0),gA=cg("%Set%",!0),$r=wr(),ug=$r("Array.prototype.push"),fg=$r("String.prototype.charCodeAt"),vA=$r("String.prototype.slice"),yA=function(t,r){var n=t.length;if(r+1>=n)return r+1;var i=fg(t,r);if(i<55296||i>56319)return r+1;var a=fg(t,r+1);return a<56320||a>57343?r+1:r+2},bf=function(t){var r=0;return{next:function(){var i=r>=t.length,a;return i||(a=t[r],r+=1),{done:i,value:a}}}},dg=function(t,r){if(hA(t)||fA(t))return bf(t);if(pA(t)){var n=0;return{next:function(){var a=yA(t,n),s=vA(t,n,a);return n=a,{done:a>t.length,value:s}}}}if(r&&typeof t["_es6-shim iterator_"]!="undefined")return t["_es6-shim iterator_"]()},!mA&&!gA?_f.exports=function(t){if(t!=null)return dg(t,!0)}:(wA=sg(),bA=lg(),hg=$r("Map.prototype.forEach",!0),pg=$r("Set.prototype.forEach",!0),(typeof process=="undefined"||!process.versions||!process.versions.node)&&(mg=$r("Map.prototype.iterator",!0),gg=$r("Set.prototype.iterator",!0)),vg=$r("Map.prototype.@@iterator",!0)||$r("Map.prototype._es6-shim iterator_",!0),yg=$r("Set.prototype.@@iterator",!0)||$r("Set.prototype._es6-shim iterator_",!0),_A=function(t){if(wA(t)){if(mg)return dA(mg(t));if(vg)return vg(t);if(hg){var r=[];return hg(t,function(i,a){ug(r,[a,i])}),bf(r)}}if(bA(t)){if(gg)return dA(gg(t));if(yg)return yg(t);if(pg){var n=[];return pg(t,function(i){ug(n,i)}),bf(n)}}},_f.exports=function(t){return _A(t)||dg(t)}));var wf,hA,pA,cg,mA,gA,$r,ug,fg,vA,yA,bf,dg,wA,bA,hg,pg,mg,gg,vg,yg,_A});var wg=I((BV,EA)=>{"use strict";g();var SA=function(e){return e!==e};EA.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||SA(t)&&SA(r))}});var bg=I((UV,AA)=>{"use strict";g();var cN=wg();AA.exports=function(){return typeof Object.is=="function"?Object.is:cN}});var TA=I((zV,kA)=>{"use strict";g();var uN=bg(),fN=Ti();kA.exports=function(){var t=uN();return fN(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var MA=I((WV,RA)=>{"use strict";g();var dN=Ti(),hN=wa(),pN=wg(),CA=bg(),mN=TA(),PA=hN(CA(),Object);dN(PA,{getPolyfill:CA,implementation:pN,shim:mN});RA.exports=PA});var xg=I((YV,$A)=>{"use strict";g();var gN=wa(),FA=wr(),vN=Qr(),_g=vN("%ArrayBuffer%",!0),xf=FA("ArrayBuffer.prototype.byteLength",!0),yN=FA("Object.prototype.toString"),OA=!!_g&&!xf&&new _g(0).slice,IA=!!OA&&gN(OA);$A.exports=xf||IA?function(t){if(!t||typeof t!="object")return!1;try{return xf?xf(t):IA(t,0),!0}catch(r){return!1}}:_g?function(t){return yN(t)==="[object ArrayBuffer]"}:function(t){return!1}});var DA=I((ZV,LA)=>{"use strict";g();var wN=Date.prototype.getDay,bN=function(t){try{return wN.call(t),!0}catch(r){return!1}},_N=Object.prototype.toString,xN="[object Date]",SN=Ci()();LA.exports=function(t){return typeof t!="object"||t===null?!1:SN?bN(t):_N.call(t)===xN}});var UA=I((JV,HA)=>{"use strict";g();var Sg=wr(),NA=Ci()(),jA,BA,Eg,Ag;NA&&(jA=Sg("Object.prototype.hasOwnProperty"),BA=Sg("RegExp.prototype.exec"),Eg={},Sf=function(){throw Eg},Ag={toString:Sf,valueOf:Sf},typeof Symbol.toPrimitive=="symbol"&&(Ag[Symbol.toPrimitive]=Sf));var Sf,EN=Sg("Object.prototype.toString"),AN=Object.getOwnPropertyDescriptor,kN="[object RegExp]";HA.exports=NA?function(t){if(!t||typeof t!="object")return!1;var r=AN(t,"lastIndex"),n=r&&jA(r,"value");if(!n)return!1;try{BA(t,Ag)}catch(i){return i===Eg}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:EN(t)===kN}});var VA=I((eW,zA)=>{"use strict";g();var TN=wr(),GA=TN("SharedArrayBuffer.prototype.byteLength",!0);zA.exports=GA?function(t){if(!t||typeof t!="object")return!1;try{return GA(t),!0}catch(r){return!1}}:function(t){return!1}});var qA=I((rW,WA)=>{"use strict";g();var CN=Number.prototype.toString,PN=function(t){try{return CN.call(t),!0}catch(r){return!1}},RN=Object.prototype.toString,MN="[object Number]",ON=Ci()();WA.exports=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:ON?PN(t):RN.call(t)===MN}});var ZA=I((iW,XA)=>{"use strict";g();var YA=wr(),IN=YA("Boolean.prototype.toString"),FN=YA("Object.prototype.toString"),$N=function(t){try{return IN(t),!0}catch(r){return!1}},LN="[object Boolean]",DN=Ci()();XA.exports=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:DN&&Symbol.toStringTag in t?$N(t):FN(t)===LN}});var ek=I((sW,kg)=>{"use strict";g();var NN=Object.prototype.toString,jN=Ju()();jN?(KA=Symbol.prototype.toString,JA=/^Symbol\(.*\)$/,QA=function(t){return typeof t.valueOf()!="symbol"?!1:JA.test(KA.call(t))},kg.exports=function(t){if(typeof t=="symbol")return!0;if(NN.call(t)!=="[object Symbol]")return!1;try{return QA(t)}catch(r){return!1}}):kg.exports=function(t){return!1};var KA,JA,QA});var nk=I((lW,rk)=>{"use strict";g();var tk=typeof BigInt!="undefined"&&BigInt;rk.exports=function(){return typeof tk=="function"&&typeof BigInt=="function"&&typeof tk(42)=="bigint"&&typeof BigInt(42)=="bigint"}});var sk=I((uW,Tg)=>{"use strict";g();var BN=nk()();BN?(ik=BigInt.prototype.valueOf,ak=function(t){try{return ik.call(t),!0}catch(r){}return!1},Tg.exports=function(t){return t===null||typeof t=="undefined"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:ak(t)}):Tg.exports=function(t){return!1};var ik,ak});var lk=I((dW,ok)=>{"use strict";g();var HN=ig(),UN=qA(),GN=ZA(),zN=ek(),VN=sk();ok.exports=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(HN(t))return"String";if(UN(t))return"Number";if(GN(t))return"Boolean";if(zN(t))return"Symbol";if(VN(t))return"BigInt"}});var fk=I((pW,uk)=>{"use strict";g();var Ef=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,ck=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Af;Ef||(Af=function(t){return!1});var Pg=Ef?Ef.prototype.has:null,Cg=ck?ck.prototype.has:null;!Af&&!Pg&&(Af=function(t){return!1});uk.exports=Af||function(t){if(!t||typeof t!="object")return!1;try{if(Pg.call(t,Pg),Cg)try{Cg.call(t,Cg)}catch(r){return!0}return t instanceof Ef}catch(r){}return!1}});var hk=I((gW,Mg)=>{"use strict";g();var WN=Qr(),dk=wr(),qN=WN("%WeakSet%",!0),Rg=dk("WeakSet.prototype.has",!0);Rg?(kf=dk("WeakMap.prototype.has",!0),Mg.exports=function(t){if(!t||typeof t!="object")return!1;try{if(Rg(t,Rg),kf)try{kf(t,kf)}catch(r){return!0}return t instanceof qN}catch(r){}return!1}):Mg.exports=function(t){return!1};var kf});var mk=I((yW,pk)=>{"use strict";g();var YN=sg(),XN=lg(),ZN=fk(),KN=hk();pk.exports=function(t){if(t&&typeof t=="object"){if(YN(t))return"Map";if(XN(t))return"Set";if(ZN(t))return"WeakMap";if(KN(t))return"WeakSet"}return!1}});var wk=I((bW,yk)=>{"use strict";g();var vk=Function.prototype.toString,Us=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ig,Tf;if(typeof Us=="function"&&typeof Object.defineProperty=="function")try{Ig=Object.defineProperty({},"length",{get:function(){throw Tf}}),Tf={},Us(function(){throw 42},null,Ig)}catch(e){e!==Tf&&(Us=null)}else Us=null;var JN=/^\s*class\b/,Fg=function(t){try{var r=vk.call(t);return JN.test(r)}catch(n){return!1}},Og=function(t){try{return Fg(t)?!1:(vk.call(t),!0)}catch(r){return!1}},Cf=Object.prototype.toString,QN="[object Object]",ej="[object Function]",tj="[object GeneratorFunction]",rj="[object HTMLAllCollection]",nj="[object HTML document.all class]",ij="[object HTMLCollection]",aj=typeof Symbol=="function"&&!!Symbol.toStringTag,sj=!(0 in[,]),$g=function(){return!1};typeof document=="object"&&(gk=document.all,Cf.call(gk)===Cf.call(document.all)&&($g=function(t){if((sj||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=Cf.call(t);return(r===rj||r===nj||r===ij||r===QN)&&t("")==null}catch(n){}return!1}));var gk;yk.exports=Us?function(t){if($g(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Us(t,null,Ig)}catch(r){if(r!==Tf)return!1}return!Fg(t)&&Og(t)}:function(t){if($g(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(aj)return Og(t);if(Fg(t))return!1;var r=Cf.call(t);return r!==ej&&r!==tj&&!/^\[object HTML/.test(r)?!1:Og(t)}});var xk=I((xW,_k)=>{"use strict";g();var oj=wk(),lj=Object.prototype.toString,bk=Object.prototype.hasOwnProperty,cj=function(t,r,n){for(var i=0,a=t.length;i<a;i++)bk.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},uj=function(t,r,n){for(var i=0,a=t.length;i<a;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},fj=function(t,r,n){for(var i in t)bk.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},dj=function(t,r,n){if(!oj(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),lj.call(t)==="[object Array]"?cj(t,r,i):typeof t=="string"?uj(t,r,i):fj(t,r,i)};_k.exports=dj});var Ek=I((EW,Sk)=>{"use strict";g();Sk.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var kk=I((kW,Ak)=>{"use strict";g();var Lg=Ek(),hj=typeof globalThis=="undefined"?global:globalThis;Ak.exports=function(){for(var t=[],r=0;r<Lg.length;r++)typeof hj[Lg[r]]=="function"&&(t[t.length]=Lg[r]);return t}});var Mk=I((CW,Rk)=>{"use strict";g();var Rf=xk(),pj=kk(),Tk=wa(),jg=wr(),Pf=sf(),mj=jg("Object.prototype.toString"),Pk=Ci()(),Ck=typeof globalThis=="undefined"?global:globalThis,Ng=pj(),Bg=jg("String.prototype.slice"),Dg=Object.getPrototypeOf,gj=jg("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},Mf={__proto__:null};Pk&&Pf&&Dg?Rf(Ng,function(e){var t=new Ck[e];if(Symbol.toStringTag in t){var r=Dg(t),n=Pf(r,Symbol.toStringTag);if(!n){var i=Dg(r);n=Pf(i,Symbol.toStringTag)}Mf["$"+e]=Tk(n.get)}}):Rf(Ng,function(e){var t=new Ck[e],r=t.slice||t.set;r&&(Mf["$"+e]=Tk(r))});var vj=function(t){var r=!1;return Rf(Mf,function(n,i){if(!r)try{"$"+n(t)===i&&(r=Bg(i,1))}catch(a){}}),r},yj=function(t){var r=!1;return Rf(Mf,function(n,i){if(!r)try{n(t),r=Bg(i,1)}catch(a){}}),r};Rk.exports=function(t){if(!t||typeof t!="object")return!1;if(!Pk){var r=Bg(mj(t),8,-1);return gj(Ng,r)>-1?r:r!=="Object"?!1:yj(t)}return Pf?vj(t):null}});var Fk=I((RW,Ik)=>{"use strict";g();var wj=wr(),Ok=wj("ArrayBuffer.prototype.byteLength",!0),bj=xg();Ik.exports=function(t){return bj(t)?Ok?Ok(t):t.byteLength:NaN}});var aT=I((OW,iT)=>{"use strict";g();var tT=fE(),An=wr(),$k=AE(),_j=Qr(),Gs=xA(),xj=tg(),Lk=MA(),Dk=Hm(),Nk=ng(),jk=xg(),Bk=DA(),Hk=UA(),Uk=VA(),Gk=Ku(),zk=lk(),Vk=mk(),Wk=Mk(),qk=Fk(),Yk=An("SharedArrayBuffer.prototype.byteLength",!0),Xk=An("Date.prototype.getTime"),Hg=Object.getPrototypeOf,Zk=An("Object.prototype.toString"),If=_j("%Set%",!0),Ug=An("Map.prototype.has",!0),Ff=An("Map.prototype.get",!0),Kk=An("Map.prototype.size",!0),$f=An("Set.prototype.add",!0),rT=An("Set.prototype.delete",!0),Lf=An("Set.prototype.has",!0),Of=An("Set.prototype.size",!0);function Jk(e,t,r,n){for(var i=Gs(e),a;(a=i.next())&&!a.done;)if(en(t,a.value,r,n))return rT(e,a.value),!0;return!1}function nT(e){if(typeof e=="undefined")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function Sj(e,t,r,n,i,a){var s=nT(r);if(s!=null)return s;var o=Ff(t,s),c=tT({},i,{strict:!1});return typeof o=="undefined"&&!Ug(t,s)||!en(n,o,c,a)?!1:!Ug(e,s)&&en(n,o,c,a)}function Ej(e,t,r){var n=nT(r);return n!=null?n:Lf(t,n)&&!Lf(e,n)}function Qk(e,t,r,n,i,a){for(var s=Gs(e),o,c;(o=s.next())&&!o.done;)if(c=o.value,en(r,c,i,a)&&en(n,Ff(t,c),i,a))return rT(e,c),!0;return!1}function en(e,t,r,n){var i=r||{};if(i.strict?Lk(e,t):e===t)return!0;var a=zk(e),s=zk(t);if(a!==s)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?Lk(e,t):e==t;var o=n.has(e),c=n.has(t),l;if(o&&c){if(n.get(e)===n.get(t))return!0}else l={};return o||n.set(e,l),c||n.set(t,l),Tj(e,t,i,n)}function eT(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function Aj(e,t,r,n){if(Of(e)!==Of(t))return!1;for(var i=Gs(e),a=Gs(t),s,o,c;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")c||(c=new If),$f(c,s.value);else if(!Lf(t,s.value)){if(r.strict||!Ej(e,t,s.value))return!1;c||(c=new If),$f(c,s.value)}if(c){for(;(o=a.next())&&!o.done;)if(o.value&&typeof o.value=="object"){if(!Jk(c,o.value,r.strict,n))return!1}else if(!r.strict&&!Lf(e,o.value)&&!Jk(c,o.value,r.strict,n))return!1;return Of(c)===0}return!0}function kj(e,t,r,n){if(Kk(e)!==Kk(t))return!1;for(var i=Gs(e),a=Gs(t),s,o,c,l,u,f;(s=i.next())&&!s.done;)if(l=s.value[0],u=s.value[1],l&&typeof l=="object")c||(c=new If),$f(c,l);else if(f=Ff(t,l),typeof f=="undefined"&&!Ug(t,l)||!en(u,f,r,n)){if(r.strict||!Sj(e,t,l,u,r,n))return!1;c||(c=new If),$f(c,l)}if(c){for(;(o=a.next())&&!o.done;)if(l=o.value[0],f=o.value[1],l&&typeof l=="object"){if(!Qk(c,e,l,f,r,n))return!1}else if(!r.strict&&(!e.has(l)||!en(Ff(e,l),f,r,n))&&!Qk(c,e,l,f,tT({},r,{strict:!1}),n))return!1;return Of(c)===0}return!0}function Tj(e,t,r,n){var i,a;if(typeof e!=typeof t||e==null||t==null||Zk(e)!==Zk(t)||Dk(e)!==Dk(t))return!1;var s=Nk(e),o=Nk(t);if(s!==o)return!1;var c=e instanceof Error,l=t instanceof Error;if(c!==l||(c||l)&&(e.name!==t.name||e.message!==t.message))return!1;var u=Hk(e),f=Hk(t);if(u!==f||(u||f)&&(e.source!==t.source||$k(e)!==$k(t)))return!1;var d=Bk(e),h=Bk(t);if(d!==h||(d||h)&&Xk(e)!==Xk(t)||r.strict&&Hg&&Hg(e)!==Hg(t))return!1;var p=Wk(e),m=Wk(t);if(p!==m)return!1;if(p||m){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var v=eT(e),y=eT(t);if(v!==y)return!1;if(v||y){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var b=jk(e),x=jk(t);if(b!==x)return!1;if(b||x)return qk(e)!==qk(t)?!1:typeof Uint8Array=="function"&&en(new Uint8Array(e),new Uint8Array(t),r,n);var E=Uk(e),_=Uk(t);if(E!==_)return!1;if(E||_)return Yk(e)!==Yk(t)?!1:typeof Uint8Array=="function"&&en(new Uint8Array(e),new Uint8Array(t),r,n);if(typeof e!=typeof t)return!1;var k=Gk(e),w=Gk(t);if(k.length!==w.length)return!1;for(k.sort(),w.sort(),i=k.length-1;i>=0;i--)if(k[i]!=w[i])return!1;for(i=k.length-1;i>=0;i--)if(a=k[i],!en(e[a],t[a],r,n))return!1;var A=Vk(e),S=Vk(t);return A!==S?!1:A==="Set"||S==="Set"?Aj(e,t,r,n):A==="Map"?kj(e,t,r,n):!0}iT.exports=function(t,r,n){return en(t,r,n,xj())}});var Xg=I((exports,module)=>{g();(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(i){return t.create().update(i)};for(var r=0;r<OUTPUT_TYPES.length;++r){var n=OUTPUT_TYPES[r];t[n]=createOutputMethod(n,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if(typeof e=="string")return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(e==null)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(r,n){return new HmacSha256(r,t,!0).update(n)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(i){return new HmacSha256(i,e)},t.update=function(i,a){return t.create(i).update(a)};for(var r=0;r<OUTPUT_TYPES.length;++r){var n=OUTPUT_TYPES[r];t[n]=createHmacOutputMethod(n,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}Sha256.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if(r!=="string"){if(r==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);t=!0}for(var n,i=0,a,s=e.length,o=this.blocks;i<s;){if(this.hashed&&(this.hashed=!1,o[0]=this.block,o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),t)for(a=this.start;i<s&&a<64;++i)o[a>>2]|=e[i]<<SHIFT[a++&3];else for(a=this.start;i<s&&a<64;++i)n=e.charCodeAt(i),n<128?o[a>>2]|=n<<SHIFT[a++&3]:n<2048?(o[a>>2]|=(192|n>>6)<<SHIFT[a++&3],o[a>>2]|=(128|n&63)<<SHIFT[a++&3]):n<55296||n>=57344?(o[a>>2]|=(224|n>>12)<<SHIFT[a++&3],o[a>>2]|=(128|n>>6&63)<<SHIFT[a++&3],o[a>>2]|=(128|n&63)<<SHIFT[a++&3]):(n=65536+((n&1023)<<10|e.charCodeAt(++i)&1023),o[a>>2]|=(240|n>>18)<<SHIFT[a++&3],o[a>>2]|=(128|n>>12&63)<<SHIFT[a++&3],o[a>>2]|=(128|n>>6&63)<<SHIFT[a++&3],o[a>>2]|=(128|n&63)<<SHIFT[a++&3]);this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=o[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,c=this.blocks,l,u,f,d,h,p,m,v,y,b,x;for(l=16;l<64;++l)h=c[l-15],u=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,h=c[l-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,c[l]=c[l-16]+u+c[l-7]+f<<0;for(x=t&r,l=0;l<64;l+=4)this.first?(this.is224?(v=300032,h=c[0]-1413257819,o=h-150054599<<0,n=h+24177077<<0):(v=704751109,h=c[0]-210244248,o=h-1521486534<<0,n=h+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),v=e&t,d=v^e&r^x,m=i&a^~i&s,h=o+f+m+K[l]+c[l],p=u+d,o=n+h<<0,n=h+p<<0),u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&e,d=y^n&t^v,m=o&i^~o&a,h=s+f+m+K[l+1]+c[l+1],p=u+d,s=r+h<<0,r=h+p<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&n,d=b^r&e^y,m=s&o^~s&i,h=a+f+m+K[l+2]+c[l+2],p=u+d,a=t+h<<0,t=h+p<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&r,d=x^t&n^b,m=a&s^~a&o,h=i+f+m+K[l+3]+c[l+3],p=u+d,i=e+h<<0,e=h+p<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+s<<0,this.h7=this.h7+o<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,c=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15];return this.is224||(c+=HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,n>>24&255,n>>16&255,n>>8&255,n&255,i>>24&255,i>>16&255,i>>8&255,i&255,a>>24&255,a>>16&255,a>>8&255,a&255,s>>24&255,s>>16&255,s>>8&255,s&255];return this.is224||c.push(o>>24&255,o>>16&255,o>>8&255,o&255),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,r){var n,i=typeof e;if(i==="string"){var a=[],s=e.length,o=0,c;for(n=0;n<s;++n)c=e.charCodeAt(n),c<128?a[o++]=c:c<2048?(a[o++]=192|c>>6,a[o++]=128|c&63):c<55296||c>=57344?(a[o++]=224|c>>12,a[o++]=128|c>>6&63,a[o++]=128|c&63):(c=65536+((c&1023)<<10|e.charCodeAt(++n)&1023),a[o++]=240|c>>18,a[o++]=128|c>>12&63,a[o++]=128|c>>6&63,a[o++]=128|c&63);e=a}else if(i==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var l=[],u=[];for(n=0;n<64;++n){var f=e[n]||0;l[n]=92^f,u[n]=54^f}Sha256.call(this,t,r),this.update(u),this.oKeyPad=l,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var AC=I(E0=>{g();(function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,a=/\\/g,s=/\u2028/,o=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(A,S){var T=A.length,P=0,O=1,j=2,D=P,Q=null,de=null,ee="",J=[],Ce=!1,me=0,F=0,z="{{",N="}}";function Re(){ee.length>0&&(J.push({tag:"_t",text:new String(ee)}),ee="")}function Dt(){for(var st=!0,ot=F;ot<J.length;ot++)if(st=e.tags[J[ot].tag]<e.tags._v||J[ot].tag=="_t"&&J[ot].text.match(t)===null,!st)return!1;return st}function _t(st,ot){if(Re(),st&&Dt())for(var Ct=F,$e;Ct<J.length;Ct++)J[Ct].text&&(($e=J[Ct+1])&&$e.tag==">"&&($e.indent=J[Ct].text.toString()),J.splice(Ct,1));else ot||J.push({tag:`
`});Ce=!1,F=J.length}function Ee(st,ot){var Ct="="+N,$e=st.indexOf(Ct,ot),G=l(st.substring(st.indexOf("=",ot)+1,$e)).split(" ");return z=G[0],N=G[G.length-1],$e+Ct.length-1}for(S&&(S=S.split(" "),z=S[0],N=S[1]),me=0;me<T;me++)D==P?u(z,A,me)?(--me,Re(),D=O):A.charAt(me)==`
`?_t(Ce):ee+=A.charAt(me):D==O?(me+=z.length-1,de=e.tags[A.charAt(me+1)],Q=de?A.charAt(me+1):"_v",Q=="="?(me=Ee(A,me),D=P):(de&&me++,D=j),Ce=me):u(N,A,me)?(J.push({tag:Q,n:l(ee),otag:z,ctag:N,i:Q=="/"?Ce-z.length:me+N.length}),ee="",me+=N.length-1,D=P,Q=="{"&&(N=="}}"?me++:c(J[J.length-1]))):ee+=A.charAt(me);return _t(Ce,!0),J};function c(w){w.n.substr(w.n.length-1)==="}"&&(w.n=w.n.substring(0,w.n.length-1))}function l(w){return w.trim?w.trim():w.replace(/^\s*|\s*$/g,"")}function u(w,A,S){if(A.charAt(S)!=w.charAt(0))return!1;for(var T=1,P=w.length;T<P;T++)if(A.charAt(S+T)!=w.charAt(T))return!1;return!0}var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(w,A,S,T){var P=[],O=null,j=null,D=null;for(j=S[S.length-1];w.length>0;){if(D=w.shift(),j&&j.tag=="<"&&!(D.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[D.tag]<=e.tags.$||h(D,T))S.push(D),D.nodes=d(w,D.tag,S,T);else if(D.tag=="/"){if(S.length===0)throw new Error("Closing tag without opener: /"+D.n);if(O=S.pop(),D.n!=O.n&&!p(D.n,O.n,T))throw new Error("Nesting error: "+O.n+" vs. "+D.n);return O.end=D.i,P}else D.tag==`
`&&(D.last=w.length==0||w[0].tag==`
`);P.push(D)}if(S.length>0)throw new Error("missing closing tag: "+S.pop().n);return P}function h(w,A){for(var S=0,T=A.length;S<T;S++)if(A[S].o==w.n)return w.tag="#",!0}function p(w,A,S){for(var T=0,P=S.length;T<P;T++)if(S[T].c==w&&S[T].o==A)return!0}function m(w){var A=[];for(var S in w)A.push('"'+b(S)+'": function(c,p,t,i) {'+w[S]+"}");return"{ "+A.join(",")+" }"}function v(w){var A=[];for(var S in w.partials)A.push('"'+b(S)+'":{name:"'+b(w.partials[S].name)+'", '+v(w.partials[S])+"}");return"partials: {"+A.join(",")+"}, subs: "+m(w.subs)}e.stringify=function(w,A,S){return"{code: function (c,p,i) { "+e.wrapMain(w.code)+" },"+v(w)+"}"};var y=0;e.generate=function(w,A,S){y=0;var T={code:"",subs:{},partials:{}};return e.walk(w,T),S.asString?this.stringify(T,A,S):this.makeTemplate(T,A,S)},e.wrapMain=function(w){return'var t=this;t.b(i=i||"");'+w+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(w,A,S){var T=this.makePartials(w);return T.code=new Function("c","p","i",this.wrapMain(w.code)),new this.template(T,A,this,S)},e.makePartials=function(w){var A,S={subs:{},partials:w.partials,name:w.name};for(A in S.partials)S.partials[A]=this.makePartials(S.partials[A]);for(A in w.subs)S.subs[A]=new Function("c","p","t","i",w.subs[A]);return S};function b(w){return w.replace(a,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(i,"\\r").replace(s,"\\u2028").replace(o,"\\u2029")}function x(w){return~w.indexOf(".")?"d":"f"}function E(w,A){var S="<"+(A.prefix||""),T=S+w.n+y++;return A.partials[T]={name:w.n,partials:{}},A.code+='t.b(t.rp("'+b(T)+'",c,p,"'+(w.indent||"")+'"));',T}e.codegen={"#":function(w,A){A.code+="if(t.s(t."+x(w.n)+'("'+b(w.n)+'",c,p,1),c,p,0,'+w.i+","+w.end+',"'+w.otag+" "+w.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(w.nodes,A),A.code+="});c.pop();}"},"^":function(w,A){A.code+="if(!t.s(t."+x(w.n)+'("'+b(w.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(w.nodes,A),A.code+="};"},">":E,"<":function(w,A){var S={partials:{},code:"",subs:{},inPartial:!0};e.walk(w.nodes,S);var T=A.partials[E(w,A)];T.subs=S.subs,T.partials=S.partials},$:function(w,A){var S={subs:{},code:"",partials:A.partials,prefix:w.n};e.walk(w.nodes,S),A.subs[w.n]=S.code,A.inPartial||(A.code+='t.sub("'+b(w.n)+'",c,p,i);')},"\n":function(w,A){A.code+=k('"\\n"'+(w.last?"":" + i"))},_v:function(w,A){A.code+="t.b(t.v(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'},_t:function(w,A){A.code+=k('"'+b(w.text)+'"')},"{":_,"&":_};function _(w,A){A.code+="t.b(t.t(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'}function k(w){return"t.b("+w+");"}e.walk=function(w,A){for(var S,T=0,P=w.length;T<P;T++)S=e.codegen[w[T].tag],S&&S(w[T],A);return A},e.parse=function(w,A,S){return S=S||{},d(w,"",[],S.sectionTags||[])},e.cache={},e.cacheKey=function(w,A){return[w,!!A.asString,!!A.disableLambda,A.delimiters,!!A.modelGet].join("||")},e.compile=function(w,A){A=A||{};var S=e.cacheKey(w,A),T=this.cache[S];if(T){var P=T.partials;for(var O in P)delete P[O].instance;return T}return T=this.generate(this.parse(this.scan(w,A.delimiters),w,A),w,A),this.cache[S]=T}})(typeof E0!="undefined"?E0:Hogan)});var kC=I(A0=>{g();var BB={};(function(e){e.Template=function(d,h,p,m){d=d||{},this.r=d.code||this.r,this.c=p,this.options=m||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},e.Template.prototype={r:function(d,h,p){return""},v:u,t:l,render:function(h,p,m){return this.ri([h],p||{},m)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],m=h[p.name];if(p.instance&&p.base==m)return p.instance;if(typeof m=="string"){if(!this.c)throw new Error("No compiler available.");m=this.c.compile(m,this.options)}if(!m)return null;if(this.partials[d].base=m,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);m=r(m,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=m,m},rp:function(d,h,p,m){var v=this.ep(d,p);return v?v.ri(h,p,m):""},rs:function(d,h,p){var m=d[d.length-1];if(!f(m)){p(d,h,this);return}for(var v=0;v<m.length;v++)d.push(m[v]),p(d,h,this),d.pop()},s:function(d,h,p,m,v,y,b){var x;return f(d)&&d.length===0?!1:(typeof d=="function"&&(d=this.ms(d,h,p,m,v,y,b)),x=!!d,!m&&x&&h&&h.push(typeof d=="object"?d:h[h.length-1]),x)},d:function(d,h,p,m){var v,y=d.split("."),b=this.f(y[0],h,p,m),x=this.options.modelGet,E=null;if(d==="."&&f(h[h.length-2]))b=h[h.length-1];else for(var _=1;_<y.length;_++)v=t(y[_],b,x),v!==void 0?(E=b,b=v):b="";return m&&!b?!1:(!m&&typeof b=="function"&&(h.push(E),b=this.mv(b,h,p),h.pop()),b)},f:function(d,h,p,m){for(var v=!1,y=null,b=!1,x=this.options.modelGet,E=h.length-1;E>=0;E--)if(y=h[E],v=t(d,y,x),v!==void 0){b=!0;break}return b?(!m&&typeof v=="function"&&(v=this.mv(v,h,p)),v):m?!1:""},ls:function(d,h,p,m,v){var y=this.options.delimiters;return this.options.delimiters=v,this.b(this.ct(l(d.call(h,m)),h,p)),this.options.delimiters=y,!1},ct:function(d,h,p){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(d,this.options).render(h,p)},b:function(d){this.buf+=d},fl:function(){var d=this.buf;return this.buf="",d},ms:function(d,h,p,m,v,y,b){var x,E=h[h.length-1],_=d.call(E);return typeof _=="function"?m?!0:(x=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(_,E,p,x.substring(v,y),b)):_},mv:function(d,h,p){var m=h[h.length-1],v=d.call(m);return typeof v=="function"?this.ct(l(v.call(m)),m,p):v},sub:function(d,h,p,m){var v=this.subs[d];v&&(this.activeSub=d,v(h,p,this,m),this.activeSub=!1)}};function t(d,h,p){var m;return h&&typeof h=="object"&&(h[d]!==void 0?m=h[d]:p&&h.get&&typeof h.get=="function"&&(m=h.get(d))),m}function r(d,h,p,m,v,y){function b(){}b.prototype=d;function x(){}x.prototype=d.subs;var E,_=new b;_.subs=new x,_.subsText={},_.buf="",m=m||{},_.stackSubs=m,_.subsText=y;for(E in h)m[E]||(m[E]=h[E]);for(E in m)_.subs[E]=m[E];v=v||{},_.stackPartials=v;for(E in p)v[E]||(v[E]=p[E]);for(E in v)_.partials[E]=v[E];return _}var n=/&/g,i=/</g,a=/>/g,s=/\'/g,o=/\"/g,c=/[&<>\"\']/;function l(d){return String(d==null?"":d)}function u(d){return d=l(d),c.test(d)?d.replace(n,"&amp;").replace(i,"&lt;").replace(a,"&gt;").replace(s,"&#39;").replace(o,"&quot;"):d}var f=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}})(typeof A0!="undefined"?A0:BB)});var k0=I((FX,TC)=>{g();var gd=AC();gd.Template=kC().Template;gd.template=gd.Template;TC.exports=gd});var Y3=I((wc,Sv)=>{g();(function(t,r){typeof wc=="object"&&typeof Sv=="object"?Sv.exports=r():typeof define=="function"&&define.amd?define([],r):typeof wc=="object"?wc.feather=r():t.feather=r()})(typeof self!="undefined"?self:wc,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=0)}({"./dist/icons.json":function(e){e.exports={activity:'<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>',airplay:'<path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon>',"alert-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-octagon":'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-triangle":'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line>',"align-center":'<line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line>',"align-justify":'<line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line>',"align-left":'<line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line>',"align-right":'<line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line>',anchor:'<circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path>',aperture:'<circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line>',archive:'<polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line>',"arrow-down-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="8 12 12 16 16 12"></polyline><line x1="12" y1="8" x2="12" y2="16"></line>',"arrow-down-left":'<line x1="17" y1="7" x2="7" y2="17"></line><polyline points="17 17 7 17 7 7"></polyline>',"arrow-down-right":'<line x1="7" y1="7" x2="17" y2="17"></line><polyline points="17 7 17 17 7 17"></polyline>',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>',"arrow-left-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="12 8 8 12 12 16"></polyline><line x1="16" y1="12" x2="8" y2="12"></line>',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline>',"arrow-right-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line>',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline>',"arrow-up-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="16 12 12 8 8 12"></polyline><line x1="12" y1="16" x2="12" y2="8"></line>',"arrow-up-left":'<line x1="17" y1="17" x2="7" y2="7"></line><polyline points="7 17 7 7 17 7"></polyline>',"arrow-up-right":'<line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline>',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline>',"at-sign":'<circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path>',award:'<circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline>',"bar-chart-2":'<line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line>',"bar-chart":'<line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line>',"battery-charging":'<path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline>',battery:'<rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line>',"bell-off":'<path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line>',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>',bluetooth:'<polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline>',bold:'<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>',"book-open":'<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path>',book:'<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>',bookmark:'<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>',box:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',briefcase:'<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>',"camera-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path>',camera:'<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle>',cast:'<path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line>',"check-circle":'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',"check-square":'<polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>',check:'<polyline points="20 6 9 17 4 12"></polyline>',"chevron-down":'<polyline points="6 9 12 15 18 9"></polyline>',"chevron-left":'<polyline points="15 18 9 12 15 6"></polyline>',"chevron-right":'<polyline points="9 18 15 12 9 6"></polyline>',"chevron-up":'<polyline points="18 15 12 9 6 15"></polyline>',"chevrons-down":'<polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline>',"chevrons-left":'<polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline>',"chevrons-right":'<polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline>',"chevrons-up":'<polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline>',chrome:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line>',circle:'<circle cx="12" cy="12" r="10"></circle>',clipboard:'<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',clock:'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>',"cloud-drizzle":'<line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>',"cloud-lightning":'<path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline>',"cloud-off":'<path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line>',"cloud-rain":'<line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>',"cloud-snow":'<path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line>',cloud:'<path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path>',code:'<polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline>',codepen:'<polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line>',codesandbox:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',coffee:'<path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line>',columns:'<path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path>',command:'<path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path>',compass:'<circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon>',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',"corner-down-left":'<polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path>',"corner-down-right":'<polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path>',"corner-left-down":'<polyline points="14 15 9 20 4 15"></polyline><path d="M20 4h-7a4 4 0 0 0-4 4v12"></path>',"corner-left-up":'<polyline points="14 9 9 4 4 9"></polyline><path d="M20 20h-7a4 4 0 0 1-4-4V4"></path>',"corner-right-down":'<polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path>',"corner-right-up":'<polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path>',"corner-up-left":'<polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>',"corner-up-right":'<polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path>',cpu:'<rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line>',"credit-card":'<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line>',crop:'<path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path>',crosshair:'<circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line>',database:'<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path>',delete:'<path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line>',disc:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle>',"divide-circle":'<line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle>',"divide-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line>',divide:'<circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle>',"dollar-sign":'<line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>',"download-cloud":'<polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line>',dribbble:'<circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path>',droplet:'<path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path>',"edit-2":'<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>',"edit-3":'<path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>',"eye-off":'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>',facebook:'<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>',"fast-forward":'<polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon>',feather:'<path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line>',figma:'<path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path>',"file-minus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line>',"file-plus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line>',"file-text":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>',file:'<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>',film:'<rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>',flag:'<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line>',"folder-minus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line>',"folder-plus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>',framer:'<path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path>',frown:'<circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',gift:'<polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>',"git-branch":'<line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path>',"git-commit":'<circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line>',"git-merge":'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path>',"git-pull-request":'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line>',github:'<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>',gitlab:'<path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path>',globe:'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>',grid:'<rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect>',"hard-drive":'<line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line>',hash:'<line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line>',headphones:'<path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path>',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>',"help-circle":'<circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line>',hexagon:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline>',image:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline>',inbox:'<polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path>',info:'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>',instagram:'<rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line>',italic:'<line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line>',key:'<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path>',layers:'<polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline>',layout:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line>',"life-buoy":'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line>',"link-2":'<path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>',linkedin:'<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle>',list:'<line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>',loader:'<line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line>',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path>',"log-in":'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line>',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line>',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>',"map-pin":'<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle>',map:'<polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line>',"maximize-2":'<polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line>',maximize:'<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>',meh:'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',menu:'<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>',"message-circle":'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>',"message-square":'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>',"mic-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',mic:'<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',"minimize-2":'<polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line>',minimize:'<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>',"minus-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line>',"minus-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line>',minus:'<line x1="5" y1="12" x2="19" y2="12"></line>',monitor:'<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line>',moon:'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>',"more-horizontal":'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>',"more-vertical":'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>',"mouse-pointer":'<path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path>',move:'<polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line>',music:'<path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle>',"navigation-2":'<polygon points="12 2 19 21 12 17 5 21 12 2"></polygon>',navigation:'<polygon points="3 11 22 2 13 21 11 13 3 11"></polygon>',octagon:'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon>',package:'<line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',paperclip:'<path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path>',"pause-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line>',pause:'<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>',"pen-tool":'<path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.586 7.586"></path><circle cx="11" cy="11" r="2"></circle>',percent:'<line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle>',"phone-call":'<path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-forwarded":'<polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-incoming":'<polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-missed":'<line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-off":'<path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line>',"phone-outgoing":'<polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',phone:'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"pie-chart":'<path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path>',"play-circle":'<circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon>',play:'<polygon points="5 3 19 12 5 21 5 3"></polygon>',"plus-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>',"plus-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>',plus:'<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>',pocket:'<path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline>',power:'<path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line>',printer:'<polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect>',radio:'<circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path>',"refresh-ccw":'<polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path>',"refresh-cw":'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>',repeat:'<polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path>',rewind:'<polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon>',"rotate-ccw":'<polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>',"rotate-cw":'<polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path>',rss:'<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle>',save:'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>',scissors:'<circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line>',search:'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>',send:'<line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>',server:'<rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line>',settings:'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>',"share-2":'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',share:'<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line>',"shield-off":'<path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line>',shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>',"shopping-bag":'<path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path>',"shopping-cart":'<circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>',shuffle:'<polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line>',sidebar:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line>',"skip-back":'<polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></line>',"skip-forward":'<polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line>',slack:'<path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path>',slash:'<circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>',sliders:'<line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line>',smartphone:'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',smile:'<circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',speaker:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line>',square:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>',"stop-circle":'<circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect>',sun:'<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>',sunrise:'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline>',sunset:'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline>',table:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path>',tablet:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',tag:'<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line>',target:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle>',terminal:'<polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line>',thermometer:'<path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path>',"thumbs-down":'<path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path>',"thumbs-up":'<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>',"toggle-left":'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="8" cy="12" r="3"></circle>',"toggle-right":'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle>',tool:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>',"trash-2":'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line>',trash:'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>',trello:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect>',"trending-down":'<polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline>',"trending-up":'<polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline>',triangle:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>',truck:'<rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle>',tv:'<rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline>',twitch:'<path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path>',twitter:'<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>',type:'<polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line>',umbrella:'<path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path>',underline:'<path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line>',unlock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path>',"upload-cloud":'<polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline>',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line>',"user-check":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>',"user-minus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line>',"user-plus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line>',"user-x":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>',users:'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>',"video-off":'<path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line>',video:'<polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>',voicemail:'<circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line>',"volume-1":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-2":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-x":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line>',volume:'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>',watch:'<circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path>',"wifi-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>',wifi:'<path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>',wind:'<path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path>',"x-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"x-octagon":'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"x-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line>',x:'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',youtube:'<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>',"zap-off":'<polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line>',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon>',"zoom-in":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line>',"zoom-out":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line>'}},"./node_modules/classnames/dedupe.js":function(e,t,r){var n,i;(function(){"use strict";var a=function(){function s(){}s.prototype=Object.create(null);function o(m,v){for(var y=v.length,b=0;b<y;++b)h(m,v[b])}var c={}.hasOwnProperty;function l(m,v){m[v]=!0}function u(m,v){for(var y in v)c.call(v,y)&&(m[y]=!!v[y])}var f=/\s+/;function d(m,v){for(var y=v.split(f),b=y.length,x=0;x<b;++x)m[y[x]]=!0}function h(m,v){if(v){var y=typeof v;y==="string"?d(m,v):Array.isArray(v)?o(m,v):y==="object"?u(m,v):y==="number"&&l(m,v)}}function p(){for(var m=arguments.length,v=Array(m),y=0;y<m;y++)v[y]=arguments[y];var b=new s;o(b,v);var x=[];for(var E in b)b[E]&&x.push(E);return x.join(" ")}return p}();typeof e!="undefined"&&e.exports?e.exports=a:(n=[],i=function(){return a}.apply(t,n),i!==void 0&&(e.exports=i))})()},"./node_modules/core-js/es/array/from.js":function(e,t,r){r("./node_modules/core-js/modules/es.string.iterator.js"),r("./node_modules/core-js/modules/es.array.from.js");var n=r("./node_modules/core-js/internals/path.js");e.exports=n.Array.from},"./node_modules/core-js/internals/a-function.js":function(e,t){e.exports=function(r){if(typeof r!="function")throw TypeError(String(r)+" is not a function");return r}},"./node_modules/core-js/internals/an-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js");e.exports=function(i){if(!n(i))throw TypeError(String(i)+" is not an object");return i}},"./node_modules/core-js/internals/array-from.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/bind-context.js"),i=r("./node_modules/core-js/internals/to-object.js"),a=r("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),s=r("./node_modules/core-js/internals/is-array-iterator-method.js"),o=r("./node_modules/core-js/internals/to-length.js"),c=r("./node_modules/core-js/internals/create-property.js"),l=r("./node_modules/core-js/internals/get-iterator-method.js");e.exports=function(f){var d=i(f),h=typeof this=="function"?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,v=m!==void 0,y=0,b=l(d),x,E,_,k;if(v&&(m=n(m,p>2?arguments[2]:void 0,2)),b!=null&&!(h==Array&&s(b)))for(k=b.call(d),E=new h;!(_=k.next()).done;y++)c(E,y,v?a(k,m,[_.value,y],!0):_.value);else for(x=o(d.length),E=new h(x);x>y;y++)c(E,y,v?m(d[y],y):d[y]);return E.length=y,E}},"./node_modules/core-js/internals/array-includes.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-indexed-object.js"),i=r("./node_modules/core-js/internals/to-length.js"),a=r("./node_modules/core-js/internals/to-absolute-index.js");e.exports=function(s){return function(o,c,l){var u=n(o),f=i(u.length),d=a(l,f),h;if(s&&c!=c){for(;f>d;)if(h=u[d++],h!=h)return!0}else for(;f>d;d++)if((s||d in u)&&u[d]===c)return s||d||0;return!s&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(e,t,r){var n=r("./node_modules/core-js/internals/a-function.js");e.exports=function(i,a,s){if(n(i),a===void 0)return i;switch(s){case 0:return function(){return i.call(a)};case 1:return function(o){return i.call(a,o)};case 2:return function(o,c){return i.call(a,o,c)};case 3:return function(o,c,l){return i.call(a,o,c,l)}}return function(){return i.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(e,t,r){var n=r("./node_modules/core-js/internals/an-object.js");e.exports=function(i,a,s,o){try{return o?a(n(s)[0],s[1]):a(s)}catch(l){var c=i.return;throw c!==void 0&&n(c.call(i)),l}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(e,t,r){var n=r("./node_modules/core-js/internals/well-known-symbol.js"),i=n("iterator"),a=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){a=!0}};o[i]=function(){return this},Array.from(o,function(){throw 2})}catch(c){}e.exports=function(c,l){if(!l&&!a)return!1;var u=!1;try{var f={};f[i]=function(){return{next:function(){return{done:u=!0}}}},c(f)}catch(d){}return u}},"./node_modules/core-js/internals/classof-raw.js":function(e,t){var r={}.toString;e.exports=function(n){return r.call(n).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(e,t,r){var n=r("./node_modules/core-js/internals/classof-raw.js"),i=r("./node_modules/core-js/internals/well-known-symbol.js"),a=i("toStringTag"),s=n(function(){return arguments}())=="Arguments",o=function(c,l){try{return c[l]}catch(u){}};e.exports=function(c){var l,u,f;return c===void 0?"Undefined":c===null?"Null":typeof(u=o(l=Object(c),a))=="string"?u:s?n(l):(f=n(l))=="Object"&&typeof l.callee=="function"?"Arguments":f}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/own-keys.js"),a=r("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),s=r("./node_modules/core-js/internals/object-define-property.js");e.exports=function(o,c){for(var l=i(c),u=s.f,f=a.f,d=0;d<l.length;d++){var h=l[d];n(o,h)||u(o,h,f(c,h))}}},"./node_modules/core-js/internals/correct-prototype-getter.js":function(e,t,r){var n=r("./node_modules/core-js/internals/fails.js");e.exports=!n(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype})},"./node_modules/core-js/internals/create-iterator-constructor.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,i=r("./node_modules/core-js/internals/object-create.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js"),s=r("./node_modules/core-js/internals/set-to-string-tag.js"),o=r("./node_modules/core-js/internals/iterators.js"),c=function(){return this};e.exports=function(l,u,f){var d=u+" Iterator";return l.prototype=i(n,{next:a(1,f)}),s(l,d,!1,!0),o[d]=c,l}},"./node_modules/core-js/internals/create-property-descriptor.js":function(e,t){e.exports=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}}},"./node_modules/core-js/internals/create-property.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/to-primitive.js"),i=r("./node_modules/core-js/internals/object-define-property.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=function(s,o,c){var l=n(o);l in s?i.f(s,l,a(0,c)):s[l]=c}},"./node_modules/core-js/internals/define-iterator.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/export.js"),i=r("./node_modules/core-js/internals/create-iterator-constructor.js"),a=r("./node_modules/core-js/internals/object-get-prototype-of.js"),s=r("./node_modules/core-js/internals/object-set-prototype-of.js"),o=r("./node_modules/core-js/internals/set-to-string-tag.js"),c=r("./node_modules/core-js/internals/hide.js"),l=r("./node_modules/core-js/internals/redefine.js"),u=r("./node_modules/core-js/internals/well-known-symbol.js"),f=r("./node_modules/core-js/internals/is-pure.js"),d=r("./node_modules/core-js/internals/iterators.js"),h=r("./node_modules/core-js/internals/iterators-core.js"),p=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,v=u("iterator"),y="keys",b="values",x="entries",E=function(){return this};e.exports=function(_,k,w,A,S,T,P){i(w,k,A);var O=function(z){if(z===S&&ee)return ee;if(!m&&z in Q)return Q[z];switch(z){case y:return function(){return new w(this,z)};case b:return function(){return new w(this,z)};case x:return function(){return new w(this,z)}}return function(){return new w(this)}},j=k+" Iterator",D=!1,Q=_.prototype,de=Q[v]||Q["@@iterator"]||S&&Q[S],ee=!m&&de||O(S),J=k=="Array"&&Q.entries||de,Ce,me,F;if(J&&(Ce=a(J.call(new _)),p!==Object.prototype&&Ce.next&&(!f&&a(Ce)!==p&&(s?s(Ce,p):typeof Ce[v]!="function"&&c(Ce,v,E)),o(Ce,j,!0,!0),f&&(d[j]=E))),S==b&&de&&de.name!==b&&(D=!0,ee=function(){return de.call(this)}),(!f||P)&&Q[v]!==ee&&c(Q,v,ee),d[k]=ee,S)if(me={values:O(b),keys:T?ee:O(y),entries:O(x)},P)for(F in me)(m||D||!(F in Q))&&l(Q,F,me[F]);else n({target:k,proto:!0,forced:m||D},me);return me}},"./node_modules/core-js/internals/descriptors.js":function(e,t,r){var n=r("./node_modules/core-js/internals/fails.js");e.exports=!n(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/document-create-element.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/is-object.js"),a=n.document,s=i(a)&&i(a.createElement);e.exports=function(o){return s?a.createElement(o):{}}},"./node_modules/core-js/internals/enum-bug-keys.js":function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js/internals/export.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,a=r("./node_modules/core-js/internals/hide.js"),s=r("./node_modules/core-js/internals/redefine.js"),o=r("./node_modules/core-js/internals/set-global.js"),c=r("./node_modules/core-js/internals/copy-constructor-properties.js"),l=r("./node_modules/core-js/internals/is-forced.js");e.exports=function(u,f){var d=u.target,h=u.global,p=u.stat,m,v,y,b,x,E;if(h?v=n:p?v=n[d]||o(d,{}):v=(n[d]||{}).prototype,v)for(y in f){if(x=f[y],u.noTargetGet?(E=i(v,y),b=E&&E.value):b=v[y],m=l(h?y:d+(p?".":"#")+y,u.forced),!m&&b!==void 0){if(typeof x==typeof b)continue;c(x,b)}(u.sham||b&&b.sham)&&a(x,"sham",!0),s(v,y,x,u)}}},"./node_modules/core-js/internals/fails.js":function(e,t){e.exports=function(r){try{return!!r()}catch(n){return!0}}},"./node_modules/core-js/internals/function-to-string.js":function(e,t,r){var n=r("./node_modules/core-js/internals/shared.js");e.exports=n("native-function-to-string",Function.toString)},"./node_modules/core-js/internals/get-iterator-method.js":function(e,t,r){var n=r("./node_modules/core-js/internals/classof.js"),i=r("./node_modules/core-js/internals/iterators.js"),a=r("./node_modules/core-js/internals/well-known-symbol.js"),s=a("iterator");e.exports=function(o){if(o!=null)return o[s]||o["@@iterator"]||i[n(o)]}},"./node_modules/core-js/internals/global.js":function(e,t,r){(function(n){var i="object",a=function(s){return s&&s.Math==Math&&s};e.exports=a(typeof globalThis==i&&globalThis)||a(typeof window==i&&window)||a(typeof self==i&&self)||a(typeof n==i&&n)||Function("return this")()}).call(this,r("./node_modules/webpack/buildin/global.js"))},"./node_modules/core-js/internals/has.js":function(e,t){var r={}.hasOwnProperty;e.exports=function(n,i){return r.call(n,i)}},"./node_modules/core-js/internals/hidden-keys.js":function(e,t){e.exports={}},"./node_modules/core-js/internals/hide.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-define-property.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=n?function(s,o,c){return i.f(s,o,a(1,c))}:function(s,o,c){return s[o]=c,s}},"./node_modules/core-js/internals/html.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=n.document;e.exports=i&&i.documentElement},"./node_modules/core-js/internals/ie8-dom-define.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/fails.js"),a=r("./node_modules/core-js/internals/document-create-element.js");e.exports=!n&&!i(function(){return Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/indexed-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/fails.js"),i=r("./node_modules/core-js/internals/classof-raw.js"),a="".split;e.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(s){return i(s)=="String"?a.call(s,""):Object(s)}:Object},"./node_modules/core-js/internals/internal-state.js":function(e,t,r){var n=r("./node_modules/core-js/internals/native-weak-map.js"),i=r("./node_modules/core-js/internals/global.js"),a=r("./node_modules/core-js/internals/is-object.js"),s=r("./node_modules/core-js/internals/hide.js"),o=r("./node_modules/core-js/internals/has.js"),c=r("./node_modules/core-js/internals/shared-key.js"),l=r("./node_modules/core-js/internals/hidden-keys.js"),u=i.WeakMap,f,d,h,p=function(_){return h(_)?d(_):f(_,{})},m=function(_){return function(k){var w;if(!a(k)||(w=d(k)).type!==_)throw TypeError("Incompatible receiver, "+_+" required");return w}};if(n){var v=new u,y=v.get,b=v.has,x=v.set;f=function(_,k){return x.call(v,_,k),k},d=function(_){return y.call(v,_)||{}},h=function(_){return b.call(v,_)}}else{var E=c("state");l[E]=!0,f=function(_,k){return s(_,E,k),k},d=function(_){return o(_,E)?_[E]:{}},h=function(_){return o(_,E)}}e.exports={set:f,get:d,has:h,enforce:p,getterFor:m}},"./node_modules/core-js/internals/is-array-iterator-method.js":function(e,t,r){var n=r("./node_modules/core-js/internals/well-known-symbol.js"),i=r("./node_modules/core-js/internals/iterators.js"),a=n("iterator"),s=Array.prototype;e.exports=function(o){return o!==void 0&&(i.Array===o||s[a]===o)}},"./node_modules/core-js/internals/is-forced.js":function(e,t,r){var n=r("./node_modules/core-js/internals/fails.js"),i=/#|\.prototype\./,a=function(u,f){var d=o[s(u)];return d==l?!0:d==c?!1:typeof f=="function"?n(f):!!f},s=a.normalize=function(u){return String(u).replace(i,".").toLowerCase()},o=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},"./node_modules/core-js/internals/is-object.js":function(e,t){e.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},"./node_modules/core-js/internals/is-pure.js":function(e,t){e.exports=!1},"./node_modules/core-js/internals/iterators-core.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/object-get-prototype-of.js"),i=r("./node_modules/core-js/internals/hide.js"),a=r("./node_modules/core-js/internals/has.js"),s=r("./node_modules/core-js/internals/well-known-symbol.js"),o=r("./node_modules/core-js/internals/is-pure.js"),c=s("iterator"),l=!1,u=function(){return this},f,d,h;[].keys&&(h=[].keys(),"next"in h?(d=n(n(h)),d!==Object.prototype&&(f=d)):l=!0),f==null&&(f={}),!o&&!a(f,c)&&i(f,c,u),e.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:l}},"./node_modules/core-js/internals/iterators.js":function(e,t){e.exports={}},"./node_modules/core-js/internals/native-symbol.js":function(e,t,r){var n=r("./node_modules/core-js/internals/fails.js");e.exports=!!Object.getOwnPropertySymbols&&!n(function(){return!String(Symbol())})},"./node_modules/core-js/internals/native-weak-map.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/function-to-string.js"),a=n.WeakMap;e.exports=typeof a=="function"&&/native code/.test(i.call(a))},"./node_modules/core-js/internals/object-create.js":function(e,t,r){var n=r("./node_modules/core-js/internals/an-object.js"),i=r("./node_modules/core-js/internals/object-define-properties.js"),a=r("./node_modules/core-js/internals/enum-bug-keys.js"),s=r("./node_modules/core-js/internals/hidden-keys.js"),o=r("./node_modules/core-js/internals/html.js"),c=r("./node_modules/core-js/internals/document-create-element.js"),l=r("./node_modules/core-js/internals/shared-key.js"),u=l("IE_PROTO"),f="prototype",d=function(){},h=function(){var p=c("iframe"),m=a.length,v="<",y="script",b=">",x="java"+y+":",E;for(p.style.display="none",o.appendChild(p),p.src=String(x),E=p.contentWindow.document,E.open(),E.write(v+y+b+"document.F=Object"+v+"/"+y+b),E.close(),h=E.F;m--;)delete h[f][a[m]];return h()};e.exports=Object.create||function(m,v){var y;return m!==null?(d[f]=n(m),y=new d,d[f]=null,y[u]=m):y=h(),v===void 0?y:i(y,v)},s[u]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-define-property.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/object-keys.js");e.exports=n?Object.defineProperties:function(c,l){a(c);for(var u=s(l),f=u.length,d=0,h;f>d;)i.f(c,h=u[d++],l[h]);return c}},"./node_modules/core-js/internals/object-define-property.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/ie8-dom-define.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/to-primitive.js"),o=Object.defineProperty;t.f=n?o:function(l,u,f){if(a(l),u=s(u,!0),a(f),i)try{return o(l,u,f)}catch(d){}if("get"in f||"set"in f)throw TypeError("Accessors not supported");return"value"in f&&(l[u]=f.value),l}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js"),s=r("./node_modules/core-js/internals/to-indexed-object.js"),o=r("./node_modules/core-js/internals/to-primitive.js"),c=r("./node_modules/core-js/internals/has.js"),l=r("./node_modules/core-js/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(d,h){if(d=s(d),h=o(h,!0),l)try{return u(d,h)}catch(p){}if(c(d,h))return a(!i.f.call(d,h),d[h])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js"),a=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(o){return n(o,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,t){t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-object.js"),a=r("./node_modules/core-js/internals/shared-key.js"),s=r("./node_modules/core-js/internals/correct-prototype-getter.js"),o=a("IE_PROTO"),c=Object.prototype;e.exports=s?Object.getPrototypeOf:function(l){return l=i(l),n(l,o)?l[o]:typeof l.constructor=="function"&&l instanceof l.constructor?l.constructor.prototype:l instanceof Object?c:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-indexed-object.js"),a=r("./node_modules/core-js/internals/array-includes.js"),s=r("./node_modules/core-js/internals/hidden-keys.js"),o=a(!1);e.exports=function(c,l){var u=i(c),f=0,d=[],h;for(h in u)!n(s,h)&&n(u,h)&&d.push(h);for(;l.length>f;)n(u,h=l[f++])&&(~o(d,h)||d.push(h));return d}},"./node_modules/core-js/internals/object-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(s){return n(s,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);t.f=a?function(o){var c=i(this,o);return!!c&&c.enumerable}:n},"./node_modules/core-js/internals/object-set-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},s;try{s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,s.call(a,[]),i=a instanceof Array}catch(o){}return function(c,l){return n(c,l),i?s.call(c,l):c.__proto__=l,c}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/object-get-own-property-names.js"),a=r("./node_modules/core-js/internals/object-get-own-property-symbols.js"),s=r("./node_modules/core-js/internals/an-object.js"),o=n.Reflect;e.exports=o&&o.ownKeys||function(l){var u=i.f(s(l)),f=a.f;return f?u.concat(f(l)):u}},"./node_modules/core-js/internals/path.js":function(e,t,r){e.exports=r("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/hide.js"),s=r("./node_modules/core-js/internals/has.js"),o=r("./node_modules/core-js/internals/set-global.js"),c=r("./node_modules/core-js/internals/function-to-string.js"),l=r("./node_modules/core-js/internals/internal-state.js"),u=l.get,f=l.enforce,d=String(c).split("toString");i("inspectSource",function(h){return c.call(h)}),(e.exports=function(h,p,m,v){var y=v?!!v.unsafe:!1,b=v?!!v.enumerable:!1,x=v?!!v.noTargetGet:!1;if(typeof m=="function"&&(typeof p=="string"&&!s(m,"name")&&a(m,"name",p),f(m).source=d.join(typeof p=="string"?p:"")),h===n){b?h[p]=m:o(p,m);return}else y?!x&&h[p]&&(b=!0):delete h[p];b?h[p]=m:a(h,p,m)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||c.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(e,t){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"./node_modules/core-js/internals/set-global.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/hide.js");e.exports=function(a,s){try{i(n,a,s)}catch(o){n[a]=s}return s}},"./node_modules/core-js/internals/set-to-string-tag.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-define-property.js").f,i=r("./node_modules/core-js/internals/has.js"),a=r("./node_modules/core-js/internals/well-known-symbol.js"),s=a("toStringTag");e.exports=function(o,c,l){o&&!i(o=l?o:o.prototype,s)&&n(o,s,{configurable:!0,value:c})}},"./node_modules/core-js/internals/shared-key.js":function(e,t,r){var n=r("./node_modules/core-js/internals/shared.js"),i=r("./node_modules/core-js/internals/uid.js"),a=n("keys");e.exports=function(s){return a[s]||(a[s]=i(s))}},"./node_modules/core-js/internals/shared.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/set-global.js"),a=r("./node_modules/core-js/internals/is-pure.js"),s="__core-js_shared__",o=n[s]||i(s,{});(e.exports=function(c,l){return o[c]||(o[c]=l!==void 0?l:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a,s,o){var c=String(i(a)),l=n(s),u=c.length,f,d;return l<0||l>=u?o?"":void 0:(f=c.charCodeAt(l),f<55296||f>56319||l+1===u||(d=c.charCodeAt(l+1))<56320||d>57343?o?c.charAt(l):f:o?c.slice(l,l+2):(f-55296<<10)+(d-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.max,a=Math.min;e.exports=function(s,o){var c=n(s);return c<0?i(c+o,0):a(c,o)}},"./node_modules/core-js/internals/to-indexed-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/indexed-object.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a){return n(i(a))}},"./node_modules/core-js/internals/to-integer.js":function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(i){return isNaN(i=+i)?0:(i>0?n:r)(i)}},"./node_modules/core-js/internals/to-length.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.min;e.exports=function(a){return a>0?i(n(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(i){return Object(n(i))}},"./node_modules/core-js/internals/to-primitive.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js");e.exports=function(i,a){if(!n(i))return i;var s,o;if(a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i))||typeof(s=i.valueOf)=="function"&&!n(o=s.call(i))||!a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i)))return o;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(e,t){var r=0,n=Math.random();e.exports=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++r+n).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js"),i=r("./node_modules/core-js/internals/an-object.js");e.exports=function(a,s){if(i(a),!n(s)&&s!==null)throw TypeError("Can't set "+String(s)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/uid.js"),s=r("./node_modules/core-js/internals/native-symbol.js"),o=n.Symbol,c=i("wks");e.exports=function(l){return c[l]||(c[l]=s&&o[l]||(s?o:a)("Symbol."+l))}},"./node_modules/core-js/modules/es.array.from.js":function(e,t,r){var n=r("./node_modules/core-js/internals/export.js"),i=r("./node_modules/core-js/internals/array-from.js"),a=r("./node_modules/core-js/internals/check-correctness-of-iteration.js"),s=!a(function(o){Array.from(o)});n({target:"Array",stat:!0,forced:s},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/string-at.js"),i=r("./node_modules/core-js/internals/internal-state.js"),a=r("./node_modules/core-js/internals/define-iterator.js"),s="String Iterator",o=i.set,c=i.getterFor(s);a(String,"String",function(l){o(this,{type:s,string:String(l),index:0})},function(){var u=c(this),f=u.string,d=u.index,h;return d>=f.length?{value:void 0,done:!0}:(h=n(f,d,!0),u.index+=h.length,{value:h,done:!1})})},"./node_modules/webpack/buildin/global.js":function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(n){typeof window=="object"&&(r=window)}e.exports=r},"./src/default-attrs.json":function(e){e.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(h){for(var p=1;p<arguments.length;p++){var m=arguments[p];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(h[v]=m[v])}return h},i=function(){function h(p,m){for(var v=0;v<m.length;v++){var y=m[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return function(p,m,v){return m&&h(p.prototype,m),v&&h(p,v),p}}(),a=r("./node_modules/classnames/dedupe.js"),s=l(a),o=r("./src/default-attrs.json"),c=l(o);function l(h){return h&&h.__esModule?h:{default:h}}function u(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}var f=function(){function h(p,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];u(this,h),this.name=p,this.contents=m,this.tags=v,this.attrs=n({},c.default,{class:"feather feather-"+p})}return i(h,[{key:"toSvg",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=n({},this.attrs,m,{class:(0,s.default)(this.attrs.class,m.class)});return"<svg "+d(v)+">"+this.contents+"</svg>"}},{key:"toString",value:function(){return this.contents}}]),h}();function d(h){return Object.keys(h).map(function(p){return p+'="'+h[p]+'"'}).join(" ")}t.default=f},"./src/icons.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icon.js"),i=l(n),a=r("./dist/icons.json"),s=l(a),o=r("./src/tags.json"),c=l(o);function l(u){return u&&u.__esModule?u:{default:u}}t.default=Object.keys(s.default).map(function(u){return new i.default(u,s.default[u],c.default[u])}).reduce(function(u,f){return u[f.name]=f,u},{})},"./src/index.js":function(e,t,r){"use strict";var n=r("./src/icons.js"),i=l(n),a=r("./src/to-svg.js"),s=l(a),o=r("./src/replace.js"),c=l(o);function l(u){return u&&u.__esModule?u:{default:u}}e.exports={icons:i.default,toSvg:s.default,replace:c.default}},"./src/replace.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(d){for(var h=1;h<arguments.length;h++){var p=arguments[h];for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(d[m]=p[m])}return d},i=r("./node_modules/classnames/dedupe.js"),a=c(i),s=r("./src/icons.js"),o=c(s);function c(d){return d&&d.__esModule?d:{default:d}}function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var h=document.querySelectorAll("[data-feather]");Array.from(h).forEach(function(p){return u(p,d)})}function u(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f(d),m=p["data-feather"];if(delete p["data-feather"],o.default[m]===void 0){console.warn("feather: '"+m+"' is not a valid icon");return}var v=o.default[m].toSvg(n({},h,p,{class:(0,a.default)(h.class,p.class)})),y=new DOMParser().parseFromString(v,"image/svg+xml"),b=y.querySelector("svg");d.parentNode.replaceChild(b,d)}function f(d){return Array.from(d.attributes).reduce(function(h,p){return h[p.name]=p.value,h},{})}t.default=l},"./src/tags.json":function(e){e.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icons.js"),i=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!o)throw new Error("The required `key` (icon name) parameter is missing.");if(!i.default[o])throw new Error("No icon matching '"+o+"'. See the complete list of icons at https://feathericons.com");return i.default[o].toSvg(c)}t.default=s},0:function(e,t,r){r("./node_modules/core-js/es/array/from.js"),e.exports=r("./src/index.js")}})})});var DH={};qP(DH,{default:()=>Qd});module.exports=YP(DH);g();g();var Jo=Ze(d1(),1),Ep=Ze(_1(),1),Jw=Ze(S1(),1),hu=Ze(uw(),1),ru=Ze(hw(),1),Qw=Ze(xw(),1),Kr=Ze(Ew(),1),e2=Ze(Pw(),1),_e=class e 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){let r=new e(t.message);return r.code=t.code,r.data=t.data,r.caller=t.caller,r.stack=t.stack,r}get isIsomorphicGitError(){return!0}},Qo=class e extends _e{constructor(t){super(`Modifying the index is not possible because you have unmerged files: ${t.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=e.code,this.data={filepaths:t}}};Qo.code="UnmergedPathsError";var le=class e extends _e{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=e.code,this.data={message:t}}};le.code="InternalError";var cs=class e extends _e{constructor(t){super(`The filepath "${t}" contains unsafe character sequences`),this.code=this.name=e.code,this.data={filepath:t}}};cs.code="UnsafeFilepathError";var Or=class{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){let r=this.buffer.slice(this._start,this._start+t);return this._start+=t,r}toString(t,r){let n=this.buffer.toString(t,this._start,this._start+r);return this._start+=r,n}write(t,r,n){let i=this.buffer.write(t,this._start,r,n);return this._start+=r,i}copy(t,r,n){let i=t.copy(this.buffer,this._start,r,n);return this._start+=i,i}readUInt8(){let t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){let r=this.buffer.writeUInt8(t,this._start);return this._start+=1,r}readUInt16BE(){let t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){let r=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,r}readUInt32BE(){let t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){let r=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,r}};function pu(e,t){return-(e<t)||+(e>t)}function t2(e,t){return pu(e.path,t.path)}function r2(e){let t=e>0?e>>12:0;t!==4&&t!==8&&t!==10&&t!==14&&(t=8);let r=e&511;return r&73?r=493:r=420,t!==8&&(r=0),(t<<12)+r}var bn=2**32;function Rw(e,t,r,n){if(e!==void 0&&t!==void 0)return[e,t];r===void 0&&(r=n.valueOf());let i=Math.floor(r/1e3),a=(r-i*1e3)*1e6;return[i,a]}function us(e){let[t,r]=Rw(e.ctimeSeconds,e.ctimeNanoseconds,e.ctimeMs,e.ctime),[n,i]=Rw(e.mtimeSeconds,e.mtimeNanoseconds,e.mtimeMs,e.mtime);return{ctimeSeconds:t%bn,ctimeNanoseconds:r%bn,mtimeSeconds:n%bn,mtimeNanoseconds:i%bn,dev:e.dev%bn,ino:e.ino%bn,mode:r2(e.mode%bn),uid:e.uid%bn,gid:e.gid%bn,size:e.size>-1?e.size%bn:0}}function Z6(e){let t="";for(let r of new Uint8Array(e))r<16&&(t+="0"),t+=r.toString(16);return t}var rp=null;async function Gn(e){return rp===null&&(rp=await J6()),rp?n2(e):K6(e)}function K6(e){return new Ep.default().update(e).digest("hex")}async function n2(e){let t=await crypto.subtle.digest("SHA-1",e);return Z6(t)}async function J6(){try{if(await n2(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch(e){}return!1}function Q6(e){return{assumeValid:!!(e&32768),extended:!!(e&16384),stage:(e&12288)>>12,nameLength:e&4095}}function eM(e){let t=e.flags;return t.extended=!1,t.nameLength=Math.min(Buffer.from(e.path).length,4095),(t.assumeValid?32768:0)+(t.extended?16384:0)+((t.stage&3)<<12)+(t.nameLength&4095)}var dp=class e{constructor(t,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=t||new Map}_addEntry(t){if(t.flags.stage===0)t.stages=[t],this._entries.set(t.path,t),this._unmergedPaths.delete(t.path);else{let r=this._entries.get(t.path);r||(this._entries.set(t.path,t),r=t),r.stages[t.flags.stage]=t,this._unmergedPaths.add(t.path)}}static async from(t){if(Buffer.isBuffer(t))return e.fromBuffer(t);if(t===null)return new e(null);throw new le("invalid type passed to GitIndex.from")}static async fromBuffer(t){if(t.length===0)throw new le("Index file is empty (.git/index)");let r=new e,n=new Or(t),i=n.toString("utf8",4);if(i!=="DIRC")throw new le(`Invalid dircache magic file number: ${i}`);let a=await Gn(t.slice(0,-20)),s=t.slice(-20).toString("hex");if(s!==a)throw new le(`Invalid checksum in GitIndex buffer: expected ${s} but saw ${a}`);let o=n.readUInt32BE();if(o!==2)throw new le(`Unsupported dircache version: ${o}`);let c=n.readUInt32BE(),l=0;for(;!n.eof()&&l<c;){let u={};u.ctimeSeconds=n.readUInt32BE(),u.ctimeNanoseconds=n.readUInt32BE(),u.mtimeSeconds=n.readUInt32BE(),u.mtimeNanoseconds=n.readUInt32BE(),u.dev=n.readUInt32BE(),u.ino=n.readUInt32BE(),u.mode=n.readUInt32BE(),u.uid=n.readUInt32BE(),u.gid=n.readUInt32BE(),u.size=n.readUInt32BE(),u.oid=n.slice(20).toString("hex");let f=n.readUInt16BE();u.flags=Q6(f);let d=t.indexOf(0,n.tell()+1)-n.tell();if(d<1)throw new le(`Got a path length of: ${d}`);if(u.path=n.toString("utf8",d),u.path.includes("..\\")||u.path.includes("../"))throw new cs(u.path);let h=8-(n.tell()-12)%8;for(h===0&&(h=8);h--;){let p=n.readUInt8();if(p!==0)throw new le(`Expected 1-8 null characters but got '${p}' after ${u.path}`);if(n.eof())throw new le("Unexpected end of file")}u.stages=[],r._addEntry(u),l++}return r}get unmergedPaths(){return[...this._unmergedPaths]}get entries(){return[...this._entries.values()].sort(t2)}get entriesMap(){return this._entries}get entriesFlat(){return[...this.entries].flatMap(t=>t.stages.length>1?t.stages.filter(r=>r):t)}*[Symbol.iterator](){for(let t of this.entries)yield t}insert({filepath:t,stats:r,oid:n,stage:i=0}){r||(r={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),r=us(r);let a=Buffer.from(t),s={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:t,oid:n,flags:{assumeValid:!1,extended:!1,stage:i,nameLength:a.length<4095?a.length:4095},stages:[]};this._addEntry(s),this._dirty=!0}delete({filepath:t}){if(this._entries.has(t))this._entries.delete(t);else for(let r of this._entries.keys())r.startsWith(t+"/")&&this._entries.delete(r);this._unmergedPaths.has(t)&&this._unmergedPaths.delete(t),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:t}){return this._entries.has(t)}render(){return this.entries.map(t=>`${t.mode.toString(8)} ${t.oid} ${t.path}`).join(`
`)}static async _entryToBuffer(t){let r=Buffer.from(t.path),n=Math.ceil((62+r.length+1)/8)*8,i=Buffer.alloc(n),a=new Or(i),s=us(t);return a.writeUInt32BE(s.ctimeSeconds),a.writeUInt32BE(s.ctimeNanoseconds),a.writeUInt32BE(s.mtimeSeconds),a.writeUInt32BE(s.mtimeNanoseconds),a.writeUInt32BE(s.dev),a.writeUInt32BE(s.ino),a.writeUInt32BE(s.mode),a.writeUInt32BE(s.uid),a.writeUInt32BE(s.gid),a.writeUInt32BE(s.size),a.write(t.oid,20,"hex"),a.writeUInt16BE(eM(t)),a.write(t.path,r.length,"utf8"),i}async toObject(){let t=Buffer.alloc(12),r=new Or(t);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let n=[];for(let o of this.entries)if(n.push(e._entryToBuffer(o)),o.stages.length>1)for(let c of o.stages)c&&c!==o&&n.push(e._entryToBuffer(c));n=await Promise.all(n);let i=Buffer.concat(n),a=Buffer.concat([t,i]),s=await Gn(a);return Buffer.concat([a,Buffer.from(s,"hex")])}};function nu(e,t,r=!0,n=!0){let i=us(e),a=us(t);return r&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.ctimeSeconds!==a.ctimeSeconds||i.uid!==a.uid||i.gid!==a.gid||n&&i.ino!==a.ino||i.size!==a.size}var np=null,os=Symbol("IndexCache");function tM(){return{map:new Map,stats:new Map}}async function rM(e,t,r){let n=await e.lstat(t),i=await e.read(t),a=await dp.from(i);r.map.set(t,a),r.stats.set(t,n)}async function nM(e,t,r){let n=r.stats.get(t);if(n===void 0)return!0;let i=await e.lstat(t);return n===null||i===null?!1:nu(n,i)}var mt=class{static async acquire({fs:t,gitdir:r,cache:n,allowUnmerged:i=!0},a){n[os]||(n[os]=tM());let s=`${r}/index`;np===null&&(np=new Jo.default({maxPending:1/0}));let o,c=[];return await np.acquire(s,async()=>{await nM(t,s,n[os])&&await rM(t,s,n[os]);let l=n[os].map.get(s);if(c=l.unmergedPaths,c.length&&!i)throw new Qo(c);if(o=await a(l),l._dirty){let u=await l.toObject();await t.write(s,u),n[os].stats.set(s,await t.lstat(s)),l._dirty=!1}}),o}};function iu(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>-1&&(e=e.slice(t+1)),e}function fs(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t===-1?".":t===0?"/":e.slice(0,t)}function i2(e){let t=new Map,r=function(i){if(!t.has(i)){let a={type:"tree",fullpath:i,basename:iu(i),metadata:{},children:[]};t.set(i,a),a.parent=r(fs(i)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return t.get(i)},n=function(i,a){if(!t.has(i)){let s={type:"blob",fullpath:i,basename:iu(i),metadata:a,parent:r(fs(i)),children:[]};s.parent&&s.parent.children.push(s),t.set(i,s)}return t.get(i)};r(".");for(let i of e)n(i.path,i);return t}function iM(e){switch(e){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new le(`Unexpected GitTree entry mode: ${e.toString(8)}`)}var hp=class{constructor({fs:t,gitdir:r,cache:n}){this.treePromise=mt.acquire({fs:t,gitdir:r,cache:n},async function(a){return i2(a.entries)});let i=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return i.type(this)}async mode(){return i.mode(this)}async stat(){return i.stat(this)}async content(){return i.content(this)}async oid(){return i.oid(this)}}}async readdir(t){let r=t._fullpath,i=(await this.treePromise).get(r);if(!i||i.type==="blob")return null;if(i.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=i.children.map(s=>s.fullpath);return a.sort(pu),a}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let n=(await this.treePromise).get(t._fullpath);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let i=n.type==="tree"?{}:us(n.metadata);t._type=n.type==="tree"?"tree":iM(i.mode),t._mode=i.mode,n.type==="tree"?t._stat=void 0:t._stat=i}return t._stat}async content(t){}async oid(t){if(t._oid===!1){let n=(await this.treePromise).get(t._fullpath);t._oid=n.metadata.oid}return t._oid}},mu=Symbol("GitWalkSymbol");function gu(){let e=Object.create(null);return Object.defineProperty(e,mu,{value:function({fs:t,gitdir:r,cache:n}){return new hp({fs:t,gitdir:r,cache:n})}}),Object.freeze(e),e}var Ne=class e extends _e{constructor(t){super(`Could not find ${t}.`),this.code=this.name=e.code,this.data={what:t}}};Ne.code="NotFoundError";var Gt=class e extends _e{constructor(t,r,n,i){super(`Object ${t} ${i?`at ${i}`:""}was anticipated to be a ${n} but it is a ${r}.`),this.code=this.name=e.code,this.data={oid:t,actual:r,expected:n,filepath:i}}};Gt.code="ObjectTypeError";var bi=class e extends _e{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=e.code,this.data={value:t}}};bi.code="InvalidOidError";var el=class e extends _e{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following:
[remote "${t}"]
fetch = +refs/heads/*:refs/remotes/origin/*
`),this.code=this.name=e.code,this.data={remote:t}}};el.code="NoRefspecError";var au=class e{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let r=null;this.parsedConfig=t.trim().split(`
`).map(n=>{if(/^\s*#/.test(n))return{line:n,comment:!0};let i=n.indexOf(" ");if(n.startsWith("^")){let a=n.slice(1);return this.refs.set(r+"^{}",a),{line:n,ref:r,peeled:a}}else{let a=n.slice(0,i);return r=n.slice(i+1),this.refs.set(r,a),{line:n,ref:r,oid:a}}})}return this}static from(t){return new e(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join(`
`)+`
`}},su=class e{constructor({remotePath:t,localPath:r,force:n,matchPrefix:i}){Object.assign(this,{remotePath:t,localPath:r,force:n,matchPrefix:i})}static from(t){let[r,n,i,a,s]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",c=i==="*";if(c!==(s==="*"))throw new le("Invalid refspec");return new e({remotePath:n,localPath:a,force:o,matchPrefix:c})}translate(t){if(this.matchPrefix){if(t.startsWith(this.remotePath))return this.localPath+t.replace(this.remotePath,"")}else if(t===this.remotePath)return this.localPath;return null}reverseTranslate(t){if(this.matchPrefix){if(t.startsWith(this.localPath))return this.remotePath+t.replace(this.localPath,"")}else if(t===this.localPath)return this.remotePath;return null}},pp=class e{constructor(t=[]){this.rules=t}static from(t){let r=[];for(let n of t)r.push(su.from(n));return new e(r)}add(t){let r=su.from(t);this.rules.push(r)}translate(t){let r=[];for(let n of this.rules)for(let i of t){let a=n.translate(i);a&&r.push([i,a])}return r}translateOne(t){let r=null;for(let n of this.rules){let i=n.translate(t);i&&(r=i)}return r}localNamespaces(){return this.rules.filter(t=>t.matchPrefix).map(t=>t.localPath.replace(/\/$/,""))}};function aM(e,t){let r=e.replace(/\^\{\}$/,""),n=t.replace(/\^\{\}$/,""),i=-(r<n)||+(r>n);return i===0?e.endsWith("^{}")?1:-1:i}var Mw=new Map;function Ow(e){let t=Mw.get(e);return t||(t=sM(e),Mw.set(e,t)),t}function sM(e){return e=e.split("/./").join("/").replace(/\/{2,}/g,"/"),e==="/."?"/":e==="./"||(e.startsWith("./")&&(e=e.slice(2)),e.endsWith("/.")&&(e=e.slice(0,-2)),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e==="")?".":e}function $(...e){return Ow(e.map(Ow).join("/"))}var oM=e=>{e=e.toLowerCase();let t=parseInt(e);return e.endsWith("k")&&(t*=1024),e.endsWith("m")&&(t*=1024*1024),e.endsWith("g")&&(t*=1024*1024*1024),t},Ko=e=>{if(e=e.trim().toLowerCase(),e==="true"||e==="yes"||e==="on")return!0;if(e==="false"||e==="no"||e==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${e}`)},Iw={core:{filemode:Ko,bare:Ko,logallrefupdates:Ko,symlinks:Ko,ignorecase:Ko,bigFileThreshold:oM}},lM=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,cM=/^[A-Za-z0-9-.]+$/,uM=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,fM=/^[A-Za-z][A-Za-z-]*$/,dM=/^(.*?)( *[#;].*)$/,hM=e=>{let t=lM.exec(e);if(t!=null){let[r,n]=t.slice(1);return[r,n]}return null},pM=e=>{let t=uM.exec(e);if(t!=null){let[r,n="true"]=t.slice(1),i=mM(n),a=gM(i);return[r,a]}return null},mM=e=>{let t=dM.exec(e);if(t==null)return e;let[r,n]=t.slice(1);return Fw(r)&&Fw(n)?`${r}${n}`:r},Fw=e=>(e.match(/(?:^|[^\\])"/g)||[]).length%2!==0,gM=e=>e.split("").reduce((t,r,n,i)=>{let a=r==='"'&&i[n-1]!=="\\",s=r==="\\"&&i[n+1]==='"';return a||s?t:t+r},""),$w=e=>e!=null?e.toLowerCase():null,mp=(e,t,r)=>[$w(e),t,$w(r)].filter(n=>n!=null).join("."),Lw=e=>{let t=e.split("."),r=t.shift(),n=t.pop(),i=t.length?t.join("."):void 0;return{section:r,subsection:i,name:n,path:mp(r,i,n),sectionPath:mp(r,i,null)}},vM=(e,t)=>e.reduce((r,n,i)=>t(n)?i:r,-1),gp=class e{constructor(t){let r=null,n=null;this.parsedConfig=t?t.split(`
`).map(i=>{let a=null,s=null,o=i.trim(),c=hM(o),l=c!=null;if(l)[r,n]=c;else{let f=pM(o);f!=null&&([a,s]=f)}let u=mp(r,n,a);return{line:i,isSection:l,section:r,subsection:n,name:a,value:s,path:u}}):[]}static from(t){return new e(t)}async get(t,r=!1){let n=Lw(t).path,i=this.parsedConfig.filter(a=>a.path===n).map(({section:a,name:s,value:o})=>{let c=Iw[a]&&Iw[a][s];return c?c(o):o});return r?i:i.pop()}async getall(t){return this.get(t,!0)}async getSubsections(t){return this.parsedConfig.filter(r=>r.section===t&&r.isSection).map(r=>r.subsection)}async deleteSection(t,r){this.parsedConfig=this.parsedConfig.filter(n=>!(n.section===t&&n.subsection===r))}async append(t,r){return this.set(t,r,!0)}async set(t,r,n=!1){let{section:i,subsection:a,name:s,path:o,sectionPath:c}=Lw(t),l=vM(this.parsedConfig,u=>u.path===o);if(r==null)l!==-1&&this.parsedConfig.splice(l,1);else if(l!==-1){let u=this.parsedConfig[l],f=Object.assign({},u,{name:s,value:r,modified:!0});n?this.parsedConfig.splice(l+1,0,f):this.parsedConfig[l]=f}else{let u=this.parsedConfig.findIndex(d=>d.path===c),f={section:i,subsection:a,name:s,value:r,modified:!0,path:o};if(cM.test(i)&&fM.test(s))if(u>=0)this.parsedConfig.splice(u+1,0,f);else{let d={section:i,subsection:a,modified:!0,path:c};this.parsedConfig.push(d,f)}}}toString(){return this.parsedConfig.map(({line:t,section:r,subsection:n,name:i,value:a,modified:s=!1})=>s?i!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${i} = "${a}"`:` ${i} = ${a}`:n!=null?`[${r} "${n}"]`:`[${r}]`:t).join(`
`)}},Ve=class{static async get({fs:t,gitdir:r}){let n=await t.read(`${r}/config`,{encoding:"utf8"});return gp.from(n)}static async save({fs:t,gitdir:r,config:n}){await t.write(`${r}/config`,n.toString(),{encoding:"utf8"})}},eu=e=>[`${e}`,`refs/${e}`,`refs/tags/${e}`,`refs/heads/${e}`,`refs/remotes/${e}`,`refs/remotes/${e}/HEAD`],yM=["config","description","index","shallow","commondir"],ip;async function vi(e,t){return ip===void 0&&(ip=new Jo.default),ip.acquire(e,t)}var q=class e{static async updateRemoteRefs({fs:t,gitdir:r,remote:n,refs:i,symrefs:a,tags:s,refspecs:o=void 0,prune:c=!1,pruneTags:l=!1}){for(let v of i.values())if(!v.match(/[0-9a-f]{40}/))throw new bi(v);let u=await Ve.get({fs:t,gitdir:r});if(!o){if(o=await u.getall(`remote.${n}.fetch`),o.length===0)throw new el(n);o.unshift(`+HEAD:refs/remotes/${n}/HEAD`)}let f=pp.from(o),d=new Map;if(l){let v=await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"});await e.deleteRefs({fs:t,gitdir:r,refs:v.map(y=>`refs/tags/${y}`)})}if(s){for(let v of i.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await e.exists({fs:t,gitdir:r,ref:v})){let y=i.get(v);d.set(v,y)}}let h=f.translate([...i.keys()]);for(let[v,y]of h){let b=i.get(v);d.set(y,b)}let p=f.translate([...a.keys()]);for(let[v,y]of p){let b=a.get(v),x=f.translateOne(b);x&&d.set(y,`ref: ${x}`)}let m=[];if(c){for(let v of f.localNamespaces()){let y=(await e.listRefs({fs:t,gitdir:r,filepath:v})).map(b=>`${v}/${b}`);for(let b of y)d.has(b)||m.push(b)}m.length>0&&await e.deleteRefs({fs:t,gitdir:r,refs:m})}for(let[v,y]of d)await vi(v,async()=>t.write($(r,v),`${y.trim()}
`,"utf8"));return{pruned:m}}static async writeRef({fs:t,gitdir:r,ref:n,value:i}){if(!i.match(/[0-9a-f]{40}/))throw new bi(i);await vi(n,async()=>t.write($(r,n),`${i.trim()}
`,"utf8"))}static async writeSymbolicRef({fs:t,gitdir:r,ref:n,value:i}){await vi(n,async()=>t.write($(r,n),`ref: ${i.trim()}
`,"utf8"))}static async deleteRef({fs:t,gitdir:r,ref:n}){return e.deleteRefs({fs:t,gitdir:r,refs:[n]})}static async deleteRefs({fs:t,gitdir:r,refs:n}){await Promise.all(n.map(o=>t.rm($(r,o))));let i=await vi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"})),a=au.from(i),s=a.refs.size;for(let o of n)a.refs.has(o)&&a.delete(o);a.refs.size<s&&(i=a.toString(),await vi("packed-refs",async()=>t.write(`${r}/packed-refs`,i,{encoding:"utf8"})))}static async resolve({fs:t,gitdir:r,ref:n,depth:i=void 0}){if(i!==void 0&&(i--,i===-1))return n;if(n.startsWith("ref: "))return n=n.slice(5),e.resolve({fs:t,gitdir:r,ref:n,depth:i});if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let a=await e.packedRefs({fs:t,gitdir:r}),s=eu(n).filter(o=>!yM.includes(o));for(let o of s){let c=await vi(o,async()=>await t.read(`${r}/${o}`,{encoding:"utf8"})||a.get(o));if(c)return e.resolve({fs:t,gitdir:r,ref:c.trim(),depth:i})}throw new Ne(n)}static async exists({fs:t,gitdir:r,ref:n}){try{return await e.expand({fs:t,gitdir:r,ref:n}),!0}catch(i){return!1}}static async expand({fs:t,gitdir:r,ref:n}){if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let i=await e.packedRefs({fs:t,gitdir:r}),a=eu(n);for(let s of a)if(await vi(s,async()=>t.exists(`${r}/${s}`))||i.has(s))return s;throw new Ne(n)}static async expandAgainstMap({ref:t,map:r}){let n=eu(t);for(let i of n)if(await r.has(i))return i;throw new Ne(t)}static resolveAgainstMap({ref:t,fullref:r=t,depth:n=void 0,map:i}){if(n!==void 0&&(n--,n===-1))return{fullref:r,oid:t};if(t.startsWith("ref: "))return t=t.slice(5),e.resolveAgainstMap({ref:t,fullref:r,depth:n,map:i});if(t.length===40&&/[0-9a-f]{40}/.test(t))return{fullref:r,oid:t};let a=eu(t);for(let s of a){let o=i.get(s);if(o)return e.resolveAgainstMap({ref:o.trim(),fullref:s,depth:n,map:i})}throw new Ne(t)}static async packedRefs({fs:t,gitdir:r}){let n=await vi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"}));return au.from(n).refs}static async listRefs({fs:t,gitdir:r,filepath:n}){let i=e.packedRefs({fs:t,gitdir:r}),a=null;try{a=await t.readdirDeep(`${r}/${n}`),a=a.map(s=>s.replace(`${r}/${n}/`,""))}catch(s){a=[]}for(let s of(await i).keys())s.startsWith(n)&&(s=s.replace(n+"/",""),a.includes(s)||a.push(s));return a.sort(aM),a}static async listBranches({fs:t,gitdir:r,remote:n}){return n?e.listRefs({fs:t,gitdir:r,filepath:`refs/remotes/${n}`}):e.listRefs({fs:t,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:t,gitdir:r}){return(await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"})).filter(i=>!i.endsWith("^{}"))}};function wM(e,t){return pu(Dw(e),Dw(t))}function Dw(e){return e.mode==="040000"?e.path+"/":e.path}function a2(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new le(`Unexpected GitTree entry mode: ${e}`)}function bM(e){let t=[],r=0;for(;r<e.length;){let n=e.indexOf(32,r);if(n===-1)throw new le(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);let i=e.indexOf(0,r);if(i===-1)throw new le(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let a=e.slice(r,n).toString("utf8");a==="40000"&&(a="040000");let s=a2(a),o=e.slice(n+1,i).toString("utf8");if(o.includes("\\")||o.includes("/"))throw new cs(o);let c=e.slice(i+1,i+21).toString("hex");r=i+21,t.push({mode:a,path:o,oid:c,type:s})}return t}function _M(e){if(typeof e=="number"&&(e=e.toString(8)),e.match(/^0?4.*/))return"040000";if(e.match(/^1006.*/))return"100644";if(e.match(/^1007.*/))return"100755";if(e.match(/^120.*/))return"120000";if(e.match(/^160.*/))return"160000";throw new le(`Could not understand file mode: ${e}`)}function xM(e){return!e.oid&&e.sha&&(e.oid=e.sha),e.mode=_M(e.mode),e.type||(e.type=a2(e.mode)),e}var er=class e{constructor(t){if(Buffer.isBuffer(t))this._entries=bM(t);else if(Array.isArray(t))this._entries=t.map(xM);else throw new le("invalid type passed to GitTree constructor");this._entries.sort(t2)}static from(t){return new e(t)}render(){return this._entries.map(t=>`${t.mode} ${t.type} ${t.oid} ${t.path}`).join(`
`)}toObject(){let t=[...this._entries];return t.sort(wM),Buffer.concat(t.map(r=>{let n=Buffer.from(r.mode.replace(/^0/,"")),i=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),s=Buffer.from([0]),o=Buffer.from(r.oid,"hex");return Buffer.concat([n,i,a,s,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let t of this._entries)yield t}},_i=class{static wrap({type:t,object:r}){return Buffer.concat([Buffer.from(`${t} ${r.byteLength.toString()}\0`),Buffer.from(r)])}static unwrap(t){let r=t.indexOf(32),n=t.indexOf(0),i=t.slice(0,r).toString("utf8"),a=t.slice(r+1,n).toString("utf8"),s=t.length-(n+1);if(parseInt(a)!==s)throw new le(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:i,object:Buffer.from(t.slice(n+1))}}};async function SM({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await e.read(`${t}/${n}`);return i?{object:i,format:"deflated",source:n}:null}function EM(e,t){let r=new Or(e),n=Nw(r);if(n!==t.byteLength)throw new le(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${t.length} bytes`);let i=Nw(r),a,s=Bw(r,t);if(s.byteLength===i)a=s;else{a=Buffer.alloc(i);let o=new Or(a);for(o.copy(s);!r.eof();)o.copy(Bw(r,t));let c=o.tell();if(i!==c)throw new le(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${c} bytes`)}return a}function Nw(e){let t=0,r=0,n=null;do n=e.readUInt8(),t|=(n&127)<<r,r+=7;while(n&128);return t}function jw(e,t,r){let n=0,i=0;for(;r--;)t&1&&(n|=e.readUInt8()<<i),t>>=1,i+=8;return n}function Bw(e,t){let r=e.readUInt8(),n=128,i=15,a=112;if(r&n){let s=jw(e,r&i,4),o=jw(e,(r&a)>>4,3);return o===0&&(o=65536),t.slice(s,s+o)}else return e.slice(r)}function AM(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function s2(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:AM(e)}var ou=class{constructor(t){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=s2(t),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(t){if(!this.eof())return this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t),this.buffer.slice(this.undoCursor,this.cursor)}async skip(t){this.eof()||(this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:t,value:r}=await this.stream.next();return t&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(t){this.undoCursor=this.cursor,this.cursor+=t,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(t){if(this._ended)return;let r=[this.buffer];for(;this.cursor+t>kM(r);){let n=await this._next();if(this._ended)break;r.push(n)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function kM(e){return e.reduce((t,r)=>t+r.length,0)}async function TM(e,t){let r=new ou(e),n=await r.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new le(`Invalid PACK header '${n}'`);let i=await r.read(4);if(i=i.readUInt32BE(0),i!==2)throw new le(`Invalid packfile version: ${i}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let s=r.tell(),{type:o,length:c,ofs:l,reference:u}=await CM(r),f=new hu.default.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new le(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==c)throw new le("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await t({data:f.result,type:o,num:a,offset:s,end:h,reference:u,ofs:l})}}}}async function CM(e){let t=await e.byte(),r=t>>4&7,n=t&15;if(t&128){let s=4;do t=await e.byte(),n|=(t&127)<<s,s+=7;while(t&128)}let i,a;if(r===6){let s=0;i=0;let o=[];do t=await e.byte(),i|=(t&127)<<s,s+=7,o.push(t);while(t&128);a=Buffer.from(o)}return r===7&&(a=await e.read(20)),{type:r,length:n,ofs:i,reference:a}}var ap=!1;async function o2(e){return ap===null&&(ap=RM()),ap?PM(e):hu.default.inflate(e)}async function PM(e){let t=new DecompressionStream("deflate"),r=new Blob([e]).stream().pipeThrough(t);return new Uint8Array(await new Response(r).arrayBuffer())}function RM(){try{if(new DecompressionStream("deflate"))return!0}catch(e){}return!1}function MM(e){let t=[],r=0,n=0;do{r=e.readUInt8();let i=r&127;t.push(i),n=r&128}while(n);return t.reduce((i,a)=>i+1<<7|a,-1)}function OM(e,t){let r=t,n=4,i=null;do i=e.readUInt8(),r|=(i&127)<<n,n+=7;while(i&128);return r}var tl=class e{constructor(t){Object.assign(this,t),this.offsetCache={}}static async fromIdx({idx:t,getExternalRefDelta:r}){let n=new Or(t);if(n.slice(4).toString("hex")!=="ff744f63")return;let a=n.readUInt32BE();if(a!==2)throw new le(`Unable to read version ${a} packfile IDX. (Only version 2 supported)`);if(t.byteLength>2048*1024*1024)throw new le("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);let s=n.readUInt32BE(),o=[];for(let u=0;u<s;u++){let f=n.slice(20).toString("hex");o[u]=f}n.seek(n.tell()+4*s);let c=new Map;for(let u=0;u<s;u++)c.set(o[u],n.readUInt32BE());let l=n.slice(20).toString("hex");return new e({hashes:o,crcs:{},offsets:c,packfileSha:l,getExternalRefDelta:r})}static async fromPack({pack:t,getExternalRefDelta:r,onProgress:n}){let i={1:"commit",2:"tree",3:"blob",4:"tag",6:"ofs-delta",7:"ref-delta"},a={},s=t.slice(-20).toString("hex"),o=[],c={},l=new Map,u=null,f=null;await TM([t],async({data:v,type:y,reference:b,offset:x,num:E})=>{u===null&&(u=E);let _=Math.floor((u-E)*100/u);_!==f&&n&&await n({phase:"Receiving objects",loaded:u-E,total:u}),f=_,y=i[y],["commit","tree","blob","tag"].includes(y)?a[x]={type:y,offset:x}:y==="ofs-delta"?a[x]={type:y,offset:x}:y==="ref-delta"&&(a[x]={type:y,offset:x})});let d=Object.keys(a).map(Number);for(let[v,y]of d.entries()){let b=v+1===d.length?t.byteLength-20:d[v+1],x=a[y],E=Jw.default.buf(t.slice(y,b))>>>0;x.end=b,x.crc=E}let h=new e({pack:Promise.resolve(t),packfileSha:s,crcs:c,hashes:o,offsets:l,getExternalRefDelta:r});f=null;let p=0,m=[0,0,0,0,0,0,0,0,0,0,0,0];for(let v in a){v=Number(v);let y=Math.floor(p*100/u);y!==f&&n&&await n({phase:"Resolving deltas",loaded:p,total:u}),p++,f=y;let b=a[v];if(!b.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:x,object:E}=await h.readSlice({start:v});m[h.readDepth]+=1;let _=await Gn(_i.wrap({type:x,object:E}));b.oid=_,o.push(_),l.set(_,v),c[_]=b.crc}catch(x){continue}}return o.sort(),h}async toBuffer(){let t=[],r=(l,u)=>{t.push(Buffer.from(l,u))};r("ff744f63","hex"),r("00000002","hex");let n=new Or(Buffer.alloc(256*4));for(let l=0;l<256;l++){let u=0;for(let f of this.hashes)parseInt(f.slice(0,2),16)<=l&&u++;n.writeUInt32BE(u)}t.push(n.buffer);for(let l of this.hashes)r(l,"hex");let i=new Or(Buffer.alloc(this.hashes.length*4));for(let l of this.hashes)i.writeUInt32BE(this.crcs[l]);t.push(i.buffer);let a=new Or(Buffer.alloc(this.hashes.length*4));for(let l of this.hashes)a.writeUInt32BE(this.offsets.get(l));t.push(a.buffer),r(this.packfileSha,"hex");let s=Buffer.concat(t),o=await Gn(s),c=Buffer.alloc(20);return c.write(o,"hex"),Buffer.concat([s,c])}async load({pack:t}){this.pack=t}async unload(){this.pack=null}async read({oid:t}){if(!this.offsets.get(t)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(t);throw new le(`Could not read object ${t} from packfile`)}let r=this.offsets.get(t);return this.readSlice({start:r})}async readSlice({start:t}){if(this.offsetCache[t])return Object.assign({},this.offsetCache[t]);this.readDepth++;let r={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new le("Tried to read from a GitPackIndex with no packfile loaded into memory");let n=(await this.pack).slice(t),i=new Or(n),a=i.readUInt8(),s=a&112,o=r[s];if(o===void 0)throw new le("Unrecognized type: 0b"+s.toString(2));let c=a&15,l=c;a&128&&(l=OM(i,c));let f=null,d=null;if(o==="ofs_delta"){let p=MM(i),m=t-p;({object:f,type:o}=await this.readSlice({start:m}))}if(o==="ref_delta"){let p=i.slice(20).toString("hex");({object:f,type:o}=await this.read({oid:p}))}let h=n.slice(i.tell());if(d=Buffer.from(await o2(h)),d.byteLength!==l)throw new le(`Packfile told us object would have length ${l} but it had length ${d.byteLength}`);return f&&(d=Buffer.from(EM(d,f))),this.readDepth>3&&(this.offsetCache[t]={type:o,object:d}),{type:o,format:"content",object:d}}},tu=Symbol("PackfileCache");async function IM({fs:e,filename:t,getExternalRefDelta:r,emitter:n,emitterPrefix:i}){let a=await e.read(t);return tl.fromIdx({idx:a,getExternalRefDelta:r})}function Ap({fs:e,cache:t,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}){t[tu]||(t[tu]=new Map);let s=t[tu].get(r);return s||(s=IM({fs:e,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}),t[tu].set(r,s)),s}async function FM({fs:e,cache:t,gitdir:r,oid:n,format:i="content",getExternalRefDelta:a}){let s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let c=`${r}/objects/pack/${o}`,l=await Ap({fs:e,cache:t,filename:c,getExternalRefDelta:a});if(l.error)throw new le(l.error);if(l.offsets.has(n)){if(!l.pack){let f=c.replace(/idx$/,"pack");l.pack=e.read(f)}let u=await l.read({oid:n,getExternalRefDelta:a});return u.format="content",u.source=`objects/pack/${o.replace(/idx$/,"pack")}`,u}}return null}async function We({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=u=>We({fs:e,cache:t,gitdir:r,oid:u}),s;if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(s={format:"wrapped",object:Buffer.from("tree 0\0")}),s||(s=await SM({fs:e,gitdir:r,oid:n})),!s){if(s=await FM({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a}),!s)throw new Ne(n);return s}if(i==="deflated"||(s.format==="deflated"&&(s.object=Buffer.from(await o2(s.object)),s.format="wrapped"),i==="wrapped"))return s;let o=await Gn(s.object);if(o!==n)throw new le(`SHA check failed! Expected ${n}, computed ${o}`);let{object:c,type:l}=_i.unwrap(s.object);if(s.type=l,s.object=c,s.format="content",i==="content")return s;throw new le(`invalid requested format "${i}"`)}var Jr=class e extends _e{constructor(t,r,n=!0){super(`Failed to create ${t} at ${r} because it already exists.${n?` (Hint: use 'force: true' parameter to overwrite existing ${t}.)`:""}`),this.code=this.name=e.code,this.data={noun:t,where:r,canForce:n}}};Jr.code="AlreadyExistsError";var rl=class e extends _e{constructor(t,r,n){super(`Found multiple ${t} matching "${r}" (${n.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=e.code,this.data={nouns:t,short:r,matches:n}}};rl.code="AmbiguousError";var nl=class e extends _e{constructor(t){super(`Your local changes to the following files would be overwritten by checkout: ${t.join(", ")}`),this.code=this.name=e.code,this.data={filepaths:t}}};nl.code="CheckoutConflictError";var il=class e extends _e{constructor(t,r){super(`Failed to checkout "${t}" because commit ${r} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=e.code,this.data={ref:t,oid:r}}};il.code="CommitNotFetchedError";var al=class e extends _e{constructor(){super("Empty response from git server."),this.code=this.name=e.code,this.data={}}};al.code="EmptyServerResponseError";var sl=class e extends _e{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=e.code,this.data={}}};sl.code="FastForwardError";var ol=class e extends _e{constructor(t,r){super(`One or more branches were not updated: ${t}`),this.code=this.name=e.code,this.data={prettyDetails:t,result:r}}};ol.code="GitPushError";var ds=class e extends _e{constructor(t,r,n){super(`HTTP Error: ${t} ${r}`),this.code=this.name=e.code,this.data={statusCode:t,statusMessage:r,response:n}}};ds.code="HttpError";var xi=class e extends _e{constructor(t){let r="invalid filepath";t==="leading-slash"||t==="trailing-slash"?r='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':t==="directory"&&(r='"filepath" should not be a directory.'),super(r),this.code=this.name=e.code,this.data={reason:t}}};xi.code="InvalidFilepathError";var zn=class e extends _e{constructor(t,r){super(`"${t}" would be an invalid git reference. (Hint: a valid alternative would be "${r}".)`),this.code=this.name=e.code,this.data={ref:t,suggestion:r}}};zn.code="InvalidRefNameError";var ll=class e extends _e{constructor(t){super(`Maximum search depth of ${t} exceeded.`),this.code=this.name=e.code,this.data={depth:t}}};ll.code="MaxDepthError";var hs=class e extends _e{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=e.code,this.data={}}};hs.code="MergeNotSupportedError";var ps=class e extends _e{constructor(t,r,n,i){super(`Automatic merge failed with one or more merge conflicts in the following files: ${t.toString()}. Fix conflicts then commit the result.`),this.code=this.name=e.code,this.data={filepaths:t,bothModified:r,deleteByUs:n,deleteByTheirs:i}}};ps.code="MergeConflictError";var zt=class e extends _e{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=e.code,this.data={role:t}}};zt.code="MissingNameError";var Qt=class e extends _e{constructor(t){super(`The function requires a "${t}" parameter but none was provided.`),this.code=this.name=e.code,this.data={parameter:t}}};Qt.code="MissingParameterError";var cl=class e extends _e{constructor(t){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=e.code,this.data={errors:t},this.errors=t}};cl.code="MultipleGitError";var la=class e extends _e{constructor(t,r){super(`Expected "${t}" but received "${r}".`),this.code=this.name=e.code,this.data={expected:t,actual:r}}};la.code="ParseError";var ms=class e extends _e{constructor(t){let r="";t==="not-fast-forward"?r=" because it was not a simple fast-forward":t==="tag-exists"&&(r=" because tag already exists"),super(`Push rejected${r}. Use "force: true" to override.`),this.code=this.name=e.code,this.data={reason:t}}};ms.code="PushRejectedError";var yi=class e extends _e{constructor(t,r){super(`Remote does not support the "${t}" so the "${r}" parameter cannot be used.`),this.code=this.name=e.code,this.data={capability:t,parameter:r}}};yi.code="RemoteCapabilityError";var ul=class e extends _e{constructor(t,r){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${t}`),this.code=this.name=e.code,this.data={preview:t,response:r}}};ul.code="SmartHttpError";var fl=class e extends _e{constructor(t,r,n){super(`Git remote "${t}" uses an unrecognized transport protocol: "${r}"`),this.code=this.name=e.code,this.data={url:t,transport:r,suggestion:n}}};fl.code="UnknownTransportError";var dl=class e extends _e{constructor(t){super(`Cannot parse remote URL: "${t}"`),this.code=this.name=e.code,this.data={url:t}}};dl.code="UrlParseError";var gs=class e extends _e{constructor(){super("The operation was canceled."),this.code=this.name=e.code,this.data={}}};gs.code="UserCanceledError";var hl=class e extends _e{constructor(t){super(`Could not merge index: Entry for '${t}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=e.code,this.data={filepath:t}}};hl.code="IndexResetError";var pl=class e extends _e{constructor(t){super(`"${t}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=e.code,this.data={ref:t}}};pl.code="NoCommitError";var gl=Object.freeze({__proto__:null,AlreadyExistsError:Jr,AmbiguousError:rl,CheckoutConflictError:nl,CommitNotFetchedError:il,EmptyServerResponseError:al,FastForwardError:sl,GitPushError:ol,HttpError:ds,InternalError:le,InvalidFilepathError:xi,InvalidOidError:bi,InvalidRefNameError:zn,MaxDepthError:ll,MergeNotSupportedError:hs,MergeConflictError:ps,MissingNameError:zt,MissingParameterError:Qt,MultipleGitError:cl,NoRefspecError:el,NotFoundError:Ne,ObjectTypeError:Gt,ParseError:la,PushRejectedError:ms,RemoteCapabilityError:yi,SmartHttpError:ul,UnknownTransportError:fl,UnsafeFilepathError:cs,UrlParseError:dl,UserCanceledError:gs,UnmergedPathsError:Qo,IndexResetError:hl,NoCommitError:pl});function vp({name:e,email:t,timestamp:r,timezoneOffset:n}){return n=$M(n),`${e} <${t}> ${r} ${n}`}function $M(e){let t=LM(DM(e));e=Math.abs(e);let r=Math.floor(e/60);e-=r*60;let n=String(r),i=String(e);return n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),(t===-1?"-":"+")+n+i}function LM(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function DM(e){return e===0?e:-e}function Un(e){return e=e.replace(/\r/g,""),e=e.replace(/^\n+/,""),e=e.replace(/\n+$/,"")+`
`,e}function lu(e){let[,t,r,n,i]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:t,email:r,timestamp:Number(n),timezoneOffset:NM(i)}}function NM(e){let[,t,r,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(t==="+"?1:-1)*(Number(r)*60+Number(n)),jM(n)}function jM(e){return e===0?e:-e}var hr=class e{constructor(t){if(typeof t=="string")this._tag=t;else if(Buffer.isBuffer(t))this._tag=t.toString("utf8");else if(typeof t=="object")this._tag=e.render(t);else throw new le("invalid type passed to GitAnnotatedTag constructor")}static from(t){return new e(t)}static render(t){return`object ${t.object}
type ${t.type}
tag ${t.tag}
tagger ${vp(t.tagger)}
${t.message}
${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
`))}message(){let t=this.withoutSignature();return t.slice(t.indexOf(`
`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let t=this.justHeaders().split(`
`),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=`
`+i.slice(1):r.push(i);let n={};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.tagger&&(n.tagger=lu(n.tagger)),n.committer&&(n.committer=lu(n.committer)),n}withoutSignature(){let t=Un(this._tag);return t.indexOf(`
-----BEGIN PGP SIGNATURE-----`)===-1?t:t.slice(0,t.lastIndexOf(`
-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
-----BEGIN PGP SIGNATURE-----`)===-1)return;let t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return Un(t)}payload(){return this.withoutSignature()+`
`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(t,r,n){let i=t.payload(),{signature:a}=await r({payload:i,secretKey:n});a=Un(a);let s=i+a;return e.from(s)}};function sp(e){return e.trim().split(`
`).map(t=>" "+t).join(`
`)+`
`}function BM(e){return e.split(`
`).map(t=>t.replace(/^ /,"")).join(`
`)}var tr=class e{constructor(t){if(typeof t=="string")this._commit=t;else if(Buffer.isBuffer(t))this._commit=t.toString("utf8");else if(typeof t=="object")this._commit=e.render(t);else throw new le("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:t,signature:r}){let n=e.justHeaders(t),i=e.justMessage(t),a=Un(n+`
gpgsig`+sp(r)+`
`+i);return new e(a)}static from(t){return new e(t)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return e.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return Un(t.slice(t.indexOf(`
`)+2))}static justHeaders(t){return t.slice(0,t.indexOf(`
`))}parseHeaders(){let t=e.justHeaders(this._commit).split(`
`),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=`
`+i.slice(1):r.push(i);let n={parent:[]};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.author&&(n.author=lu(n.author)),n.committer&&(n.committer=lu(n.committer)),n}static renderHeaders(t){let r="";if(t.tree?r+=`tree ${t.tree}
`:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
`,t.parent){if(t.parent.length===void 0)throw new le("commit 'parent' property should be an array");for(let a of t.parent)r+=`parent ${a}
`}let n=t.author;r+=`author ${vp(n)}
`;let i=t.committer||t.author;return r+=`committer ${vp(i)}
`,t.gpgsig&&(r+="gpgsig"+sp(t.gpgsig)),r}static render(t){return e.renderHeaders(t)+`
`+Un(t.message)}render(){return this._commit}withoutSignature(){let t=Un(this._commit);if(t.indexOf(`
gpgsig`)===-1)return t;let r=t.slice(0,t.indexOf(`
gpgsig`)),n=t.slice(t.indexOf(`-----END PGP SIGNATURE-----
`)+28);return Un(r+`
`+n)}isolateSignature(){let t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return BM(t)}static async sign(t,r,n){let i=t.withoutSignature(),a=e.justMessage(t._commit),{signature:s}=await r({payload:i,secretKey:n});s=Un(s);let c=e.justHeaders(t._commit)+`
gpgsig`+sp(s)+`
`+a;return e.from(c)}};async function vs({fs:e,cache:t,gitdir:r,oid:n}){if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:er.from([]),oid:n};let{type:i,object:a}=await We({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=hr.from(a).parse().object,vs({fs:e,cache:t,gitdir:r,oid:n});if(i==="commit")return n=tr.from(a).parse().tree,vs({fs:e,cache:t,gitdir:r,oid:n});if(i!=="tree")throw new Gt(n,i,"tree");return{tree:er.from(a),oid:n}}var yp=class{constructor({fs:t,gitdir:r,ref:n,cache:i}){this.fs=t,this.cache=i,this.gitdir=r,this.mapPromise=(async()=>{let s=new Map,o;try{o=await q.resolve({fs:t,gitdir:r,ref:n})}catch(l){l instanceof Ne&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let c=await vs({fs:t,cache:this.cache,gitdir:r,oid:o});return c.type="tree",c.mode="40000",s.set(".",c),s})();let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,cache:i,gitdir:a}=this,s=await this.mapPromise,o=s.get(r);if(!o)throw new Error(`No obj for ${r}`);let c=o.oid;if(!c)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:l,object:u}=await We({fs:n,cache:i,gitdir:a,oid:c});if(l!==o.type)throw new Gt(c,l,o.type);let f=er.from(u);for(let d of f)s.set($(r,d.path),d);return f.entries().map(d=>$(r,d.path))}async type(t){if(t._type===!1){let r=await this.mapPromise,{type:n}=r.get(t._fullpath);t._type=n}return t._type}async mode(t){if(t._mode===!1){let r=await this.mapPromise,{mode:n}=r.get(t._fullpath);t._mode=r2(parseInt(n,8))}return t._mode}async stat(t){}async content(t){if(t._content===!1){let r=await this.mapPromise,{fs:n,cache:i,gitdir:a}=this,o=r.get(t._fullpath).oid,{type:c,object:l}=await We({fs:n,cache:i,gitdir:a,oid:o});c!=="blob"?t._content=void 0:t._content=new Uint8Array(l)}return t._content}async oid(t){if(t._oid===!1){let n=(await this.mapPromise).get(t._fullpath);t._oid=n.oid}return t._oid}};function wi({ref:e="HEAD"}={}){let t=Object.create(null);return Object.defineProperty(t,mu,{value:function({fs:r,gitdir:n,cache:i}){return new yp({fs:r,gitdir:n,ref:e,cache:i})}}),Object.freeze(t),t}var wp=class{constructor({fs:t,dir:r,gitdir:n,cache:i}){this.fs=t,this.cache=i,this.dir=r,this.gitdir=n;let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,dir:i}=this,a=await n.readdir($(i,r));return a===null?null:a.map(s=>$(r,s))}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let{fs:r,dir:n}=this,i=await r.lstat(`${n}/${t._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let a=i.isDirectory()?"tree":"blob";a==="blob"&&!i.isFile()&&!i.isSymbolicLink()&&(a="special"),t._type=a,i=us(i),t._mode=i.mode,i.size===-1&&t._actualSize&&(i.size=t._actualSize),t._stat=i}return t._stat}async content(t){if(t._content===!1){let{fs:r,dir:n,gitdir:i}=this;if(await t.type()==="tree")t._content=void 0;else{let s=await(await Ve.get({fs:r,gitdir:i})).get("core.autocrlf"),o=await r.read(`${n}/${t._fullpath}`,{autocrlf:s});t._actualSize=o.length,t._stat&&t._stat.size===-1&&(t._stat.size=t._actualSize),t._content=new Uint8Array(o)}}return t._content}async oid(t){if(t._oid===!1){let{fs:r,gitdir:n,cache:i}=this,a;await mt.acquire({fs:r,gitdir:n,cache:i},async function(s){let o=s.entriesMap.get(t._fullpath),c=await t.stat(),u=await(await Ve.get({fs:r,gitdir:n})).get("core.filemode"),f=typeof process!="undefined"?process.platform!=="win32":!0;!o||nu(c,o,u,f)?await t.content()===void 0?a=void 0:(a=await Gn(_i.wrap({type:"blob",object:await t.content()})),o&&a===o.oid&&(!u||c.mode===o.mode)&&nu(c,o,u,f)&&s.insert({filepath:t._fullpath,stats:c,oid:a})):a=o.oid}),t._oid=a}return t._oid}};function vu(){let e=Object.create(null);return Object.defineProperty(e,mu,{value:function({fs:t,dir:r,gitdir:n,cache:i}){return new wp({fs:t,dir:r,gitdir:n,cache:i})}}),Object.freeze(e),e}function HM(e,t){let r=t-e;return Array.from({length:r},(n,i)=>e+i)}var l2=typeof Array.prototype.flat=="undefined"?e=>e.reduce((t,r)=>t.concat(r),[]):e=>e.flat(),bp=class{constructor(){this.value=null}consider(t){t!=null&&(this.value===null?this.value=t:t<this.value&&(this.value=t))}reset(){this.value=null}};function*UM(e){let t=new bp,r,n=[],i=e.length;for(let a=0;a<i;a++)n[a]=e[a].next().value,n[a]!==void 0&&t.consider(n[a]);if(t.value!==null)for(;;){let a=[];r=t.value,t.reset();for(let s=0;s<i;s++)n[s]!==void 0&&n[s]===r?(a[s]=n[s],n[s]=e[s].next().value):a[s]=null,n[s]!==void 0&&t.consider(n[s]);if(yield a,t.value===null)return}}async function ys({fs:e,cache:t,dir:r,gitdir:n,trees:i,map:a=async(c,l)=>l,reduce:s=async(c,l)=>{let u=l2(l);return c!==void 0&&u.unshift(c),u},iterate:o=(c,l)=>Promise.all([...l].map(c))}){let c=i.map(h=>h[mu]({fs:e,dir:r,gitdir:n,cache:t})),l=new Array(c.length).fill("."),u=HM(0,c.length),f=async h=>{u.map(v=>{h[v]=h[v]&&new c[v].ConstructEntry(h[v])});let m=(await Promise.all(u.map(v=>h[v]?c[v].readdir(h[v]):[]))).map(v=>v===null?[]:v).map(v=>v[Symbol.iterator]());return{entries:h,children:UM(m)}},d=async h=>{let{entries:p,children:m}=await f(h),v=p.find(b=>b&&b._fullpath)._fullpath,y=await a(v,p);if(y!==null){let b=await o(d,m);return b=b.filter(x=>x!==void 0),s(y,b)}};return d(l)}async function _p(e,t){let r=await e.readdir(t);r==null?await e.rm(t):r.length?await Promise.all(r.map(n=>{let i=$(t,n);return e.lstat(i).then(a=>{if(a)return a.isDirectory()?_p(e,i):e.rm(i)})})).then(()=>e.rmdir(t)):await e.rmdir(t)}function GM(e){return zM(e)&&Hw(e.then)&&Hw(e.catch)}function zM(e){return e&&typeof e=="object"}function Hw(e){return typeof e=="function"}function Uw(e){return GM((r=>{try{return r.readFile().catch(n=>n)}catch(n){return n}})(e))}var Gw=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function zw(e,t){if(Uw(t))for(let r of Gw)e[`_${r}`]=t[r].bind(t);else for(let r of Gw)e[`_${r}`]=(0,ru.default)(t[r].bind(t));Uw(t)?t.rm?e._rm=t.rm.bind(t):t.rmdir.length>1?e._rm=t.rmdir.bind(t):e._rm=_p.bind(null,e):t.rm?e._rm=(0,ru.default)(t.rm.bind(t)):t.rmdir.length>2?e._rm=(0,ru.default)(t.rmdir.bind(t)):e._rm=_p.bind(null,e)}var X=class{constructor(t){if(typeof t._original_unwrapped_fs!="undefined")return t;let r=Object.getOwnPropertyDescriptor(t,"promises");r&&r.enumerable?zw(this,t.promises):zw(this,t),this._original_unwrapped_fs=t}async exists(t,r={}){try{return await this._stat(t),!0}catch(n){if(n.code==="ENOENT"||n.code==="ENOTDIR")return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',n),n}}async read(t,r={}){try{let n=await this._readFile(t,r);if(r.autocrlf==="true")try{n=new TextDecoder("utf8",{fatal:!0}).decode(n),n=n.replace(/\r\n/g,`
`),n=new TextEncoder().encode(n)}catch(i){}return typeof n!="string"&&(n=Buffer.from(n)),n}catch(n){return null}}async write(t,r,n={}){try{await this._writeFile(t,r,n);return}catch(i){await this.mkdir(fs(t)),await this._writeFile(t,r,n)}}async mkdir(t,r=!1){try{await this._mkdir(t);return}catch(n){if(n===null||n.code==="EEXIST")return;if(r)throw n;if(n.code==="ENOENT"){let i=fs(t);if(i==="."||i==="/"||i===t)throw n;await this.mkdir(i),await this.mkdir(t,!0)}}}async rm(t){try{await this._unlink(t)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(t,r){try{r&&r.recursive?await this._rm(t,r):await this._rmdir(t)}catch(n){if(n.code!=="ENOENT")throw n}}async readdir(t){try{let r=await this._readdir(t);return r.sort(pu),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(t){let r=await this._readdir(t);return(await Promise.all(r.map(async i=>{let a=t+"/"+i;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((i,a)=>i.concat(a),[])}async lstat(t){try{return await this._lstat(t)}catch(r){if(r.code==="ENOENT")return null;throw r}}async readlink(t,r={encoding:"buffer"}){try{let n=await this._readlink(t,r);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(n){if(n.code==="ENOENT")return null;throw n}}async writelink(t,r){return this._symlink(r.toString("utf8"),t)}};function C(e,t){if(t===void 0)throw new Qt(e)}async function cu(e,t){return!e&&!t?!1:e&&!t||!e&&t?!0:!(await e.type()==="tree"&&await t.type()==="tree"||await e.type()===await t.type()&&await e.mode()===await t.mode()&&await e.oid()===await t.oid())}async function VM({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n="HEAD",cache:i={}}){try{C("fs",e),C("dir",t),C("gitdir",r);let a=new X(e),s=[wi({ref:n}),vu(),gu()],o=[];await mt.acquire({fs:a,gitdir:r,cache:i},async function(l){o=l.unmergedPaths});let c=await ys({fs:a,cache:i,dir:t,gitdir:r,trees:s,map:async function(l,[u,f,d]){let h=!await cu(f,d),p=o.includes(l),m=!await cu(d,u);if(h||p)return u?{path:l,mode:await u.mode(),oid:await u.oid(),type:await u.type(),content:await u.content()}:void 0;if(m)return!1;throw new hl(l)}});await mt.acquire({fs:a,gitdir:r,cache:i},async function(l){for(let u of c)if(u!==!1){if(!u){await a.rmdir(`${t}/${u.path}`,{recursive:!0}),l.delete({filepath:u.path});continue}if(u.type==="blob"){let f=new TextDecoder().decode(u.content);await a.write(`${t}/${u.path}`,f,{mode:u.mode}),l.insert({filepath:u.path,oid:u.oid,stage:0})}}})}catch(a){throw a.caller="git.abortMerge",a}}var ws=class{static async isIgnored({fs:t,dir:r,gitdir:n=$(r,".git"),filepath:i}){if(iu(i)===".git")return!0;if(i===".")return!1;let a="",s=$(n,"info","exclude");await t.exists(s)&&(a=await t.read(s,"utf8"));let o=[{gitignore:$(r,".gitignore"),filepath:i}],c=i.split("/").filter(Boolean);for(let u=1;u<c.length;u++){let f=c.slice(0,u).join("/"),d=c.slice(u).join("/");o.push({gitignore:$(r,f,".gitignore"),filepath:d})}let l=!1;for(let u of o){let f;try{f=await t.read(u.gitignore,"utf8")}catch(p){if(p.code==="NOENT")continue}let d=(0,Qw.default)().add(a);d.add(f);let h=fs(u.filepath);if(h!=="."&&d.ignores(h))return!0;l?l=!d.test(u.filepath).unignored:l=d.test(u.filepath).ignored}return l}};async function WM({fs:e,gitdir:t,object:r,format:n,oid:i}){if(n!=="deflated")throw new le("GitObjectStoreLoose expects objects to write to be in deflated format");let a=`objects/${i.slice(0,2)}/${i.slice(2)}`,s=`${t}/${a}`;await e.exists(s)||await e.write(s,r)}var op=null;async function c2(e){return op===null&&(op=YM()),op?qM(e):hu.default.deflate(e)}async function qM(e){let t=new CompressionStream("deflate"),r=new Blob([e]).stream().pipeThrough(t);return new Uint8Array(await new Response(r).arrayBuffer())}function YM(){try{return new CompressionStream("deflate").writable.close(),new Blob([]).stream().cancel(),!0}catch(e){return!1}}async function pr({fs:e,gitdir:t,type:r,object:n,format:i="content",oid:a=void 0,dryRun:s=!1}){return i!=="deflated"&&(i!=="wrapped"&&(n=_i.wrap({type:r,object:n})),a=await Gn(n),n=Buffer.from(await c2(n))),s||await WM({fs:e,gitdir:t,object:n,format:"deflated",oid:a}),a}function XM(e){let t;for(;~(t=e.indexOf(92));)e[t]=47;return e}async function ZM({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={},force:a=!1,parallel:s=!0}){try{C("fs",e),C("dir",t),C("gitdir",r),C("filepath",n);let o=new X(e);await mt.acquire({fs:o,gitdir:r,cache:i},async c=>xp({dir:t,gitdir:r,fs:o,filepath:n,index:c,force:a,parallel:s}))}catch(o){throw o.caller="git.add",o}}async function xp({dir:e,gitdir:t,fs:r,filepath:n,index:i,force:a,parallel:s}){n=Array.isArray(n)?n:[n];let o=n.map(async f=>{if(!a&&await ws.isIgnored({fs:r,dir:e,gitdir:t,filepath:f}))return;let d=await r.lstat($(e,f));if(!d)throw new Ne(f);if(d.isDirectory()){let h=await r.readdir($(e,f));if(s){let p=h.map(m=>xp({dir:e,gitdir:t,fs:r,filepath:[$(f,m)],index:i,force:a,parallel:s}));await Promise.all(p)}else for(let p of h)await xp({dir:e,gitdir:t,fs:r,filepath:[$(f,p)],index:i,force:a,parallel:s})}else{let p=await(await Ve.get({fs:r,gitdir:t})).get("core.autocrlf"),m=d.isSymbolicLink()?await r.readlink($(e,f)).then(XM):await r.read($(e,f),{autocrlf:p});if(m===null)throw new Ne(f);let v=await pr({fs:r,gitdir:t,type:"blob",object:m});i.insert({filepath:f,stats:d,oid:v})}}),c=await Promise.allSettled(o),l=c.filter(f=>f.status==="rejected").map(f=>f.reason);if(l.length>1)throw new cl(l);if(l.length===1)throw l[0];return c.filter(f=>f.status==="fulfilled"&&f.value).map(f=>f.value)}async function ml({fs:e,gitdir:t,path:r}){return(await Ve.get({fs:e,gitdir:t})).get(r)}function u2(e,...t){for(let r of t)if(r)for(let n of Object.keys(r)){let i=r[n];i!==void 0&&(e[n]=i)}return e}async function ca({fs:e,gitdir:t,author:r,commit:n}){let i=Math.floor(Date.now()/1e3),a={name:await ml({fs:e,gitdir:t,path:"user.name"}),email:await ml({fs:e,gitdir:t,path:"user.email"})||"",timestamp:i,timezoneOffset:new Date(i*1e3).getTimezoneOffset()},s=u2({},a,n?n.author:void 0,r);if(s.name!==void 0)return s}async function bs({fs:e,gitdir:t,author:r,committer:n,commit:i}){let a=Math.floor(Date.now()/1e3),s={name:await ml({fs:e,gitdir:t,path:"user.name"}),email:await ml({fs:e,gitdir:t,path:"user.email"})||"",timestamp:a,timezoneOffset:new Date(a*1e3).getTimezoneOffset()},o=u2({},s,i?i.committer:void 0,r,n);if(o.name!==void 0)return o}async function f2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await We({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=hr.from(a).parse().object,f2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="commit")throw new Gt(n,i,"commit");return{commit:tr.from(a),oid:n}}async function uu({fs:e,cache:t,gitdir:r,oid:n}){let{commit:i,oid:a}=await f2({fs:e,cache:t,gitdir:r,oid:n});return{oid:a,commit:i.parse(),payload:i.withoutSignature()}}async function yu({fs:e,cache:t,onSign:r,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:c=!1,dryRun:l=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h}){let p=!1;f||(f=await q.resolve({fs:e,gitdir:n,ref:"HEAD",depth:2}));let m,v;try{m=await q.resolve({fs:e,gitdir:n,ref:f}),v=await uu({fs:e,gitdir:n,oid:m,cache:{}})}catch(x){p=!0}if(c&&p)throw new pl(f);let y=c?await ca({fs:e,gitdir:n,author:a,commit:v.commit}):await ca({fs:e,gitdir:n,author:a});if(!y)throw new zt("author");let b=c?await bs({fs:e,gitdir:n,author:y,committer:s,commit:v.commit}):await bs({fs:e,gitdir:n,author:y,committer:s});if(!b)throw new zt("committer");return mt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async function(x){let _=i2(x.entries).get(".");if(h||(h=await d2({fs:e,gitdir:n,inode:_,dryRun:l})),d?d=await Promise.all(d.map(A=>q.resolve({fs:e,gitdir:n,ref:A}))):c?d=v.commit.parent:d=m?[m]:[],!i)if(c)i=v.commit.message;else throw new Qt("message");let k=tr.from({tree:h,parent:d,author:y,committer:b,message:i});o&&(k=await tr.sign(k,r,o));let w=await pr({fs:e,gitdir:n,type:"commit",object:k.toObject(),dryRun:l});return!u&&!l&&await q.writeRef({fs:e,gitdir:n,ref:f,value:w}),w})}async function d2({fs:e,gitdir:t,inode:r,dryRun:n}){let i=r.children;for(let c of i)c.type==="tree"&&(c.metadata.mode="040000",c.metadata.oid=await d2({fs:e,gitdir:t,inode:c,dryRun:n}));let a=i.map(c=>({mode:c.metadata.mode,path:c.basename,oid:c.metadata.oid,type:c.type})),s=er.from(a);return await pr({fs:e,gitdir:t,type:"tree",object:s.toObject(),dryRun:n})}async function vl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}){if(i.startsWith("/"))throw new xi("leading-slash");if(i.endsWith("/"))throw new xi("trailing-slash");let a=n,s=await vs({fs:e,cache:t,gitdir:r,oid:n}),o=s.tree;if(i==="")n=s.oid;else{let c=i.split("/");n=await h2({fs:e,cache:t,gitdir:r,tree:o,pathArray:c,oid:a,filepath:i})}return n}async function h2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s}){let o=i.shift();for(let c of n)if(c.path===o){if(i.length===0)return c.oid;{let{type:l,object:u}=await We({fs:e,cache:t,gitdir:r,oid:c.oid});if(l!=="tree")throw new Gt(a,l,"tree",s);return n=er.from(u),h2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s})}}throw new Ne(`file or directory found at "${a}:${s}"`)}async function Ss({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){i!==void 0&&(n=await vl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}));let{tree:a,oid:s}=await vs({fs:e,cache:t,gitdir:r,oid:n});return{oid:s,tree:a.entries()}}async function kp({fs:e,gitdir:t,tree:r}){let n=er.from(r).toObject();return await pr({fs:e,gitdir:t,type:"tree",object:n,format:"content"})}async function KM({fs:e,cache:t,onSign:r,gitdir:n,ref:i,oid:a,note:s,force:o,author:c,committer:l,signingKey:u}){let f;try{f=await q.resolve({gitdir:n,fs:e,ref:i})}catch(y){if(!(y instanceof Ne))throw y}let h=(await Ss({fs:e,cache:t,gitdir:n,oid:f||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(o)h=h.filter(y=>y.path!==a);else for(let y of h)if(y.path===a)throw new Jr("note",a);typeof s=="string"&&(s=Buffer.from(s,"utf8"));let p=await pr({fs:e,gitdir:n,type:"blob",object:s,format:"content"});h.push({mode:"100644",path:a,oid:p,type:"blob"});let m=await kp({fs:e,gitdir:n,tree:h});return await yu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:m,parent:f&&[f],message:`Note added by 'isomorphic-git addNote'
`,author:c,committer:l,signingKey:u})}async function JM({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,note:s,force:o,author:c,committer:l,signingKey:u,cache:f={}}){try{C("fs",e),C("gitdir",n),C("oid",a),C("note",s),u&&C("onSign",t);let d=new X(e),h=await ca({fs:d,gitdir:n,author:c});if(!h)throw new zt("author");let p=await bs({fs:d,gitdir:n,author:h,committer:l});if(!p)throw new zt("committer");return await KM({fs:new X(d),cache:f,onSign:t,gitdir:n,ref:i,oid:a,note:s,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}async function p2({fs:e,gitdir:t,remote:r,url:n,force:i}){if(r!==Kr.default.clean(r))throw new zn(r,Kr.default.clean(r));let a=await Ve.get({fs:e,gitdir:t});if(!i&&(await a.getSubsections("remote")).includes(r)&&n!==await a.get(`remote.${r}.url`))throw new Jr("remote",r);await a.set(`remote.${r}.url`,n),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await Ve.save({fs:e,gitdir:t,config:a})}async function QM({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n,url:i,force:a=!1}){try{return C("fs",e),C("gitdir",r),C("remote",n),C("url",i),await p2({fs:new X(e),gitdir:r,remote:n,url:i,force:a})}catch(s){throw s.caller="git.addRemote",s}}async function eO({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tagger:a,message:s=i,gpgsig:o,object:c,signingKey:l,force:u=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!u&&await q.exists({fs:e,gitdir:n,ref:i}))throw new Jr("tag",i);let f=await q.resolve({fs:e,gitdir:n,ref:c||"HEAD"}),{type:d}=await We({fs:e,cache:t,gitdir:n,oid:f}),h=hr.from({object:f,type:d,tag:i.replace("refs/tags/",""),tagger:a,message:s,gpgsig:o});l&&(h=await hr.sign(h,r,l));let p=await pr({fs:e,gitdir:n,type:"tag",object:h.toObject()});await q.writeRef({fs:e,gitdir:n,ref:i,value:p})}async function tO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i,tagger:a,message:s=i,gpgsig:o,object:c,signingKey:l,force:u=!1,cache:f={}}){try{C("fs",e),C("gitdir",n),C("ref",i),l&&C("onSign",t);let d=new X(e),h=await ca({fs:d,gitdir:n,author:a});if(!h)throw new zt("tagger");return await eO({fs:d,cache:f,onSign:t,gitdir:n,ref:i,tagger:h,message:s,gpgsig:o,object:c,signingKey:l,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function rO({fs:e,gitdir:t,ref:r,object:n,checkout:i=!1,force:a=!1}){if(r!==Kr.default.clean(r))throw new zn(r,Kr.default.clean(r));let s=`refs/heads/${r}`;if(!a&&await q.exists({fs:e,gitdir:t,ref:s}))throw new Jr("branch",r,!1);let o;try{o=await q.resolve({fs:e,gitdir:t,ref:n||"HEAD"})}catch(c){}o&&await q.writeRef({fs:e,gitdir:t,ref:s,value:o}),i&&await q.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function nO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,checkout:a=!1,force:s=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),await rO({fs:new X(e),gitdir:r,ref:n,object:i,checkout:a,force:s})}catch(o){throw o.caller="git.branch",o}}var m2=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);async function Tp({fs:e,cache:t,onProgress:r,onPostCheckout:n,dir:i,gitdir:a,remote:s,ref:o,filepaths:c,noCheckout:l,noUpdateHead:u,dryRun:f,force:d,track:h=!0}){let p;if(n)try{p=await q.resolve({fs:e,gitdir:a,ref:"HEAD"})}catch(v){p="0000000000000000000000000000000000000000"}let m;try{m=await q.resolve({fs:e,gitdir:a,ref:o})}catch(v){if(o==="HEAD")throw v;let y=`${s}/${o}`;if(m=await q.resolve({fs:e,gitdir:a,ref:y}),h){let b=await Ve.get({fs:e,gitdir:a});await b.set(`branch.${o}.remote`,s),await b.set(`branch.${o}.merge`,`refs/heads/${o}`),await Ve.save({fs:e,gitdir:a,config:b})}await q.writeRef({fs:e,gitdir:a,ref:`refs/heads/${o}`,value:m})}if(!l){let v;try{v=await iO({fs:e,cache:t,onProgress:r,dir:i,gitdir:a,ref:o,force:d,filepaths:c})}catch(_){throw _ instanceof Ne&&_.data.what===m?new il(o,m):_}let y=v.filter(([_])=>_==="conflict").map(([_,k])=>k);if(y.length>0)throw new nl(y);let b=v.filter(([_])=>_==="error").map(([_,k])=>k);if(b.length>0)throw new le(b.join(", "));if(f){n&&await n({previousHead:p,newHead:m,type:c!=null&&c.length>0?"file":"branch"});return}let x=0,E=v.length;await mt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="delete"||k==="delete-index").map(async function([k,w]){let A=`${i}/${w}`;k==="delete"&&await e.rm(A),_.delete({filepath:w}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}))}),await mt.acquire({fs:e,gitdir:a,cache:t},async function(_){for(let[k,w]of v)if(k==="rmdir"||k==="rmdir-index"){let A=`${i}/${w}`;try{k==="rmdir-index"&&_.delete({filepath:w}),await e.rmdir(A),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(S){if(S.code==="ENOTEMPTY")console.log(`Did not delete ${w} because directory is not empty`);else throw S}}}),await Promise.all(v.filter(([_])=>_==="mkdir"||_==="mkdir-index").map(async function([_,k]){let w=`${i}/${k}`;await e.mkdir(w),r&&await r({phase:"Updating workdir",loaded:++x,total:E})})),await mt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="create"||k==="create-index"||k==="update"||k==="mkdir-index").map(async function([k,w,A,S,T]){let P=`${i}/${w}`;try{if(k!=="create-index"&&k!=="mkdir-index"){let{object:j}=await We({fs:e,cache:t,gitdir:a,oid:A});if(T&&await e.rm(P),S===33188)await e.write(P,j);else if(S===33261)await e.write(P,j,{mode:511});else if(S===40960)await e.writelink(P,j);else throw new le(`Invalid mode 0o${S.toString(8)} detected in blob ${A}`)}let O=await e.lstat(P);S===33261&&(O.mode=493),k==="mkdir-index"&&(O.mode=57344),_.insert({filepath:w,stats:O,oid:A}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(O){console.log(O)}}))}),n&&await n({previousHead:p,newHead:m,type:c!=null&&c.length>0?"file":"branch"})}if(!u){let v=await q.expand({fs:e,gitdir:a,ref:o});v.startsWith("refs/heads")?await q.writeSymbolicRef({fs:e,gitdir:a,ref:"HEAD",value:v}):await q.writeRef({fs:e,gitdir:a,ref:"HEAD",value:m})}}async function iO({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,ref:a,force:s,filepaths:o}){let c=0;return ys({fs:e,cache:t,dir:n,gitdir:i,trees:[wi({ref:a}),vu(),gu()],map:async function(l,[u,f,d]){if(l===".")return;if(o&&!o.some(p=>m2(l,p)))return null;switch(r&&await r({phase:"Analyzing workdir",loaded:++c}),[!!d,!!u,!!f].map(Number).join("")){case"000":return;case"001":return s&&o&&o.includes(l)?["delete",l]:void 0;case"010":switch(await u.type()){case"tree":return["mkdir",l];case"blob":return["create",l,await u.oid(),await u.mode()];case"commit":return["mkdir-index",l,await u.oid(),await u.mode()];default:return["error",`new entry Unhandled type ${await u.type()}`]}case"011":switch(`${await u.type()}-${await f.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",l];case"blob-blob":return await u.oid()!==await f.oid()?s?["update",l,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",l]:await u.mode()!==await f.mode()?s?["update",l,await u.oid(),await u.mode(),!0]:["conflict",l]:["create-index",l,await u.oid(),await u.mode()];case"commit-tree":return;case"commit-blob":return["conflict",l];default:return["error",`new entry Unhandled type ${u.type}`]}case"100":return["delete-index",l];case"101":switch(await d.type()){case"tree":return["rmdir",l];case"blob":return await d.oid()!==await f.oid()?s?["delete",l]:["conflict",l]:["delete",l];case"commit":return["rmdir-index",l];default:return["error",`delete entry Unhandled type ${await d.type()}`]}case"110":case"111":switch(`${await d.type()}-${await u.type()}`){case"tree-tree":return;case"blob-blob":{if(await d.oid()===await u.oid()&&await d.mode()===await u.mode()&&!s)return;if(f){if(await f.oid()!==await d.oid()&&await f.oid()!==await u.oid())return s?["update",l,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",l]}else if(s)return["update",l,await u.oid(),await u.mode(),await u.mode()!==await d.mode()];return await u.mode()!==await d.mode()?["update",l,await u.oid(),await u.mode(),!0]:await u.oid()!==await d.oid()?["update",l,await u.oid(),await u.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",l,await u.oid()];case"blob-tree":return["update-blob-to-tree",l];case"commit-commit":return["mkdir-index",l,await u.oid(),await u.mode()];default:return["error",`update entry Unhandled type ${await d.type()}-${await u.type()}`]}}},reduce:async function(l,u){return u=l2(u),l?l&&l[0]==="rmdir"?(u.push(l),u):(u.unshift(l),u):u}})}async function aO({fs:e,onProgress:t,onPostCheckout:r,dir:n,gitdir:i=$(n,".git"),remote:a="origin",ref:s,filepaths:o,noCheckout:c=!1,noUpdateHead:l=s===void 0,dryRun:u=!1,force:f=!1,track:d=!0,cache:h={}}){try{C("fs",e),C("dir",n),C("gitdir",i);let p=s||"HEAD";return await Tp({fs:new X(e),cache:h,onProgress:t,onPostCheckout:r,dir:n,gitdir:i,remote:a,ref:p,filepaths:o,noCheckout:c,noUpdateHead:l,dryRun:u,force:f,track:d})}catch(p){throw p.caller="git.checkout",p}}var sO=new RegExp("^refs/(heads/|tags/|remotes/)?(.*)");function oa(e){let t=sO.exec(e);return t?t[1]==="remotes/"&&e.endsWith("/HEAD")?t[2].slice(0,-5):t[2]:e}async function fa({fs:e,gitdir:t,fullname:r=!1,test:n=!1}){let i=await q.resolve({fs:e,gitdir:t,ref:"HEAD",depth:2});if(n)try{await q.resolve({fs:e,gitdir:t,ref:i})}catch(a){return}if(i.startsWith("refs/"))return r?i:oa(i)}function oO(e){return e=e.replace(/^git@([^:]+):/,"https://$1/"),e=e.replace(/^ssh:\/\//,"https://"),e}function g2({username:e="",password:t=""}){return`Basic ${Buffer.from(`${e}:${t}`).toString("base64")}`}async function yl(e,t){let r=s2(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function fu(e){let t=0,r=[];await yl(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}function Vw(e){let t=e.match(/^https?:\/\/([^/]+)@/);if(t==null)return{url:e,auth:{}};t=t[1];let[r,n]=t.split(":");return e=e.replace(`${t}@`,""),{url:e,auth:{username:r,password:n}}}function Sp(e,t){let r=t.toString(16);return"0".repeat(e-r.length)+r}var ze=class{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(t){typeof t=="string"&&(t=Buffer.from(t));let r=t.length+4,n=Sp(4,r);return Buffer.concat([Buffer.from(n,"utf8"),t])}static streamReader(t){let r=new ou(t);return async function(){try{let i=await r.read(4);if(i==null)return!0;if(i=parseInt(i.toString("utf8"),16),i===0||i===1)return null;let a=await r.read(i-4);return a==null?!0:a}catch(i){return t.error=i,!0}}}};async function Ww(e){let t={},r;for(;r=await e(),r!==!0;){if(r===null)continue;r=r.toString("utf8").replace(/\n$/,"");let n=r.indexOf("=");if(n>-1){let i=r.slice(0,n),a=r.slice(n+1);t[i]=a}else t[r]=!0}return{protocolVersion:2,capabilities2:t}}async function qw(e,{service:t}){let r=new Set,n=new Map,i=new Map,a=ze.streamReader(e),s=await a();for(;s===null;)s=await a();if(s===!0)throw new al;if(s.includes("version 2"))return Ww(a);if(s.toString("utf8").replace(/\n$/,"")!==`# service=${t}`)throw new la(`# service=${t}\\n`,s.toString("utf8"));let o=await a();for(;o===null;)o=await a();if(o===!0)return{capabilities:r,refs:n,symrefs:i};if(o=o.toString("utf8"),o.includes("version 2"))return Ww(a);let[c,l]=lp(o,"\0","\\x00");if(l.split(" ").map(u=>r.add(u)),c!=="0000000000000000000000000000000000000000 capabilities^{}"){let[u,f]=lp(c," "," ");for(n.set(f,u);;){let d=await a();if(d===!0)break;if(d!==null){let[h,p]=lp(d.toString("utf8")," "," ");n.set(p,h)}}}for(let u of r)if(u.startsWith("symref=")){let f=u.match(/symref=([^:]+):(.*)/);f.length===3&&i.set(f[1],f[2])}return{protocolVersion:1,capabilities:r,refs:n,symrefs:i}}function lp(e,t,r){let n=e.trim().split(t);if(n.length!==2)throw new la(`Two strings separated by '${r}'`,e.toString("utf8"));return n}var Yw=(e,t)=>e.endsWith("?")?`${e}${t}`:`${e}/${t.replace(/^https?:\/\//,"")}`,Xw=(e,t)=>{(t.username||t.password)&&(e.Authorization=g2(t)),t.headers&&Object.assign(e,t.headers)},cp=async e=>{try{let t=Buffer.from(await fu(e.body)),r=t.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:t}}catch(t){return{}}},_s=class{static async capabilities(){return["discover","connect"]}static async discover({http:t,onProgress:r,onAuth:n,onAuthSuccess:i,onAuthFailure:a,corsProxy:s,service:o,url:c,headers:l,protocolVersion:u}){let{url:f,auth:d}=Vw(c),h=s?Yw(s,f):f;(d.username||d.password)&&(l.Authorization=g2(d)),u===2&&(l["Git-Protocol"]="version=2");let p,m,v=!1;do if(p=await t.request({onProgress:r,method:"GET",url:`${h}/info/refs?service=${o}`,headers:l}),m=!1,p.statusCode===401||p.statusCode===203){let y=v?a:n;if(y){if(d=await y(f,{...d,headers:{...l}}),d&&d.cancel)throw new gs;d&&(Xw(l,d),v=!0,m=!0)}}else p.statusCode===200&&v&&i&&await i(f,d);while(m);if(p.statusCode!==200){let{response:y}=await cp(p);throw new ds(p.statusCode,p.statusMessage,y)}if(p.headers["content-type"]===`application/x-${o}-advertisement`){let y=await qw(p.body,{service:o});return y.auth=d,y}else{let{preview:y,response:b,data:x}=await cp(p);try{let E=await qw([x],{service:o});return E.auth=d,E}catch(E){throw new ul(y,b)}}}static async connect({http:t,onProgress:r,corsProxy:n,service:i,url:a,auth:s,body:o,headers:c}){let l=Vw(a);l&&(a=l.url),n&&(a=Yw(n,a)),c["content-type"]=`application/x-${i}-request`,c.accept=`application/x-${i}-result`,Xw(c,s);let u=await t.request({onProgress:r,method:"POST",url:`${a}/${i}`,body:o,headers:c});if(u.statusCode!==200){let{response:f}=cp(u);throw new ds(u.statusCode,u.statusMessage,f)}return u}};function lO({url:e}){if(e.startsWith("git@"))return{transport:"ssh",address:e};let t=e.match(/(\w+)(:\/\/|::)(.*)/);if(t!==null){if(t[2]==="://")return{transport:t[1],address:t[0]};if(t[2]==="::")return{transport:t[1],address:t[3]}}}var xs=class{static getRemoteHelperFor({url:t}){let r=new Map;r.set("http",_s),r.set("https",_s);let n=lO({url:t});if(!n)throw new dl(t);if(r.has(n.transport))return r.get(n.transport);throw new fl(t,n.transport,n.transport==="ssh"?oO(t):void 0)}},sa=null,ua=class{static async read({fs:t,gitdir:r}){sa===null&&(sa=new Jo.default);let n=$(r,"shallow"),i=new Set;return await sa.acquire(n,async function(){let a=await t.read(n,{encoding:"utf8"});if(a===null||a.trim()==="")return i;a.trim().split(`
`).map(s=>i.add(s))}),i}static async write({fs:t,gitdir:r,oids:n}){sa===null&&(sa=new Jo.default);let i=$(r,"shallow");if(n.size>0){let a=[...n].join(`
`)+`
`;await sa.acquire(i,async function(){await t.write(i,a,{encoding:"utf8"})})}else await sa.acquire(i,async function(){await t.rm(i)})}};async function cO({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return e.exists(`${t}/${n}`)}async function uO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=await e.readdir($(r,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${r}/objects/pack/${s}`,c=await Ap({fs:e,cache:t,filename:o,getExternalRefDelta:i});if(c.error)throw new le(c.error);if(c.offsets.has(n))return!0}return!1}async function Zw({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=o=>We({fs:e,cache:t,gitdir:r,oid:o}),s=await cO({fs:e,gitdir:r,oid:n});return s||(s=await uO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a})),s}function fO(e){let i="5041434b"+"00000002"+"00000000";return e.slice(0,12).toString("hex")===i}function v2(e,t){let r=e.map(n=>n.split("=",1)[0]);return t.filter(n=>{let i=n.split("=",1)[0];return r.includes(i)})}var wu={name:"isomorphic-git",version:"1.27.1",agent:"git/isomorphic-git@1.27.1"},ls=class{constructor(){this._queue=[]}write(t){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:t})}else this._queue.push(t)}end(){if(this._ended=!0,this._waiting){let t=this._waiting;this._waiting=null,t({done:!0})}}destroy(t){this.error=t,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(t=>{this._waiting=t})}};function dO(e){let t=e.indexOf("\r"),r=e.indexOf(`
`);return t===-1&&r===-1?-1:t===-1?r+1:r===-1?t+1:r===t+1?r+1:Math.min(t,r)+1}function y2(e){let t=new ls,r="";return(async()=>(await yl(e,n=>{for(n=n.toString("utf8"),r+=n;;){let i=dO(r);if(i===-1)break;t.write(r.slice(0,i)),r=r.slice(i)}}),r.length>0&&t.write(r),t.end()))(),t}var du=class{static demux(t){let r=ze.streamReader(t),n=new ls,i=new ls,a=new ls,s=async function(){let o=await r();if(o===null)return s();if(o===!0){n.end(),a.end(),t.error?i.destroy(t.error):i.end();return}switch(o[0]){case 1:{i.write(o.slice(1));break}case 2:{a.write(o.slice(1));break}case 3:{let c=o.slice(1);a.write(c),n.end(),a.end(),i.destroy(new Error(c.toString("utf8")));return}default:n.write(o)}s()};return s(),{packetlines:n,packfile:i,progress:a}}};async function hO(e){let{packetlines:t,packfile:r,progress:n}=du.demux(e),i=[],a=[],s=[],o=!1,c=!1;return new Promise((l,u)=>{yl(t,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new bi(h)),i.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new bi(h)),a.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");s.push({oid:h,status:p}),p||(c=!0)}else d.startsWith("NAK")?(o=!0,c=!0):(c=!0,o=!0);c&&(e.error?u(e.error):l({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))}).finally(()=>{c||(e.error?u(e.error):l({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))})})}function pO({capabilities:e=[],wants:t=[],haves:r=[],shallows:n=[],depth:i=null,since:a=null,exclude:s=[]}){let o=[];t=[...new Set(t)];let c=` ${e.join(" ")}`;for(let l of t)o.push(ze.encode(`want ${l}${c}
`)),c="";for(let l of n)o.push(ze.encode(`shallow ${l}
`));i!==null&&o.push(ze.encode(`deepen ${i}
`)),a!==null&&o.push(ze.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)}
`));for(let l of s)o.push(ze.encode(`deepen-not ${l}
`));o.push(ze.flush());for(let l of r)o.push(ze.encode(`have ${l}
`));return o.push(ze.encode(`done
`)),o}async function Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:c,ref:l,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1}){let w=l||await fa({fs:e,gitdir:c,test:!0}),A=await Ve.get({fs:e,gitdir:c}),S=f||w&&await A.get(`branch.${w}.remote`)||"origin",T=d||await A.get(`remote.${S}.url`);if(typeof T=="undefined")throw new Qt("remote OR url");let P=u||w&&await A.get(`branch.${w}.merge`)||l||"HEAD";h===void 0&&(h=await A.get("http.corsProxy"));let O=xs.getRemoteHelperFor({url:T}),j=await O.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:h,service:"git-upload-pack",url:T,headers:E,protocolVersion:1}),D=j.auth,Q=j.refs;if(Q.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!j.capabilities.has("shallow"))throw new yi("shallow","depth");if(m!==null&&!j.capabilities.has("deepen-since"))throw new yi("deepen-since","since");if(v.length>0&&!j.capabilities.has("deepen-not"))throw new yi("deepen-not","exclude");if(y===!0&&!j.capabilities.has("deepen-relative"))throw new yi("deepen-relative","relative");let{oid:de,fullref:ee}=q.resolveAgainstMap({ref:P,map:Q});for(let G of Q.keys())G===ee||G==="HEAD"||G.startsWith("refs/heads/")||b&&G.startsWith("refs/tags/")||Q.delete(G);let J=v2([...j.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${wu.agent}`]);y&&J.push("deepen-relative");let Ce=x?[de]:Q.values(),me=x?[w]:await q.listRefs({fs:e,gitdir:c,filepath:"refs"}),F=[];for(let G of me)try{G=await q.expand({fs:e,gitdir:c,ref:G});let Le=await q.resolve({fs:e,gitdir:c,ref:G});await Zw({fs:e,cache:t,gitdir:c,oid:Le})&&F.push(Le)}catch(Le){}F=[...new Set(F)];let z=await ua.read({fs:e,gitdir:c}),N=j.capabilities.has("shallow")?[...z]:[],Re=pO({capabilities:J,wants:Ce,haves:F,shallows:N,depth:p,since:m,exclude:v}),Dt=Buffer.from(await fu(Re)),_t=await O.connect({http:r,onProgress:n,corsProxy:h,service:"git-upload-pack",url:T,auth:D,body:[Dt],headers:E}),Ee=await hO(_t.body);_t.headers&&(Ee.headers=_t.headers);for(let G of Ee.shallows)if(!z.has(G))try{let{object:Le}=await We({fs:e,cache:t,gitdir:c,oid:G}),L=new tr(Le),Y=await Promise.all(L.headers().parent.map(De=>Zw({fs:e,cache:t,gitdir:c,oid:De})));Y.length===0||Y.every(De=>De)||z.add(G)}catch(Le){z.add(G)}for(let G of Ee.unshallows)z.delete(G);if(await ua.write({fs:e,gitdir:c,oids:z}),x){let G=new Map([[ee,de]]),Le=new Map,L=10,Y=ee;for(;L--;){let vt=j.symrefs.get(Y);if(vt===void 0)break;Le.set(Y,vt),Y=vt}let ye=Q.get(Y);ye&&G.set(Y,ye);let{pruned:De}=await q.updateRemoteRefs({fs:e,gitdir:c,remote:S,refs:G,symrefs:Le,tags:b,prune:_});_&&(Ee.pruned=De)}else{let{pruned:G}=await q.updateRemoteRefs({fs:e,gitdir:c,remote:S,refs:Q,symrefs:j.symrefs,tags:b,prune:_,pruneTags:k});_&&(Ee.pruned=G)}if(Ee.HEAD=j.symrefs.get("HEAD"),Ee.HEAD===void 0){let{oid:G}=q.resolveAgainstMap({ref:"HEAD",map:Q});for(let[Le,L]of Q.entries())if(Le!=="HEAD"&&L===G){Ee.HEAD=Le;break}}let st=ee.startsWith("refs/tags")?"tag":"branch";if(Ee.FETCH_HEAD={oid:de,description:`${st} '${oa(ee)}' of ${T}`},n||i){let G=y2(Ee.progress);yl(G,async Le=>{if(i&&await i(Le),n){let L=Le.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);L&&await n({phase:L[1].trim(),loaded:parseInt(L[2],10),total:parseInt(L[3],10)})}})}let ot=Buffer.from(await fu(Ee.packfile));if(_t.body.error)throw _t.body.error;let Ct=ot.slice(-20).toString("hex"),$e={defaultBranch:Ee.HEAD,fetchHead:Ee.FETCH_HEAD.oid,fetchHeadDescription:Ee.FETCH_HEAD.description};if(Ee.headers&&($e.headers=Ee.headers),_&&($e.pruned=Ee.pruned),Ct!==""&&!fO(ot)){$e.packfile=`objects/pack/pack-${Ct}.pack`;let G=$(c,$e.packfile);await e.write(G,ot);let Le=Y=>We({fs:e,cache:t,gitdir:c,oid:Y}),L=await tl.fromPack({pack:ot,getExternalRefDelta:Le,onProgress:n});await e.write(G.replace(/\.pack$/,".idx"),await L.toBuffer())}return $e}async function w2({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){if(await e.exists(n+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(s=>n+"/"+s);for(let s of a)await e.mkdir(s);await e.write(n+"/config",`[core]
repositoryformatversion = 0
filemode = false
bare = ${t}
`+(t?"":` logallrefupdates = true
`)+` symlinks = false
ignorecase = true
`),await e.write(n+"/HEAD",`ref: refs/heads/${i}
`)}async function mO({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPostCheckout:c,dir:l,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:m,since:v,exclude:y,relative:b,singleBranch:x,noCheckout:E,noTags:_,headers:k}){try{if(await w2({fs:e,gitdir:u}),await p2({fs:e,gitdir:u,remote:p,url:f,force:!1}),d){let S=await Ve.get({fs:e,gitdir:u});await S.set("http.corsProxy",d),await Ve.save({fs:e,gitdir:u,config:S})}let{defaultBranch:w,fetchHead:A}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:m,since:v,exclude:y,relative:b,singleBranch:x,headers:k,tags:!_});if(A===null)return;h=h||w,h=h.replace("refs/heads/",""),await Tp({fs:e,cache:t,onProgress:n,onPostCheckout:c,dir:l,gitdir:u,ref:h,remote:p,noCheckout:E})}catch(w){throw await e.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),w}}async function gO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:c,gitdir:l=$(c,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:m=void 0,exclude:v=[],relative:y=!1,singleBranch:b=!1,noCheckout:x=!1,noTags:E=!1,headers:_={},cache:k={}}){try{return C("fs",e),C("http",t),C("gitdir",l),x||C("dir",c),C("url",u),await mO({fs:new X(e),cache:k,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:c,gitdir:l,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:m,exclude:v,relative:y,singleBranch:b,noCheckout:x,noTags:E,headers:_})}catch(w){throw w.caller="git.clone",w}}async function vO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),message:i,author:a,committer:s,signingKey:o,amend:c=!1,dryRun:l=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h,cache:p={}}){try{C("fs",e),c||C("message",i),o&&C("onSign",t);let m=new X(e);return await yu({fs:m,cache:p,onSign:t,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:c,dryRun:l,noUpdateBranch:u,ref:f,parent:d,tree:h})}catch(m){throw m.caller="git.commit",m}}async function yO({fs:e,dir:t,gitdir:r=$(t,".git"),fullname:n=!1,test:i=!1}){try{return C("fs",e),C("gitdir",r),await fa({fs:new X(e),gitdir:r,fullname:n,test:i})}catch(a){throw a.caller="git.currentBranch",a}}async function wO({fs:e,gitdir:t,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await q.exists({fs:e,gitdir:t,ref:r}))throw new Ne(r);let i=await q.expand({fs:e,gitdir:t,ref:r}),a=await fa({fs:e,gitdir:t,fullname:!0});if(i===a){let c=await q.resolve({fs:e,gitdir:t,ref:i});await q.writeRef({fs:e,gitdir:t,ref:"HEAD",value:c})}await q.deleteRef({fs:e,gitdir:t,ref:i});let s=oa(r),o=await Ve.get({fs:e,gitdir:t});await o.deleteSection("branch",s),await Ve.save({fs:e,gitdir:t,config:o})}async function bO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await wO({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteBranch",i}}async function _O({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{C("fs",e),C("ref",n),await q.deleteRef({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteRef",i}}async function xO({fs:e,gitdir:t,remote:r}){let n=await Ve.get({fs:e,gitdir:t});await n.deleteSection("remote",r),await Ve.save({fs:e,gitdir:t,config:n})}async function SO({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("remote",n),await xO({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.deleteRemote",i}}async function EO({fs:e,gitdir:t,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await q.deleteRef({fs:e,gitdir:t,ref:r})}async function AO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await EO({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteTag",i}}async function kO({fs:e,gitdir:t,oid:r}){let n=r.slice(0,2);return(await e.readdir(`${t}/objects/${n}`)).map(a=>`${n}${a}`).filter(a=>a.startsWith(r))}async function TO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=[],s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let c=`${r}/objects/pack/${o}`,l=await Ap({fs:e,cache:t,filename:c,getExternalRefDelta:i});if(l.error)throw new le(l.error);for(let u of l.offsets.keys())u.startsWith(n)&&a.push(u)}return a}async function CO({fs:e,cache:t,gitdir:r,oid:n}){let i=o=>We({fs:e,cache:t,gitdir:r,oid:o}),a=await kO({fs:e,gitdir:r,oid:n}),s=await TO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i});for(let o of s)a.indexOf(o)===-1&&a.push(o);if(a.length===1)return a[0];throw a.length>1?new rl("oids",n,a):new Ne(`an object matching "${n}"`)}async function PO({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await CO({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.expandOid",a}}async function RO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("gitdir",r),C("ref",n),await q.expand({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.expandRef",i}}async function Pp({fs:e,cache:t,gitdir:r,oids:n}){let i={},a=n.length,s=n.map((o,c)=>({index:c,oid:o}));for(;s.length;){let o=new Set;for(let{oid:l,index:u}of s)i[l]||(i[l]=new Set),i[l].add(u),i[l].size===a&&o.add(l);if(o.size>0)return[...o];let c=new Map;for(let{oid:l,index:u}of s)try{let{object:f}=await We({fs:e,cache:t,gitdir:r,oid:l}),d=tr.from(f),{parent:h}=d.parseHeaders();for(let p of h)(!i[p]||!i[p].has(u))&&c.set(p+":"+u,{oid:p,index:u})}catch(f){}s=Array.from(c.values())}return[]}var up=/^.*(\r?\n|$)/gm;function MO({branches:e,contents:t}){let r=e[1],n=e[2],i=t[0],a=t[1],s=t[2],o=a.match(up),c=i.match(up),l=s.match(up),u=(0,e2.default)(o,c,l),f=7,d="",h=!0;for(let p of u)p.ok&&(d+=p.ok.join("")),p.conflict&&(h=!1,d+=`${"<".repeat(f)} ${r}
`,d+=p.conflict.a.join(""),d+=`${"=".repeat(f)}
`,d+=p.conflict.b.join(""),d+=`${">".repeat(f)} ${n}
`);return{cleanMerge:h,mergedText:d}}async function OO({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),index:i,ourOid:a,baseOid:s,theirOid:o,ourName:c="ours",baseName:l="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=wi({ref:a}),m=wi({ref:s}),v=wi({ref:o}),y=[],b=[],x=[],E=[],_=await ys({fs:e,cache:t,dir:r,gitdir:n,trees:[p,m,v],map:async function(k,[w,A,S]){let T=iu(k),P=await cu(w,A),O=await cu(S,A);switch(`${P}-${O}`){case"false-false":return{mode:await A.mode(),path:T,oid:await A.oid(),type:await A.type()};case"false-true":return S?{mode:await S.mode(),path:T,oid:await S.oid(),type:await S.type()}:void 0;case"true-false":return w?{mode:await w.mode(),path:T,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&A&&S&&await w.type()==="blob"&&await A.type()==="blob"&&await S.type()==="blob")return IO({fs:e,gitdir:n,path:T,ours:w,base:A,theirs:S,ourName:c,baseName:l,theirName:u,mergeDriver:h}).then(async j=>{if(j.cleanMerge)d||i.insert({filepath:k,oid:j.mergeResult.oid,stage:0});else if(y.push(k),b.push(k),!d){let D=await A.oid(),Q=await w.oid(),de=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:D,stage:1}),i.insert({filepath:k,oid:Q,stage:2}),i.insert({filepath:k,oid:de,stage:3})}return j.mergeResult});if(A&&!w&&S&&await A.type()==="blob"&&await S.type()==="blob"){if(y.push(k),x.push(k),!d){let j=await A.oid(),D=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:j,stage:1}),i.insert({filepath:k,oid:D,stage:3})}return{mode:await S.mode(),oid:await S.oid(),type:"blob",path:T}}if(A&&w&&!S&&await A.type()==="blob"&&await w.type()==="blob"){if(y.push(k),E.push(k),!d){let j=await A.oid(),D=await w.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:j,stage:1}),i.insert({filepath:k,oid:D,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:T}}if(A&&!w&&!S&&await A.type()==="blob")return;throw new hs}}},reduce:y.length!==0&&(!r||d)?void 0:async(k,w)=>{let A=w.filter(Boolean);if(k&&!(k&&k.type==="tree"&&A.length===0)){if(A.length>0){let T=new er(A).toObject(),P=await pr({fs:e,gitdir:n,type:"tree",object:T,dryRun:f});k.oid=P}return k}}});return y.length!==0?(r&&!d&&await ys({fs:e,cache:t,dir:r,gitdir:n,trees:[wi({ref:_.oid})],map:async function(k,[w]){let A=`${r}/${k}`;if(await w.type()==="blob"){let S=await w.mode(),T=new TextDecoder().decode(await w.content());await e.write(A,T,{mode:S})}return!0}}),new ps(y,b,x,E)):_.oid}async function IO({fs:e,gitdir:t,path:r,ours:n,base:i,theirs:a,ourName:s,theirName:o,baseName:c,dryRun:l,mergeDriver:u=MO}){let f="blob",d=await i.mode()===await n.mode()?await a.mode():await n.mode();if(await n.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};if(await n.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await a.oid(),type:f}};if(await a.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};let h=Buffer.from(await n.content()).toString("utf8"),p=Buffer.from(await i.content()).toString("utf8"),m=Buffer.from(await a.content()).toString("utf8"),{mergedText:v,cleanMerge:y}=await u({branches:[c,s,o],contents:[p,h,m],path:r}),b=await pr({fs:e,gitdir:t,type:"blob",object:Buffer.from(v,"utf8"),dryRun:l});return{cleanMerge:y,mergeResult:{mode:d,path:r,oid:b,type:f}}}async function b2({fs:e,cache:t,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:c=!1,noUpdateBranch:l=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,onSign:m,mergeDriver:v}){i===void 0&&(i=await fa({fs:e,gitdir:n,fullname:!0})),i=await q.expand({fs:e,gitdir:n,ref:i}),a=await q.expand({fs:e,gitdir:n,ref:a});let y=await q.resolve({fs:e,gitdir:n,ref:i}),b=await q.resolve({fs:e,gitdir:n,ref:a}),x=await Pp({fs:e,cache:t,gitdir:n,oids:[y,b]});if(x.length!==1)throw new hs;let E=x[0];if(E===b)return{oid:y,alreadyMerged:!0};if(s&&E===y)return!c&&!l&&await q.writeRef({fs:e,gitdir:n,ref:i,value:b}),{oid:b,fastForward:!0};{if(o)throw new sl;let _=await mt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async w=>OO({fs:e,cache:t,dir:r,gitdir:n,index:w,ourOid:y,theirOid:b,baseOid:E,ourName:oa(i),baseName:"base",theirName:oa(a),dryRun:c,abortOnConflict:u,mergeDriver:v}));if(_ instanceof ps)throw _;return f||(f=`Merge branch '${oa(a)}' into ${oa(i)}`),{oid:await yu({fs:e,cache:t,gitdir:n,message:f,ref:i,tree:_,parent:[y,b],author:d,committer:h,signingKey:p,onSign:m,dryRun:c,noUpdateBranch:l}),tree:_,mergeCommit:!0}}}async function _2({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,dir:c,gitdir:l,ref:u,url:f,remote:d,remoteRef:h,prune:p,pruneTags:m,fastForward:v,fastForwardOnly:y,corsProxy:b,singleBranch:x,headers:E,author:_,committer:k,signingKey:w}){try{if(!u){let T=await fa({fs:e,gitdir:l});if(!T)throw new Qt("ref");u=T}let{fetchHead:A,fetchHeadDescription:S}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:l,corsProxy:b,ref:u,url:f,remote:d,remoteRef:h,singleBranch:x,headers:E,prune:p,pruneTags:m});await b2({fs:e,cache:t,gitdir:l,ours:u,theirs:A,fastForward:v,fastForwardOnly:y,message:`Merge ${S}`,author:_,committer:k,signingKey:w,dryRun:!1,noUpdateBranch:!1}),await Tp({fs:e,cache:t,onProgress:n,dir:c,gitdir:l,ref:u,remote:d,noCheckout:!1})}catch(A){throw A.caller="git.pull",A}}async function FO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c=$(o,".git"),ref:l,url:u,remote:f,remoteRef:d,corsProxy:h,singleBranch:p,headers:m={},cache:v={}}){try{C("fs",e),C("http",t),C("gitdir",c);let y={name:"",email:"",timestamp:Date.now(),timezoneOffset:0};return await _2({fs:new X(e),cache:v,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c,ref:l,url:u,remote:f,remoteRef:d,fastForwardOnly:!0,corsProxy:h,singleBranch:p,headers:m,author:y,committer:y})}catch(y){throw y.caller="git.fastForward",y}}async function $O({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c=$(o,".git"),ref:l,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1,cache:w={}}){try{return C("fs",e),C("http",t),C("gitdir",c),await Cp({fs:new X(e),cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,gitdir:c,ref:l,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p,since:m,exclude:v,relative:y,tags:b,singleBranch:x,headers:E,prune:_,pruneTags:k})}catch(A){throw A.caller="git.fetch",A}}async function LO({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await Pp({fs:new X(e),cache:i,gitdir:r,oids:n})}catch(a){throw a.caller="git.findMergeBase",a}}async function x2({fs:e,filepath:t}){if(await e.exists($(t,".git")))return t;{let r=fs(t);if(r===t)throw new Ne(`git root for ${t}`);return x2({fs:e,filepath:r})}}async function DO({fs:e,filepath:t}){try{return C("fs",e),C("filepath",t),await x2({fs:new X(e),filepath:t})}catch(r){throw r.caller="git.findRoot",r}}async function NO({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await ml({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfig",i}}async function jO({fs:e,gitdir:t,path:r}){return(await Ve.get({fs:e,gitdir:t})).getall(r)}async function BO({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await jO({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfigAll",i}}async function HO({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1}){try{C("http",e),C("url",a);let l=await xs.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:1}),u={capabilities:[...l.capabilities]};for(let[f,d]of l.refs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}for(let[f,d]of l.symrefs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}return u}catch(c){throw c.caller="git.getRemoteInfo",c}}function S2(e,t,r,n){let i=[];for(let[a,s]of e.refs){if(t&&!a.startsWith(t))continue;if(a.endsWith("^{}")){if(n){let c=a.replace("^{}",""),l=i[i.length-1],u=l.ref===c?l:i.find(f=>f.ref===c);if(u===void 0)throw new Error("I did not expect this to happen");u.peeled=s}continue}let o={ref:a,oid:s};r&&e.symrefs.has(a)&&(o.target=e.symrefs.get(a)),i.push(o)}return i}async function UO({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:c=2}){try{C("http",e),C("url",a);let u=await xs.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:c});if(u.protocolVersion===2)return{protocolVersion:u.protocolVersion,capabilities:u.capabilities2};let f={};for(let d of u.capabilities){let[h,p]=d.split("=");p?f[h]=p:f[h]=!0}return{protocolVersion:1,capabilities:f,refs:S2(u,void 0,!0,!0)}}catch(l){throw l.caller="git.getRemoteInfo2",l}}async function GO({type:e,object:t,format:r="content",oid:n=void 0}){return r!=="deflated"&&(r!=="wrapped"&&(t=_i.wrap({type:e,object:t})),n=await Gn(t)),{oid:n,object:t}}async function zO({object:e}){try{C("object",e),typeof e=="string"?e=Buffer.from(e,"utf8"):e=Buffer.from(e);let t="blob",{oid:r,object:n}=await GO({type:"blob",format:"content",object:e});return{oid:r,type:t,object:new Uint8Array(n),format:"wrapped"}}catch(t){throw t.caller="git.hashBlob",t}}async function VO({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,filepath:a}){try{a=$(n,a);let s=await e.read(a),o=l=>We({fs:e,cache:t,gitdir:i,oid:l}),c=await tl.fromPack({pack:s,getExternalRefDelta:o,onProgress:r});return await e.write(a.replace(/\.pack$/,".idx"),await c.toBuffer()),{oids:[...c.hashes]}}catch(s){throw s.caller="git.indexPack",s}}async function WO({fs:e,onProgress:t,dir:r,gitdir:n=$(r,".git"),filepath:i,cache:a={}}){try{return C("fs",e),C("dir",r),C("gitdir",r),C("filepath",i),await VO({fs:new X(e),cache:a,onProgress:t,dir:r,gitdir:n,filepath:i})}catch(s){throw s.caller="git.indexPack",s}}async function qO({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){try{return C("fs",e),C("gitdir",n),t||C("dir",r),await w2({fs:new X(e),bare:t,dir:r,gitdir:n,defaultBranch:i})}catch(a){throw a.caller="git.init",a}}async function E2({fs:e,cache:t,gitdir:r,oid:n,ancestor:i,depth:a}){let s=await ua.read({fs:e,gitdir:r});if(!n)throw new Qt("oid");if(!i)throw new Qt("ancestor");if(n===i)return!1;let o=[n],c=new Set,l=0;for(;o.length;){if(l++===a)throw new ll(a);let u=o.shift(),{type:f,object:d}=await We({fs:e,cache:t,gitdir:r,oid:u});if(f!=="commit")throw new Gt(u,f,"commit");let h=tr.from(d).parse();for(let p of h.parent)if(p===i)return!0;if(!s.has(u))for(let p of h.parent)c.has(p)||(o.push(p),c.add(p))}return!1}async function YO({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,ancestor:i,depth:a=-1,cache:s={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),C("ancestor",i),await E2({fs:new X(e),cache:s,gitdir:r,oid:n,ancestor:i,depth:a})}catch(o){throw o.caller="git.isDescendent",o}}async function XO({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n}){try{return C("fs",e),C("dir",t),C("gitdir",r),C("filepath",n),ws.isIgnored({fs:new X(e),dir:t,gitdir:r,filepath:n})}catch(i){throw i.caller="git.isIgnored",i}}async function ZO({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("gitdir",r),q.listBranches({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.listBranches",i}}async function KO({fs:e,gitdir:t,ref:r,cache:n}){if(r){let i=await q.resolve({gitdir:t,fs:e,ref:r}),a=[];return await A2({fs:e,cache:n,gitdir:t,oid:i,filenames:a,prefix:""}),a}else return mt.acquire({fs:e,gitdir:t,cache:n},async function(i){return i.entries.map(a=>a.path)})}async function A2({fs:e,cache:t,gitdir:r,oid:n,filenames:i,prefix:a}){let{tree:s}=await Ss({fs:e,cache:t,gitdir:r,oid:n});for(let o of s)o.type==="tree"?await A2({fs:e,cache:t,gitdir:r,oid:o.oid,filenames:i,prefix:$(a,o.path)}):i.push($(a,o.path))}async function JO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),await KO({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listFiles",a}}async function QO({fs:e,cache:t,gitdir:r,ref:n}){let i;try{i=await q.resolve({gitdir:r,fs:e,ref:n})}catch(o){if(o instanceof Ne)return[]}return(await Ss({fs:e,cache:t,gitdir:r,oid:i})).tree.map(o=>({target:o.path,note:o.oid}))}async function e8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",cache:i={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),await QO({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listNotes",a}}async function t8({fs:e,gitdir:t}){let r=await Ve.get({fs:e,gitdir:t}),n=await r.getSubsections("remote");return Promise.all(n.map(async a=>{let s=await r.get(`remote.${a}.url`);return{remote:a,url:s}}))}async function r8({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),await t8({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listRemotes",n}}async function n8(e){let t=ze.streamReader(e),r=[],n;for(;n=await t(),n!==!0;){if(n===null)continue;n=n.toString("utf8").replace(/\n$/,"");let[i,a,...s]=n.split(" "),o={ref:a,oid:i};for(let c of s){let[l,u]=c.split(":");l==="symref-target"?o.target=u:l==="peeled"&&(o.peeled=u)}r.push(o)}return r}async function i8({prefix:e,symrefs:t,peelTags:r}){let n=[];return n.push(ze.encode(`command=ls-refs
`)),n.push(ze.encode(`agent=${wu.agent}
`)),(r||t||e)&&n.push(ze.delim()),r&&n.push(ze.encode("peel")),t&&n.push(ze.encode("symrefs")),e&&n.push(ze.encode(`ref-prefix ${e}`)),n.push(ze.flush()),n}async function a8({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:c=2,prefix:l,symrefs:u,peelTags:f}){try{C("http",e),C("url",a);let d=await _s.discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:c});if(d.protocolVersion===1)return S2(d,l,u,f);let h=await i8({prefix:l,symrefs:u,peelTags:f}),p=await _s.connect({http:e,auth:d.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:h});return n8(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function s8({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),q.listTags({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listTags",n}}function o8(e,t){return e.committer.timestamp-t.committer.timestamp}var l8="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function Kw({fs:e,cache:t,gitdir:r,oid:n,fileId:i}){if(i===l8)return;let a=n,s,o=await vs({fs:e,cache:t,gitdir:r,oid:n}),c=o.tree;return i===o.oid?s=o.path:(s=await k2({fs:e,cache:t,gitdir:r,tree:c,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function k2({fs:e,cache:t,gitdir:r,tree:n,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let c=n.entries().map(function(l){let u;return l.oid===i?(u=$(o,l.path),s.push(u)):l.type==="tree"&&(u=We({fs:e,cache:t,gitdir:r,oid:l.oid}).then(function({object:f}){return k2({fs:e,cache:t,gitdir:r,tree:er.from(f),fileId:i,oid:a,filepaths:s,parentPath:$(o,l.path)})})),u});return await Promise.all(c),s}async function c8({fs:e,cache:t,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:c}){let l=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),u=[],f=await ua.read({fs:e,gitdir:r}),d=await q.resolve({fs:e,gitdir:r,ref:i}),h=[await uu({fs:e,cache:t,gitdir:r,oid:d})],p,m,v;function y(b){v&&n&&u.push(b)}for(;h.length>0;){let b=h.pop();if(l!==void 0&&b.commit.committer.timestamp<=l)break;if(n){let x;try{x=await vl({fs:e,cache:t,gitdir:r,oid:b.commit.tree,filepath:n}),m&&p!==x&&u.push(m),p=x,m=b,v=!0}catch(E){if(E instanceof Ne){let _=c&&p;if(_&&(_=await Kw({fs:e,cache:t,gitdir:r,oid:b.commit.tree,fileId:p}),_))if(Array.isArray(_)){if(m){let k=await Kw({fs:e,cache:t,gitdir:r,oid:m.commit.tree,fileId:p});if(Array.isArray(k))if(_=_.filter(w=>k.indexOf(w)===-1),_.length===1)_=_[0],n=_,m&&u.push(m);else{_=!1,m&&u.push(m);break}}}else n=_,m&&u.push(m);if(!_){if(v&&p&&(u.push(m),!o))break;if(!o&&!c)throw E}m=b,v=!1}else throw E}}else u.push(b);if(a!==void 0&&u.length===a){y(b);break}if(!f.has(b.oid))for(let x of b.commit.parent){let E=await uu({fs:e,cache:t,gitdir:r,oid:x});h.map(_=>_.oid).includes(E.oid)||h.push(E)}h.length===0&&y(b),h.sort((x,E)=>o8(x.commit,E.commit))}return u}async function u8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i="HEAD",depth:a,since:s,force:o,follow:c,cache:l={}}){try{return C("fs",e),C("gitdir",r),C("ref",i),await c8({fs:new X(e),cache:l,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:c})}catch(u){throw u.caller="git.log",u}}async function f8({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:c=!1,noUpdateBranch:l=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:m={},mergeDriver:v}){try{C("fs",e),p&&C("onSign",t);let y=new X(e),b=await ca({fs:y,gitdir:n,author:d});if(!b&&(!o||!s))throw new zt("author");let x=await bs({fs:y,gitdir:n,author:b,committer:h});if(!x&&(!o||!s))throw new zt("committer");return await b2({fs:y,cache:m,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:c,noUpdateBranch:l,abortOnConflict:u,message:f,author:b,committer:x,signingKey:p,onSign:t,mergeDriver:v})}catch(y){throw y.caller="git.merge",y}}var d8={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function T2({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Ep.default,s=[];function o(u,f){let d=Buffer.from(u,f);s.push(d),a.update(d)}async function c({stype:u,object:f}){let d=d8[u],h=f.length,p=h>15?128:0,m=h&15;h=h>>>4;let v=(p|d|m).toString(16);for(o(v,"hex");p;)p=h>127?128:0,v=p|h&127,o(Sp(2,v),"hex"),h=h>>>7;o(Buffer.from(await c2(f)))}o("PACK"),o("00000002","hex"),o(Sp(8,i.length),"hex");for(let u of i){let{type:f,object:d}=await We({fs:e,cache:t,gitdir:n,oid:u});await c({write:o,object:d,stype:f})}let l=a.digest();return s.push(l),s}async function h8({fs:e,cache:t,gitdir:r,oids:n,write:i}){let a=await T2({fs:e,cache:t,gitdir:r,oids:n}),s=Buffer.from(await fu(a)),c=`pack-${s.slice(-20).toString("hex")}.pack`;return i?(await e.write($(r,`objects/pack/${c}`),s),{filename:c}):{filename:c,packfile:new Uint8Array(s)}}async function p8({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,write:i=!1,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await h8({fs:new X(e),cache:a,gitdir:r,oids:n,write:i})}catch(s){throw s.caller="git.packObjects",s}}async function m8({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c=$(o,".git"),ref:l,url:u,remote:f,remoteRef:d,prune:h=!1,pruneTags:p=!1,fastForward:m=!0,fastForwardOnly:v=!1,corsProxy:y,singleBranch:b,headers:x={},author:E,committer:_,signingKey:k,cache:w={}}){try{C("fs",e),C("gitdir",c);let A=new X(e),S=await ca({fs:A,gitdir:c,author:E});if(!S)throw new zt("author");let T=await bs({fs:A,gitdir:c,author:S,committer:_});if(!T)throw new zt("committer");return await _2({fs:A,cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c,ref:l,url:u,remote:f,remoteRef:d,fastForward:m,fastForwardOnly:v,corsProxy:y,singleBranch:b,headers:x,author:S,committer:T,signingKey:k,prune:h,pruneTags:p})}catch(A){throw A.caller="git.pull",A}}async function g8({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),start:i,finish:a}){let s=await ua.read({fs:e,gitdir:n}),o=new Set,c=new Set;for(let f of i)o.add(await q.resolve({fs:e,gitdir:n,ref:f}));for(let f of a)try{let d=await q.resolve({fs:e,gitdir:n,ref:f});c.add(d)}catch(d){}let l=new Set;async function u(f){l.add(f);let{type:d,object:h}=await We({fs:e,cache:t,gitdir:n,oid:f});if(d==="tag"){let m=hr.from(h).headers().object;return u(m)}if(d!=="commit")throw new Gt(f,d,"commit");if(!s.has(f)){let m=tr.from(h).headers().parent;for(f of m)!c.has(f)&&!l.has(f)&&await u(f)}}for(let f of o)await u(f);return l}async function fp({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Set;async function s(o){if(a.has(o))return;a.add(o);let{type:c,object:l}=await We({fs:e,cache:t,gitdir:n,oid:o});if(c==="tag"){let f=hr.from(l).headers().object;await s(f)}else if(c==="commit"){let f=tr.from(l).headers().tree;await s(f)}else if(c==="tree"){let u=er.from(l);for(let f of u)f.type==="blob"&&a.add(f.oid),f.type==="tree"&&await s(f.oid)}}for(let o of i)await s(o);return a}async function v8(e){let t={},r="",n=ze.streamReader(e),i=await n();for(;i!==!0;)i!==null&&(r+=i.toString("utf8")+`
`),i=await n();let a=r.toString("utf8").split(`
`);if(i=a.shift(),!i.startsWith("unpack "))throw new la('unpack ok" or "unpack [error message]',i);t.ok=i==="unpack ok",t.ok||(t.error=i.slice(7)),t.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),c=s.slice(3),l=c.indexOf(" ");l===-1&&(l=c.length);let u=c.slice(0,l),f=c.slice(l+1);t.refs[u]={ok:o==="ok",error:f}}return t}async function y8({capabilities:e=[],triplets:t=[]}){let r=[],n=`\0 ${e.join(" ")}`;for(let i of t)r.push(ze.encode(`${i.oldoid} ${i.oid} ${i.fullRef}${n}
`)),n="";return r.push(ze.flush()),r}async function w8({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:c,gitdir:l,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={}}){let b=u||await fa({fs:e,gitdir:l});if(typeof b=="undefined")throw new Qt("ref");let x=await Ve.get({fs:e,gitdir:l});d=d||await x.get(`branch.${b}.pushRemote`)||await x.get("remote.pushDefault")||await x.get(`branch.${b}.remote`)||"origin";let E=h||await x.get(`remote.${d}.pushurl`)||await x.get(`remote.${d}.url`);if(typeof E=="undefined")throw new Qt("remote OR url");let _=f||await x.get(`branch.${b}.merge`);if(typeof E=="undefined")throw new Qt("remoteRef");v===void 0&&(v=await x.get("http.corsProxy"));let k=await q.expand({fs:e,gitdir:l,ref:b}),w=m?"0000000000000000000000000000000000000000":await q.resolve({fs:e,gitdir:l,ref:k}),A=xs.getRemoteHelperFor({url:E}),S=await A.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:v,service:"git-receive-pack",url:E,headers:y,protocolVersion:1}),T=S.auth,P;if(!_)P=k;else try{P=await q.expandAgainstMap({ref:_,map:S.refs})}catch(z){if(z instanceof Ne)P=_.startsWith("refs/")?_:`refs/heads/${_}`;else throw z}let O=S.refs.get(P)||"0000000000000000000000000000000000000000";if(c&&!await c({remote:d,url:E,localRef:{ref:m?"(delete)":k,oid:w},remoteRef:{ref:P,oid:O}}))throw new gs;let j=!S.capabilities.has("no-thin"),D=new Set;if(!m){let z=[...S.refs.values()],N=new Set;if(O!=="0000000000000000000000000000000000000000"){let Re=await Pp({fs:e,cache:t,gitdir:l,oids:[w,O]});for(let Dt of Re)z.push(Dt);j&&(N=await fp({fs:e,cache:t,gitdir:l,oids:Re}))}if(!z.includes(w)){let Re=await g8({fs:e,cache:t,gitdir:l,start:[w],finish:z});D=await fp({fs:e,cache:t,gitdir:l,oids:Re})}if(j){try{let Re=await q.resolve({fs:e,gitdir:l,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:Dt}=await q.resolveAgainstMap({ref:Re.replace(`refs/remotes/${d}/`,""),fullref:Re,map:S.refs}),_t=[Dt];for(let Ee of await fp({fs:e,cache:t,gitdir:l,oids:_t}))N.add(Ee)}catch(Re){}for(let Re of N)D.delete(Re)}if(w===O&&(p=!0),!p){if(k.startsWith("refs/tags")&&O!=="0000000000000000000000000000000000000000")throw new ms("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&O!=="0000000000000000000000000000000000000000"&&!await E2({fs:e,cache:t,gitdir:l,oid:w,ancestor:O,depth:-1}))throw new ms("not-fast-forward")}}let Q=v2([...S.capabilities],["report-status","side-band-64k",`agent=${wu.agent}`]),de=await y8({capabilities:Q,triplets:[{oldoid:O,oid:w,fullRef:P}]}),ee=m?[]:await T2({fs:e,cache:t,gitdir:l,oids:[...D]}),J=await A.connect({http:r,onProgress:n,corsProxy:v,service:"git-receive-pack",url:E,auth:T,headers:y,body:[...de,...ee]}),{packfile:Ce,progress:me}=await du.demux(J.body);if(i){let z=y2(me);yl(z,async N=>{await i(N)})}let F=await v8(Ce);if(J.headers&&(F.headers=J.headers),d&&F.ok&&F.refs[P].ok&&!k.startsWith("refs/tags")){let z=`refs/remotes/${d}/${P.replace("refs/heads","")}`;m?await q.deleteRef({fs:e,gitdir:l,ref:z}):await q.writeRef({fs:e,gitdir:l,ref:z,value:w})}if(F.ok&&Object.values(F.refs).every(z=>z.ok))return F;{let z=Object.entries(F.refs).filter(([N,Re])=>!Re.ok).map(([N,Re])=>`
- ${N}: ${Re.error}`).join("");throw new ol(z,F)}}async function b8({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:c,gitdir:l=$(c,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={},cache:b={}}){try{return C("fs",e),C("http",t),C("gitdir",l),await w8({fs:new X(e),cache:b,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:l,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:m,corsProxy:v,headers:y})}catch(x){throw x.caller="git.push",x}}async function C2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await We({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=hr.from(a).parse().object,C2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="blob")throw new Gt(n,i,"blob");return{oid:n,blob:new Uint8Array(a)}}async function P2({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){return i!==void 0&&(n=await vl({fs:e,cache:t,gitdir:r,oid:n,filepath:i})),await C2({fs:e,cache:t,gitdir:r,oid:n})}async function wl({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await P2({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function _8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await uu({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readCommit",a}}async function x8({fs:e,cache:t,gitdir:r,ref:n="refs/notes/commits",oid:i}){let a=await q.resolve({gitdir:r,fs:e,ref:n}),{blob:s}=await P2({fs:e,cache:t,gitdir:r,oid:a,filepath:i});return s}async function S8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",oid:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oid",i),await x8({fs:new X(e),cache:a,gitdir:r,ref:n,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function E8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{C("fs",e),C("gitdir",r),C("oid",n);let c=new X(e);a!==void 0&&(n=await vl({fs:c,cache:o,gitdir:r,oid:n,filepath:a}));let u=await We({fs:c,cache:o,gitdir:r,oid:n,format:i==="parsed"?"content":i});if(u.oid=n,i==="parsed")switch(u.format="parsed",u.type){case"commit":u.object=tr.from(u.object).parse();break;case"tree":u.object=er.from(u.object).entries();break;case"blob":s?u.object=u.object.toString(s):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=hr.from(u.object).parse();break;default:throw new Gt(u.oid,u.type,"blob|commit|tag|tree")}else(u.format==="deflated"||u.format==="wrapped")&&(u.type=u.format);return u}catch(c){throw c.caller="git.readObject",c}}async function A8({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await We({fs:e,cache:t,gitdir:r,oid:n,format:"content"});if(i!=="tag")throw new Gt(n,i,"tag");let s=hr.from(a);return{oid:n,tag:s.parse(),payload:s.payload()}}async function k8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await A8({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readTag",a}}async function T8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i=void 0,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await Ss({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function C8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n),await mt.acquire({fs:new X(e),gitdir:r,cache:i},async function(a){a.delete({filepath:n})})}catch(a){throw a.caller="git.remove",a}}async function P8({fs:e,cache:t,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:c}){let l;try{l=await q.resolve({gitdir:n,fs:e,ref:i})}catch(p){if(!(p instanceof Ne))throw p}let f=(await Ss({fs:e,gitdir:n,oid:l||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==a);let d=await kp({fs:e,gitdir:n,tree:f});return await yu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:d,parent:l&&[l],message:`Note removed by 'isomorphic-git removeNote'
`,author:s,committer:o,signingKey:c})}async function R8({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:c,cache:l={}}){try{C("fs",e),C("gitdir",n),C("oid",a);let u=new X(e),f=await ca({fs:u,gitdir:n,author:s});if(!f)throw new zt("author");let d=await bs({fs:u,gitdir:n,author:f,committer:o});if(!d)throw new zt("committer");return await P8({fs:u,cache:l,onSign:t,gitdir:n,ref:i,oid:a,author:f,committer:d,signingKey:c})}catch(u){throw u.caller="git.removeNote",u}}async function M8({fs:e,gitdir:t,oldref:r,ref:n,checkout:i=!1}){if(n!==Kr.default.clean(n))throw new zn(n,Kr.default.clean(n));if(r!==Kr.default.clean(r))throw new zn(r,Kr.default.clean(r));let a=`refs/heads/${r}`,s=`refs/heads/${n}`;if(await q.exists({fs:e,gitdir:t,ref:s}))throw new Jr("branch",n,!1);let c=await q.resolve({fs:e,gitdir:t,ref:a,depth:1});await q.writeRef({fs:e,gitdir:t,ref:s,value:c}),await q.deleteRef({fs:e,gitdir:t,ref:a});let u=await fa({fs:e,gitdir:t,fullname:!0})===a;(i||u)&&await q.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function O8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,oldref:i,checkout:a=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oldref",i),await M8({fs:new X(e),gitdir:r,ref:n,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function R2({gitdir:e,type:t,object:r}){return Gn(_i.wrap({type:t,object:r}))}async function I8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i,cache:a={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let s=new X(e),o,c;try{o=await q.resolve({fs:s,gitdir:r,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await vl({fs:s,cache:a,gitdir:r,oid:o,filepath:n})}catch(f){o=null}let l={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},u=t&&await s.read($(t,n));u&&(c=await R2({gitdir:r,type:"blob",object:u}),o===c&&(l=await s.lstat($(t,n)))),await mt.acquire({fs:s,gitdir:r,cache:a},async function(f){f.delete({filepath:n}),o&&f.insert({filepath:n,stats:l,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function F8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,depth:i}){try{return C("fs",e),C("gitdir",r),C("ref",n),await q.resolve({fs:new X(e),gitdir:r,ref:n,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function $8({fs:e,dir:t,gitdir:r=$(t,".git"),path:n,value:i,append:a=!1}){try{C("fs",e),C("gitdir",r),C("path",n);let s=new X(e),o=await Ve.get({fs:s,gitdir:r});a?await o.append(n,i):await o.set(n,i),await Ve.save({fs:s,gitdir:r,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function L8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let a=new X(e);if(await ws.isIgnored({fs:a,gitdir:r,dir:t,filepath:n}))return"ignored";let o=await D8({fs:a,cache:i,gitdir:r}),c=await M2({fs:a,cache:i,gitdir:r,tree:o,path:n}),l=await mt.acquire({fs:a,gitdir:r,cache:i},async function(m){for(let v of m)if(v.path===n)return v;return null}),u=await a.lstat($(t,n)),f=c!==null,d=l!==null,h=u!==null,p=async()=>{if(d&&!nu(l,u))return l.oid;{let m=await a.read($(t,n)),v=await R2({gitdir:r,type:"blob",object:m});return d&&l.oid===v&&u.size!==-1&&mt.acquire({fs:a,gitdir:r,cache:i},async function(y){y.insert({filepath:n,stats:u,oid:v})}),v}};if(!f&&!h&&!d)return"absent";if(!f&&!h&&d)return"*absent";if(!f&&h&&!d)return"*added";if(!f&&h&&d)return await p()===l.oid?"added":"*added";if(f&&!h&&!d)return"deleted";if(f&&!h&&d)return c===l.oid,"*deleted";if(f&&h&&!d)return await p()===c?"*undeleted":"*undeletemodified";if(f&&h&&d){let m=await p();return m===c?m===l.oid?"unmodified":"*unmodified":m===l.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function M2({fs:e,cache:t,gitdir:r,tree:n,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of n)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:c}=await We({fs:e,cache:t,gitdir:r,oid:s.oid});if(o==="tree"){let l=er.from(c);return M2({fs:e,cache:t,gitdir:r,tree:l,path:i})}if(o==="blob")throw new Gt(s.oid,o,"blob",i.join("/"))}return null}async function D8({fs:e,cache:t,gitdir:r}){let n;try{n=await q.resolve({fs:e,gitdir:r,ref:"HEAD"})}catch(a){if(a instanceof Ne)return[]}let{tree:i}=await Ss({fs:e,cache:t,gitdir:r,oid:n});return i}async function N8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="HEAD",filepaths:i=["."],filter:a,cache:s={},ignored:o=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let c=new X(e);return await ys({fs:c,cache:s,dir:t,gitdir:r,trees:[wi({ref:n}),vu(),gu()],map:async function(l,[u,f,d]){if(!u&&!d&&f&&!o&&await ws.isIgnored({fs:c,dir:t,filepath:l})||!i.some(k=>m2(l,k)))return null;if(a&&!a(l))return;let[h,p,m]=await Promise.all([u&&u.type(),f&&f.type(),d&&d.type()]),v=[h,p,m].includes("blob");if((h==="tree"||h==="special")&&!v)return;if(h==="commit")return null;if((p==="tree"||p==="special")&&!v)return;if(m==="commit")return null;if((m==="tree"||m==="special")&&!v)return;let y=h==="blob"?await u.oid():void 0,b=m==="blob"?await d.oid():void 0,x;h!=="blob"&&p==="blob"&&m!=="blob"?x="42":p==="blob"&&(x=await f.oid());let E=[void 0,y,x,b],_=E.map(k=>E.indexOf(k));return _.shift(),[l,..._]}})}catch(c){throw c.caller="git.statusMatrix",c}}async function j8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,force:a=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let s=new X(e);if(n===void 0)throw new Qt("ref");n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`;let o=await q.resolve({fs:s,gitdir:r,ref:i||"HEAD"});if(!a&&await q.exists({fs:s,gitdir:r,ref:n}))throw new Jr("tag",n);await q.writeRef({fs:s,gitdir:r,ref:n,value:o})}catch(s){throw s.caller="git.tag",s}}async function B8({fs:e,dir:t,gitdir:r=$(t,".git"),cache:n={},filepath:i,oid:a,mode:s,add:o,remove:c,force:l}){try{C("fs",e),C("gitdir",r),C("filepath",i);let u=new X(e);if(c)return await mt.acquire({fs:u,gitdir:r,cache:n},async function(d){let h;if(!l&&(h=await u.lstat($(t,i)),h)){if(h.isDirectory())throw new xi("directory");return}d.has({filepath:i})&&d.delete({filepath:i})});let f;if(!a){if(f=await u.lstat($(t,i)),!f)throw new Ne(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new xi("directory")}return await mt.acquire({fs:u,gitdir:r,cache:n},async function(d){if(!o&&!d.has({filepath:i}))throw new Ne(`file at "${i}" in index and "add" not set`);let h={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:s,uid:0,gid:0,size:0};if(!a){h=f;let p=h.isSymbolicLink()?await u.readlink($(t,i)):await u.read($(t,i));a=await pr({fs:u,gitdir:r,type:"blob",format:"content",object:p})}return d.insert({filepath:i,oid:a,stats:h}),a})}catch(u){throw u.caller="git.updateIndex",u}}function H8(){try{return wu.version}catch(e){throw e.caller="git.version",e}}async function U8({fs:e,dir:t,gitdir:r=$(t,".git"),trees:n,map:i,reduce:a,iterate:s,cache:o={}}){try{return C("fs",e),C("gitdir",r),C("trees",n),await ys({fs:new X(e),cache:o,dir:t,gitdir:r,trees:n,map:i,reduce:a,iterate:s})}catch(c){throw c.caller="git.walk",c}}async function G8({fs:e,dir:t,gitdir:r=$(t,".git"),blob:n}){try{return C("fs",e),C("gitdir",r),C("blob",n),await pr({fs:new X(e),gitdir:r,type:"blob",object:n,format:"content"})}catch(i){throw i.caller="git.writeBlob",i}}async function z8({fs:e,gitdir:t,commit:r}){let n=tr.from(r).toObject();return await pr({fs:e,gitdir:t,type:"commit",object:n,format:"content"})}async function V8({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n}){try{return C("fs",e),C("gitdir",r),C("commit",n),await z8({fs:new X(e),gitdir:r,commit:n})}catch(i){throw i.caller="git.writeCommit",i}}async function W8({fs:e,dir:t,gitdir:r=$(t,".git"),type:n,object:i,format:a="parsed",oid:s,encoding:o=void 0}){try{let c=new X(e);if(a==="parsed"){switch(n){case"commit":i=tr.from(i).toObject();break;case"tree":i=er.from(i).toObject();break;case"blob":i=Buffer.from(i,o);break;case"tag":i=hr.from(i).toObject();break;default:throw new Gt(s||"",n,"blob|commit|tag|tree")}a="content"}return s=await pr({fs:c,gitdir:r,type:n,object:i,oid:s,format:a}),s}catch(c){throw c.caller="git.writeObject",c}}async function q8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,value:i,force:a=!1,symbolic:s=!1}){try{C("fs",e),C("gitdir",r),C("ref",n),C("value",i);let o=new X(e);if(n!==Kr.default.clean(n))throw new zn(n,Kr.default.clean(n));if(!a&&await q.exists({fs:o,gitdir:r,ref:n}))throw new Jr("ref",n);s?await q.writeSymbolicRef({fs:o,gitdir:r,ref:n,value:i}):(i=await q.resolve({fs:o,gitdir:r,ref:i}),await q.writeRef({fs:o,gitdir:r,ref:n,value:i}))}catch(o){throw o.caller="git.writeRef",o}}async function Y8({fs:e,gitdir:t,tag:r}){let n=hr.from(r).toObject();return await pr({fs:e,gitdir:t,type:"tag",object:n,format:"content"})}async function X8({fs:e,dir:t,gitdir:r=$(t,".git"),tag:n}){try{return C("fs",e),C("gitdir",r),C("tag",n),await Y8({fs:new X(e),gitdir:r,tag:n})}catch(i){throw i.caller="git.writeTag",i}}async function Z8({fs:e,dir:t,gitdir:r=$(t,".git"),tree:n}){try{return C("fs",e),C("gitdir",r),C("tree",n),await kp({fs:new X(e),gitdir:r,tree:n})}catch(i){throw i.caller="git.writeTree",i}}var K8={Errors:gl,STAGE:gu,TREE:wi,WORKDIR:vu,add:ZM,abortMerge:VM,addNote:JM,addRemote:QM,annotatedTag:tO,branch:nO,checkout:aO,clone:gO,commit:vO,getConfig:NO,getConfigAll:BO,setConfig:$8,currentBranch:yO,deleteBranch:bO,deleteRef:_O,deleteRemote:SO,deleteTag:AO,expandOid:PO,expandRef:RO,fastForward:FO,fetch:$O,findMergeBase:LO,findRoot:DO,getRemoteInfo:HO,getRemoteInfo2:UO,hashBlob:zO,indexPack:WO,init:qO,isDescendent:YO,isIgnored:XO,listBranches:ZO,listFiles:JO,listNotes:e8,listRemotes:r8,listServerRefs:a8,listTags:s8,log:u8,merge:f8,packObjects:p8,pull:m8,push:b8,readBlob:wl,readCommit:_8,readNote:S8,readObject:E8,readTag:k8,readTree:T8,remove:C8,removeNote:R8,renameBranch:O8,resetIndex:I8,updateIndex:B8,resolveRef:F8,status:L8,statusMatrix:N8,tag:j8,version:H8,walk:U8,writeBlob:G8,writeCommit:V8,writeObject:W8,writeRef:q8,writeTag:X8,writeTree:Z8},ie=K8;var Me=require("obsidian");g();var xa=require("obsidian");g();var qg=require("child_process"),vT=Ze(xu()),Zn=Ze(require("fs/promises")),Xn=require("obsidian"),Be=Ze(require("path")),Wl=require("path");g();var Lu=Ze(D2(),1),Ou=Ze(xu(),1),c_=require("child_process"),W_=Ze(Mp(),1),Cs=Ze(Mp(),1),yx=require("node:events"),Fu=Object.defineProperty,gI=Object.defineProperties,vI=Object.getOwnPropertyDescriptor,yI=Object.getOwnPropertyDescriptors,Kp=Object.getOwnPropertyNames,N2=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,wI=Object.prototype.propertyIsEnumerable,j2=(e,t,r)=>t in e?Fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ir=(e,t)=>{for(var r in t||(t={}))vb.call(t,r)&&j2(e,r,t[r]);if(N2)for(var r of N2(t))wI.call(t,r)&&j2(e,r,t[r]);return e},xl=(e,t)=>gI(e,yI(t)),W=(e,t)=>function(){return e&&(t=(0,e[Kp(e)[0]])(e=0)),t},bI=(e,t)=>function(){return t||(0,e[Kp(e)[0]])((t={exports:{}}).exports,t),t.exports},rt=(e,t)=>{for(var r in t)Fu(e,r,{get:t[r],enumerable:!0})},_I=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Kp(t))!vb.call(e,i)&&i!==r&&Fu(e,i,{get:()=>t[i],enumerable:!(n=vI(t,i))||n.enumerable});return e},Ke=e=>_I(Fu({},"__esModule",{value:!0}),e),_l=(e,t,r)=>new Promise((n,i)=>{var a=c=>{try{o(r.next(c))}catch(l){i(l)}},s=c=>{try{o(r.throw(c))}catch(l){i(l)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,s);o((r=r.apply(e,t)).next())});function xI(...e){let t=new String(e);return $u.set(t,e),t}function Ru(e){return e instanceof String&&$u.has(e)}function B2(e){return $u.get(e)||[]}var $u,kl=W({"src/lib/args/pathspec.ts"(){"use strict";$u=new WeakMap}}),yr,Ei=W({"src/lib/errors/git-error.ts"(){"use strict";yr=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),Tl,Rs=W({"src/lib/errors/git-response-error.ts"(){"use strict";Ei(),Tl=class extends yr{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),yb,wb=W({"src/lib/errors/task-configuration-error.ts"(){"use strict";Ei(),yb=class extends yr{constructor(e){super(void 0,e)}}}});function bb(e){return typeof e=="function"?e:ga}function _b(e){return typeof e=="function"&&e!==ga}function xb(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Sb(e,t=0){return Eb(e)&&e.length>t?e[t]:void 0}function ma(e,t=0){if(Eb(e)&&e.length>t)return e[e.length-1-t]}function Eb(e){return!!(e&&typeof e.length=="number")}function Cl(e="",t=!0,r=`
`){return e.split(r).reduce((n,i)=>{let a=t?i.trim():i;return a&&n.push(a),n},[])}function Jp(e,t){return Cl(e,!0).map(r=>t(r))}function Qp(e){return(0,Lu.exists)(e,Lu.FOLDER)}function ke(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Ab(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Du(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function _n(e){return Array.isArray(e)?e:[e]}function kb(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Tb(e){return _n(e).map(String)}function Ie(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function Sl(e,t){let r=[];for(let n=0,i=e.length;n<i;n++)r.push(t,e[n]);return r}function El(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Cb(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function Np(e=0){return new Promise(t=>setTimeout(t,e))}function jp(e){if(e!==!1)return e}var Ps,ga,Pl,Nu=W({"src/lib/utils/util.ts"(){"use strict";Ps="\0",ga=()=>{},Pl=Object.prototype.toString.call.bind(Object.prototype.toString)}});function xn(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function em(e,t){let r=Ru(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function tm(e){return!!e&&Pl(e)==="[object Object]"}function Pb(e){return typeof e=="function"}var Rl,Pt,Rb,Mu,rm,Mb=W({"src/lib/utils/argument-filters.ts"(){"use strict";Nu(),kl(),Rl=e=>Array.isArray(e),Pt=e=>typeof e=="string",Rb=e=>Array.isArray(e)&&e.every(Pt),Mu=e=>Pt(e)||Array.isArray(e)&&e.every(Pt),rm=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),Bp,SI=W({"src/lib/utils/exit-codes.ts"(){"use strict";Bp=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(Bp||{})}}),Al,EI=W({"src/lib/utils/git-output-streams.ts"(){"use strict";Al=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new Al(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),ce,Si,AI=W({"src/lib/utils/line-parser.ts"(){"use strict";ce=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,a)=>this.addMatch(i,a,r(a)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},Si=class extends ce{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function Ob(...e){let t=process.cwd(),r=Object.assign(Ir({baseDir:t},Ib),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Ib,kI=W({"src/lib/utils/simple-git-options.ts"(){"use strict";Ib={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function nm(e,t=[]){return tm(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];return Ru(i)?r.push(i):em(i,["boolean"])?r.push(n+"="+i):r.push(n),r},t):t}function rr(e,t=0,r=!1){let n=[];for(let i=0,a=t<0?e.length:t;i<a;i++)"string|number".includes(typeof e[i])&&n.push(String(e[i]));return nm(im(e),n),r||n.push(...TI(e)),n}function TI(e){let t=typeof ma(e)=="function";return xn(ma(e,t?1:0),Rl,[])}function im(e){let t=Pb(ma(e));return xn(ma(e,t?1:0),tm)}function Je(e,t=!0){let r=bb(ma(e));return t||_b(r)?r:void 0}var CI=W({"src/lib/utils/task-options.ts"(){"use strict";Mb(),Nu(),kl()}});function Hp(e,t){return e(t.stdOut,t.stdErr)}function ir(e,t,r,n=!0){return _n(r).forEach(i=>{for(let a=Cl(i,n),s=0,o=a.length;s<o;s++){let c=(l=0)=>{if(!(s+l>=o))return a[s+l]};t.some(({parse:l})=>l(c,e))}}),e}var PI=W({"src/lib/utils/task-parser.ts"(){"use strict";Nu()}}),Fb={};rt(Fb,{ExitCodes:()=>Bp,GitOutputStreams:()=>Al,LineParser:()=>ce,NOOP:()=>ga,NULL:()=>Ps,RemoteLineParser:()=>Si,append:()=>ke,appendTaskOptions:()=>nm,asArray:()=>_n,asCamelCase:()=>kb,asFunction:()=>bb,asNumber:()=>Ie,asStringArray:()=>Tb,bufferToString:()=>El,callTaskParser:()=>Hp,createInstanceConfig:()=>Ob,delay:()=>Np,filterArray:()=>Rl,filterFunction:()=>Pb,filterHasLength:()=>rm,filterPlainObject:()=>tm,filterPrimitives:()=>em,filterString:()=>Pt,filterStringArray:()=>Rb,filterStringOrStringArray:()=>Mu,filterType:()=>xn,first:()=>Sb,folderExists:()=>Qp,forEachLineWithContent:()=>Jp,getTrailingOptions:()=>rr,including:()=>Ab,isUserFunction:()=>_b,last:()=>ma,objectToString:()=>Pl,orVoid:()=>jp,parseStringResponse:()=>ir,pick:()=>Cb,prefixedArray:()=>Sl,remove:()=>Du,splitOn:()=>xb,toLinesWithContent:()=>Cl,trailingFunctionArgument:()=>Je,trailingOptionsArgument:()=>im});var oe=W({"src/lib/utils/index.ts"(){"use strict";Mb(),SI(),EI(),AI(),kI(),CI(),PI(),Nu()}}),$b={};rt($b,{CheckRepoActions:()=>Up,checkIsBareRepoTask:()=>Db,checkIsRepoRootTask:()=>Lb,checkIsRepoTask:()=>RI});function RI(e){switch(e){case"bare":return Db();case"root":return Lb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:ju,parser:am}}function Lb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:ju,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Db(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:ju,parser:am}}function MI(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Up,ju,am,Nb=W({"src/lib/tasks/check-is-repo.ts"(){"use strict";oe(),Up=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Up||{}),ju=({exitCode:e},t,r,n)=>{if(e===128&&MI(t))return r(Buffer.from("false"));n(t)},am=e=>e.trim()==="true"}});function OI(e,t){let r=new jb(e),n=e?Hb:Bb;return Cl(t).forEach(i=>{let a=i.replace(n,"");r.paths.push(a),(Ub.test(a)?r.folders:r.files).push(a)}),r}var jb,Bb,Hb,Ub,II=W({"src/lib/responses/CleanSummary.ts"(){"use strict";oe(),jb=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Bb=/^[a-z]+\s*/i,Hb=/^[a-z]+\s+[a-z]+\s*/i,Ub=/\/$/}}),Gp={};rt(Gp,{EMPTY_COMMANDS:()=>Bu,adhocExecTask:()=>Gb,configurationErrorTask:()=>nr,isBufferTask:()=>Vb,isEmptyTask:()=>Wb,straightThroughBufferTask:()=>zb,straightThroughStringTask:()=>Vt});function Gb(e){return{commands:Bu,format:"empty",parser:e}}function nr(e){return{commands:Bu,format:"empty",parser(){throw typeof e=="string"?new yb(e):e}}}function Vt(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function zb(e){return{commands:e,format:"buffer",parser(t){return t}}}function Vb(e){return e.format==="buffer"}function Wb(e){return e.format==="empty"||!e.commands.length}var Bu,tt=W({"src/lib/tasks/task.ts"(){"use strict";wb(),Bu=[]}}),qb={};rt(qb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>sm,CONFIG_ERROR_MODE_REQUIRED:()=>om,CONFIG_ERROR_UNKNOWN_OPTION:()=>lm,CleanOptions:()=>ku,cleanTask:()=>Yb,cleanWithOptionsTask:()=>FI,isCleanOptionsArray:()=>$I});function FI(e,t){let{cleanMode:r,options:n,valid:i}=LI(e);return r?i.options?(n.push(...t),n.some(jI)?nr(sm):Yb(r,n)):nr(lm+JSON.stringify(e)):nr(om)}function Yb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return OI(e==="n",n)}}}function $I(e){return Array.isArray(e)&&e.every(t=>cm.has(t))}function LI(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{DI(i)?(t=i,n.cleanMode=!0):n.options=n.options&&NI(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function DI(e){return e==="f"||e==="n"}function NI(e){return/^-[a-z]$/i.test(e)&&cm.has(e.charAt(1))}function jI(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var sm,om,lm,ku,cm,Xb=W({"src/lib/tasks/clean.ts"(){"use strict";II(),oe(),tt(),sm="Git clean interactive mode is not supported",om='Git clean mode parameter ("n" or "f") is required',lm="Git clean unknown option found in: ",ku=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(ku||{}),cm=new Set(["i",...Tb(Object.values(ku))])}});function BI(e){let t=new Kb;for(let r of Zb(e))t.addValue(r.file,String(r.key),r.value);return t}function HI(e,t){let r=null,n=[],i=new Map;for(let a of Zb(e,t))a.key===t&&(n.push(r=a.value),i.has(a.file)||i.set(a.file,[]),i.get(a.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function UI(e){return e.replace(/^(file):/,"")}function*Zb(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;n<i;){let a=UI(r[n++]),s=r[n++],o=t;if(s.includes(`
`)){let c=xb(s,`
`);o=c[0],s=c[1]}yield{file:a,key:o,value:s}}}var Kb,GI=W({"src/lib/responses/ConfigList.ts"(){"use strict";oe(),Kb=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=ma(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Op(e,t){return typeof e=="string"&&zp.hasOwnProperty(e)?e:t}function zI(e,t,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(a){return a}}}function VI(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return HI(n,e)}}}function WI(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return BI(r)}}}function qI(){return{addConfig(e,t,...r){return this._runTask(zI(e,t,r[0]===!0,Op(r[1],"local")),Je(arguments))},getConfig(e,t){return this._runTask(VI(e,Op(t,void 0)),Je(arguments))},listConfig(...e){return this._runTask(WI(Op(e[0],void 0)),Je(arguments))}}}var zp,Jb=W({"src/lib/tasks/config.ts"(){"use strict";GI(),oe(),zp=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(zp||{})}});function YI(e){return Qb.has(e)}var Ip,Qb,e_=W({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ip=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Ip||{}),Qb=new Set(Object.values(Ip))}});function XI(...e){return new r_().param(...e)}function ZI(e){let t=new Set,r={};return Jp(e,n=>{let[i,a,s]=n.split(Ps);t.add(i),(r[i]=r[i]||[]).push({line:Ie(a),path:i,preview:s})}),{paths:t,results:r}}function KI(){return{grep(e){let t=Je(arguments),r=rr(arguments);for(let i of t_)if(r.includes(i))return this._runTask(nr(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=XI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(i){return ZI(i)}},t)}}}var t_,bl,H2,r_,n_=W({"src/lib/tasks/grep.ts"(){"use strict";oe(),tt(),t_=["-h"],bl=Symbol("grepQuery"),r_=class{constructor(){this[H2]=[]}*[(H2=bl,Symbol.iterator)](){for(let e of this[bl])yield e}and(...e){return e.length&&this[bl].push("--and","(",...Sl(e,"-e"),")"),this}param(...e){return this[bl].push(...Sl(e,"-e")),this}}}}),i_={};rt(i_,{ResetMode:()=>Tu,getResetMode:()=>QI,resetTask:()=>JI});function JI(e,t){let r=["reset"];return a_(e)&&r.push(`--${e}`),r.push(...t),Vt(r)}function QI(e){if(a_(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function a_(e){return s_.includes(e)}var Tu,s_,o_=W({"src/lib/tasks/reset.ts"(){"use strict";tt(),Tu=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(Tu||{}),s_=Array.from(Object.values(Tu))}});function eF(){return(0,Ou.default)("simple-git")}function U2(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...i)=>{e(n,...i),r(n,...i)}:e:(n,...i)=>{e(`%s ${n}`,t,...i),r&&r(n,...i)}}function tF(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function um(e,t,r,n=eF()){let i=e&&`[${e}]`||"",a=[],s=typeof t=="string"?n.extend(t):t,o=tF(xn(t,Pt),s,n);return l(r);function c(u,f){return ke(a,um(e,o.replace(/^[^:]+/,u),f,n))}function l(u){let f=u&&`[${u}]`||"",d=s&&U2(s,f)||ga,h=U2(n,`${i} ${f}`,d);return Object.assign(s?d:h,{label:e,sibling:c,info:h,step:l})}}var l_=W({"src/lib/git-logger.ts"(){"use strict";oe(),Ou.default.formatters.L=e=>String(rm(e)?e.length:"-"),Ou.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Pl(e)}}),Eu,Vp,rF=W({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";Ei(),l_(),Eu=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=Eu.getName(e.commands[0]),r=um(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new yr(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++Eu.counter}`}},Vp=Eu,Vp.counter=0}});function pa(e,t){return{method:Sb(e.commands)||"",commands:t}}function nF(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function G2(e,t,r,n){return i=>{r("%s received %L bytes",t,i),n("%B",i),e.push(i)}}var Wp,iF=W({"src/lib/runners/git-executor-chain.ts"(){"use strict";Ei(),tt(),oe(),rF(),Wp=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Vp}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return _l(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield Wb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof yr?Object.assign(t,{task:e}):new yr(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return _l(this,null,function*(){let r=this._plugins.exec("spawn.binary","",pa(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],pa(e,e.commands)),i=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),a=yield this.handleTaskData(e,n,i,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),Vb(e)?Hp(e.parser,a):Hp(e.parser,a.asStrings())})}attemptEmptyTask(e,t){return _l(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:i,rejection:a,stdOut:s,stdErr:o}=r;return new Promise((c,l)=>{n("Preparing to handle process response exitCode=%d stdOut=",i);let{error:u}=this._plugins.exec("task.error",{error:a},Ir(Ir({},pa(e,t)),r));if(u&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,u,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",Pl(f)),c(new Al(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(o)))},l);if(u)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,o.length,a),l(u);n.info("retrieving task output complete"),c(new Al(Buffer.concat(s),Buffer.concat(o)))})}gitResponse(e,t,r,n,i){return _l(this,null,function*(){let a=i.sibling("output"),s=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},pa(e,e.commands));return new Promise(o=>{let c=[],l=[];i.info("%s %o",t,r),i("%O",s);let u=this._beforeSpawn(e,r);if(u)return o({stdOut:c,stdErr:l,exitCode:9901,rejection:u});this._plugins.exec("spawn.before",void 0,xl(Ir({},pa(e,r)),{kill(d){u=d||u}}));let f=(0,c_.spawn)(t,r,s);f.stdout.on("data",G2(c,"stdOut",i,a.step("stdOut"))),f.stderr.on("data",G2(l,"stdErr",i,a.step("stdErr"))),f.on("error",nF(l,i)),n&&(i("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,xl(Ir({},pa(e,r)),{spawned:f,close(d,h){o({stdOut:c,stdErr:l,exitCode:d,rejection:u||h})},kill(d){f.killed||(u=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,xl(Ir({},pa(e,t)),{kill(n){r=n||r}})),r}}}}),u_={};rt(u_,{GitExecutor:()=>f_});var f_,aF=W({"src/lib/runners/git-executor.ts"(){"use strict";iF(),f_=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new Wp(this,this._scheduler,this._plugins)}chain(){return new Wp(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function sF(e,t,r=ga){let n=a=>{r(null,a)},i=a=>{(a==null?void 0:a.task)===e&&r(a instanceof Tl?oF(a):a,void 0)};t.then(n,i)}function oF(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=ga};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,i){return i in e||(n[i]={enumerable:!1,configurable:!1,get(){return t(i),e.git[i]}}),n}}var lF=W({"src/lib/task-callback.ts"(){"use strict";Rs(),oe()}});function z2(e,t){return Gb(r=>{if(!Qp(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var cF=W({"src/lib/tasks/change-working-directory.ts"(){"use strict";oe(),tt()}});function Fp(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Du(t,"-B")),Vt(t)}function uF(){return{checkout(){return this._runTask(Fp(rr(arguments,1)),Je(arguments))},checkoutBranch(e,t){return this._runTask(Fp(["-b",e,t,...rr(arguments)]),Je(arguments))},checkoutLocalBranch(e){return this._runTask(Fp(["-b",e,...rr(arguments)]),Je(arguments))}}}var fF=W({"src/lib/tasks/checkout.ts"(){"use strict";oe(),tt()}});function dF(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function hF(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return ir(dF(),[d_],e)}})}}}var d_,pF=W({"src/lib/tasks/count-objects.ts"(){"use strict";oe(),d_=new ce(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=kb(t);e.hasOwnProperty(n)&&(e[n]=Ie(r))})}});function mF(e){return ir({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},h_,e)}var h_,gF=W({"src/lib/parsers/parse-commit.ts"(){"use strict";oe(),h_=[new ce(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new ce(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new ce(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new ce(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(r,10)||0;n==="-"?e.summary.deletions=i:n==="+"&&(e.summary.insertions=i)})]}});function vF(e,t,r){return{commands:["-c","core.abbrev=40","commit",...Sl(e,"-m"),...t,...r],format:"utf-8",parser:mF}}function yF(){return{commit(t,...r){let n=Je(arguments),i=e(t)||vF(_n(t),_n(xn(r[0],Mu,[])),[...xn(r[1],Rl,[]),...rr(arguments,0,!0)]);return this._runTask(i,n)}};function e(t){return!Mu(t)&&nr("git.commit: requires the commit message to be supplied as a string/string[]")}}var wF=W({"src/lib/tasks/commit.ts"(){"use strict";gF(),oe(),tt()}});function bF(){return{firstCommit(){return this._runTask(Vt(["rev-list","--max-parents=0","HEAD"],!0),Je(arguments))}}}var _F=W({"src/lib/tasks/first-commit.ts"(){"use strict";oe(),tt()}});function xF(e,t){let r=["hash-object",e];return t&&r.push("-w"),Vt(r,!0)}var SF=W({"src/lib/tasks/hash-object.ts"(){"use strict";tt()}});function EF(e,t,r){let n=String(r).trim(),i;if(i=p_.exec(n))return new Cu(e,t,!1,i[1]);if(i=m_.exec(n))return new Cu(e,t,!0,i[1]);let a="",s=n.split(" ");for(;s.length;)if(s.shift()==="in"){a=s.join(" ");break}return new Cu(e,t,/^re/i.test(n),a)}var Cu,p_,m_,AF=W({"src/lib/responses/InitSummary.ts"(){"use strict";Cu=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},p_=/^Init.+ repository in (.+)$/,m_=/^Rein.+ in (.+)$/}});function kF(e){return e.includes(fm)}function TF(e=!1,t,r){let n=["init",...r];return e&&!kF(n)&&n.splice(1,0,fm),{commands:n,format:"utf-8",parser(i){return EF(n.includes("--bare"),t,i)}}}var fm,CF=W({"src/lib/tasks/init.ts"(){"use strict";AF(),fm="--bare"}});function dm(e){for(let t=0;t<e.length;t++){let r=hm.exec(e[t]);if(r)return`--${r[1]}`}return""}function PF(e){return hm.test(e)}var hm,Ml=W({"src/lib/args/log-format.ts"(){"use strict";hm=/^--(stat|numstat|name-only|name-status)(=|$)/}}),g_,RF=W({"src/lib/responses/DiffSummary.ts"(){"use strict";g_=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function v_(e=""){let t=y_[e];return r=>ir(new g_,t,r,!1)}var $p,V2,W2,q2,y_,w_=W({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";Ml(),RF(),e_(),oe(),$p=[new ce(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:Ie(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new ce(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:Ie(r),after:Ie(n),binary:!0})}),new ce(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=Ie(t),e.insertions=Ie(n==null?void 0:n[1]),e.deletions=Ie(i==null?void 0:i[1])})],V2=[new ce(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let i=Ie(t),a=Ie(r);e.changed++,e.insertions+=i,e.deletions+=a,e.files.push({file:n,changes:i+a,insertions:i,deletions:a,binary:!1})}),new ce(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],W2=[new ce(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],q2=[new ce(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,i,a])=>{e.changed++,e.files.push({file:a!=null?a:n,changes:0,insertions:0,deletions:0,binary:!1,status:jp(YI(t)&&t),from:jp(!!a&&n!==a&&n),similarity:Ie(r)})})],y_={"":$p,"--stat":$p,"--numstat":V2,"--name-status":q2,"--name-only":W2}}});function MF(e,t){return t.reduce((r,n,i)=>(r[n]=e[i]||"",r),Object.create({diff:null}))}function b_(e=gm,t=__,r=""){let n=v_(r);return function(i){let a=Cl(i.trim(),!1,pm).map(function(s){let o=s.split(mm),c=MF(o[0].split(e),t);return o.length>1&&o[1].trim()&&(c.diff=n(o[1])),c});return{all:a,latest:a.length&&a[0]||null,total:a.length}}}var pm,mm,gm,__,x_=W({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";oe(),w_(),Ml(),pm="\xF2\xF2\xF2\xF2\xF2\xF2 ",mm=" \xF2\xF2",gm=" \xF2 ",__=["hash","date","message","refs","author_name","author_email"]}}),S_={};rt(S_,{diffSummaryTask:()=>OF,validateLogFormatConfig:()=>Hu});function OF(e){let t=dm(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Hu(r)||{commands:r,format:"utf-8",parser:v_(t)}}function Hu(e){let t=e.filter(PF);if(t.length>1)return nr(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return nr(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var vm=W({"src/lib/tasks/diff.ts"(){"use strict";Ml(),w_(),tt()}});function IF(e,t){let r=[],n=[];return Object.keys(e).forEach(i=>{r.push(i),n.push(String(e[i]))}),[r,n.join(t)]}function FF(e){return Object.keys(e).reduce((t,r)=>(r in qp||(t[r]=e[r]),t),{})}function E_(e={},t=[]){let r=xn(e.splitter,Pt,gm),n=!em(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[i,a]=IF(n,r),s=[],o=[`--pretty=format:${pm}${a}${mm}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&o.push(`--max-count=${c}`),e.from||e.to){let l=e.symmetric!==!1?"...":"..";s.push(`${e.from||""}${l}${e.to||""}`)}return Pt(e.file)&&o.push("--follow",xI(e.file)),nm(FF(e),o),{fields:i,splitter:r,commands:[...o,...s]}}function $F(e,t,r){let n=b_(e,t,dm(r));return{commands:["log",...r],format:"utf-8",parser:n}}function LF(){return{log(...r){let n=Je(arguments),i=E_(im(arguments),xn(arguments[0],Rl)),a=t(...r)||Hu(i.commands)||e(i);return this._runTask(a,n)}};function e(r){return $F(r.splitter,r.fields,r.commands)}function t(r,n){return Pt(r)&&Pt(n)&&nr("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var qp,A_=W({"src/lib/tasks/log.ts"(){"use strict";Ml(),kl(),x_(),oe(),tt(),vm(),qp=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(qp||{})}}),Pu,k_,DF=W({"src/lib/responses/MergeSummary.ts"(){"use strict";Pu=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},k_=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Yp,T_,NF=W({"src/lib/responses/PullSummary.ts"(){"use strict";Yp=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},T_=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Lp(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Y2(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:Ie(t&&t[1]||"0"),delta:Ie(r&&r[1]||"0")}}var C_,jF=W({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";oe(),C_=[new Si(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=Lp(e.remoteMessages);Object.assign(i,{[n]:Ie(r)})}),new Si(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=Lp(e.remoteMessages);Object.assign(i,{[n]:Ie(r)})}),new Si(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let i=Lp(e.remoteMessages);i.total=Y2(t),i.reused=Y2(r),i.packReused=Ie(n)})]}});function P_(e,t){return ir({remoteMessages:new M_},R_,t)}var R_,M_,O_=W({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";oe(),jF(),R_=[new Si(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...C_,new Si([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Si([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:Ie(t),summary:r,url:n}})],M_=class{constructor(){this.all=[]}}}});function BF(e,t){let r=ir(new T_,I_,[e,t]);return r.message&&r}var X2,Z2,K2,J2,I_,Q2,ym,F_=W({"src/lib/parsers/parse-pull.ts"(){"use strict";NF(),oe(),O_(),X2=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Z2=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,K2=/^(create|delete) mode \d+ (.+)/,J2=[new ce(X2,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new ce(Z2,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new ce(K2,(e,[t,r])=>{ke(e.files,r),ke(t==="create"?e.created:e.deleted,r)})],I_=[new ce(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new ce(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new ce(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,i])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=i,e.hash.remote=r})],Q2=(e,t)=>ir(new Yp,J2,[e,t]),ym=(e,t)=>Object.assign(new Yp,Q2(e,t),P_(e,t))}}),eb,$_,tb,HF=W({"src/lib/parsers/parse-merge.ts"(){"use strict";DF(),oe(),F_(),eb=[new ce(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new ce(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new Pu(t,r))}),new ce(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new Pu(t,r,{deleteRef:n}))}),new ce(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new Pu(t,null))}),new ce(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],$_=(e,t)=>Object.assign(tb(e,t),ym(e,t)),tb=e=>ir(new k_,eb,e)}});function rb(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=$_(t,r);if(n.failed)throw new Tl(n);return n}}:nr("Git.merge requires at least one option")}var UF=W({"src/lib/tasks/merge.ts"(){"use strict";Rs(),HF(),tt()}});function GF(e,t,r){let n=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(e),a=!r.includes("new");return{deleted:n,tag:i,branch:!i,new:!a,alreadyUpdated:a,local:e,remote:t}}var nb,L_,ib,zF=W({"src/lib/parsers/parse-push.ts"(){"use strict";oe(),O_(),nb=[new ce(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new ce(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=xl(Ir({},e.ref||{}),{local:t})}),new ce(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(GF(t,r,n))}),new ce(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=xl(Ir({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new ce(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,i])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:i}}})],L_=(e,t)=>{let r=ib(e,t),n=P_(e,t);return Ir(Ir({},r),n)},ib=(e,t)=>ir({pushed:[]},nb,[e,t])}}),D_={};rt(D_,{pushTagsTask:()=>VF,pushTask:()=>wm});function VF(e={},t){return ke(t,"--tags"),wm(e,t)}function wm(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Du(r,"-v"),ke(r,"--verbose"),ke(r,"--porcelain"),{commands:r,format:"utf-8",parser:L_}}var N_=W({"src/lib/tasks/push.ts"(){"use strict";zF(),oe()}});function WF(){return{showBuffer(){let e=["show",...rr(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(zb(e),Je(arguments))},show(){let e=["show",...rr(arguments,1)];return this._runTask(Vt(e),Je(arguments))}}}var qF=W({"src/lib/tasks/show.ts"(){"use strict";oe(),tt()}}),ab,j_,YF=W({"src/lib/responses/FileStatusSummary.ts"(){"use strict";ab=/^(.+)\0(.+)$/,j_=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=ab.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function sb(e){let[t,r]=e.split(Ps);return{from:r||t,to:t}}function vr(e,t,r){return[`${e}${t}`,r]}function Dp(e,...t){return t.map(r=>vr(e,r,(n,i)=>ke(n.conflicted,i)))}function XF(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(i,a,s){let o=`${i}${a}`,c=B_.get(o);c&&c(e,s),o!=="##"&&o!=="!!"&&e.files.push(new j_(s,i,a))}}var ob,B_,H_,ZF=W({"src/lib/responses/StatusSummary.ts"(){"use strict";oe(),YF(),ob=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},B_=new Map([vr(" ","A",(e,t)=>ke(e.created,t)),vr(" ","D",(e,t)=>ke(e.deleted,t)),vr(" ","M",(e,t)=>ke(e.modified,t)),vr("A"," ",(e,t)=>ke(e.created,t)&&ke(e.staged,t)),vr("A","M",(e,t)=>ke(e.created,t)&&ke(e.staged,t)&&ke(e.modified,t)),vr("D"," ",(e,t)=>ke(e.deleted,t)&&ke(e.staged,t)),vr("M"," ",(e,t)=>ke(e.modified,t)&&ke(e.staged,t)),vr("M","M",(e,t)=>ke(e.modified,t)&&ke(e.staged,t)),vr("R"," ",(e,t)=>{ke(e.renamed,sb(t))}),vr("R","M",(e,t)=>{let r=sb(t);ke(e.renamed,r),ke(e.modified,r.to)}),vr("!","!",(e,t)=>{ke(e.ignored=e.ignored||[],t)}),vr("?","?",(e,t)=>ke(e.not_added,t)),...Dp("A","A","U"),...Dp("D","D","U"),...Dp("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,a=/\.{3}(\S*)/,s=/\son\s([\S]+)$/,o;o=r.exec(t),e.ahead=o&&+o[1]||0,o=n.exec(t),e.behind=o&&+o[1]||0,o=i.exec(t),e.current=o&&o[1],o=a.exec(t),e.tracking=o&&o[1],o=s.exec(t),e.current=o&&o[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),H_=function(e){let t=e.split(Ps),r=new ob;for(let n=0,i=t.length;n<i;){let a=t[n++].trim();a&&(a.charAt(0)==="R"&&(a+=Ps+(t[n++]||"")),XF(r,a))}return r}}});function KF(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!U_.includes(r))],parser(r){return H_(r)}}}var U_,JF=W({"src/lib/tasks/status.ts"(){"use strict";ZF(),U_=["--null","-z"]}});function Iu(e=0,t=0,r=0,n="",i=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function QF(){return Iu(0,0,0,"",!1)}function e4(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:t4,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(bm));n(t)}})}}}function t4(e){return e===bm?QF():ir(Iu(0,0,0,e),G_,e)}var bm,G_,r4=W({"src/lib/tasks/version.ts"(){"use strict";oe(),bm="installed=false",G_=[new ce(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,i=""])=>{Object.assign(e,Iu(Ie(t),Ie(r),Ie(n),i))}),new ce(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,i=""])=>{Object.assign(e,Iu(Ie(t),Ie(r),n,i))})]}}),z_={};rt(z_,{SimpleGitApi:()=>Xp});var Xp,n4=W({"src/lib/simple-git-api.ts"(){"use strict";lF(),cF(),fF(),pF(),wF(),Jb(),_F(),n_(),SF(),CF(),A_(),UF(),N_(),qF(),JF(),tt(),r4(),oe(),Xp=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&sF(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(Vt(["add",..._n(e)]),Je(arguments))}cwd(e){let t=Je(arguments);return typeof e=="string"?this._runTask(z2(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(z2(e.path,e.root&&this._executor||void 0),t):this._runTask(nr("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(xF(e,t===!0),Je(arguments))}init(e){return this._runTask(TF(e===!0,this._executor.cwd,rr(arguments)),Je(arguments))}merge(){return this._runTask(rb(rr(arguments)),Je(arguments))}mergeFromTo(e,t){return Pt(e)&&Pt(t)?this._runTask(rb([e,t,...rr(arguments)]),Je(arguments,!1)):this._runTask(nr("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=wm({remote:xn(arguments[0],Pt),branch:xn(arguments[1],Pt)},rr(arguments));return this._runTask(e,Je(arguments))}stash(){return this._runTask(Vt(["stash",...rr(arguments)]),Je(arguments))}status(){return this._runTask(KF(rr(arguments)),Je(arguments))}},Object.assign(Xp.prototype,uF(),yF(),qI(),hF(),bF(),KI(),LF(),WF(),e4())}}),V_={};rt(V_,{Scheduler:()=>q_});var lb,q_,i4=W({"src/lib/runners/scheduler.ts"(){"use strict";oe(),l_(),lb=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,W_.createDeferred)();return{promise:t,done:r,id:e}}})(),q_=class{constructor(e=2){this.concurrency=e,this.logger=um("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=ke(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Du(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=ke(this.pending,lb());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),Y_={};rt(Y_,{applyPatchTask:()=>a4});function a4(e,t){return Vt(["apply",...t,...e])}var s4=W({"src/lib/tasks/apply-patch.ts"(){"use strict";tt()}});function o4(e,t){return{branch:e,hash:t,success:!0}}function l4(e){return{branch:e,hash:null,success:!1}}var X_,c4=W({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";X_=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Z_(e,t){return t===1&&Zp.test(e)}var cb,Zp,ub,Uu,u4=W({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";c4(),oe(),cb=/(\S+)\s+\(\S+\s([^)]+)\)/,Zp=/^error[^']+'([^']+)'/m,ub=[new ce(cb,(e,[t,r])=>{let n=o4(t,r);e.all.push(n),e.branches[t]=n}),new ce(Zp,(e,[t])=>{let r=l4(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Uu=(e,t)=>ir(new X_,ub,[e,t])}}),K_,f4=W({"src/lib/responses/BranchSummary.ts"(){"use strict";K_=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,i){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:i}}}}});function fb(e){return e?e.charAt(0):""}function J_(e){return ir(new K_,Q_,e)}var Q_,d4=W({"src/lib/parsers/parse-branch.ts"(){"use strict";f4(),oe(),Q_=[new ce(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,i])=>{e.push(fb(t),!0,r,n,i)}),new ce(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,i])=>{e.push(fb(t),!1,r,n,i)})]}}),ex={};rt(ex,{branchLocalTask:()=>p4,branchTask:()=>h4,containsDeleteBranchCommand:()=>tx,deleteBranchTask:()=>g4,deleteBranchesTask:()=>m4});function tx(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function h4(e){let t=tx(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,i){return t?Uu(n,i).all[0]:J_(n)}}}function p4(){return{format:"utf-8",commands:["branch","-v"],parser:J_}}function m4(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return Uu(r,n)},onError({exitCode:r,stdOut:n},i,a,s){if(!Z_(String(i),r))return s(i);a(n)}}}function g4(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,i){return Uu(n,i).branches[e]},onError({exitCode:n,stdErr:i,stdOut:a},s,o,c){if(!Z_(String(s),n))return c(s);throw new Tl(r.parser(El(a),El(i)),String(s))}};return r}var v4=W({"src/lib/tasks/branch.ts"(){"use strict";Rs(),u4(),d4(),oe()}}),rx,y4=W({"src/lib/responses/CheckIgnore.ts"(){"use strict";rx=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),nx={};rt(nx,{checkIgnoreTask:()=>w4});function w4(e){return{commands:["check-ignore",...e],format:"utf-8",parser:rx}}var b4=W({"src/lib/tasks/check-ignore.ts"(){"use strict";y4()}}),ix={};rt(ix,{cloneMirrorTask:()=>x4,cloneTask:()=>ax});function _4(e){return/^--upload-pack(=|$)/.test(e)}function ax(e,t,r){let n=["clone",...r];return Pt(e)&&n.push(e),Pt(t)&&n.push(t),n.find(_4)?nr("git.fetch: potential exploit argument blocked."):Vt(n)}function x4(e,t,r){return ke(r,"--mirror"),ax(e,t,r)}var S4=W({"src/lib/tasks/clone.ts"(){"use strict";tt(),oe()}});function E4(e,t){return ir({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},sx,[e,t])}var sx,A4=W({"src/lib/parsers/parse-fetch.ts"(){"use strict";oe(),sx=[new ce(/From (.+)$/,(e,[t])=>{e.remote=t}),new ce(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new ce(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new ce(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new ce(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,i])=>{e.updated.push({name:n,tracking:i,to:r,from:t})})]}}),ox={};rt(ox,{fetchTask:()=>T4});function k4(e){return/^--upload-pack(=|$)/.test(e)}function T4(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(k4)?nr("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:E4}}var C4=W({"src/lib/tasks/fetch.ts"(){"use strict";A4(),tt()}});function P4(e){return ir({moves:[]},lx,e)}var lx,R4=W({"src/lib/parsers/parse-move.ts"(){"use strict";oe(),lx=[new ce(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),cx={};rt(cx,{moveTask:()=>M4});function M4(e,t){return{commands:["mv","-v",..._n(e),t],format:"utf-8",parser:P4}}var O4=W({"src/lib/tasks/move.ts"(){"use strict";R4(),oe()}}),ux={};rt(ux,{pullTask:()=>I4});function I4(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(i,a){return ym(i,a)},onError(i,a,s,o){let c=BF(El(i.stdOut),El(i.stdErr));if(c)return o(new Tl(c));o(a)}}}var F4=W({"src/lib/tasks/pull.ts"(){"use strict";Rs(),F_(),oe()}});function $4(e){let t={};return fx(e,([r])=>t[r]={name:r}),Object.values(t)}function L4(e){let t={};return fx(e,([r,n,i])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),i&&n&&(t[r].refs[i.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function fx(e,t){Jp(e,r=>t(r.split(/\s+/)))}var D4=W({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";oe()}}),dx={};rt(dx,{addRemoteTask:()=>N4,getRemotesTask:()=>j4,listRemotesTask:()=>B4,remoteTask:()=>H4,removeRemoteTask:()=>U4});function N4(e,t,r){return Vt(["remote","add",...r,e,t])}function j4(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?L4:$4}}function B4(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),Vt(t)}function H4(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),Vt(t)}function U4(e){return Vt(["remote","remove",e])}var G4=W({"src/lib/tasks/remote.ts"(){"use strict";D4(),tt()}}),hx={};rt(hx,{stashListTask:()=>z4});function z4(e={},t){let r=E_(e),n=["stash","list",...r.commands,...t],i=b_(r.splitter,r.fields,dm(n));return Hu(n)||{commands:n,format:"utf-8",parser:i}}var V4=W({"src/lib/tasks/stash-list.ts"(){"use strict";Ml(),x_(),vm(),A_()}}),px={};rt(px,{addSubModuleTask:()=>W4,initSubModuleTask:()=>q4,subModuleTask:()=>Gu,updateSubModuleTask:()=>Y4});function W4(e,t){return Gu(["add",e,t])}function q4(e){return Gu(["init",...e])}function Gu(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),Vt(t)}function Y4(e){return Gu(["update",...e])}var X4=W({"src/lib/tasks/sub-module.ts"(){"use strict";tt()}});function Z4(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?mx(e,t):0}function mx(e,t){return e===t?0:e>t?1:-1}function K4(e){return e.trim()}function Au(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var db,gx,J4=W({"src/lib/responses/TagList.ts"(){"use strict";db=class{constructor(e,t){this.all=e,this.latest=t}},gx=function(e,t=!1){let r=e.split(`
`).map(K4).filter(Boolean);t||r.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return Z4(Au(s[0]),Au(o[0]));for(let c=0,l=Math.max(s.length,o.length);c<l;c++){let u=mx(Au(s[c]),Au(o[c]));if(u)return u}return 0});let n=t?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new db(r,n)}}}),vx={};rt(vx,{addAnnotatedTagTask:()=>t$,addTagTask:()=>e$,tagListTask:()=>Q4});function Q4(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return gx(r,t)}}}function e$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function t$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var r$=W({"src/lib/tasks/tag.ts"(){"use strict";J4()}}),n$=bI({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(aF(),Ke(u_)),{SimpleGitApi:n}=(n4(),Ke(z_)),{Scheduler:i}=(i4(),Ke(V_)),{configurationErrorTask:a}=(tt(),Ke(Gp)),{asArray:s,filterArray:o,filterPrimitives:c,filterString:l,filterStringOrStringArray:u,filterType:f,getTrailingOptions:d,trailingFunctionArgument:h,trailingOptionsArgument:p}=(oe(),Ke(Fb)),{applyPatchTask:m}=(s4(),Ke(Y_)),{branchTask:v,branchLocalTask:y,deleteBranchesTask:b,deleteBranchTask:x}=(v4(),Ke(ex)),{checkIgnoreTask:E}=(b4(),Ke(nx)),{checkIsRepoTask:_}=(Nb(),Ke($b)),{cloneTask:k,cloneMirrorTask:w}=(S4(),Ke(ix)),{cleanWithOptionsTask:A,isCleanOptionsArray:S}=(Xb(),Ke(qb)),{diffSummaryTask:T}=(vm(),Ke(S_)),{fetchTask:P}=(C4(),Ke(ox)),{moveTask:O}=(O4(),Ke(cx)),{pullTask:j}=(F4(),Ke(ux)),{pushTagsTask:D}=(N_(),Ke(D_)),{addRemoteTask:Q,getRemotesTask:de,listRemotesTask:ee,remoteTask:J,removeRemoteTask:Ce}=(G4(),Ke(dx)),{getResetMode:me,resetTask:F}=(o_(),Ke(i_)),{stashListTask:z}=(V4(),Ke(hx)),{addSubModuleTask:N,initSubModuleTask:Re,subModuleTask:Dt,updateSubModuleTask:_t}=(X4(),Ke(px)),{addAnnotatedTagTask:Ee,addTagTask:st,tagListTask:ot}=(r$(),Ke(vx)),{straightThroughBufferTask:Ct,straightThroughStringTask:$e}=(tt(),Ke(Gp));function G(L,Y){this._plugins=Y,this._executor=new r(L.baseDir,new i(L.maxConcurrentProcesses),Y),this._trimmed=L.trimmed}(G.prototype=Object.create(n.prototype)).constructor=G,G.prototype.customBinary=function(L){return this._plugins.reconfigure("binary",L),this},G.prototype.env=function(L,Y){return arguments.length===1&&typeof L=="object"?this._executor.env=L:(this._executor.env=this._executor.env||{})[L]=Y,this},G.prototype.stashList=function(L){return this._runTask(z(p(arguments)||{},o(L)&&L||[]),h(arguments))};function Le(L,Y,ye,De){return typeof ye!="string"?a(`git.${L}() requires a string 'repoPath'`):Y(ye,f(De,l),d(arguments))}G.prototype.clone=function(){return this._runTask(Le("clone",k,...arguments),h(arguments))},G.prototype.mirror=function(){return this._runTask(Le("mirror",w,...arguments),h(arguments))},G.prototype.mv=function(L,Y){return this._runTask(O(L,Y),h(arguments))},G.prototype.checkoutLatestTag=function(L){var Y=this;return this.pull(function(){Y.tags(function(ye,De){Y.checkout(De.latest,L)})})},G.prototype.pull=function(L,Y,ye,De){return this._runTask(j(f(L,l),f(Y,l),d(arguments)),h(arguments))},G.prototype.fetch=function(L,Y){return this._runTask(P(f(L,l),f(Y,l),d(arguments)),h(arguments))},G.prototype.silent=function(L){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},G.prototype.tags=function(L,Y){return this._runTask(ot(d(arguments)),h(arguments))},G.prototype.rebase=function(){return this._runTask($e(["rebase",...d(arguments)]),h(arguments))},G.prototype.reset=function(L){return this._runTask(F(me(L),d(arguments)),h(arguments))},G.prototype.revert=function(L){let Y=h(arguments);return typeof L!="string"?this._runTask(a("Commit must be a string"),Y):this._runTask($e(["revert",...d(arguments,0,!0),L]),Y)},G.prototype.addTag=function(L){let Y=typeof L=="string"?st(L):a("Git.addTag requires a tag name");return this._runTask(Y,h(arguments))},G.prototype.addAnnotatedTag=function(L,Y){return this._runTask(Ee(L,Y),h(arguments))},G.prototype.deleteLocalBranch=function(L,Y,ye){return this._runTask(x(L,typeof Y=="boolean"?Y:!1),h(arguments))},G.prototype.deleteLocalBranches=function(L,Y,ye){return this._runTask(b(L,typeof Y=="boolean"?Y:!1),h(arguments))},G.prototype.branch=function(L,Y){return this._runTask(v(d(arguments)),h(arguments))},G.prototype.branchLocal=function(L){return this._runTask(y(),h(arguments))},G.prototype.raw=function(L){let Y=!Array.isArray(L),ye=[].slice.call(Y?arguments:L,0);for(let vt=0;vt<ye.length&&Y;vt++)if(!c(ye[vt])){ye.splice(vt,ye.length-vt);break}ye.push(...d(arguments,0,!0));var De=h(arguments);return ye.length?this._runTask($e(ye,this._trimmed),De):this._runTask(a("Raw: must supply one or more command to execute"),De)},G.prototype.submoduleAdd=function(L,Y,ye){return this._runTask(N(L,Y),h(arguments))},G.prototype.submoduleUpdate=function(L,Y){return this._runTask(_t(d(arguments,!0)),h(arguments))},G.prototype.submoduleInit=function(L,Y){return this._runTask(Re(d(arguments,!0)),h(arguments))},G.prototype.subModule=function(L,Y){return this._runTask(Dt(d(arguments)),h(arguments))},G.prototype.listRemote=function(){return this._runTask(ee(d(arguments)),h(arguments))},G.prototype.addRemote=function(L,Y,ye){return this._runTask(Q(L,Y,d(arguments)),h(arguments))},G.prototype.removeRemote=function(L,Y){return this._runTask(Ce(L),h(arguments))},G.prototype.getRemotes=function(L,Y){return this._runTask(de(L===!0),h(arguments))},G.prototype.remote=function(L,Y){return this._runTask(J(d(arguments)),h(arguments))},G.prototype.tag=function(L,Y){let ye=d(arguments);return ye[0]!=="tag"&&ye.unshift("tag"),this._runTask($e(ye),h(arguments))},G.prototype.updateServerInfo=function(L){return this._runTask($e(["update-server-info"]),h(arguments))},G.prototype.pushTags=function(L,Y){let ye=D({remote:f(L,l)},d(arguments));return this._runTask(ye,h(arguments))},G.prototype.rm=function(L){return this._runTask($e(["rm","-f",...s(L)]),h(arguments))},G.prototype.rmKeepLocal=function(L){return this._runTask($e(["rm","--cached",...s(L)]),h(arguments))},G.prototype.catFile=function(L,Y){return this._catFile("utf-8",arguments)},G.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},G.prototype._catFile=function(L,Y){var ye=h(Y),De=["cat-file"],vt=Y[0];if(typeof vt=="string")return this._runTask(a("Git.catFile: options must be supplied as an array of strings"),ye);Array.isArray(vt)&&De.push.apply(De,vt);let za=L==="buffer"?Ct(De):$e(De);return this._runTask(za,ye)},G.prototype.diff=function(L,Y){let ye=l(L)?a("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):$e(["diff",...d(arguments)]);return this._runTask(ye,h(arguments))},G.prototype.diffSummary=function(){return this._runTask(T(d(arguments,1)),h(arguments))},G.prototype.applyPatch=function(L){let Y=u(L)?m(s(L),d([].slice.call(arguments,1))):a("git.applyPatch requires one or more string patches as the first argument");return this._runTask(Y,h(arguments))},G.prototype.revparse=function(){let L=["rev-parse",...d(arguments,!0)];return this._runTask($e(L,!0),h(arguments))},G.prototype.clean=function(L,Y,ye){let De=S(L),vt=De&&L.join("")||f(L,l)||"",za=d([].slice.call(arguments,De?1:0));return this._runTask(A(vt,za),h(arguments))},G.prototype.exec=function(L){let Y={commands:[],format:"utf-8",parser(){typeof L=="function"&&L()}};return this._runTask(Y)},G.prototype.clearQueue=function(){return this},G.prototype.checkIgnore=function(L,Y){return this._runTask(E(s(f(L,u,[]))),h(arguments))},G.prototype.checkIsRepo=function(L,Y){return this._runTask(_(f(L,l)),h(arguments))},t.exports=G}});kl();Ei();var i$=class extends yr{constructor(e,t){super(void 0,t),this.config=e}};Ei();Ei();var Vn=class extends yr{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Rs();wb();Nb();Xb();Jb();e_();n_();o_();function a$(e){return e?[{type:"spawn.before",action(n,i){e.aborted&&i.kill(new Vn(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,i){function a(){i.kill(new Vn(void 0,"abort","Abort signal received"))}e.addEventListener("abort",a),i.spawned.on("close",()=>e.removeEventListener("abort",a))}}]:void 0}function s$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function o$(e,t){if(s$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Vn(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function l$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Vn(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new Vn(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new Vn(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function c$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((i,a)=>{let s=a<r.length?r[a+1]:"";e||o$(i,s),t||l$(i,n.method)}),r}}}oe();function u$(e){let t=Sl(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}oe();var hb=(0,Cs.deferred)().promise;function f$({onClose:e=!0,onExit:t=50}={}){function r(){let i=-1,a={close:(0,Cs.deferred)(),closeTimeout:(0,Cs.deferred)(),exit:(0,Cs.deferred)(),exitTimeout:(0,Cs.deferred)()},s=Promise.race([e===!1?hb:a.closeTimeout.promise,t===!1?hb:a.exitTimeout.promise]);return n(e,a.close,a.closeTimeout),n(t,a.exit,a.exitTimeout),{close(o){i=o,a.close.done()},exit(o){i=o,a.exit.done()},get exitCode(){return i},result:s}}function n(i,a,s){i!==!1&&(i===!0?a.promise:a.promise.then(()=>Np(i))).then(s.done)}return{type:"spawn.after",action(i,a){return _l(this,arguments,function*(s,{spawned:o,close:c}){var l,u;let f=r(),d=!0,h=()=>void(d=!1);(l=o.stdout)==null||l.on("data",h),(u=o.stderr)==null||u.on("data",h),o.on("error",h),o.on("close",p=>f.close(p)),o.on("exit",p=>f.exit(p));try{yield f.result,d&&(yield Np(50)),c(f.exitCode)}catch(p){c(f.exitCode,p)}})}}}oe();var d$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",pb="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function h$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function mb(e,t){if(e.length<1||e.length>2)throw new Vn(void 0,"binary",d$);if(e.some(h$))if(t)console.warn(pb);else throw new Vn(void 0,"binary",pb);let[n,i]=e;return{binary:n,prefix:i}}function p$(e,t=["git"],r=!1){let n=mb(_n(t),r);e.on("binary",i=>{n=mb(_n(i),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",i=>n.prefix?[n.prefix,...i]:i)}Ei();function m$(e){return!!(e.exitCode&&e.stdErr.length)}function g$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function v$(e=!1,t=m$,r=g$){return(n,i)=>!e&&n||!t(i)?n:r(i)}function gb(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new yr(void 0,n.toString("utf-8"))}:{error:n}}}}oe();var y$=class{constructor(){this.plugins=new Set,this.events=new yx.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=ke(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return _n(e).forEach(r=>r&&this.plugins.add(ke(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,i=Object.freeze(Object.create(r));for(let a of this.plugins)a.type===e&&(n=a.action(n,i));return n}};oe();function w$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(a,s){return r.includes(s.method)?Ab(a,t):a}},{type:"spawn.after",action(a,s){var o;s.commands.includes(t)&&((o=s.spawned.stderr)==null||o.on("data",c=>{let l=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));l&&e({method:s.method,stage:b$(l[1]),progress:Ie(l[2]),processed:Ie(l[3]),total:Ie(l[4])})}))}}]}function b$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}oe();function _$(e){let t=Cb(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ir(Ir({},t),r)}}}function x$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,i){var a,s;let o;function c(){o&&clearTimeout(o),o=setTimeout(u,e)}function l(){var f,d;(f=i.spawned.stdout)==null||f.off("data",c),(d=i.spawned.stderr)==null||d.off("data",c),i.spawned.off("exit",l),i.spawned.off("close",l),o&&clearTimeout(o)}function u(){l(),i.kill(new Vn(void 0,"timeout","block timeout reached"))}r&&((a=i.spawned.stdout)==null||a.on("data",c)),t&&((s=i.spawned.stderr)==null||s.on("data",c)),i.spawned.on("exit",l),i.spawned.on("close",l),c()}}}kl();function S$(){return{type:"spawn.args",action(e){let t=[],r;function n(i){(r=r||[]).push(...i)}for(let i=0;i<e.length;i++){let a=e[i];if(Ru(a)){n(B2(a));continue}if(a==="--"){n(e.slice(i+1).flatMap(s=>Ru(s)&&B2(s)||s));break}t.push(a)}return r?[...t,"--",...r.map(String)]:t}}}oe();var E$=n$();function A$(e,t){var r;let n=new y$,i=Ob(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!Qp(i.baseDir))throw new i$(i,"Cannot use simple-git on a directory that does not exist");return Array.isArray(i.config)&&n.add(u$(i.config)),n.add(c$(i.unsafe)),n.add(S$()),n.add(f$(i.completion)),i.abort&&n.add(a$(i.abort)),i.progress&&n.add(w$(i.progress)),i.timeout&&n.add(x$(i.timeout)),i.spawnOptions&&n.add(_$(i.spawnOptions)),n.add(gb(v$(!0))),i.errors&&n.add(gb(i.errors)),p$(n,i.binary,(r=i.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new E$(i,n)}Rs();var wx=A$;g();var bx=require("obsidian"),zu="YYYY-MM-DD",_m=`${zu} HH:mm`,xm=`${zu} HH:mm:ss`,Vu=40,Ms="conflict-files-obsidian-git.md",Sn={commitMessage:"vault backup: {{date}}",commitDateFormat:xm,autoSaveInterval:0,autoPushInterval:0,autoPullInterval:0,autoPullOnBoot:!1,disablePush:!1,pullBeforePush:!0,disablePopups:!1,disablePopupsForNoChanges:!1,listChangedFilesInMessageBody:!1,showStatusBar:!0,updateSubmodules:!1,syncMethod:"merge",customMessageOnAutoBackup:!1,autoBackupAfterFileChange:!1,treeStructure:!1,refreshSourceControl:bx.Platform.isDesktopApp,basePath:"",differentIntervalCommitAndPush:!1,changedFilesInStatusBar:!1,showedMobileNotice:!1,refreshSourceControlTimer:7e3,showBranchStatusBar:!0,setLastSaveToLastCommit:!1,submoduleRecurseCheckout:!1,gitDir:"",showFileMenu:!0,authorInHistoryView:"hide",dateInHistoryView:!1,diffStyle:"split",lineAuthor:{show:!1,followMovement:"inactive",authorDisplay:"initials",showCommitHash:!1,dateTimeFormatOptions:"date",dateTimeFormatCustomString:_m,dateTimeTimezone:"viewer-local",coloringMaxAge:"1y",colorNew:{r:255,g:150,b:150},colorOld:{r:120,g:160,b:255},textColorCss:"var(--text-muted)",ignoreWhitespace:!1,gutterSpacingFallbackLength:5}},St={type:"git-view",name:"Source Control",icon:"git-pull-request"},Fr={type:"git-history-view",name:"History",icon:"history"},Ai={type:"split-diff-view",name:"Diff view",icon:"diff"},ki={type:"diff-view",name:"Diff View",icon:"git-pull-request"},Wu="C:\\Program Files\\Git\\cmd\\git.exe",qu="git_credentials_input",Os="obsidian_askpass.sh",_x=`#!/bin/sh
PROMPT="$1"
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
cleanup() {
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
}
trap cleanup EXIT
echo "$PROMPT" > "$TEMP_FILE"
while [ ! -e "$TEMP_FILE.response" ]; do
if [ ! -e "$TEMP_FILE" ]; then
echo "Trigger file got removed: Abort" >&2
exit 1
fi
sleep 0.1
done
RESPONSE=$(cat "$TEMP_FILE.response")
echo "$RESPONSE"
`,xx=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];g();var Sx=require("obsidian"),k$={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0},Fe=class extends Sx.SuggestModal{constructor(t,r){super(t.app),this.config={...k$,...r},this.setPlaceholder(this.config.placeholder)}openAndGetResult(){return new Promise(t=>{this.resolve=t,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(t=>setTimeout(t,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(t){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[t.length>0?t:" ",...this.config.options]:[t.length>0?t:"...",...this.config.options]}renderSuggestion(t,r){r.setText(t)}onChooseSuggestion(t,r){if(this.resolve){let n;this.config.allowEmpty&&t===" "?n="":t==="..."?n=void 0:n=t,this.resolve(n)}}};g();function Ex(e,t){let r=Object.assign({},e.lineAuthor,t.lineAuthor);return Object.assign({},e,t,{lineAuthor:r})}var Is=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};g();var sT=Ze(Ux()),oT=Ze(aT()),zs=require("obsidian");var Gg=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);function tn(e,t){let r;if(t){if(t.button===0||t.button===1){let n=zs.Keymap.isModEvent(t);r=e.workspace.getLeaf(n)}}else r=e.workspace.getLeaf(!1);return r}function kn(e,t,r,n,i){if(t.button==2){let a=e.vault.getAbstractFileByPath(r);if(a!=null){let s=new zs.Menu;e.workspace.trigger("file-menu",s,a,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}}}function Oi(e){throw new Error("Impossible branch: "+e)}function zg(e){return`rgb(${e.r},${e.g},${e.b})`}function lT(e){var a;let t=(a=sT.fromString(e))==null?void 0:a.toRgbaArray();if(t===void 0)return;let[r,n,i]=t;return{r,g:n,b:i}}function cT(e){return e.diff(zs.moment.unix(0),"seconds")}function uT(e){if(e.length!==0)return e.slice().sort()[Math.floor(e.length/2)]}function fT(e,t){return(0,oT.default)(e,t,{strict:!0})}function zl(e,t){return new Proxy(e,{get(r,n){return n==="length"?Math.min(t,r.length):r[n]}})}function dT(e,t,r){return e.length<=t?new Array(t-e.length).fill(r).join("")+e:e.substring(e.length-t)}function hT(e,t){if(t<=0)return e;let r=new Array(t).fill(" ").join(""),n=e.substring(t,e.length);return r+n}function Vg(e,t,r){return e<=t&&t<=r}function Ii(e){let[t,...r]=e.split("/");return[t,r.length===0?void 0:r.join("/")]}function Tn(e){return e.endsWith("/")?e:e.split("/").last().replace(".md","")}function Vl(e){return e===1?"1 minute":`${e} minutes`}function Cj(e){let t=e.lastIndexOf(".");return e.substring(t+1)}function Vs(e){if(e.endsWith(".md"))return!1;let t=Cj(e);return xx.includes(t)}g();var pT=require("obsidian"),Ws=class{constructor(t){this.plugin=t,this.app=t.app}getRelativeVaultPath(t){return this.plugin.settings.basePath?this.plugin.settings.basePath+"/"+t:t}getRelativeRepoPath(t,r=!0){return r&&this.plugin.settings.basePath.length>0?t.substring(this.plugin.settings.basePath.length+1):t}unload(){}_getTreeStructure(t,r=0){let n=[];for(t=[...t];t.length>0;){let i=t.first(),a=i.path.substring(r);if(a.contains("/")){let s=a.substring(0,a.indexOf("/")),o=t.filter(l=>l.path.substring(r).startsWith(s+"/"));o.forEach(l=>t.remove(l));let c=i.path.substring(0,a.indexOf("/")+r);n.push({title:s,path:c,vaultPath:this.getRelativeVaultPath(c),children:this._getTreeStructure(o,(r>0?r+s.length:s.length)+1)})}else n.push({title:a,data:i,path:i.path,vaultPath:this.getRelativeVaultPath(i.path)}),t.remove(i)}return n}simplify(t){var r,n,i,a;for(let s of t){for(;;){let o=((r=s.children)==null?void 0:r.length)==1,c=((i=(n=s.children)==null?void 0:n.first())==null?void 0:i.data)==null;if(!(s.children!=null&&o&&c))break;let l=s.children.first();s.title+="/"+l.title,s.data=l.data,s.path=l.path,s.vaultPath=l.vaultPath,s.children=l.children}s.children!=null&&this.simplify(s.children),(a=s.children)==null||a.sort((o,c)=>{let l=(c.data==null?1:0)-(o.data==null?1:0);return l!=0?l:o.title.localeCompare(c.title)})}return t.sort((s,o)=>{let c=(o.data==null?1:0)-(s.data==null?1:0);return c!=0?c:s.title.localeCompare(o.title)})}getTreeStructure(t){let r=this._getTreeStructure(t);return this.simplify(r)}async formatCommitMessage(t){let r;if(t.includes("{{numFiles}}")){r=await this.status();let n=r.staged.length;t=t.replace("{{numFiles}}",String(n))}if(t.includes("{{hostname}}")){let n=this.plugin.localStorage.getHostname()||"";t=t.replace("{{hostname}}",n)}if(t.includes("{{files}}")){r=r!=null?r:await this.status();let n={},i="";if(r.staged.length<100){r.staged.forEach(s=>{s.index in n?n[s.index].push(s.path):n[s.index]=[s.path]});let a=[];for(let[s,o]of Object.entries(n))a.push(s+" "+o.join(" "));i=a.join(", ")}else i="Too many files to list";t=t.replace("{{files}}",i)}if(t=t.replace("{{date}}",(0,pT.moment)().format(this.plugin.settings.commitDateFormat)),this.plugin.settings.listChangedFilesInMessageBody){let n=r!=null?r:await this.status(),i="";n.staged.length<100?i=n.staged.map(a=>a.path).join(`
`):i="Too many files to list",t=t+`
Affected files:
`+i}return t}};var Te=class extends Ws{constructor(r){super(r);this.useDefaultWindowsGitPath=!1}async setGitInstance(r=!1){if(this.isGitInstalled()){let n=this.app.vault.adapter,i=n.getBasePath(),a=i;this.plugin.settings.basePath&&(await n.exists((0,Xn.normalizePath)(this.plugin.settings.basePath))?a=Be.join(i,this.plugin.settings.basePath):r||new Xn.Notice("ObsidianGit: Base path does not exist")),this.absoluteRepoPath=a,this.git=wx({baseDir:a,binary:this.plugin.localStorage.getGitPath()||(this.useDefaultWindowsGitPath?Wu:void 0),config:["core.quotepath=off"],unsafe:{allowUnsafeCustomBinary:!0}});let s=this.plugin.localStorage.getPATHPaths(),o=this.plugin.localStorage.getEnvVars(),c=this.plugin.settings.gitDir;if(s.length>0){let f=process.env.PATH+":"+s.join(":");process.env.PATH=f}c&&(process.env.GIT_DIR=c);for(let f of o){let[d,h]=f.split("=");process.env[d]=h}if(vT.default.enable("simple-git"),await this.git.checkIsRepo()){let f=await this.git.revparse("--show-cdup"),d=(0,Wl.resolve)(a+Wl.sep+f);this.absoluteRepoPath=d,await this.git.cwd(d)}let l=Be.join(i,this.app.vault.configDir,"plugins","obsidian-git"),u=Be.join(l,Os);process.env.SSH_ASKPASS==null&&(process.env.SSH_ASKPASS=u),process.env.OBSIDIAN_GIT_CREDENTIALS_INPUT=Be.join(l,qu),process.env.SSH_ASKPASS==u&&this.askpass().catch(f=>this.plugin.displayError(f))}}getRelativeVaultPath(r){let i=this.app.vault.adapter.getBasePath(),a=Be.join(this.absoluteRepoPath,r),s=Be.relative(i,a);return Xn.Platform.isWin&&(s=s.replace(/\\/g,"/")),s}getRelativeRepoPath(r,n=!0){if(n){let a=this.plugin.app.vault.adapter.getBasePath(),s=this.absoluteRepoPath,o=Be.join(a,r),c=Be.relative(s,o);return Xn.Platform.isWin&&(c=c.replace(/\\/g,"/")),c}return r}async askpass(){let r=this.app.vault.adapter,n=r.getBasePath(),i=Be.join(n,this.app.vault.configDir,"plugins","obsidian-git"),a=this.app.vault.configDir+"/plugins/obsidian-git/";await Zn.writeFile(Be.join(i,Os),_x),await Zn.chmod(Be.join(i,Os),493),this.watchAbortController=new AbortController;let{signal:s}=this.watchAbortController;try{let o=Zn.watch(i,{signal:s});for await(let c of o){if(c.filename!=qu)continue;let l=a+qu;if(!await r.exists(l))continue;let u=await r.read(l),f;u.length>60&&(f=new Xn.Notice(u,999999));let d=await new Fe(this.plugin,{allowEmpty:!0,placeholder:u.length>60?"Enter a response to the message.":u}).openAndGetResult();f==null||f.hide(),await r.exists(l)&&await r.write(`${l}.response`,d!=null?d:"")}}catch(o){this.plugin.displayError(o),await Zn.rm(Be.join(i,Os),{force:!0}),await Zn.rm(Be.join(i,`${Os}.response`),{force:!0}),await new Promise(c=>setTimeout(c,5e3)),this.plugin.log("Retry watch for ask pass"),await this.askpass()}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(){this.plugin.setPluginState({gitAction:1});let r=await this.git.status();this.plugin.setPluginState({gitAction:0});let n=r.files.map(i=>{let a=this.formatPath(i);return{path:a.path,from:a.from,index:i.index==="?"?"U":i.index,workingDir:i.working_dir==="?"?"U":i.working_dir,vaultPath:this.getRelativeVaultPath(a.path)}});return{all:n,changed:n.filter(i=>i.workingDir!==" "),staged:n.filter(i=>i.index!==" "&&i.index!="U"),conflicted:r.conflicted.map(i=>this.formatPath({path:i}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let n=this.getRelativeRepoPath(r),a=["-C",Be.dirname(n),"rev-parse","HEAD"],s=this.git.raw(a);return s.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),s}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((n,i,a,s)=>{if(!(s.contains("submodule")&&s.contains("foreach")))return;let o="",c=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");i.on("data",l=>{o+=l.toString("utf8")}),i.on("end",()=>{let u=o.split(`
`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return c+"/"+d[1]+Wl.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},n=>this.plugin.displayError(n))})}formatPath(r,n=!1){function i(a){if(a!=null)return a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a}return n?{from:i(r.from),path:i(r.path)}:{path:i(r.path)}}async blame(r,n,i){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let a=await this.getSubmoduleOfFile(r),s=a?["-C",a.submodule]:[],o=a?a.relativeFilepath:r;s.push("blame","--porcelain"),i&&s.push("-w");let c=`-C${Vu}`;switch(n){case"inactive":break;case"same-commit":s.push("-C",c);break;case"all-commits":s.push("-C","-C",c);break;default:Oi(n)}s.push("--",o);let l=await this.git.raw(s);return Pj(l)}async isTracked(r){let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("ls-files","--",a),this.git.raw(i).then(s=>s.trim()!=="")}async commitAll({message:r}){if(this.plugin.settings.updateSubmodules){this.plugin.setPluginState({gitAction:4});let i=await this.getSubmodulePaths();for(let a of i)await this.git.cwd({path:a,root:!1}).add("-A"),await this.git.cwd({path:a,root:!1}).commit(await this.formatCommitMessage(r))}this.plugin.setPluginState({gitAction:3}),await this.git.add("-A"),this.plugin.setPluginState({gitAction:4});let n=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),n.summary.changes}async commit({message:r,amend:n}){this.plugin.setPluginState({gitAction:4});let i=(await this.git.commit(await this.formatCommitMessage(r),n?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),this.plugin.setPluginState({gitAction:0}),i}async stage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.add(["--",r]),this.plugin.setPluginState({gitAction:0})}async stageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.add(r!=null?r:"-A"),this.plugin.setPluginState({gitAction:0})}async unstageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.reset(r!=null?["--",r]:[]),this.plugin.setPluginState({gitAction:0})}async unstage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.reset(["--",r]),this.plugin.setPluginState({gitAction:0})}async discard(r){this.plugin.setPluginState({gitAction:3}),await this.isTracked(r)?await this.git.checkout(["--",r]):await this.app.vault.adapter.rmdir(this.getRelativeVaultPath(r),!0),this.plugin.setPluginState({gitAction:0})}async hashObject(r){r=this.getRelativeRepoPath(r);let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("hash-object","--",a),this.git.raw(i)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){this.plugin.setPluginState({gitAction:2});try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo(),n=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let i=await this.git.revparse([r.tracking]);if(n!==i){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{switch(this.plugin.settings.syncMethod){case"merge":await this.git.merge([r.tracking]);break;case"rebase":await this.git.rebase([r.tracking])}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,i]),await this.unstageAll({})}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`)}this.app.workspace.trigger("obsidian-git:head-change");let a=await this.git.revparse([r.current]);return(await this.git.diff([`${n}..${a}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}}async push(){this.plugin.setPluginState({gitAction:5});try{if(this.plugin.settings.updateSubmodules){let s=await this.git.env({...process.env,OBSIDIAN_GIT:1}).subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(s)}let r=await this.git.status(),n=r.tracking,i=r.current;if(!n&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let a=(await this.git.diffSummary([i,n,"--"])).changed;return await this.git.env({...process.env,OBSIDIAN_GIT:1}).push(),a}catch(r){this.convertErrors(r)}}async getUnpushedCommits(){let r=await this.git.status(),n=r.tracking,i=r.current;return n==null||i==null?0:(await this.git.diffSummary([i,n,"--"])).changed}async canPush(){if(this.plugin.settings.updateSubmodules===!0)return!0;let r=await this.git.status(),n=r.tracking,i=r.current;return n?(await this.git.diffSummary([i,n,"--"])).changed!==0:!1}async checkRequirements(){return this.isGitInstalled()?await this.git.checkIsRepo()?"valid":"missing-repo":"missing-git"}async branchInfo(){let r=await this.git.status(),n=await this.git.branch(["--no-color"]);return{current:r.current||void 0,tracking:r.tracking||void 0,branches:n.all}}async getRemoteUrl(r){try{return await this.git.remote(["get-url",r])||void 0}catch(n){if(String(n).contains(r))return;throw n}}async log(r,n=!0,i,a){let s;r&&(s=this.getRelativeRepoPath(r,n));let o={file:s,maxCount:i,"--diff-merges":"first-parent","--name-status":null};return a&&(o[a]=null),(await this.git.log(o)).all.map(l=>{var u,f,d,h;return{...l,author:{name:l.author_name,email:l.author_email},refs:l.refs.split(", ").filter(p=>p.length>0),diff:{...l.diff,files:(f=(u=l.diff)==null?void 0:u.files.map(p=>({...p,status:p.status,path:p.file,hash:l.hash,vaultPath:this.getRelativeVaultPath(p.file),fromPath:p.from,fromVaultPath:p.from!=null?this.getRelativeVaultPath(p.from):void 0,binary:p.binary})))!=null?f:[]},fileName:(h=(d=l.diff)==null?void 0:d.files.first())==null?void 0:h.file}})}async show(r,n,i=!0){let a=this.getRelativeRepoPath(n,i);return this.git.show([r+":"+a])}async checkout(r,n){if(n&&(r=`${n}/${r}`),await this.git.checkout(r),this.plugin.settings.submoduleRecurseCheckout){let i=await this.getSubmodulePaths();for(let a of i){let s=await this.git.cwd({path:a,root:!1}).branch();Object.keys(s.branches).includes(r)&&await this.git.cwd({path:a,root:!1}).checkout(r)}}}async createBranch(r){await this.git.checkout(["-b",r])}async deleteBranch(r,n){await this.git.branch([n?"-D":"-d",r])}async branchIsMerged(r){return!(await this.git.branch(["--no-merged"])).all.contains(r)}async init(){await this.git.init(!1)}async clone(r,n,i){await this.git.clone(r,Be.join(this.app.vault.adapter.getBasePath(),n),i?["--depth",`${i}`]:[])}async setConfig(r,n){n==null?await this.git.raw(["config","--local","--unset",r]):await this.git.addConfig(r,n)}async getConfig(r){let i=(await this.git.listConfig("local")).all[r];if(typeof i=="string"||i==null)return i;throw new Error("Config value is not a string")}async fetch(r){await this.git.fetch(r!=null?[r]:[])}async setRemote(r,n){(await this.getRemotes()).includes(r)?await this.git.remote(["set-url",r,n]):await this.git.remote(["add",r,n])}async getRemoteBranches(r){let n=await this.git.branch(["-r","--list",`${r}*`]),i=[];for(let a in n.branches)i.push(n.branches[a].name);return i}async getRemotes(){let r=await this.git.remote([]);return r?r.trim().split(`
`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(n){try{await this.git.branch(["--set-upstream",r])}catch(i){await this.git.push(["--set-upstream",...Ii(r)])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,n=!1,i){return n?await this.git.diff(["--cached","--",r]):i?await this.git.show([`${i}`,"--",r]):await this.git.diff(["--",r])}async diff(r,n,i){return await this.git.diff([`${n}..${i}`,"--",r])}async rawCommand(r){let n=r.split(" ");return await this.git.raw(n[0],...n.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(Be.dirname(r)))return;let n=await this.git.raw(["-C",Be.dirname(r),"rev-parse","--show-toplevel"],c=>c&&console.warn("get-submodule-of-file",c==null?void 0:c.message));if(n=n.trim(),(await this.git.raw(["-C",Be.dirname(r),"rev-parse","--show-superproject-working-tree"],c=>c&&console.warn("get-submodule-of-file",c==null?void 0:c.message))).trim()==="")return;let s=this.app.vault.adapter.getFullPath(Be.normalize(r)),o=Be.relative(n,s);return{submodule:n,relativeFilepath:o}}async getLastCommitTime(){let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),n=(0,qg.spawnSync)(r||"git",["--version"],{stdio:"ignore"});if(n.error)if(Xn.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${Wu}) of Git for Windows.`);let i=(0,qg.spawnSync)(Wu,["--version"],{stdio:"ignore"});if(i.error)return console.error(i.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(n.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof yr){let n=String(r.message);if(n.contains("Could not resolve host")||n.contains("Unable to resolve host")||n.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||n.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||n.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new Is(n)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(n){let i=n instanceof Error?n.message:String(n);return this.plugin.displayError(`Error checking LFS status: ${i}`),!1}}},yT={hash:"000000",isZeroCommit:!0,summary:""};function Pj(e){let r=e.replace(`\r
`,`
`).split(`
`),n={commits:new Map,hashPerLine:[void 0],originalFileLineNrPerLine:[void 0],finalFileLineNrPerLine:[void 0],groupSizePerStartingLine:new Map},i=1;for(let a=0;a<r.length;){if(mT(r[a])){let s=r[a].split(" "),o=Rj(s,i,n);for(a++;mT(r[a]);a++){let c=r[a].split(" ");Mj(c,n,i)}Oj(n.commits.get(o)),i+=1}else if(!(r[a]===""&&a===r.length-1))throw Error(`Expected non-whitespace line or EOF, but found: ${r[a]}`);a++}return n}function Rj(e,t,r){let n=e[0];if(r.hashPerLine.push(n),r.originalFileLineNrPerLine.push(parseInt(e[1])),r.finalFileLineNrPerLine.push(parseInt(e[2])),e.length>=4&&r.groupSizePerStartingLine.set(t,parseInt(e[3])),parseInt(e[2])!==t)throw Error(`git-blame output is out of order: ${t} vs ${e[2]}`);return n}function Mj(e,t,r){let n=e[0],i=e.slice(1).join(" "),a=t.hashPerLine[r],s=t.commits.get(a)||{hash:a,author:{},committer:{},previous:{}};switch(n){case"summary":s.summary=i;break;case"author":s.author.name=i;break;case"author-mail":s.author.email=gT(i);break;case"author-time":s.author.epochSeconds=parseInt(i);break;case"author-tz":s.author.tz=i;break;case"committer":s.committer.name=i;break;case"committer-mail":s.committer.email=gT(i);break;case"committer-time":s.committer.epochSeconds=parseInt(i);break;case"committer-tz":s.committer.tz=i;break;case"previous":s.previous.commitHash=i;break;case"filename":s.previous.filename=i;break}t.commits.set(a,s)}function Oj(e){if(e.summary===void 0)throw Error(`Summary not provided for commit: ${e.hash}`);Wg(e.author)&&(e.author=void 0),Wg(e.committer)&&(e.committer=void 0),Wg(e.previous)&&(e.previous=void 0),e.isZeroCommit=!!e.hash.match(/^0*$/)}function Wg(e){return!e||Object.keys(e).length===0}function mT(e){return e.length>0&&e[0].trim()===e[0]}function gT(e){let t=e.startsWith("<")?e.substring(1):e;return t.endsWith(">")?t.substring(0,t.length-1):t}g();var QT=require("@codemirror/state");g();var OT=require("@codemirror/state"),Zf=require("obsidian");g();var Yg=class{constructor(){this.eventsPerFilepath=new Map;this.startRemoveStalesSubscribersInterval()}ifFilepathDefinedTransformSubscribers(t,r){if(t)return this.ensureInitialized(t),r(this.eventsPerFilepath.get(t))}forEachSubscriber(t){this.eventsPerFilepath.forEach(r=>r.forEach(t))}ensureInitialized(t){this.eventsPerFilepath.get(t)||this.eventsPerFilepath.set(t,new Set)}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(t=>t==null?void 0:t.removeIfStale()),6e4)}clear(){window.clearInterval(this.removeStalesSubscribersTimer),this.eventsPerFilepath.clear()}},qs=new Yg;g();var qf=require("@codemirror/state"),TT=Ze(Xg());g();var B=require("obsidian");g();g();function rn(){}rn.prototype={diff:function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i=="function"&&(a=i,i={});var s=this;function o(E){return E=s.postProcess(E,i),a?(setTimeout(function(){a(E)},0),!0):E}t=this.castInput(t,i),r=this.castInput(r,i),t=this.removeEmpty(this.tokenize(t,i)),r=this.removeEmpty(this.tokenize(r,i));var c=r.length,l=t.length,u=1,f=c+l;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],r,t,0,i);if(p[0].oldPos+1>=l&&m+1>=c)return o(wT(s,p[0].lastComponent,r,t,s.useLongestToken));var v=-1/0,y=1/0;function b(){for(var E=Math.max(v,-u);E<=Math.min(y,u);E+=2){var _=void 0,k=p[E-1],w=p[E+1];k&&(p[E-1]=void 0);var A=!1;if(w){var S=w.oldPos-E;A=w&&0<=S&&S<c}var T=k&&k.oldPos+1<l;if(!A&&!T){p[E]=void 0;continue}if(!T||A&&k.oldPos<w.oldPos?_=s.addToPath(w,!0,!1,0,i):_=s.addToPath(k,!1,!0,1,i),m=s.extractCommon(_,r,t,E,i),_.oldPos+1>=l&&m+1>=c)return o(wT(s,_.lastComponent,r,t,s.useLongestToken));p[E]=_,_.oldPos+1>=l&&(y=Math.min(y,E-1)),m+1>=c&&(v=Math.max(v,E+1))}u++}if(a)(function E(){setTimeout(function(){if(u>f||Date.now()>h)return a();b()||E()},0)})();else for(;u<=f&&Date.now()<=h;){var x=b();if(x)return x}},addToPath:function(t,r,n,i,a){var s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===r&&s.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,i,a){for(var s=r.length,o=n.length,c=t.oldPos,l=c-i,u=0;l+1<s&&c+1<o&&this.equals(n[c+1],r[l+1],a);)l++,c++,u++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!a.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,l},equals:function(t,r,n){return n.comparator?n.comparator(t,r):t===r||n.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return Array.from(t)},join:function(t){return t.join("")},postProcess:function(t){return t}};function wT(e,t,r,n,i){for(var a=[],s;t;)a.push(t),s=t.previousComponent,delete t.previousComponent,t=s;a.reverse();for(var o=0,c=a.length,l=0,u=0;o<c;o++){var f=a[o];if(f.removed)f.value=e.join(n.slice(u,u+f.count)),u+=f.count;else{if(!f.added&&i){var d=r.slice(l,l+f.count);d=d.map(function(h,p){var m=n[u+p];return m.length>h.length?m:h}),f.value=e.join(d)}else f.value=e.join(r.slice(l,l+f.count));l+=f.count,f.added||(u+=f.count)}}return a}var ZW=new rn;function bT(e,t){var r;for(r=0;r<e.length&&r<t.length;r++)if(e[r]!=t[r])return e.slice(0,r);return e.slice(0,r)}function _T(e,t){var r;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(r=0;r<e.length&&r<t.length;r++)if(e[e.length-(r+1)]!=t[t.length-(r+1)])return e.slice(-r);return e.slice(-r)}function Kg(e,t,r){if(e.slice(0,t.length)!=t)throw Error("string ".concat(JSON.stringify(e)," doesn't start with prefix ").concat(JSON.stringify(t),"; this is a bug"));return r+e.slice(t.length)}function Jg(e,t,r){if(!t)return e+r;if(e.slice(-t.length)!=t)throw Error("string ".concat(JSON.stringify(e)," doesn't end with suffix ").concat(JSON.stringify(t),"; this is a bug"));return e.slice(0,-t.length)+r}function ql(e,t){return Kg(e,t,"")}function Nf(e,t){return Jg(e,t,"")}function xT(e,t){return t.slice(0,Ij(e,t))}function Ij(e,t){var r=0;e.length>t.length&&(r=e.length-t.length);var n=t.length;e.length<t.length&&(n=e.length);var i=Array(n),a=0;i[0]=0;for(var s=1;s<n;s++){for(t[s]==t[a]?i[s]=i[a]:i[s]=a;a>0&&t[s]!=t[a];)a=i[a];t[s]==t[a]&&a++}a=0;for(var o=r;o<e.length;o++){for(;a>0&&e[o]!=t[a];)a=i[a];e[o]==t[a]&&a++}return a}var jf="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Fj=new RegExp("[".concat(jf,"]+|\\s+|[^").concat(jf,"]"),"ug"),Hf=new rn;Hf.equals=function(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()};Hf.tokenize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(t.intlSegmenter){if(t.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(t.intlSegmenter.segment(e),function(a){return a.segment})}else r=e.match(Fj)||[];var n=[],i=null;return r.forEach(function(a){/\s/.test(a)?i==null?n.push(a):n.push(n.pop()+a):/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+a):n.push(i+a):n.push(a),i=a}),n};Hf.join=function(e){return e.map(function(t,r){return r==0?t:t.replace(/^\s+/,"")}).join("")};Hf.postProcess=function(e,t){if(!e||t.oneChangePerToken)return e;var r=null,n=null,i=null;return e.forEach(function(a){a.added?n=a:a.removed?i=a:((n||i)&&ST(r,i,n,a),r=a,n=null,i=null)}),(n||i)&&ST(r,i,n,null),e};function ST(e,t,r,n){if(t&&r){var i=t.value.match(/^\s*/)[0],a=t.value.match(/\s*$/)[0],s=r.value.match(/^\s*/)[0],o=r.value.match(/\s*$/)[0];if(e){var c=bT(i,s);e.value=Jg(e.value,s,c),t.value=ql(t.value,c),r.value=ql(r.value,c)}if(n){var l=_T(a,o);n.value=Kg(n.value,o,l),t.value=Nf(t.value,l),r.value=Nf(r.value,l)}}else if(r)e&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(e&&n){var u=n.value.match(/^\s*/)[0],f=t.value.match(/^\s*/)[0],d=t.value.match(/\s*$/)[0],h=bT(u,f);t.value=ql(t.value,h);var p=_T(ql(u,h),d);t.value=Nf(t.value,p),n.value=Kg(n.value,u,p),e.value=Jg(e.value,u,u.slice(0,u.length-p.length))}else if(n){var m=n.value.match(/^\s*/)[0],v=t.value.match(/\s*$/)[0],y=xT(v,m);t.value=Nf(t.value,y)}else if(e){var b=e.value.match(/\s*$/)[0],x=t.value.match(/^\s*/)[0],E=xT(b,x);t.value=ql(t.value,E)}}var $j=new rn;$j.tokenize=function(e){var t=new RegExp("(\\r?\\n)|[".concat(jf,"]+|[^\\S\\n\\r]+|[^").concat(jf,"]"),"ug");return e.match(t)||[]};var Uf=new rn;Uf.tokenize=function(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var a=n[i];i%2&&!t.newlineIsToken?r[r.length-1]+=a:r.push(a)}return r};Uf.equals=function(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
`))&&(e=e.trim()),(!r.newlineIsToken||!t.includes(`
`))&&(t=t.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(e.endsWith(`
`)&&(e=e.slice(0,-1)),t.endsWith(`
`)&&(t=t.slice(0,-1))),rn.prototype.equals.call(this,e,t,r)};function ET(e,t,r){return Uf.diff(e,t,r)}var Lj=new rn;Lj.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Dj=new rn;Dj.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function AT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(r),!0).forEach(function(n){Bj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nj(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jj(e){var t=Nj(e,"string");return typeof t=="symbol"?t:t+""}function Qg(e){"@babel/helpers - typeof";return Qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qg(e)}function Bj(e,t,r){return t=jj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zg(e){return Hj(e)||Uj(e)||Gj(e)||zj()}function Hj(e){if(Array.isArray(e))return e0(e)}function Uj(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gj(e,t){if(e){if(typeof e=="string")return e0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e0(e,t)}}function e0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Yl=new rn;Yl.useLongestToken=!0;Yl.tokenize=Uf.tokenize;Yl.castInput=function(e,t){var r=t.undefinedReplacement,n=t.stringifyReplacer,i=n===void 0?function(a,s){return typeof s=="undefined"?r:s}:n;return typeof e=="string"?e:JSON.stringify(t0(e,null,null,i),i," ")};Yl.equals=function(e,t,r){return rn.prototype.equals.call(Yl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)};function t0(e,t,r,n,i){t=t||[],r=r||[],n&&(e=n(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return r[a];var s;if(Object.prototype.toString.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),r.push(s),a=0;a<e.length;a+=1)s[a]=t0(e[a],t,r,n,i);return t.pop(),r.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Qg(e)==="object"&&e!==null){t.push(e),s={},r.push(s);var o=[],c;for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&o.push(c);for(o.sort(),a=0;a<o.length;a+=1)c=o[a],s[c]=t0(e[c],t,r,n,c);t.pop(),r.pop()}else s=e;return s}var r0=new rn;r0.tokenize=function(e){return e.slice()};r0.join=r0.removeEmpty=function(e){return e};function kT(e,t,r,n,i,a,s){if(s||(s={}),typeof s=="function"&&(s={callback:s}),typeof s.context=="undefined"&&(s.context=4),s.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(s.callback){var o=s,c=o.callback;ET(r,n,Bf(Bf({},s),{},{callback:function(f){var d=l(f);c(d)}}))}else return l(ET(r,n,s));function l(u){if(!u)return;u.push({value:"",lines:[]});function f(A){return A.map(function(S){return" "+S})}for(var d=[],h=0,p=0,m=[],v=1,y=1,b=function(){var S=u[x],T=S.lines||Wj(S.value);if(S.lines=T,S.added||S.removed){var P;if(!h){var O=u[x-1];h=v,p=y,O&&(m=s.context>0?f(O.lines.slice(-s.context)):[],h-=m.length,p-=m.length)}(P=m).push.apply(P,Zg(T.map(function(ee){return(S.added?"+":"-")+ee}))),S.added?y+=T.length:v+=T.length}else{if(h)if(T.length<=s.context*2&&x<u.length-2){var j;(j=m).push.apply(j,Zg(f(T)))}else{var D,Q=Math.min(T.length,s.context);(D=m).push.apply(D,Zg(f(T.slice(0,Q))));var de={oldStart:h,oldLines:v-h+Q,newStart:p,newLines:y-p+Q,lines:m};d.push(de),h=0,p=0,m=[]}v+=T.length,y+=T.length}},x=0;x<u.length;x++)b();for(var E=0,_=d;E<_.length;E++)for(var k=_[E],w=0;w<k.lines.length;w++)k.lines[w].endsWith(`
`)?k.lines[w]=k.lines[w].slice(0,-1):(k.lines.splice(w+1,0,"\\ No newline at end of file"),w++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:d}}}function n0(e){if(Array.isArray(e))return e.map(n0).join(`
`);var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader=="undefined"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader=="undefined"?"":" "+e.newHeader));for(var r=0;r<e.hunks.length;r++){var n=e.hunks[r];n.oldLines===0&&(n.oldStart-=1),n.newLines===0&&(n.newStart-=1),t.push("@@ -"+n.oldStart+","+n.oldLines+" +"+n.newStart+","+n.newLines+" @@"),t.push.apply(t,n.lines)}return t.join(`
`)+`
`}function Vj(e,t,r,n,i,a,s){var o;if(typeof s=="function"&&(s={callback:s}),(o=s)!==null&&o!==void 0&&o.callback){var l=s,u=l.callback;kT(e,t,r,n,i,a,Bf(Bf({},s),{},{callback:function(d){d?u(n0(d)):u()}}))}else{var c=kT(e,t,r,n,i,a,s);return c?n0(c):void 0}}function Gf(e,t,r,n,i,a){return Vj(e,e,t,r,n,i,a)}function Wj(e){var t=e.endsWith(`
`),r=e.split(`
`).map(function(n){return n+`
`});return t?r.pop():r.push(r.pop().slice(0,-1)),r}var ba=require("obsidian");g();var Fi=require("obsidian"),zf=class{constructor(t,r){this.plugin=r;this.promises={};this.adapter=t.adapter,this.vault=t,this.lastBasePath=this.plugin.settings.basePath,this.promises.readFile=this.readFile.bind(this),this.promises.writeFile=this.writeFile.bind(this),this.promises.readdir=this.readdir.bind(this),this.promises.mkdir=this.mkdir.bind(this),this.promises.rmdir=this.rmdir.bind(this),this.promises.stat=this.stat.bind(this),this.promises.unlink=this.unlink.bind(this),this.promises.lstat=this.lstat.bind(this),this.promises.readlink=this.readlink.bind(this),this.promises.symlink=this.symlink.bind(this)}async readFile(t,r){var n;if(this.maybeLog("Read: "+t+JSON.stringify(r)),r=="utf8"||r.encoding=="utf8"){let i=this.vault.getAbstractFileByPath(t);return i instanceof Fi.TFile?(this.maybeLog("Reuse"),this.vault.read(i)):this.adapter.read(t)}else{if(t.endsWith(this.gitDir+"/index"))return this.plugin.settings.basePath!=this.lastBasePath?(this.clearIndex(),this.lastBasePath=this.plugin.settings.basePath,this.adapter.readBinary(t)):(n=this.index)!=null?n:this.adapter.readBinary(t);let i=this.vault.getAbstractFileByPath(t);return i instanceof Fi.TFile?(this.maybeLog("Reuse"),this.vault.readBinary(i)):this.adapter.readBinary(t)}}async writeFile(t,r){if(this.maybeLog("Write: "+t),typeof r=="string"){let n=this.vault.getAbstractFileByPath(t);return n instanceof Fi.TFile?this.vault.modify(n,r):this.adapter.write(t,r)}else if(t.endsWith(this.gitDir+"/index"))this.index=r,this.indexmtime=Date.now();else{let n=this.vault.getAbstractFileByPath(t);return n instanceof Fi.TFile?this.vault.modifyBinary(n,r):this.adapter.writeBinary(t,r)}}async readdir(t){t==="."&&(t="/");let r=await this.adapter.list(t),n=[...r.files,...r.folders],i;return t!=="/"?i=n.map(a=>(0,Fi.normalizePath)(a.substring(t.length))):i=n,i}async mkdir(t){return this.adapter.mkdir(t)}async rmdir(t,r){var n,i;return this.adapter.rmdir(t,(i=(n=r==null?void 0:r.options)==null?void 0:n.recursive)!=null?i:!1)}async stat(t){if(t.endsWith(this.gitDir+"/index")){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.length,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let n=await this.adapter.stat(t);if(n==null)throw{code:"ENOENT"};return this.indexctime=n.ctime,this.indexmtime=n.mtime,{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}t==="."&&(t="/");let r=this.vault.getAbstractFileByPath(t);if(this.maybeLog("Stat: "+t),r instanceof Fi.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let n=await this.adapter.stat(t);if(n)return{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:n.type==="folder"?"directory":n.type,isFile:()=>n.type==="file",isDirectory:()=>n.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(t){return this.adapter.remove(t)}async lstat(t){return this.stat(t)}async readlink(t){throw new Error(`readlink of (${t}) is not implemented.`)}async symlink(t){throw new Error(`symlink of (${t}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index"),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}maybeLog(t){}};var nn=class extends Ws{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new zf(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir||void 0,onAuth:()=>{var r,n;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(n=this.plugin.localStorage.getPassword())!=null?n:void 0}},onAuthFailure:async()=>{new ba.Notice("Authentication failed. Please try with different credentials");let r=await new Fe(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let n=await new Fe(this.plugin,{placeholder:"Specify your password/personal access token"}).openAndGetResult();if(n)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(n),{username:r,password:n}}return{cancel:!0}},http:{async request({url:r,method:n,headers:i,body:a}){let s;a&&(s=(await Zj(a)).buffer);let o=await(0,ba.requestUrl)({url:r,method:n,headers:i,body:s,throw:!1});return{url:r,method:n,headers:o.headers,body:[new Uint8Array(o.arrayBuffer)],statusCode:o.status,statusMessage:o.status.toString()}}}}}async wrapFS(r){try{let n=await r;return await this.fs.saveAndClear(),n}catch(n){throw await this.fs.saveAndClear(),n}}async status(){let r,n=window.setTimeout(()=>{r=new ba.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{this.plugin.setPluginState({gitAction:1});let i=(await this.wrapFS(ie.statusMatrix({...this.getRepo()}))).map(c=>this.getFileStatusResult(c)),a=i.filter(c=>c.workingDir!==" "),s=i.filter(c=>c.index!==" "&&c.index!=="U"),o=[];return window.clearTimeout(n),r==null||r.hide(),{all:i,changed:a,staged:s,conflicted:o}}catch(i){throw window.clearTimeout(n),r==null||r.hide(),this.plugin.displayError(i),i}}async commitAll({message:r,status:n,unstagedFiles:i}){try{return await this.checkAuthorInfo(),await this.stageAll({status:n,unstagedFiles:i}),this.commit({message:r})}catch(a){throw this.plugin.displayError(a),a}}async commit({message:r}){try{await this.checkAuthorInfo(),this.plugin.setPluginState({gitAction:4});let n=await this.formatCommitMessage(r),i=this.plugin.localStorage.getConflict(),a;if(i){let s=await this.branchInfo();a=[s.current,s.tracking]}await this.wrapFS(ie.commit({...this.getRepo(),message:n,parent:a})),this.plugin.localStorage.setConflict(!1);return}catch(n){throw this.plugin.displayError(n),n}}async stage(r,n){let i=this.getRelativeRepoPath(r,n),a;n?a=r:a=this.getRelativeVaultPath(r);try{this.plugin.setPluginState({gitAction:3}),await this.app.vault.adapter.exists(a)?await this.wrapFS(ie.add({...this.getRepo(),filepath:i})):await this.wrapFS(ie.remove({...this.getRepo(),filepath:i}))}catch(s){throw this.plugin.displayError(s),s}}async stageAll({dir:r,status:n,unstagedFiles:i}){try{if(n)await Promise.all(n.changed.map(a=>a.workingDir!=="D"?this.wrapFS(ie.add({...this.getRepo(),filepath:a.path})):ie.remove({...this.getRepo(),filepath:a.path})));else{let a=i!=null?i:await this.getUnstagedFiles(r!=null?r:".");await Promise.all(a.map(({path:s,deleted:o})=>o?ie.remove({...this.getRepo(),filepath:s}):this.wrapFS(ie.add({...this.getRepo(),filepath:s}))))}}catch(a){throw this.plugin.displayError(a),a}}async unstage(r,n){try{this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.wrapFS(ie.resetIndex({...this.getRepo(),filepath:r}))}catch(i){throw this.plugin.displayError(i),i}}async unstageAll({dir:r,status:n}){try{let i;n?i=n.staged.map(a=>a.path):i=(await this.getStagedFiles(r!=null?r:".")).map(({path:s})=>s),await this.wrapFS(Promise.all(i.map(a=>ie.resetIndex({...this.getRepo(),filepath:a}))))}catch(i){throw this.plugin.displayError(i),i}}async discard(r){try{this.plugin.setPluginState({gitAction:3}),await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:[r],force:!0}))}catch(n){throw this.plugin.displayError(n),n}}async discardAll({dir:r,status:n}){let i=[];n?r!=null?i=n.changed.filter(a=>a.path.startsWith(r)).map(a=>a.path):i=n.changed.map(a=>a.path):i=(await this.getUnstagedFiles(r)).map(({path:a})=>a);try{await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:i,force:!0}))}catch(a){throw this.plugin.displayError(a),a}}getProgressText(r,n){let i=`${r} progress:`;return n.phase&&(i=`${i} ${n.phase}:`),n.loaded&&(i=`${i} ${n.loaded}`,n.total&&(i=`${i} of ${n.total}`)),i}resolveRef(r){return this.wrapFS(ie.resolveRef({...this.getRepo(),ref:r}))}async pull(){let r=this.showNotice("Initializing pull");try{this.plugin.setPluginState({gitAction:2});let n=await this.resolveRef("HEAD");await this.fetch();let i=await this.branchInfo();await this.checkAuthorInfo(),(await this.wrapFS(ie.merge({...this.getRepo(),ours:i.current,theirs:i.tracking,abortOnConflict:!1}))).alreadyMerged||await this.wrapFS(ie.checkout({...this.getRepo(),ref:i.current,onProgress:c=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Checkout",c))},remote:i.remote})),r==null||r.hide();let s=await this.resolveRef("HEAD"),o=await this.getFileChangesCount(n,s);return this.showNotice("Finished pull",!1),o.map(c=>({path:c.path,workingDir:"P",index:"P",vaultPath:this.getRelativeVaultPath(c.path)}))}catch(n){throw r==null||r.hide(),n instanceof gl.MergeConflictError&&await this.plugin.handleConflict(n.data.filepaths.map(i=>this.getRelativeVaultPath(i))),this.plugin.displayError(n),n}}async push(){if(!await this.canPush())return 0;let r=this.showNotice("Initializing push");try{this.plugin.setPluginState({gitAction:1});let n=await this.branchInfo(),i=n.tracking,a=n.current,s=(await this.getFileChangesCount(a,i)).length;return this.plugin.setPluginState({gitAction:5}),await this.wrapFS(ie.push({...this.getRepo(),onProgress:o=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Pushing",o))}})),r==null||r.hide(),s}catch(n){throw r==null||r.hide(),this.plugin.displayError(n),n}}async getUnpushedCommits(){let r=await this.branchInfo(),n=r.tracking,i=r.current;if(n==null||i==null)return 0;let a=await this.resolveRef(i),s=await this.resolveRef(n);return(await this.getFileChangesCount(a,s)).length}async canPush(){let r=await this.branchInfo(),n=r.tracking,i=r.current,a=await this.resolveRef(i),s=await this.resolveRef(n);return a!=s}async checkRequirements(){return await this.plugin.app.vault.adapter.exists(`${this.getRepo().dir}/.git/HEAD`)?"valid":"missing-repo"}async branchInfo(){var r,n;try{let i=await ie.currentBranch(this.getRepo())||"",a=await ie.listBranches(this.getRepo()),s=(r=await this.getConfig(`branch.${i}.remote`))!=null?r:"origin",o=(n=await this.getConfig(`branch.${i}.merge`))==null?void 0:n.split("refs/heads")[1],c=o?s+o:void 0;return{current:i,tracking:c,branches:a,remote:s}}catch(i){throw this.plugin.displayError(i),i}}async getCurrentRemote(){var i;let r=await ie.currentBranch(this.getRepo())||"";return(i=await this.getConfig(`branch.${r}.remote`))!=null?i:"origin"}async checkout(r,n){try{return this.wrapFS(ie.checkout({...this.getRepo(),ref:r,force:!!n,remote:n}))}catch(i){throw this.plugin.displayError(i),i}}async createBranch(r){try{await this.wrapFS(ie.branch({...this.getRepo(),ref:r,checkout:!0}))}catch(n){throw this.plugin.displayError(n),n}}async deleteBranch(r){try{await this.wrapFS(ie.deleteBranch({...this.getRepo(),ref:r}))}catch(n){throw this.plugin.displayError(n),n}}branchIsMerged(r){return Promise.resolve(!0)}async init(){try{await this.wrapFS(ie.init(this.getRepo()))}catch(r){throw this.plugin.displayError(r),r}}async clone(r,n,i){let a=this.showNotice("Initializing clone");try{await this.wrapFS(ie.clone({...this.getRepo(),dir:n,url:r,depth:i,onProgress:s=>{a!==void 0&&(a.noticeEl.innerText=this.getProgressText("Cloning",s))}})),a==null||a.hide()}catch(s){throw a==null||a.hide(),this.plugin.displayError(s),s}}async setConfig(r,n){try{return this.wrapFS(ie.setConfig({...this.getRepo(),path:r,value:n}))}catch(i){throw this.plugin.displayError(i),i}}async getConfig(r){try{return this.wrapFS(ie.getConfig({...this.getRepo(),path:r}))}catch(n){throw this.plugin.displayError(n),n}}async fetch(r){let n=this.showNotice("Initializing fetch");try{let i={...this.getRepo(),onProgress:a=>{n!==void 0&&(n.noticeEl.innerText=this.getProgressText("Fetching",a))},remote:r!=null?r:await this.getCurrentRemote()};await this.wrapFS(ie.fetch(i)),n==null||n.hide()}catch(i){throw this.plugin.displayError(i),n==null||n.hide(),i}}async setRemote(r,n){try{await this.wrapFS(ie.addRemote({...this.getRepo(),remote:r,url:n,force:!0}))}catch(i){throw this.plugin.displayError(i),i}}async getRemoteBranches(r){let n=[];return n.push(...await this.wrapFS(ie.listBranches({...this.getRepo(),remote:r}))),n.remove("HEAD"),n=n.map(i=>`${r}/${i}`),n}async getRemotes(){return(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).map(r=>r.remote)}async removeRemote(r){await this.wrapFS(ie.deleteRemote({...this.getRepo(),remote:r}))}async getRemoteUrl(r){var n;return(n=(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).filter(i=>i.remote==r)[0])==null?void 0:n.url}async log(r,n=!0,i,a){let s=await this.wrapFS(ie.log({...this.getRepo(),depth:i,ref:a}));return Promise.all(s.map(async o=>{let c=o.commit.message.split(`
`);return{message:c[0],author:{name:o.commit.author.name,email:o.commit.author.email},body:c.slice(1).join(`
`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(l=>({path:l.path,status:l.type,vaultPath:this.getRelativeVaultPath(l.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}async updateUpstreamBranch(r){let[n,i]=Ii(r),a=await this.branchInfo();await this.wrapFS(ie.push({...this.getRepo(),remote:n,remoteRef:i})),await this.setConfig(`branch.${a.current}.merge`,`refs/heads/${i}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,n){return this.walkDifference({walkers:[ie.TREE({ref:r}),ie.TREE({ref:n})]})}async walkDifference({walkers:r,dir:n}){return await this.wrapFS(ie.walk({...this.getRepo(),trees:r,map:async function(a,[s,o]){if(!Gg(a,n))return null;if(await(s==null?void 0:s.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let c=await(s==null?void 0:s.oid()),l=await(o==null?void 0:o.oid()),u="equal";if(c!==l&&(u="M"),c===void 0&&(u="A"),l===void 0&&(u="D"),c===void 0&&l===void 0&&(console.log("Something weird happened:"),console.log(s),console.log(o)),u!=="equal")return{path:a,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[ie.TREE({ref:"HEAD"}),ie.STAGE()],dir:r})).map(i=>({vaultPath:this.getRelativeVaultPath(i.path),path:i.path}))}async getUnstagedFiles(r="."){let n,i=window.setTimeout(()=>{n=new ba.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let a=this.getRepo(),s=await this.wrapFS(ie.walk({...a,trees:[ie.WORKDIR(),ie.STAGE()],map:async function(o,[c,l]){if(!l&&c&&await ie.isIgnored({...a,filepath:o})||!Gg(o,r))return null;let[u,f]=await Promise.all([c&&c.type(),l&&l.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await l.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await c.oid()),p?p!==h?{path:o,deleted:!1}:null:{path:o,deleted:!0}}}));return window.clearTimeout(i),n==null||n.hide(),s}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async getDiffString(r,n=!1,i){let a=this.getRelativeVaultPath(r),s=async(l,[u])=>{if(r==l){let f=await u.oid();return(await ie.readBlob({...this.getRepo(),oid:f})).blob}};if(i){let l=await wl({...this.getRepo(),filepath:r,oid:i}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h}),u=await ie.readCommit({...this.getRepo(),oid:i}),f=await wl({...this.getRepo(),filepath:r,oid:u.commit.parent.first()}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h});return Gf(a,f!=null?f:"",l!=null?l:"")}let o=(await ie.walk({...this.getRepo(),trees:[ie.STAGE()],map:s})).first(),c=new TextDecoder().decode(o);if(n){let l=await this.resolveRef("HEAD").then(f=>wl({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof ie.Errors.NotFoundError))throw f});return Gf(a,l!=null?l:"",c)}else{let l;return await this.app.vault.adapter.exists(a)?l=await this.app.vault.adapter.read(a):l="",Gf(a,c,l)}}async getLastCommitTime(){let r=this.getRepo(),n=await this.resolveRef("HEAD"),a=(await ie.readCommit({...r,oid:n})).commit.committer.timestamp;return new Date(a*1e3)}getFileStatusResult(r){let n=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:n[0]=="?"?"U":n[0],workingDir:n[1]=="?"?"U":n[1],path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),n=await this.getConfig("user.email");if(!r||!n)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,n=!0){if(!this.plugin.settings.disablePopups)return new ba.Notice(r,n?this.noticeLength:void 0)}};function qj(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function Yj(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:qj(e)}async function Xj(e,t){let r=Yj(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function Zj(e){let t=0,r=[];await Xj(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}var Kj="https://momentjs.com/docs/#/parsing/string-format/",Jj="https://publish.obsidian.md/git-doc/Line+Authoring",Vf=class extends B.PluginSettingTab{constructor(r,n){super(r,n);this.plugin=n;this.lineAuthorColorSettings=new Map}get settings(){return this.plugin.settings}display(){let{containerEl:r}=this,n=this.plugin,i;n.settings.differentIntervalCommitAndPush?i="commit":i="commit-and-sync";let a=n.gitReady;r.empty(),a||(r.createEl("p",{text:"Git is not ready. When all settings are correct you can configure commit-sync, etc."}),r.createEl("br"));let s;if(a){new B.Setting(r).setName("Automatic").setHeading(),new B.Setting(r).setName("Split timers for automatic commit and sync").setDesc("Enable to use one interval for commit and another for sync.").addToggle(u=>u.setValue(n.settings.differentIntervalCommitAndPush).onChange(async f=>{n.settings.differentIntervalCommitAndPush=f,await n.saveSettings(),n.automaticsManager.reload("commit","push"),this.display()})),new B.Setting(r).setName(`Auto ${i} interval (minutes)`).setDesc(`${n.settings.differentIntervalCommitAndPush?"Commit":"Commit and sync"} changes every X minutes. Set to 0 (default) to disable. (See below setting for further configuration!)`).addText(u=>u.setValue(String(n.settings.autoSaveInterval)).onChange(async f=>{isNaN(Number(f))?new B.Notice("Please specify a valid number."):(n.settings.autoSaveInterval=Number(f),await n.saveSettings(),n.automaticsManager.reload("commit"),n.settings.autoSaveInterval>0?new B.Notice(`Automatic ${i} enabled! Every ${Vl(n.settings.autoSaveInterval)}.`):n.settings.autoSaveInterval<=0&&new B.Notice(`Automatic ${i} disabled!`))})),s=new B.Setting(r).setName(`Auto ${i} after stopping file edits`).setDesc(`Requires the ${i} interval not to be 0.
If turned on, do auto ${i} every ${Vl(n.settings.autoSaveInterval)} after stopping file edits.
This also prevents auto ${i} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(u=>u.setValue(n.settings.autoBackupAfterFileChange).onChange(async f=>{n.settings.autoBackupAfterFileChange=f,this.display(),await n.saveSettings(),n.automaticsManager.reload("commit")})),this.mayDisableSetting(s,n.settings.setLastSaveToLastCommit),s=new B.Setting(r).setName(`Auto ${i} after latest commit`).setDesc(`If turned on, sets last auto ${i} timestamp to the latest commit timestamp. This reduces the frequency of auto ${i} when doing manual commits.`).addToggle(u=>u.setValue(n.settings.setLastSaveToLastCommit).onChange(async f=>{n.settings.setLastSaveToLastCommit=f,await n.saveSettings(),n.automaticsManager.reload("commit"),this.display()})),this.mayDisableSetting(s,n.settings.autoBackupAfterFileChange),s=new B.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(u=>u.setValue(String(n.settings.autoPushInterval)).onChange(async f=>{isNaN(Number(f))?new B.Notice("Please specify a valid number."):(n.settings.autoPushInterval=Number(f),await n.saveSettings(),n.automaticsManager.reload("push"),n.settings.autoPushInterval>0?new B.Notice(`Automatic push enabled! Every ${Vl(n.settings.autoPushInterval)}.`):n.settings.autoPushInterval<=0&&new B.Notice("Automatic push disabled!"))})),this.mayDisableSetting(s,!n.settings.differentIntervalCommitAndPush),new B.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(u=>u.setValue(String(n.settings.autoPullInterval)).onChange(async f=>{isNaN(Number(f))?new B.Notice("Please specify a valid number."):(n.settings.autoPullInterval=Number(f),await n.saveSettings(),n.automaticsManager.reload("pull"),n.settings.autoPullInterval>0?new B.Notice(`Automatic pull enabled! Every ${Vl(n.settings.autoPullInterval)}.`):n.settings.autoPullInterval<=0&&new B.Notice("Automatic pull disabled!"))})),new B.Setting(r).setName(`Specify custom commit message on auto ${i}`).setDesc("You will get a pop up to specify your message.").addToggle(u=>u.setValue(n.settings.customMessageOnAutoBackup).onChange(async f=>{n.settings.customMessageOnAutoBackup=f,await n.saveSettings(),this.display()})),s=new B.Setting(r).setName(`Commit message on auto ${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>u.setPlaceholder("vault backup: {{date}}").setValue(n.settings.autoCommitMessage).onChange(async f=>{n.settings.autoCommitMessage=f,await n.saveSettings()})),this.mayDisableSetting(s,n.settings.customMessageOnAutoBackup),new B.Setting(r).setName("Commit message").setHeading(),new B.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>u.setPlaceholder("vault backup: {{date}}").setValue(n.settings.commitMessage?n.settings.commitMessage:"").onChange(async f=>{n.settings.commitMessage=f,await n.saveSettings()}));let l=new B.Setting(r).setName("{{date}} placeholder format").addMomentFormat(u=>u.setDefaultFormat(n.settings.commitDateFormat).setValue(n.settings.commitDateFormat).onChange(async f=>{n.settings.commitDateFormat=f,await n.saveSettings()}));l.descEl.innerHTML=`
Specify custom date format. E.g. "${xm}. See <a href="https://momentjs.com">Moment.js</a> for more formats.`,new B.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(u=>{var f;return u.setValue((f=n.localStorage.getHostname())!=null?f:"").onChange(d=>{n.localStorage.setHostname(d)})}),new B.Setting(r).setName("Preview commit message").addButton(u=>u.setButtonText("Preview").onClick(async()=>{let f=await n.gitManager.formatCommitMessage(n.settings.commitMessage);new B.Notice(`${f}`)})),new B.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(u=>u.setValue(n.settings.listChangedFilesInMessageBody).onChange(async f=>{n.settings.listChangedFilesInMessageBody=f,await n.saveSettings()})),new B.Setting(r).setName("Pull").setHeading(),n.gitManager instanceof Te&&new B.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(u=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};u.addOptions(f),u.setValue(n.settings.syncMethod),u.onChange(async d=>{n.settings.syncMethod=d,await n.saveSettings()})}),new B.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(u=>u.setValue(n.settings.autoPullOnBoot).onChange(async f=>{n.settings.autoPullOnBoot=f,await n.saveSettings()})),new B.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new B.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${n.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(u=>u.setValue(!n.settings.disablePush).onChange(async f=>{n.settings.disablePush=!f,this.display(),await n.saveSettings()})),new B.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${n.settings.disablePush?"":"and push "}only.`).addToggle(u=>u.setValue(n.settings.pullBeforePush).onChange(async f=>{n.settings.pullBeforePush=f,this.display(),await n.saveSettings()})),n.gitManager instanceof Te&&(new B.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new B.Setting(r).setName("History view").setHeading(),new B.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(l=>{let u={hide:"Hide",full:"Full",initials:"Initials"};l.addOptions(u),l.setValue(n.settings.authorInHistoryView),l.onChange(async f=>{n.settings.authorInHistoryView=f,await n.saveSettings(),await n.refresh()})}),new B.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(l=>l.setValue(n.settings.dateInHistoryView).onChange(async u=>{n.settings.dateInHistoryView=u,await n.saveSettings(),await n.refresh()})),new B.Setting(r).setName("Source control view").setHeading(),new B.Setting(r).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(l=>l.setValue(n.settings.refreshSourceControl).onChange(async u=>{n.settings.refreshSourceControl=u,await n.saveSettings()})),new B.Setting(r).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(l=>l.setValue(n.settings.refreshSourceControlTimer.toString()).setPlaceholder("7000").onChange(async u=>{n.settings.refreshSourceControlTimer=Math.max(parseInt(u),500),await n.saveSettings(),n.setRefreshDebouncer()})),new B.Setting(r).setName("Miscellaneous").setHeading(),n.gitManager instanceof Te&&new B.Setting(r).setName("Diff view style").setDesc('Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.').addDropdown(l=>{let u={split:"Split",git_unified:"Unified"};l.addOptions(u),l.setValue(n.settings.diffStyle),l.onChange(async f=>{n.settings.diffStyle=f,await n.saveSettings()})}),new B.Setting(r).setName("Disable notifications").setDesc("Disable notifications for git operations to minimize distraction (refer to status bar for updates). Errors are still shown as notifications even if you enable this setting.").addToggle(l=>l.setValue(n.settings.disablePopups).onChange(async u=>{n.settings.disablePopups=u,this.display(),await n.saveSettings()})),n.settings.disablePopups||new B.Setting(r).setName("Hide notifications for no changes").setDesc("Don't show notifications when there are no changes to commit or push.").addToggle(l=>l.setValue(n.settings.disablePopupsForNoChanges).onChange(async u=>{n.settings.disablePopupsForNoChanges=u,await n.saveSettings()})),new B.Setting(r).setName("Show status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(l=>l.setValue(n.settings.showStatusBar).onChange(async u=>{n.settings.showStatusBar=u,await n.saveSettings()})),new B.Setting(r).setName("Show stage/unstage button in file menu").addToggle(l=>l.setValue(n.settings.showFileMenu).onChange(async u=>{n.settings.showFileMenu=u,await n.saveSettings()})),new B.Setting(r).setName("Show branch status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(l=>l.setValue(n.settings.showBranchStatusBar).onChange(async u=>{n.settings.showBranchStatusBar=u,await n.saveSettings()})),new B.Setting(r).setName("Show the count of modified files in the status bar").addToggle(l=>l.setValue(n.settings.changedFilesInStatusBar).onChange(async u=>{n.settings.changedFilesInStatusBar=u,await n.saveSettings()})),n.gitManager instanceof nn?new B.Setting(r).setName("Authentication/commit author").setHeading():new B.Setting(r).setName("Commit author").setHeading(),n.gitManager instanceof nn&&new B.Setting(r).setName("Username on your git server. E.g. your username on GitHub").addText(l=>{var u;l.setValue((u=n.localStorage.getUsername())!=null?u:""),l.onChange(f=>{n.localStorage.setUsername(f)})}),n.gitManager instanceof nn&&new B.Setting(r).setName("Password/Personal access token").setDesc("Type in your password. You won't be able to see it again.").addText(l=>{l.inputEl.autocapitalize="off",l.inputEl.autocomplete="off",l.inputEl.spellcheck=!1,l.onChange(u=>{n.localStorage.setPassword(u)})}),n.gitReady&&new B.Setting(r).setName("Author name for commit").addText(async l=>{var u;l.setValue((u=await n.gitManager.getConfig("user.name"))!=null?u:""),l.onChange(async f=>{await n.gitManager.setConfig("user.name",f==""?void 0:f)})}),n.gitReady&&new B.Setting(r).setName("Author email for commit").addText(async l=>{var u;l.setValue((u=await n.gitManager.getConfig("user.email"))!=null?u:""),l.onChange(async f=>{await n.gitManager.setConfig("user.email",f==""?void 0:f)})}),new B.Setting(r).setName("Advanced").setDesc("These settings usually don't need to be changed, but may be requried for special setups.").setHeading(),n.gitManager instanceof Te&&(new B.Setting(r).setName("Update submodules").setDesc('"Commit-and-sync" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule.').addToggle(l=>l.setValue(n.settings.updateSubmodules).onChange(async u=>{n.settings.updateSubmodules=u,await n.saveSettings()})),n.settings.updateSubmodules&&new B.Setting(r).setName("Submodule recurse checkout/switch").setDesc("Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist).").addToggle(l=>l.setValue(n.settings.submoduleRecurseCheckout).onChange(async u=>{n.settings.submoduleRecurseCheckout=u,await n.saveSettings()}))),n.gitManager instanceof Te&&new B.Setting(r).setName("Custom Git binary path").addText(l=>{var u;l.setValue((u=n.localStorage.getGitPath())!=null?u:""),l.setPlaceholder("git"),l.onChange(f=>{n.localStorage.setGitPath(f),n.gitManager.updateGitPath(f||"git").catch(d=>n.displayError(d))})}),n.gitManager instanceof Te&&new B.Setting(r).setName("Additional environment variables").setDesc("Use each line for a new environment variable in the format KEY=VALUE .").addTextArea(l=>{l.setPlaceholder("GIT_DIR=/path/to/git/dir"),l.setValue(n.localStorage.getEnvVars().join(`
`)),l.onChange(u=>{n.localStorage.setEnvVars(u.split(`
`))})}),n.gitManager instanceof Te&&new B.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(l=>{l.setValue(n.localStorage.getPATHPaths().join(`
`)),l.onChange(u=>{n.localStorage.setPATHPaths(u.split(`
`))})}),n.gitManager instanceof Te&&new B.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(l=>{l.setButtonText("Reload"),l.setCta(),l.onClick(async()=>{await n.gitManager.setGitInstance()})}),new B.Setting(r).setName("Custom base path (Git repository path)").setDesc(`
Sets the relative path to the vault from which the Git binary should be executed.
Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows.
`).addText(l=>{l.setValue(n.settings.basePath),l.setPlaceholder("directory/directory-with-git-repo"),l.onChange(async u=>{n.settings.basePath=u,await n.saveSettings(),n.gitManager.updateBasePath(u||"").catch(f=>n.displayError(f))})}),new B.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(l=>{l.setValue(n.settings.gitDir),l.setPlaceholder(".git"),l.onChange(async u=>{n.settings.gitDir=u,await n.saveSettings()})}),new B.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(l=>l.setValue(n.localStorage.getPluginDisabled()).onChange(u=>{n.localStorage.setPluginDisabled(u),u?n.unloadPlugin():n.init({fromReload:!0}).catch(f=>n.displayError(f)),new B.Notice("Obsidian must be restarted for the changes to take affect.")})),new B.Setting(r).setName("Support").setHeading(),new B.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(l=>{l.buttonEl.outerHTML="<a href='https://ko-fi.com/F1F195IQ5' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>"});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let c=o.createEl("button");if(c.setText("Copy Debug Information"),c.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new B.Notice("Debug information copied to clipboard. May contain sensitive information!")},B.Platform.isDesktopApp){let l=r.createDiv();l.setAttr("align","center"),l.setText(`Debugging and logging:
You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),B.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,n){n&&(r.setDisabled(n),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.lineAuthoringFeature.activateFeature():this.plugin.lineAuthoringFeature.deactivateFeature()}async lineAuthorSettingHandler(r,n){this.settings.lineAuthor[r]=n,await this.plugin.saveSettings(),this.plugin.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new B.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.innerHTML=`
<a href="${Jj}">Feature guide and quick examples</a></br>
The commit hash, author name and authoring date can all be individually toggled.</br>Hide everything, to only show the age-colored sidebar.`,r.addToggle(n=>n.setValue(this.settings.lineAuthor.show).onChange(i=>{this.configureLineAuthorShowStatus(i),this.display()})),this.settings.lineAuthor.show){let n=new B.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown(a=>{a.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),a.setValue(this.settings.lineAuthor.followMovement),a.onChange(s=>this.lineAuthorSettingHandler("followMovement",s))});if(n.descEl.innerHTML=`
By default (deactivated), each line only shows the newest commit where it was changed.
<br/>
With <i>same commit</i>, cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown.
<br/>
With <i>all commits</i>, cut-copy-paste-ing text inbetween multiple commits will be detected.
<br/>
It uses <a href="https://git-scm.com/docs/git-blame">git-blame</a> and
for matches (at least ${Vu} characters) within the same (or all) commit(s), <em>the originating</em> commit's information is shown.`,new B.Setting(this.containerEl).setName("Show commit hash").addToggle(a=>{a.setValue(this.settings.lineAuthor.showCommitHash),a.onChange(s=>this.lineAuthorSettingHandler("showCommitHash",s))}),new B.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(a=>{let s={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};a.addOptions(s),a.setValue(this.settings.lineAuthor.authorDisplay),a.onChange(async o=>this.lineAuthorSettingHandler("authorDisplay",o))}),new B.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(a=>{let s={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeFormatOptions),a.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",o),this.display()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let a=new B.Setting(this.containerEl);a.setName("Custom authoring date format").addText(s=>{s.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),s.setPlaceholder("YYYY-MM-DD HH:mm"),s.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",o),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(o)})}),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(this.settings.lineAuthor.dateTimeFormatCustomString)}new B.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(a=>{let s={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeTimezone),a.onChange(async o=>this.lineAuthorSettingHandler("dateTimeTimezone",o))}).descEl.innerHTML=`
The time-zone in which the authoring date should be shown.
Either your local time-zone (default),
the author's time-zone during commit creation or
<a href="https://en.wikipedia.org/wiki/UTC%C2%B100:00">UTC\xB100:00</a>.
`;let i=new B.Setting(this.containerEl).setName("Oldest age in coloring");i.descEl.innerHTML=this.previewOldestAgeDescriptionHtml(this.settings.lineAuthor.coloringMaxAge)[0],i.addText(a=>{a.setPlaceholder("1y"),a.setValue(this.settings.lineAuthor.coloringMaxAge),a.onChange(async s=>{let[o,c]=this.previewOldestAgeDescriptionHtml(s);i.descEl.innerHTML=o,c&&(await this.lineAuthorSettingHandler("coloringMaxAge",s),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest"),new B.Setting(this.containerEl).setName("Text color").addText(a=>{a.setValue(this.settings.lineAuthor.textColorCss),a.onChange(async s=>{await this.lineAuthorSettingHandler("textColorCss",s)})}).descEl.innerHTML=`
The CSS color of the gutter text.<br/>
It is higly recommended to use
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">
CSS variables</a>
defined by themes
(e.g. <pre style="display:inline">var(--text-muted)</pre> or
<pre style="display:inline">var(--text-on-accent)</pre>,
because they automatically adapt to theme changes.<br/>
See: <a href="https://github.com/obsidian-community/obsidian-theme-template/blob/main/obsidian.css">
List of available CSS variables in Obsidian
<a/>
`,new B.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=`
Whitespace and newlines are interpreted as
part of the document and in changes
by default (hence not ignored).
This makes the last line being shown as 'changed'
when a new subsequent line is added,
even if the previously last line's text is the same.
<br>
If you don't care about purely-whitespace changes
(e.g. list nesting / quote indentation changes),
then activating this will provide more meaningful change detection.
`}}createColorSetting(r){let n=new B.Setting(this.containerEl).setName("").addText(i=>{let a=i0(r,this.settings.lineAuthor),s=i0(r,Sn.lineAuthor);i.setPlaceholder(zg(s)),i.setValue(zg(a)),i.onChange(async o=>{let c=lT(o);if(c!==void 0){let l=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(l,c)}this.refreshColorSettingsDesc(r,c)})});this.lineAuthorColorSettings.set(r,n),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,i0(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let n=this.lineAuthorColorSettings.get(r);if(n){let i=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";n.nameEl.innerText=`Color for ${i} commits`}}refreshColorSettingsDesc(r,n){let i=this.lineAuthorColorSettings.get(r);i&&(i.descEl.innerHTML=this.colorSettingPreviewDescHtml(r,this.settings.lineAuthor,n!==void 0))}colorSettingPreviewDescHtml(r,n,i){let a=i?a0(r,n):"rgba(127,127,127,0.3)",s=B.moment.unix(B.moment.now()/1e3).format("YYYY-MM-DD"),o=i?`abcdef Author Name ${s}`:"invalid color";return`Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and
named colors (e.g. 'black', 'purple'). Color preview: ${`<div
class="line-author-settings-preview"
style="background-color: ${a}; width: 30ch;"
>${o}</div>`}`}previewCustomDateTimeDescriptionHtml(r){let n=(0,B.moment)().format(r);return`<a href="${Kj}">Format string</a> to display the authoring date.</br>Currently: ${n}`}previewOldestAgeDescriptionHtml(r){let n=Wf(r);return[`The oldest age in the line author coloring. Everything older will have the same color.
</br>Smallest valid age is "1d". Currently: ${n!==void 0?`${n.asDays()} days`:"invalid!"}`,n]}};function i0(e,t){return e==="oldest"?t.colorOld:t.colorNew}function Wf(e){let t=B.moment.duration("P"+e.toUpperCase());return t.isValid()&&t.asDays()&&t.asDays()>=1?t:void 0}function CT(e,t,r){if(!(e===void 0||t===void 0||r===void 0))return`head${e}-obj${t}-path${r}`}var PT=qf.Annotation.define();function RT(e,t,r){return r.update({annotations:PT.of({key:e,la:t,lineOffsetsFromUnsavedChanges:new Map})})}function Qj(e){return e.annotation(PT)}var Ys=qf.StateField.define({create:e=>{},update:(e,t)=>{var r;return(r=Qj(t))!=null?r:eB(t,e)},compare:(e,t)=>(e==null?void 0:e.key)===(t==null?void 0:t.key)});function Yf(e){var a;let t=TT.sha256.create();if(!e)return t;let{la:r,key:n,lineOffsetsFromUnsavedChanges:i}=e;t.update(r==="untracked"?"t":"f"),t.update(n);for(let[s,o]of(a=i.entries())!=null?a:[])t.update([s,o]);return t}var Lr={get:void 0,save:void 0};function MT(e,t){Lr.get=e,Lr.save=t}function Xf(e){var t,r;return(r=(t=Wf(e.coloringMaxAge))==null?void 0:t.asDays())!=null?r:Wf(Sn.lineAuthor.coloringMaxAge).asDays()}function eB(e,t){if(t)return e.changes.empty||e.changes.iterChanges((r,n,i,a)=>{var p;let s=e.startState.doc,{newDoc:o}=e,c=s.lineAt(r).number,l=s.lineAt(n).number,u=o.lineAt(i).number,f=o.lineAt(a).number,d=l-c+1,h=f-u+1;for(let m=u;m<=f;m++){let v=(p=t.lineOffsetsFromUnsavedChanges.get(m))!=null?p:0,y=f===m,b=h-d;y&&(v+=b),t.lineOffsetsFromUnsavedChanges.set(m,v)}}),t}var s0=class{constructor(t){this.state=t;this.subscribeMe()}notifyLineAuthoring(t,r){if(this.view===void 0){console.warn(`Git: View is not defined for editor cache key. Unforeseen situation. id: ${t}`);return}let n=this.view.state,i=RT(t,r,n);this.view.dispatch(i)}updateToNewState(t){let r=this.lastSeenPath&&this.filepath!=this.lastSeenPath;return this.state=t,r&&(this.unsubscribeMe(this.lastSeenPath),this.subscribeMe()),this}removeIfStale(){this.view.destroyed&&this.unsubscribeMe(this.lastSeenPath)}subscribeMe(){this.filepath!==void 0&&(qs.ifFilepathDefinedTransformSubscribers(this.filepath,t=>t.add(this)),this.lastSeenPath=this.filepath)}unsubscribeMe(t){qs.ifFilepathDefinedTransformSubscribers(t,r=>r.delete(this))}get filepath(){var t,r;return(r=(t=this.state.field(Zf.editorInfoField))==null?void 0:t.file)==null?void 0:r.path}get view(){return this.state.field(Zf.editorEditorField)}},IT=OT.StateField.define({create:e=>new s0(e),update:(e,t)=>e.updateToNewState(t.state),compare:(e,t)=>e===t});g();function FT(){Xs=void 0,o0=[],Kf=0,Qf.clear(),ed.clear(),Zs.clear()}var Xs,Jf=()=>Xs;function $T(e,t){var i;let r=t.length;if(r<((i=Xs==null?void 0:Xs.length)!=null?i:0))return;Xs={gutter:e,length:r,text:t};let n=Lr.get();r!==n.gutterSpacingFallbackLength&&(n.gutterSpacingFallbackLength=r,Lr.save(n))}var o0=[],tB=15,Kf=0;function LT(e){o0[Kf]=e,Kf=(Kf+1)%tB}function DT(){return uT(o0)}var Qf=new Map,ed=new Map,Zs=new Set;g();var ZT=require("@codemirror/state"),KT=require("@codemirror/view");g();var f0=require("@codemirror/view"),WT=Ze(Xg()),nd=require("obsidian");g();g();var td={x:-10,y:-10};function NT(){td.x===-10&&window.addEventListener("mousedown",e=>{td.x=e.clientX,td.y=e.clientY})}function jT(){for(let e of Zs)if(rB(e,td))return e}function rB(e,t){let{x:r,y:n,width:i,height:a}=e.getBoundingClientRect();return r<=t.x&&t.x<=r+i&&n<=t.y&&t.y<=n+a}g();var Xl={};var BT="data-commit";function HT(e,t,r){if(t.hasFocus())return;let n=jT();if(!n)return;let i=iB(n);i&&(!i.isZeroCommit&&!i.isWaitingGutter&&nB(i,e),l0("showCommitHash",e),l0("authorDisplay",e),l0("dateTimeFormatOptions",e))}function nB(e,t){t.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick(n=>navigator.clipboard.writeText(e.hash)))}function l0(e,t){var c,l;let r,n,i=Xl.plugin.settings.lineAuthor,a=i[e],s=typeof a=="boolean"?a:a!=="hide",o=Sn.lineAuthor[e];if(e==="showCommitHash")r="Show commit hash",n=a;else if(e==="authorDisplay"){let u=(c=i.lastShownAuthorDisplay)!=null?c:o;r="Show author "+(s?a:u),n=s?"hide":u}else if(e==="dateTimeFormatOptions"){let u=(l=i.lastShownDateTimeFormatOptions)!=null?l:o;r="Show "+(s?a:u),r+=r.contains("date")?"":" date",n=s?"hide":u}else Oi(e);t.addItem(u=>u.setTitle(r).setSection("obs-git-line-author-configure").setChecked(s).onClick(f=>{var d,h;return(h=(d=Xl.plugin)==null?void 0:d.settingsTab)==null?void 0:h.lineAuthorSettingHandler(e,n)}))}function UT(e,t,r){r.setAttr(BT,JSON.stringify({hash:e.hash,isZeroCommit:e.isZeroCommit,isWaitingGutter:t}))}function iB(e){let t=e.getAttr(BT);return t?JSON.parse(t):void 0}g();function a0(e,t){return e==="oldest"?rd(0,!1,t).color:rd(void 0,!0,t).color}function rd(e,t,r){let n=Xf(r),i=Date.now()/1e3,a=e!=null?e:0,o=(t?0:i-a)/60/60/24,c=Math.pow(Math.clamp(o/n,0,1),1/2.3),l=aB(),u=r.colorNew,f=r.colorOld,d=l?.4:1,h=c0(u.r,f.r,c)*d,p=c0(u.g,f.g,c)*d,m=c0(u.b,f.b,c)*d;return{color:`rgba(${h},${p},${m},${l?.75:.25})`,daysSinceCommit:o}}function c0(e,t,r){return e+(t-e)*r}function aB(){var e;return((e=window.app)==null?void 0:e.getTheme())==="obsidian"}function GT(e){document.body.style.setProperty("--obs-git-gutter-text",e.textColorCss)}g();function zT(e,t,r){let n;for(let i=t;i<=r;i++){let a=e.hashPerLine[i],s=e.commits.get(a);(!n||s.isZeroCommit||sB(s,n))&&(n=s)}return n}function sB(e,t){var i,a,s,o;let r=(a=(i=e.author)==null?void 0:i.epochSeconds)!=null?a:0,n=(o=(s=t.author)==null?void 0:s.epochSeconds)!=null?o:0;return r>n}var VT="-",oB="+",lB=3,cB="*",uB=/\S/g,fB="%",Ks=class e extends f0.GutterMarker{constructor(r){super();this.text=r}eq(r){return r instanceof e&&this.text===r.text}toDOM(){return document.createTextNode(this.text)}destroy(r){document.body.contains(r)||r.remove()}},u0=class extends f0.GutterMarker{constructor(r,n,i,a,s,o){super();this.lineAuthoring=r;this.startLine=n;this.endLine=i;this.key=a;this.settings=s;this.options=o;this.point=!1;this.elementClass="obs-git-blame-gutter"}eq(r){return this.key===(r==null?void 0:r.key)&&this.startLine===(r==null?void 0:r.startLine)&&this.endLine===(r==null?void 0:r.endLine)&&(this==null?void 0:this.options)===(r==null?void 0:r.options)}toDOM(){var r;return this.precomputedDomProvider=(r=this.precomputedDomProvider)!=null?r:this.computeDom(),this.precomputedDomProvider()}destroy(r){document.body.contains(r)||(r.remove(),Zs.delete(r))}computeDom(){let r=zT(this.lineAuthoring,this.startLine,this.endLine),n=r.isZeroCommit?"":this.renderNonZeroCommit(r);return!r.isZeroCommit&&this.options!=="waiting-for-result"?$T(this,n):n=this.adaptTextForFakeCommit(r,n,this.options),this.createHtmlNode(r,n,this.options==="waiting-for-result")}createHtmlNode(r,n,i){var l;let a=window.createDiv();a.innerText=n;let{color:s,daysSinceCommit:o}=rd((l=r==null?void 0:r.author)==null?void 0:l.epochSeconds,r==null?void 0:r.isZeroCommit,this.settings);a.style.backgroundColor=s,UT(r,i,a);function c(){let u=a.cloneNode(!0);return Zs.add(u),i||LT(o),u}return c}renderNonZeroCommit(r){let n=this.settings.showCommitHash?this.renderHash(r):"",i=this.settings.authorDisplay==="hide"?"":`${this.renderAuthorName(r,this.settings.authorDisplay)}`,a=this.settings.dateTimeFormatOptions==="hide"?"":`${this.renderAuthoringDate(r,this.settings.dateTimeFormatOptions,this.settings.dateTimeFormatCustomString,this.settings.dateTimeTimezone)}`;return[n,i,a].filter(o=>o.length>=1).join(" ")}renderHash(r){return r.hash.substring(0,6)}renderAuthorName(r,n){var o,c,l,u;let i=(c=(o=r==null?void 0:r.author)==null?void 0:o.name)!=null?c:"",a=i.split(" ").filter(f=>f.length>=1),s;switch(n){case"initials":s=a.map(f=>f[0].toUpperCase()).join("");break;case"first name":s=(l=a.first())!=null?l:VT;break;case"last name":s=(u=a.last())!=null?u:VT;break;case"full":s=i;break;default:return Oi(n)}return fT(r==null?void 0:r.author,r==null?void 0:r.committer)||(s=s+cB),s}renderAuthoringDate(r,n,i,a){var l;let s="?";if(((l=r==null?void 0:r.author)==null?void 0:l.epochSeconds)===void 0)return s;let o;switch(n){case"date":o=zu;break;case"datetime":o=_m;break;case"custom":o=i;break;case"natural language":o=u=>{let f=u.diff((0,nd.moment)());return nd.moment.duration(f).humanize(!0)};break;default:return Oi(n)}let c=nd.moment.unix(r.author.epochSeconds);switch(a){case"viewer-local":break;case"author-local":c=c.utcOffset(r.author.tz),typeof o=="string"&&(o+=" Z");break;case"utc0000":c=c.utc(),typeof o=="string"&&(o+="[Z]");break;default:return Oi(a)}return typeof o=="string"?c.format(o):o(c)}adaptTextForFakeCommit(r,n,i){var c,l,u,f;let a=(l=(c=Jf())==null?void 0:c.text)!=null?l:n,s=i!=="waiting-for-result"&&r.isZeroCommit?oB:fB;n=a.replace(uB,s);let o=(f=(u=Lr.get())==null?void 0:u.gutterSpacingFallbackLength)!=null?f:n.length;if(n=dT(n,o,s),i!=="waiting-for-result"&&r.isZeroCommit){let d=Math.min(o,lB);n=hT(n,o-d)}return n}};function _a(e,t,r,n,i,a){let s=WT.sha256.create();s.update(Object.values(i).join(",")),s.update(`s${t}-e${r}-k${n}-o${a}`);let o=s.hex(),c=Qf.get(o);if(c)return c;let l=new u0(e,t,r,n,i,a);return Qf.set(o,l),l}g();var qT=require("obsidian");function d0(){var t,r;let e=(r=(t=Lr.get())==null?void 0:t.gutterSpacingFallbackLength)!=null?r:Sn.lineAuthor.gutterSpacingFallbackLength;return new Ks(Array(e).fill("-").join(""))}function h0(e){let{lineAuthoring:t,ageForInitialRender:r}=dB(e);return _a(t,1,1,"initialGutter"+r,e,"waiting-for-result")}function dB(e){var a;let t=(a=DT())!=null?a:Xf(e)*.25,r=(0,qT.moment)().add(-t,"days"),n={name:"",epochSeconds:cT(r),tz:"+0000"},i={hash:"waiting-for-result",author:n,committer:n,isZeroCommit:!1};return{lineAuthoring:{hashPerLine:[void 0,"waiting-for-result"],commits:new Map([["waiting-for-result",i]])},ageForInitialRender:t}}g();function YT(e,t){return _a({hashPerLine:[void 0,"000000"],commits:new Map([["000000",yT]])},1,1,e,t)}var p0=new Ks(""),JT=(0,KT.gutter)({class:"line-author-gutter-container",markers(e){let t=e.state.field(Ys,!1);return hB(e,t)},lineMarkerChange(e){let t=Yf(e.state.field(Ys));return Yf(e.startState.field(Ys))!==t},renderEmptyElements:!0,initialSpacer:e=>(XT(e),d0()),updateSpacer:(e,t)=>{var r,n;return XT(t.view),(n=(r=Jf())==null?void 0:r.gutter)!=null?n:d0()}});function hB(e,t){let r=Yf(t),n=e.state.doc,i=new Map;for(let u=1;u<=n.lines;u++){let f=n.line(u).from,d=e.lineBlockAt(f).to;i.set(u,[f,d]),r.update([f,d,0])}let a=Lr.get();r.update("s"+Object.values(Lr).join(","));let s=r.hex(),o=ed.get(s);if(o)return o;let{result:c,allowCache:l}=pB(n,i,a,t);return l&&ed.set(s,c),c}function pB(e,t,r,n){let i=!0,a=e.lines,s=[];function o(f,d,h){return s.push(h.range(f,d))}let c=mB(a,n),l=e.length===0,u=e.iterLines(a,a+1).next().value==="";for(let f=1;f<=a;f++){let[d,h]=t.get(f),p=e.lineAt(h).number;if(l){o(d,h,p0);continue}if(f===a&&u){o(d,h,p0);continue}if(n===void 0){o(d,h,h0(r)),i=!1;continue}let{key:m,la:v}=n;if(v==="untracked"){o(d,h,YT(v,r));continue}let y=v.hashPerLine.length-1,b=c[f],x=c[p];if(x&&x>y&&o(d,h,p0),b!==void 0&&Vg(1,b,y)&&x!==void 0&&Vg(1,x,y)){o(d,h,_a(v,b,x,m,r));continue}if(y<1){o(d,h,h0(r)),i=!1;continue}let E=Math.clamp(b!=null?b:f,1,y),_=Math.clamp(x!=null?x:p,1,y);o(d,h,_a(v,E,_,m+"computing",r,"waiting-for-result"))}return{result:ZT.RangeSet.of(s,!0),allowCache:i}}function mB(e,t){if(!(t!=null&&t.lineOffsetsFromUnsavedChanges))return Array.from(new Array(e+1),i=>i);let r=[void 0],n=0;for(let i=1;i<=e;i++){let a=t.lineOffsetsFromUnsavedChanges.get(i);n+=a!=null?a:0,r[i]=a===void 0?i-n:void 0}return r}function XT(e){e.dom.querySelectorAll(".cm-gutters").forEach(r=>{r!=null&&r.style&&(r.style.marginLeft||(r.style.marginLeft="unset"))})}var id=class{constructor(t){this.plugin=t;this.lineAuthorings=new Map}async trackChanged(t){return this.trackChangedHelper(t).catch(r=>(console.warn("Git: Error in trackChanged."+r),Promise.reject(r)))}async trackChangedHelper(t){if(t){if(t.path===void 0){console.warn("Git: Attempted to track change of undefined filepath. Unforeseen situation.");return}return this.computeLineAuthorInfo(t.path)}}destroy(){this.lineAuthorings.clear(),qs.clear(),FT()}async computeLineAuthorInfo(t){let r=this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager,n=await r.submoduleAwareHeadRevisonInContainingDirectory(t),i=await r.hashObject(t),a=CT(n,i,t);if(a!==void 0){if(!this.lineAuthorings.has(a)){let s=await r.blame(t,this.plugin.settings.lineAuthor.followMovement,this.plugin.settings.lineAuthor.ignoreWhitespace);this.lineAuthorings.set(a,s)}this.notifyComputationResultToSubscribers(t,a)}}notifyComputationResultToSubscribers(t,r){qs.ifFilepathDefinedTransformSubscribers(t,n=>n.forEach(i=>i.notifyLineAuthoring(r,this.lineAuthorings.get(r))))}},eC=QT.Prec.high([IT,Ys,JT]);var ad=class{constructor(t){this.plg=t;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=t=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=t==null?void 0:t.view;!(r instanceof xa.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),MT(()=>this.plg.settings.lineAuthor,t=>{this.plg.settings.lineAuthor=t,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;GT(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new id(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(t){console.warn("Git: Error while loading line authoring feature.",t),this.deactivateFeature()}}deactivateFeature(){var t;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(t=this.lineAuthorInfoProvider)==null||t.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&xa.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Te?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(eC),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let t of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(t);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),NT(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent),this.plg.app.workspace.offref(this.gutterContextMenuEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",t=>{var r;return void((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(t,r)=>{var n;return t instanceof xa.TFile&&((n=this.lineAuthorInfoProvider)==null?void 0:n.trackChanged(t))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",t=>{var r;return t instanceof xa.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t))})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",HT)}};g();var sd=class{constructor(t){this.plugin=t;this.tasks=[]}addTask(t){this.tasks.push(t),this.tasks.length===1&&this.handleTask()}handleTask(){this.tasks.length>0&&this.tasks[0]().catch(t=>this.plugin.displayError(t)).finally(()=>{this.tasks.shift(),this.handleTask()})}clear(){this.tasks=[]}};g();var Dr=require("obsidian");var od=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.messages=[];this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(t,r){this.messages.push({message:`Git: ${t.slice(0,100)}`,timeout:r}),this.display()}display(){this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){switch((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Dr.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.state.gitAction){case 0:this.displayFromNow();break;case 1:this.statusBarEl.ariaLabel="Checking repository status...",(0,Dr.setIcon)(this.iconEl,"refresh-cw"),this.statusBarEl.addClass(this.base+"status");break;case 3:this.statusBarEl.ariaLabel="Adding files...",(0,Dr.setIcon)(this.iconEl,"archive"),this.statusBarEl.addClass(this.base+"add");break;case 4:this.statusBarEl.ariaLabel="Committing changes...",(0,Dr.setIcon)(this.iconEl,"git-commit"),this.statusBarEl.addClass(this.base+"commit");break;case 5:this.statusBarEl.ariaLabel="Pushing changes...",(0,Dr.setIcon)(this.iconEl,"upload"),this.statusBarEl.addClass(this.base+"push");break;case 2:this.statusBarEl.ariaLabel="Pulling changes...",(0,Dr.setIcon)(this.iconEl,"download"),this.statusBarEl.addClass(this.base+"pull");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Dr.setIcon)(this.iconEl,"alert-triangle"),this.statusBarEl.addClass(this.base+"failed-init");break}}displayFromNow(){var n;let t=this.lastCommitTimestamp,r=this.plugin.state.offlineMode;if(t){let i=(0,Dr.moment)(t).fromNow();this.statusBarEl.ariaLabel=`${r?"Offline: ":""}Last Commit: ${i}`,(n=this.unPushedCommits)!=null&&n&&(this.statusBarEl.ariaLabel+=`
(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Dr.setIcon)(this.iconEl,"globe"):(0,Dr.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus&&this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};g();var cd=require("obsidian"),ld=class extends cd.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let n=(0,cd.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${n}: ${r}`,`${r}: ${n}`]}renderSuggestion(r,n){n.innerText=r}onChooseSuggestion(r,n){this.resolve&&this.resolve(r)}};g();var tC=require("obsidian"),Zl=class{constructor(t){this.plugin=t}saveLastAuto(t,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(t.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(t.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(t.toString())}loadLastAuto(){var t,r,n;return{backup:new Date((t=this.plugin.localStorage.getLastAutoBackup())!=null?t:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((n=this.plugin.localStorage.getLastAutoPush())!=null?n:"")}}async init(){await this.setUpAutoCommitAndSync();let t=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=new Date,n=this.plugin.settings.autoPushInterval-Math.round((r.getTime()-t.push.getTime())/1e3/60);this.startAutoPush(n<=0?0:n)}if(this.plugin.settings.autoPullInterval>0){let r=new Date,n=this.plugin.settings.autoPullInterval-Math.round((r.getTime()-t.pull.getTime())/1e3/60);this.startAutoPull(n<=0?0:n)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...t){t.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),t.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),t.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let t=await this.plugin.gitManager.getLastCommitTime();t&&this.plugin.localStorage.setLastAutoBackup(t.toString())}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let t=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=new Date,n=this.plugin.settings.autoSaveInterval-Math.round((r.getTime()-t.backup.getTime())/1e3/60);this.startAutoCommitAndSync(n<=0?0:n)}}}startAutoCommitAndSync(t){let r=(t!=null?t:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?t===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,tC.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(()=>this.plugin.settings.differentIntervalCommitAndPush?this.plugin.commit({fromAuto:!0}):this.plugin.commitAndSync(!0)),this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync()}startAutoPull(t){let r=(t!=null?t:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>{this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote()),this.saveLastAuto(new Date,"pull"),this.startAutoPull()},r)}startAutoPush(t){let r=(t!=null?t:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>{this.plugin.promiseQueue.addTask(()=>this.plugin.push()),this.saveLastAuto(new Date,"push"),this.startAutoPush()},r)}clearAutoCommitAndSync(){var r;let t=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,t=!0),this.plugin.autoCommitDebouncer&&((r=this.plugin.autoCommitDebouncer)==null||r.cancel(),this.plugin.autoCommitDebouncer=void 0,t=!0),t}clearAutoPull(){return this.timeoutIDPull?(window.clearTimeout(this.timeoutIDPull),this.timeoutIDPull=void 0,!0):!1}clearAutoPush(){return this.timeoutIDPush?(window.clearTimeout(this.timeoutIDPush),this.timeoutIDPush=void 0,!0):!1}};g();var Jl=require("obsidian");g();var Kl=require("obsidian");async function rC(e,t,r){let n=await iC(t,r);if(n.result==="failure"){new Kl.Notice(n.reason);return}let{isGitHub:i,branch:a,repo:s,user:o,filePath:c}=n;if(i){let l=e.getCursor("from").line+1,u=e.getCursor("to").line+1;l===u?window.open(`https://github.com/${o}/${s}/blob/${a}/${c}?plain=1#L${l}`):window.open(`https://github.com/${o}/${s}/blob/${a}/${c}?plain=1#L${l}-L${u}`)}else new Kl.Notice("It seems like you are not using GitHub")}async function nC(e,t){let r=await iC(e,t);if(r.result==="failure"){new Kl.Notice(r.reason);return}let{isGitHub:n,branch:i,repo:a,user:s,filePath:o}=r;n?window.open(`https://github.com/${s}/${a}/commits/${i}/${o}`):new Kl.Notice("It seems like you are not using GitHub")}async function iC(e,t){let r=await t.branchInfo(),n=r.tracking,i=r.current,a,s=t.getRelativeRepoPath(e.path);if(t instanceof Te){let c=await t.getSubmoduleOfFile(t.getRelativeRepoPath(e.path));if(c){s=c.relativeFilepath;let l=await t.git.cwd({path:c.submodule,root:!1}).status();if(n=l.tracking||void 0,i=l.current||void 0,n){let u=n.substring(0,n.indexOf("/")),f=await t.git.cwd({path:c.submodule,root:!1}).getConfig(`remote.${u}.url`,"local");if(f.value!=null)a=f.value;else return{result:"failure",reason:"Failed to get remote url of submodule"}}}}if(n==null)return{result:"failure",reason:"Remote branch is not configured"};if(i==null)return{result:"failure",reason:"Failed to get current branch name"};if(a==null){let c=n.substring(0,n.indexOf("/"));if(a=await t.getConfig(`remote.${c}.url`),a==null)return{result:"failure",reason:"Failed to get remote url"}}let o=a.match(/(?:^https:\/\/github\.com\/(.+)\/(.+?)(?:\.git)?$)|(?:^[a-zA-Z]+@github\.com:(.+)\/(.+?)(?:\.git)?$)/);if(o==null)return{result:"failure",reason:"Could not parse remote url"};{let[c,l,u,f,d]=o;return{result:"success",isGitHub:!!c,repo:u||d,user:l||f,branch:i,filePath:s}}}g();var aC=require("obsidian"),ud=class extends aC.FuzzySuggestModal{constructor(t,r){super(t.app),this.plugin=t,this.changedFiles=r,this.setPlaceholder("Not supported files will be opened by default app!")}getItems(){return this.changedFiles}getItemText(t){if(t.index=="U"&&t.workingDir=="U")return`Untracked | ${t.vaultPath}`;let r="",n="";return t.workingDir!=" "&&(r=`Working Dir: ${t.workingDir} `),t.index!=" "&&(n=`Index: ${t.index}`),`${r}${n} | ${t.vaultPath}`}onChooseItem(t,r){this.plugin.app.metadataCache.getFirstLinkpathDest(t.vaultPath,"")==null?this.app.openWithDefaultApp(t.vaultPath):this.plugin.app.workspace.openLinkText(t.vaultPath,"/")}};g();var sC=require("obsidian"),fd=class extends sC.Modal{constructor(r,n){super(r);this.content=n;this.resolve=null}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText("Edit .gitignore");let i=r.createDiv(),a=i.createEl("textarea",{text:this.content,cls:["obsidian-git-textarea"],attr:{rows:10,cols:30,wrap:"off"}});i.createEl("button",{cls:["mod-cta","obsidian-git-center-button"],text:"Save"}).addEventListener("click",()=>{this.resolve(a.value),this.close()})}onClose(){let{contentEl:r}=this;r.empty(),this.resolve&&this.resolve(void 0)}};function oC(e){let t=e.app;e.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=e.gitManager.getRelativeVaultPath(".gitignore");await t.vault.adapter.exists(r)||await t.vault.adapter.write(r,"");let n=await t.vault.adapter.read(r),a=await new fd(t,n).openAndGetReslt();a!==void 0&&(await t.vault.adapter.write(r,a),await e.refresh())}}),e.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType(St.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:St.type})):n=r.first(),await t.workspace.revealLeaf(n)}}),e.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType(Fr.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:Fr.type})):n=r.first(),await t.workspace.revealLeaf(n)}}),e.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;{let i=e.gitManager.getRelativeRepoPath(n.path,!0);e.tools.openDiff({aFile:i,aRef:""})}}}),e.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:n})=>{if(n)return rC(r,n,e.gitManager)}}),e.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:n})=>{if(n)return nC(n,e.gitManager)}}),e.addCommand({id:"pull",name:"Pull",callback:()=>e.promiseQueue.addTask(()=>e.pullChangesFromRemote())}),e.addCommand({id:"fetch",name:"Fetch",callback:()=>e.promiseQueue.addTask(()=>e.fetch())}),e.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>e.promiseQueue.addTask(()=>e.switchRemoteBranch())}),e.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.addFileToGitignore(n).catch(i=>e.displayError(i))}}),e.addCommand({id:"push",name:"Commit-and-sync",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync(!1))}),e.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>e.promiseQueue.addTask(async()=>{await e.commitAndSync(!1),window.close()})}),e.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync(!1,!0))}),e.addCommand({id:"commit",name:"Commit all changes",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1}))}),e.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0}))}),e.addCommand({id:"commit-staged",name:"Commit staged",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:!0}))}),Jl.Platform.isDesktopApp&&e.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),e.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0}))}),e.addCommand({id:"push2",name:"Push",callback:()=>e.promiseQueue.addTask(()=>e.push())}),e.addCommand({id:"stage-current-file",name:"Stage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.stageFile(n))}}),e.addCommand({id:"unstage-current-file",name:"Unstage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.unstageFile(n))}}),e.addCommand({id:"edit-remotes",name:"Edit remotes",callback:()=>e.editRemotes().catch(r=>e.displayError(r))}),e.addCommand({id:"remove-remote",name:"Remove remote",callback:()=>e.removeRemote().catch(r=>e.displayError(r))}),e.addCommand({id:"set-upstream-branch",name:"Set upstream branch",callback:()=>e.setUpstreamBranch().catch(r=>e.displayError(r))}),e.addCommand({id:"delete-repo",name:"CAUTION: Delete repository",callback:async()=>{await t.vault.adapter.exists(`${e.settings.basePath}/.git`)?await new Fe(e,{options:["NO","YES"],placeholder:"Do you really want to delete the repository (.git directory)? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&(await t.vault.adapter.rmdir(`${e.settings.basePath}/.git`,!0),new Jl.Notice("Successfully deleted repository. Reloading plugin..."),e.unloadPlugin(),await e.init({fromReload:!0})):new Jl.Notice("No repository found")}}),e.addCommand({id:"init-repo",name:"Initialize a new repo",callback:()=>e.createNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"clone-repo",name:"Clone an existing remote repo",callback:()=>e.cloneNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"list-changed-files",name:"List changed files",callback:async()=>{if(await e.isAllInitialized())try{let r=await e.updateCachedStatus();if(r.changed.length+r.staged.length>500){e.displayError("Too many changes to display");return}new ud(e,r.all).open()}catch(r){e.displayError(r)}}}),e.addCommand({id:"switch-branch",name:"Switch branch",callback:()=>{e.switchBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"create-branch",name:"Create new branch",callback:()=>{e.createBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"delete-branch",name:"Delete branch",callback:()=>{e.deleteBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"discard-all",name:"CAUTION: Discard all changes",callback:async()=>{if(!await e.isAllInitialized())return!1;await new Fe(e,{options:["NO","YES"],placeholder:"Do you want to discard all changes to tracked files? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&e.promiseQueue.addTask(()=>e.discardAll())}}),e.addCommand({id:"raw-command",name:"Raw command",checkCallback:r=>{let n=e.gitManager;if(r)return n instanceof Te;e.tools.runRawCommand().catch(i=>e.displayError(i))}}),e.addCommand({id:"toggle-line-author-info",name:"Toggle line author information",callback:()=>{var r;return(r=e.settingsTab)==null?void 0:r.configureLineAuthorShowStatus(!e.settings.lineAuthor.show)}})}g();var dd=class{constructor(t){this.plugin=t;this.prefix=this.plugin.manifest.id+":",this.app=t.app}migrate(){let t=["password","hostname","conflict","lastAutoPull","lastAutoBackup","lastAutoPush","gitPath","pluginDisabled"];for(let r of t){let n=localStorage.getItem(this.prefix+r);this.app.loadLocalStorage(this.prefix+r)==null&&n!=null&&n!=null&&(this.app.saveLocalStorage(this.prefix+r,n),localStorage.removeItem(this.prefix+r))}}getPassword(){return this.app.loadLocalStorage(this.prefix+"password")}setPassword(t){return this.app.saveLocalStorage(this.prefix+"password",t)}getUsername(){return this.app.loadLocalStorage(this.prefix+"username")}setUsername(t){return this.app.saveLocalStorage(this.prefix+"username",t)}getHostname(){return this.app.loadLocalStorage(this.prefix+"hostname")}setHostname(t){return this.app.saveLocalStorage(this.prefix+"hostname",t)}getConflict(){return this.app.loadLocalStorage(this.prefix+"conflict")=="true"}setConflict(t){return this.app.saveLocalStorage(this.prefix+"conflict",`${t}`)}getLastAutoPull(){return this.app.loadLocalStorage(this.prefix+"lastAutoPull")}setLastAutoPull(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPull",t)}getLastAutoBackup(){return this.app.loadLocalStorage(this.prefix+"lastAutoBackup")}setLastAutoBackup(t){return this.app.saveLocalStorage(this.prefix+"lastAutoBackup",t)}getLastAutoPush(){return this.app.loadLocalStorage(this.prefix+"lastAutoPush")}setLastAutoPush(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPush",t)}getGitPath(){return this.app.loadLocalStorage(this.prefix+"gitPath")}setGitPath(t){return this.app.saveLocalStorage(this.prefix+"gitPath",t)}getPATHPaths(){var t,r;return(r=(t=this.app.loadLocalStorage(this.prefix+"PATHPaths"))==null?void 0:t.split(":"))!=null?r:[]}setPATHPaths(t){return this.app.saveLocalStorage(this.prefix+"PATHPaths",t.join(":"))}getEnvVars(){var t;return JSON.parse((t=this.app.loadLocalStorage(this.prefix+"envVars"))!=null?t:"[]")}setEnvVars(t){return this.app.saveLocalStorage(this.prefix+"envVars",JSON.stringify(t))}getPluginDisabled(){return this.app.loadLocalStorage(this.prefix+"pluginDisabled")=="true"}setPluginDisabled(t){return this.app.saveLocalStorage(this.prefix+"pluginDisabled",`${t}`)}};g();g();g();g();var He;(function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"})(He||(He={}));var lC={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},cC={LINES:"lines",WORDS:"words",NONE:"none"},uC={WORD:"word",CHAR:"char"},Sa;(function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"})(Sa||(Sa={}));g();var gB=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],vB=RegExp("["+gB.join("\\")+"]","g");function fC(e){return e.replace(vB,"\\$&")}function m0(e){return e&&e.replace(/\\/g,"/")}function dC(e){let t,r,n,i=0;for(t=0,n=e.length;t<n;t++)r=e.charCodeAt(t),i=(i<<5)-i+r,i|=0;return i}function hC(e,t){let r=e.split(".");return r.length>1?r[r.length-1]:t}function pC(e,t){return t.reduce((r,n)=>r||e.startsWith(n),!1)}var mC=["a/","b/","i/","w/","c/","o/"];function $i(e,t,r){let n=r!==void 0?[...mC,r]:mC,i=t?new RegExp(`^${fC(t)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(e)||[],s=n.find(c=>a.indexOf(c)===0);return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function yB(e,t){return $i(e,"---",t)}function wB(e,t){return $i(e,"+++",t)}function gC(e,t={}){let r=[],n=null,i=null,a=null,s=null,o=null,c=null,l=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,m=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,b=/^copy to "?(.+)"?/,x=/^rename from "?(.+)"?/,E=/^rename to "?(.+)"?/,_=/^similarity index (\d+)%/,k=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,A=/^Binary files (.*) and (.*) differ/,S=/^GIT binary patch/,T=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,P=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,O=/^new file mode (\d{6})/,j=/^deleted file mode (\d{6}),(\d{6})/,D=e.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,`
`).split(`
`);function Q(){i!==null&&n!==null&&(n.blocks.push(i),i=null)}function de(){n!==null&&(!n.oldName&&c!==null&&(n.oldName=c),!n.newName&&l!==null&&(n.newName=l),n.newName&&(r.push(n),n=null)),c=null,l=null}function ee(){Q(),de(),n={blocks:[],deletedLines:0,addedLines:0}}function J(F){Q();let z;n!==null&&((z=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(F))?(n.isCombined=!1,a=parseInt(z[1],10),o=parseInt(z[2],10)):(z=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(F))?(n.isCombined=!0,a=parseInt(z[1],10),s=parseInt(z[2],10),o=parseInt(z[3],10)):(F.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),a=0,o=0,n.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:s,newStartLine:o,header:F}}function Ce(F){if(n===null||i===null||a===null||o===null)return;let z={content:F},N=n.isCombined?["+ "," +","++"]:["+"],Re=n.isCombined?["- "," -","--"]:["-"];pC(F,N)?(n.addedLines++,z.type=He.INSERT,z.oldNumber=void 0,z.newNumber=o++):pC(F,Re)?(n.deletedLines++,z.type=He.DELETE,z.oldNumber=a++,z.newNumber=void 0):(z.type=He.CONTEXT,z.oldNumber=a++,z.newNumber=o++),i.lines.push(z)}function me(F,z){let N=z;for(;N<D.length-3;){if(F.startsWith("diff"))return!1;if(D[N].startsWith(u)&&D[N+1].startsWith(f)&&D[N+2].startsWith(d))return!0;N++}return!1}return D.forEach((F,z)=>{if(!F||F.startsWith("*"))return;let N,Re=D[z-1],Dt=D[z+1],_t=D[z+2];if(F.startsWith("diff --git")||F.startsWith("diff --combined")){if(ee(),(N=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(F))&&(c=$i(N[1],void 0,t.dstPrefix),l=$i(N[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isGitDiff=!0;return}if(F.startsWith("Binary files")&&!(n!=null&&n.isGitDiff)){if(ee(),(N=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(F))&&(c=$i(N[1],void 0,t.dstPrefix),l=$i(N[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isBinary=!0;return}if((!n||!n.isGitDiff&&n&&F.startsWith(u)&&Dt.startsWith(f)&&_t.startsWith(d))&&ee(),n!=null&&n.isTooBig)return;if(n&&(typeof t.diffMaxChanges=="number"&&n.addedLines+n.deletedLines>t.diffMaxChanges||typeof t.diffMaxLineLength=="number"&&F.length>t.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;let st=typeof t.diffTooBigMessage=="function"?t.diffTooBigMessage(r.length):"Diff too big to be displayed";J(st);return}if(F.startsWith(u)&&Dt.startsWith(f)||F.startsWith(f)&&Re.startsWith(u)){if(n&&!n.oldName&&F.startsWith("--- ")&&(N=yB(F,t.srcPrefix))){n.oldName=N,n.language=hC(n.oldName,n.language);return}if(n&&!n.newName&&F.startsWith("+++ ")&&(N=wB(F,t.dstPrefix))){n.newName=N,n.language=hC(n.newName,n.language);return}}if(n&&(F.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i)){J(F);return}if(i&&(F.startsWith("+")||F.startsWith("-")||F.startsWith(" "))){Ce(F);return}let Ee=!me(F,z);if(n===null)throw new Error("Where is my file !!!");(N=h.exec(F))?n.oldMode=N[1]:(N=p.exec(F))?n.newMode=N[1]:(N=m.exec(F))?(n.deletedFileMode=N[1],n.isDeleted=!0):(N=v.exec(F))?(n.newFileMode=N[1],n.isNew=!0):(N=y.exec(F))?(Ee&&(n.oldName=N[1]),n.isCopy=!0):(N=b.exec(F))?(Ee&&(n.newName=N[1]),n.isCopy=!0):(N=x.exec(F))?(Ee&&(n.oldName=N[1]),n.isRename=!0):(N=E.exec(F))?(Ee&&(n.newName=N[1]),n.isRename=!0):(N=A.exec(F))?(n.isBinary=!0,n.oldName=$i(N[1],void 0,t.srcPrefix),n.newName=$i(N[2],void 0,t.dstPrefix),J("Binary file")):S.test(F)?(n.isBinary=!0,J(F)):(N=_.exec(F))?n.unchangedPercentage=parseInt(N[1],10):(N=k.exec(F))?n.changedPercentage=parseInt(N[1],10):(N=w.exec(F))?(n.checksumBefore=N[1],n.checksumAfter=N[2],N[3]&&(n.mode=N[3])):(N=T.exec(F))?(n.checksumBefore=[N[2],N[3]],n.checksumAfter=N[1]):(N=P.exec(F))?(n.oldMode=[N[2],N[3]],n.newMode=N[1]):(N=O.exec(F))?(n.newFileMode=N[1],n.isNew=!0):(N=j.exec(F))&&(n.deletedFileMode=N[1],n.isDeleted=!0)}),Q(),de(),r}g();g();g();function Kn(){}Kn.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var a=this;function s(m){return i?(setTimeout(function(){i(void 0,m)},0),!0):m}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var o=r.length,c=t.length,l=1,u=o+c;n.maxEditLength&&(u=Math.min(u,n.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=o&&d+1>=c)return s([{value:this.join(r),count:r.length}]);function h(){for(var m=-1*l;m<=l;m+=2){var v=void 0,y=f[m-1],b=f[m+1],x=(b?b.newPos:0)-m;y&&(f[m-1]=void 0);var E=y&&y.newPos+1<o,_=b&&0<=x&&x<c;if(!E&&!_){f[m]=void 0;continue}if(!E||_&&y.newPos<b.newPos?(v=xB(b),a.pushComponent(v.components,void 0,!0)):(v=y,v.newPos++,a.pushComponent(v.components,!0,void 0)),x=a.extractCommon(v,r,t,m),v.newPos+1>=o&&x+1>=c)return s(_B(a,v.components,r,t,a.useLongestToken));f[m]=v}l++}if(i)(function m(){setTimeout(function(){if(l>u)return i();h()||m()},0)})();else for(;l<=u;){var p=h();if(p)return p}},pushComponent:function(t,r,n){var i=t[t.length-1];i&&i.added===r&&i.removed===n?t[t.length-1]={count:i.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,i){for(var a=r.length,s=n.length,o=t.newPos,c=o-i,l=0;o+1<a&&c+1<s&&this.equals(r[o+1],n[c+1]);)o++,c++,l++;return l&&t.components.push({count:l}),t.newPos=o,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function _B(e,t,r,n,i){for(var a=0,s=t.length,o=0,c=0;a<s;a++){var l=t[a];if(l.removed){if(l.value=e.join(n.slice(c,c+l.count)),c+=l.count,a&&t[a-1].added){var f=t[a-1];t[a-1]=t[a],t[a]=f}}else{if(!l.added&&i){var u=r.slice(o,o+l.count);u=u.map(function(h,p){var m=n[c+p];return m.length>h.length?m:h}),l.value=e.join(u)}else l.value=e.join(r.slice(o,o+l.count));o+=l.count,l.added||(c+=l.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function xB(e){return{newPos:e.newPos,components:e.components.slice(0)}}var SB=new Kn;function wC(e,t,r){return SB.diff(e,t,r)}var vC=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,yC=/\S/,y0=new Kn;y0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!yC.test(e)&&!yC.test(t)};y0.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&vC.test(t[r])&&vC.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};function bC(e,t,r){return y0.diff(e,t,r)}var _C=new Kn;_C.tokenize=function(e){var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var i=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var EB=new Kn;EB.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var AB=new Kn;AB.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function hd(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hd=function(t){return typeof t}:hd=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hd(e)}var kB=Object.prototype.toString,Ql=new Kn;Ql.useLongestToken=!0;Ql.tokenize=_C.tokenize;Ql.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,i=n===void 0?function(a,s){return typeof s=="undefined"?r:s}:n;return typeof e=="string"?e:JSON.stringify(g0(e,null,null,i),i," ")};Ql.equals=function(e,t){return Kn.prototype.equals.call(Ql,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function g0(e,t,r,n,i){t=t||[],r=r||[],n&&(e=n(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return r[a];var s;if(kB.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),r.push(s),a=0;a<e.length;a+=1)s[a]=g0(e[a],t,r,n,i);return t.pop(),r.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),hd(e)==="object"&&e!==null){t.push(e),s={},r.push(s);var o=[],c;for(c in e)e.hasOwnProperty(c)&&o.push(c);for(o.sort(),a=0;a<o.length;a+=1)c=o[a],s[c]=g0(e[c],t,r,n,c);t.pop(),r.pop()}else s=e;return s}var v0=new Kn;v0.tokenize=function(e){return e.slice()};v0.join=v0.removeEmpty=function(e){return e};g();function CB(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let i;for(i=0;i<=e.length;i++)r[0][i]=i;for(n=1;n<=t.length;n++)for(i=1;i<=e.length;i++)t.charAt(n-1)===e.charAt(i-1)?r[n][i]=r[n-1][i-1]:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[t.length][e.length]}function Js(e){return(t,r)=>{let n=e(t).trim(),i=e(r).trim();return CB(n,i)/(n.length+i.length)}}function Qs(e){function t(n,i,a=new Map){let s=1/0,o;for(let c=0;c<n.length;++c)for(let l=0;l<i.length;++l){let u=JSON.stringify([n[c],i[l]]),f;a.has(u)&&(f=a.get(u))||(f=e(n[c],i[l]),a.set(u,f)),f<s&&(s=f,o={indexA:c,indexB:l,score:s})}return o}function r(n,i,a=0,s=new Map){let o=t(n,i,s);if(!o||n.length+i.length<3)return[[n,i]];let c=n.slice(0,o.indexA),l=i.slice(0,o.indexB),u=[n[o.indexA]],f=[i[o.indexB]],d=o.indexA+1,h=o.indexB+1,p=n.slice(d),m=i.slice(h),v=r(c,l,a+1,s),y=r(u,f,a+1,s),b=r(p,m,a+1,s),x=y;return(o.indexA>0||o.indexB>0)&&(x=v.concat(x)),(n.length>d||i.length>h)&&(x=x.concat(b)),x}return r}var Et={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},Ea={matching:cC.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:uC.WORD,colorScheme:Sa.LIGHT},Cn="/",xC=Js(e=>e.value),PB=Qs(xC);function b0(e){return e.indexOf("dev/null")!==-1}function RB(e){return e.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,"")}function MB(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function eo(e){switch(e){case He.CONTEXT:return Et.CONTEXT;case He.INSERT:return Et.INSERTS;case He.DELETE:return Et.DELETES}}function to(e){switch(e){case Sa.DARK:return"d2h-dark-color-scheme";case Sa.AUTO:return"d2h-auto-color-scheme";case Sa.LIGHT:default:return"d2h-light-color-scheme"}}function OB(e){return e?2:1}function Li(e){return e.slice(0).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}function Nr(e,t,r=!0){let n=OB(t);return{prefix:e.substring(0,n),content:r?Li(e.substring(n)):e.substring(n)}}function Aa(e){let t=m0(e.oldName),r=m0(e.newName);if(t!==r&&!b0(t)&&!b0(r)){let n=[],i=[],a=t.split(Cn),s=r.split(Cn),o=a.length,c=s.length,l=0,u=o-1,f=c-1;for(;l<u&&l<f&&a[l]===s[l];)n.push(s[l]),l+=1;for(;u>l&&f>l&&a[u]===s[f];)i.unshift(s[f]),u-=1,f-=1;let d=n.join(Cn),h=i.join(Cn),p=a.slice(l,u+1).join(Cn),m=s.slice(l,f+1).join(Cn);return d.length&&h.length?d+Cn+"{"+p+" \u2192 "+m+"}"+Cn+h:d.length?d+Cn+"{"+p+" \u2192 "+m+"}":h.length?"{"+p+" \u2192 "+m+"}"+Cn+h:t+" \u2192 "+r}else return b0(r)?t:r}function ro(e){return`d2h-${dC(Aa(e)).toString().slice(-6)}`}function no(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function pd(e,t,r,n={}){let{matching:i,maxLineLengthHighlight:a,matchWordsThreshold:s,diffStyle:o}=Object.assign(Object.assign({},Ea),n),c=Nr(e,r,!1),l=Nr(t,r,!1);if(c.content.length>a||l.content.length>a)return{oldLine:{prefix:c.prefix,content:Li(c.content)},newLine:{prefix:l.prefix,content:Li(l.content)}};let u=o==="char"?wC(c.content,l.content):bC(c.content,l.content),f=[];if(o==="word"&&i==="words"){let h=u.filter(v=>v.removed),p=u.filter(v=>v.added);PB(p,h).forEach(v=>{v[0].length===1&&v[1].length===1&&xC(v[0][0],v[1][0])<s&&(f.push(v[0][0]),f.push(v[1][0]))})}let d=u.reduce((h,p)=>{let m=p.added?"ins":p.removed?"del":null,v=f.indexOf(p)>-1?' class="d2h-change"':"",y=Li(p.value);return m!==null?`${h}<${m}${v}>${y}</${m}>`:`${h}${y}`},"");return{oldLine:{prefix:c.prefix,content:RB(d)},newLine:{prefix:l.prefix,content:MB(d)}}}var SC="file-summary",IB="icon",FB={colorScheme:Ea.colorScheme},md=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},FB),r)}render(t){let r=t.map(n=>this.hoganUtils.render(SC,"line",{fileHtmlId:ro(n),oldName:n.oldName,newName:n.newName,fileName:Aa(n),deletedLines:"-"+n.deletedLines,addedLines:"+"+n.addedLines},{fileIcon:this.hoganUtils.template(IB,no(n))})).join(`
`);return this.hoganUtils.render(SC,"wrapper",{colorScheme:to(this.config.colorScheme),filesNumber:t.length,files:r})}};g();var x0=Object.assign(Object.assign({},Ea),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),ec="generic",EC="line-by-line",$B="icon",LB="tag",tc=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},x0),r)}render(t){let r=t.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(`
`);return this.hoganUtils.render(ec,"wrapper",{colorScheme:to(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(EC,"file-diff"),i=this.hoganUtils.template(ec,"file-path"),a=this.hoganUtils.template($B,"file"),s=this.hoganUtils.template(LB,no(t));return n.render({file:t,fileHtmlId:ro(t),diffs:r,filePath:i.render({fileDiffName:Aa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(ec,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Et})}generateFileHtml(t){let r=Qs(Js(n=>Nr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i=this.hoganUtils.render(ec,"block-header",{CSSLineClass:Et,blockHeader:t.isTooBig?n.header:Li(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([c,l])=>{let{left:u,right:f}=this.processChangedLines(t,t.isCombined,c,l);i+=u,i+=f});else if(a.length)a.forEach(c=>{let{prefix:l,content:u}=Nr(c.content,t.isCombined);i+=this.generateSingleLineHtml(t,{type:Et.CONTEXT,prefix:l,content:u,oldNumber:c.oldNumber,newNumber:c.newNumber})});else if(s.length||o.length){let{left:c,right:l}=this.processChangedLines(t,t.isCombined,s,o);i+=c,i+=l}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(`
`)}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a<t.lines.length;a++){let s=t.lines[a];(s.type!==He.INSERT&&i.length||s.type===He.CONTEXT&&n.length>0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?n(t,r):[[t,r]]}processChangedLines(t,r,n,i){let a={right:"",left:""},s=Math.max(n.length,i.length);for(let o=0;o<s;o++){let c=n[o],l=i[o],u=c!==void 0&&l!==void 0?pd(c.content,l.content,r,this.config):void 0,f=c!==void 0&&c.oldNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:Et.DELETE_CHANGES}:Object.assign(Object.assign({},Nr(c.content,r)),{type:eo(c.type)})),{oldNumber:c.oldNumber,newNumber:c.newNumber}):void 0,d=l!==void 0&&l.newNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.newLine.prefix,content:u.newLine.content,type:Et.INSERT_CHANGES}:Object.assign(Object.assign({},Nr(l.content,r)),{type:eo(l.type)})),{oldNumber:l.oldNumber,newNumber:l.newNumber}):void 0,{left:h,right:p}=this.generateLineHtml(t,f,d);a.left+=h,a.right+=p}return a}generateLineHtml(t,r,n){return{left:this.generateSingleLineHtml(t,r),right:this.generateSingleLineHtml(t,n)}}generateSingleLineHtml(t,r){if(r===void 0)return"";let n=this.hoganUtils.render(EC,"numbers",{oldNumber:r.oldNumber||"",newNumber:r.newNumber||""});return this.hoganUtils.render(ec,"line",{type:r.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:r.prefix===" "?"&nbsp;":r.prefix,content:r.content,lineNumber:n,line:r,file:t})}};g();var S0=Object.assign(Object.assign({},Ea),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),rc="generic",DB="side-by-side",NB="icon",jB="tag",nc=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},S0),r)}render(t){let r=t.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(`
`);return this.hoganUtils.render(rc,"wrapper",{colorScheme:to(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(DB,"file-diff"),i=this.hoganUtils.template(rc,"file-path"),a=this.hoganUtils.template(NB,"file"),s=this.hoganUtils.template(jB,no(t));return n.render({file:t,fileHtmlId:ro(t),diffs:r,filePath:i.render({fileDiffName:Aa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(rc,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Et})}}generateFileHtml(t){let r=Qs(Js(n=>Nr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i={left:this.makeHeaderHtml(n.header,t),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([c,l])=>{let{left:u,right:f}=this.processChangedLines(t.isCombined,c,l);i.left+=u,i.right+=f});else if(a.length)a.forEach(c=>{let{prefix:l,content:u}=Nr(c.content,t.isCombined),{left:f,right:d}=this.generateLineHtml({type:Et.CONTEXT,prefix:l,content:u,number:c.oldNumber},{type:Et.CONTEXT,prefix:l,content:u,number:c.newNumber});i.left+=f,i.right+=d});else if(s.length||o.length){let{left:c,right:l}=this.processChangedLines(t.isCombined,s,o);i.left+=c,i.right+=l}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).reduce((n,i)=>({left:n.left+i.left,right:n.right+i.right}),{left:"",right:""})}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a<t.lines.length;a++){let s=t.lines[a];(s.type!==He.INSERT&&i.length||s.type===He.CONTEXT&&n.length>0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?n(t,r):[[t,r]]}makeHeaderHtml(t,r){return this.hoganUtils.render(rc,"block-header",{CSSLineClass:Et,blockHeader:r!=null&&r.isTooBig?t:Li(t),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(t,r,n){let i={right:"",left:""},a=Math.max(r.length,n.length);for(let s=0;s<a;s++){let o=r[s],c=n[s],l=o!==void 0&&c!==void 0?pd(o.content,c.content,t,this.config):void 0,u=o!==void 0&&o.oldNumber!==void 0?Object.assign(Object.assign({},l!==void 0?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:Et.DELETE_CHANGES}:Object.assign(Object.assign({},Nr(o.content,t)),{type:eo(o.type)})),{number:o.oldNumber}):void 0,f=c!==void 0&&c.newNumber!==void 0?Object.assign(Object.assign({},l!==void 0?{prefix:l.newLine.prefix,content:l.newLine.content,type:Et.INSERT_CHANGES}:Object.assign(Object.assign({},Nr(c.content,t)),{type:eo(c.type)})),{number:c.newNumber}):void 0,{left:d,right:h}=this.generateLineHtml(u,f);i.left+=d,i.right+=h}return i}generateLineHtml(t,r){return{left:this.generateSingleHtml(t),right:this.generateSingleHtml(r)}}generateSingleHtml(t){let r="d2h-code-side-linenumber",n="d2h-code-side-line";return this.hoganUtils.render(rc,"line",{type:(t==null?void 0:t.type)||`${Et.CONTEXT} d2h-emptyplaceholder`,lineClass:t!==void 0?r:`${r} d2h-code-side-emptyplaceholder`,contentClass:t!==void 0?n:`${n} d2h-code-side-emptyplaceholder`,prefix:(t==null?void 0:t.prefix)===" "?"&nbsp;":t==null?void 0:t.prefix,content:t==null?void 0:t.content,lineNumber:t==null?void 0:t.number})}};g();var T0=Ze(k0());g();var lt=Ze(k0()),nt={};nt["file-summary-line"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<li class="d2h-file-list-line">'),n.b(`
`+r),n.b(' <span class="d2h-file-name-wrapper">'),n.b(`
`+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <a href="#'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-name">'),n.b(n.v(n.f("fileName",e,t,0))),n.b("</a>"),n.b(`
`+r),n.b(' <span class="d2h-file-stats">'),n.b(`
`+r),n.b(' <span class="d2h-lines-added">'),n.b(n.v(n.f("addedLines",e,t,0))),n.b("</span>"),n.b(`
`+r),n.b(' <span class="d2h-lines-deleted">'),n.b(n.v(n.f("deletedLines",e,t,0))),n.b("</span>"),n.b(`
`+r),n.b(" </span>"),n.b(`
`+r),n.b(" </span>"),n.b(`
`+r),n.b("</li>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}});nt["file-summary-wrapper"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-file-list-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-list-header">'),n.b(`
`+r),n.b(' <span class="d2h-file-list-title">Files changed ('),n.b(n.v(n.f("filesNumber",e,t,0))),n.b(")</span>"),n.b(`
`+r),n.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),n.b(`
`+r),n.b(' <a class="d2h-file-switch d2h-show">show</a>'),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <ol class="d2h-file-list">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("files",e,t,0))),n.b(`
`+r),n.b(" </ol>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});nt["generic-block-header"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('"></td>'),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.s(n.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(s.t(s.f("blockHeader",i,a,0)))}),e.pop()),n.s(n.f("blockHeader",e,t,1),e,t,1,0,0,"")||n.b("&nbsp;"),n.b("</div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});nt["generic-empty-diff"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b(`
`+r),n.b(" File without changes"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});nt["generic-file-path"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-file-name-wrapper">'),n.b(`
`+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <span class="d2h-file-name">'),n.b(n.v(n.f("fileDiffName",e,t,0))),n.b("</span>"),n.b(`
`+r),n.b(n.rp("<fileTag1",e,t," ")),n.b("</span>"),n.b(`
`+r),n.b('<label class="d2h-file-collapse">'),n.b(`
`+r),n.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),n.b(`
`+r),n.b(" Viewed"),n.b(`
`+r),n.b("</label>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}});nt["generic-line"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("lineNumber",e,t,0))),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b(`
`+r),n.s(n.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(' <span class="d2h-code-line-prefix">'),s.b(s.t(s.f("prefix",i,a,0))),s.b("</span>"),s.b(`
`+r)}),e.pop()),n.s(n.f("prefix",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-prefix">&nbsp;</span>'),n.b(`
`+r)),n.s(n.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(' <span class="d2h-code-line-ctn">'),s.b(s.t(s.f("content",i,a,0))),s.b("</span>"),s.b(`
`+r)}),e.pop()),n.s(n.f("content",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-ctn"><br></span>'),n.b(`
`+r)),n.b(" </div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});nt["generic-wrapper"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("content",e,t,0))),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});nt["icon-file-added"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),n.b(`
`+r),n.b(' width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});nt["icon-file-changed"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});nt["icon-file-deleted"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});nt["icon-file-renamed"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});nt["icon-file"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),n.b(`
`+r),n.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});nt["line-by-line-file-diff"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-header">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-file-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("diffs",e,t,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});nt["line-by-line-numbers"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="line-num1">'),n.b(n.v(n.f("oldNumber",e,t,0))),n.b("</div>"),n.b(`
`+r),n.b('<div class="line-num2">'),n.b(n.v(n.f("newNumber",e,t,0))),n.b("</div>"),n.fl()},partials:{},subs:{}});nt["side-by-side-file-diff"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-header">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-files-diff">'),n.b(`
`+r),n.b(' <div class="d2h-file-side-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.d("diffs.left",e,t,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-file-side-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.d("diffs.right",e,t,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});nt["tag-file-added"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),n.fl()},partials:{},subs:{}});nt["tag-file-changed"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),n.fl()},partials:{},subs:{}});nt["tag-file-deleted"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),n.fl()},partials:{},subs:{}});nt["tag-file-renamed"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),n.fl()},partials:{},subs:{}});var ic=class{constructor({compiledTemplates:t={},rawTemplates:r={}}){let n=Object.entries(r).reduce((i,[a,s])=>{let o=T0.compile(s,{asString:!1});return Object.assign(Object.assign({},i),{[a]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},nt),t),n)}static compile(t){return T0.compile(t,{asString:!1})}render(t,r,n,i,a){let s=this.templateKey(t,r);try{return this.preCompiledTemplates[s].render(n,i,a)}catch(o){throw new Error(`Could not find template to render '${s}'`)}}template(t,r){return this.preCompiledTemplates[this.templateKey(t,r)]}templateKey(t,r){return`${t}-${r}`}};var HB=Object.assign(Object.assign(Object.assign({},x0),S0),{outputFormat:lC.LINE_BY_LINE,drawFileList:!0});function CC(e,t={}){let r=Object.assign(Object.assign({},HB),t),n=typeof e=="string"?gC(e,r):e,i=new ic(r),{colorScheme:a}=r,s={colorScheme:a},o=r.drawFileList?new md(i,s).render(n):"",c=r.outputFormat==="side-by-side"?new nc(i,r).render(n):new tc(i,r).render(n);return o+c}var vd=require("obsidian");var ka=class extends vd.ItemView{constructor(r,n){super(r);this.plugin=n;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return ki.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return ki.name}getIcon(){return ki.icon}async setState(r,n){this.state=r,vd.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let n=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let i=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!n){if(this.plugin.gitManager instanceof Te&&await this.plugin.gitManager.isTracked(this.state.bFile))n=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(`
`);else if(await this.app.vault.adapter.exists(i)){let a=await this.app.vault.adapter.read(i);n=[...`--- /dev/null
+++ ${this.state.bFile}
@@ -0,0 +1,${a.split(`
`).length} @@`.split(`
`),...a.split(`
`).map(o=>`+${o}`)].join(`
`)}}if(n){let a=this.parser.parseFromString(CC(n),"text/html").querySelector(".d2h-file-diff");this.contentEl.append(a)}else{let a=this.contentEl.createDiv({cls:"obsidian-git-center"});a.createSpan({text:"\u26A0\uFE0F",attr:{style:"font-size: 2em"}}),a.createEl("br"),a.createSpan({text:"File not found: "+this.state.bFile})}}finally{this.gettingDiff=!1}}}};g();var V3=require("obsidian");g();g();g();var PC="5";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(PC);g();g();var io="[",Ta="[!",Ca="]",Di={};var ct=Symbol(),qt=Symbol("filename"),RC=Symbol("hmr");g();g();var UB=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory"];var aZ=[...UB,"formNoValidate","isMap","noModule","playsInline","readOnly","value","inert","volume","defaultValue","defaultChecked","srcObject"];var GB=["touchstart","touchmove"];function MC(e){return GB.includes(e)}g();g();g();var yd=!0;g();var V=!1;g();var an=Array.isArray,ac=Array.from,C0=Object.keys,Mt=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,P0=Object.getOwnPropertyDescriptors,R0=Object.prototype,OC=Array.prototype,Pa=Object.getPrototypeOf;function M0(e){return typeof e=="function"}var br=()=>{};function wd(e){for(var t=0;t<e.length;t++)e[t]()}g();g();var _r=Symbol("$state"),Ra=Symbol("$state metadata"),bd=Symbol("legacy props"),IC=Symbol("");g();g();function _d(e){return e===this.v}function O0(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ao(e){return!O0(e,this.v)}g();function I0(){if(V){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function FC(){if(V){let e=new Error(`derived_references_self
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function $C(e){if(V){let t=new Error(`effect_in_teardown
\`${e}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function LC(){if(V){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function DC(e){if(V){let t=new Error(`effect_orphan
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function NC(){if(V){let e=new Error(`effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function jC(){if(V){let e=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function BC(e){if(V){let t=new Error(`props_invalid_value
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function HC(e){if(V){let t=new Error(`rune_outside_svelte
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function UC(){if(V){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function GC(){if(V){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function zC(){if(V){let e=new Error("state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state\nhttps://svelte.dev/e/state_unsafe_local_read");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function VC(){if(V){let e=new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}g();var Jn=!1,Qn=!1;g();g();g();var sc=null;function ei(e){let t=Error(),r=t.stack;if(r){let n=r.split(`
`),i=[`
`];for(let a=0;a<n.length;a++){let s=n[a];if(s!=="Error"){if(s.includes("validate_each_keys"))return null;s.includes("svelte/src/internal")||i.push(s)}}if(i.length===1)return null;Mt(t,"stack",{value:i.join(`
`)}),Mt(t,"name",{value:`${e}Error`})}return t}var Ma=new Set;function L0(e){Ma=e}function ut(e,t){var r={f:0,v:e,reactions:null,equals:_d,version:0};return V&&Qn&&(r.created=t!=null?t:ei("CreatedAt"),r.debug=null),r}function ft(e){return VB(ut(e))}function Ni(e,t=!1){var n,i;let r=ut(e);return t||(r.equals=ao),Jn&&he!==null&&he.l!==null&&((i=(n=he.l).s)!=null?i:n.s=[]).push(r),r}function VB(e){return fe!==null&&fe.f&2&&(sn===null?YC([e]):sn.push(e)),e}function re(e,t){return fe!==null&&ji()&&fe.f&18&&(sn===null||!sn.includes(e))&&VC(),oo(e,t)}function oo(e,t){if(!e.equals(t)&&(e.v=t,e.version=xd(),V&&Qn&&(e.updated=ei("UpdatedAt")),qC(e,2048),ji()&&te!==null&&te.f&1024&&!(te.f&32)&&(At!==null&&At.includes(e)?(Xt(te,2048),lo(te)):ti===null?XC([e]):ti.push(e)),V&&Ma.size>0)){let n=Array.from(Ma);var r=ri;so(!0);try{for(let i of n)i.f&1024&&Xt(i,4096),Bi(i)&&Ia(i)}finally{so(r)}Ma.clear()}return t}function qC(e,t){var r=e.reactions;if(r!==null)for(var n=ji(),i=r.length,a=0;a<i;a++){var s=r[a],o=s.f;if(!(o&2048)&&!(!n&&s===te)){if(V&&o&262144){Ma.add(s);continue}Xt(s,t),o&1280&&(o&2?qC(s,4096):lo(s))}}}g();g();g();var lc="font-weight: bold",cc="font-weight: normal";function ZC(e,t,r){V?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,lc,cc):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function co(e){V?console.warn(`%c[svelte] hydration_mismatch
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,lc,cc):console.warn("https://svelte.dev/e/hydration_mismatch")}function KC(){V?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,lc,cc):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function D0(e,t){V?console.warn(`%c[svelte] ownership_invalid_mutation
%c${e?`${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead`:"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
https://svelte.dev/e/ownership_invalid_mutation`,lc,cc):console.warn("https://svelte.dev/e/ownership_invalid_mutation")}function Sd(e){V?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,lc,cc):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var ae=!1;function sr(e){ae=e}var ue;function Qe(e){if(e===null)throw co(),Di;return ue=e}function Ot(){return Qe(It(ue))}function H(e){if(ae){if(It(ue)!==null)throw co(),Di;ue=e}}function uo(e=1){if(ae){for(var t=e,r=ue;t--;)r=It(r);ue=r}}function fo(){for(var e=0,t=ue;;){if(t.nodeType===8){var r=t.data;if(r===Ca){if(e===0)return t;e-=1}else(r===io||r===Ta)&&(e+=1)}var n=It(t);t.remove(),t=n}}g();g();g();var WB={},qB=/at (?:.+ \()?(.+):(\d+):(\d+)\)?$/,YB=/@(.+):(\d+):(\d+)$/;function XB(){var r;let e=new Error().stack;if(!e)return null;let t=[];for(let n of e.split(`
`)){let i=(r=qB.exec(n))!=null?r:YB.exec(n);i&&t.push({file:i[1],line:+i[2],column:+i[3]})}return t}function JC(){var t;let e=(t=XB())==null?void 0:t.slice(4);if(!e)return null;for(let r=0;r<e.length;r++){let n=e[r],i=WB[n.file];if(!i){if(r===0)return null;continue}for(let a of i){if(a.end==null)return null;if(a.start.line<n.line&&a.end.line>n.line)return a.component}}return null}var ZB=Symbol("ADD_OWNER");function N0(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function QC(e,t){return e.owners===null?!0:e.owners.has(t)||e.parent!==null&&QC(e.parent,t)}function e3(e){var t,r;return(r=(t=e==null?void 0:e.owners)==null?void 0:t.values().next().value)!=null?r:e3(e.parent)}var KB=!1;function t3(e){if(KB)return;let t=JC();if(t&&!QC(e,t)){let r=e3(e);r[qt]!==t[qt]?D0(t[qt],r[qt]):D0()}}function be(e,t=null,r){var l,u;var n=null;if(V&&Qn&&(n=ei("CreatedAt")),typeof e!="object"||e===null||_r in e)return e;let i=Pa(e);if(i!==R0&&i!==OC)return e;var a=new Map,s=an(e),o=ut(0);s&&a.set("length",ut(e.length,n));var c;if(V)if(c={parent:t,owners:null},r){let f=(u=(l=r.v)==null?void 0:l[Ra])==null?void 0:u.owners;c.owners=f?new Set(f):null}else c.owners=t===null?he!==null?new Set([he.function]):null:new Set;return new Proxy(e,{defineProperty(f,d,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&UC();var p=a.get(d);return p===void 0?(p=ut(h.value,n),a.set(d,p)):re(p,be(h.value,c)),!0},deleteProperty(f,d){var h=a.get(d);if(h===void 0)d in f&&a.set(d,ut(ct,n));else{if(s&&typeof d=="string"){var p=a.get("length"),m=Number(d);Number.isInteger(m)&&m<p.v&&re(p,m)}re(h,ct),r3(o)}return!0},get(f,d,h){var b;if(V&&d===Ra)return c;if(d===_r)return e;var p=a.get(d),m=d in f;if(p===void 0&&(!m||(b=jr(f,d))!=null&&b.writable)&&(p=ut(be(m?f[d]:ct,c),n),a.set(d,p)),p!==void 0){var v=R(p);if(V){var y=v==null?void 0:v[Ra];y&&(y==null?void 0:y.parent)!==c&&N0(c,y)}return v===ct?void 0:v}return Reflect.get(f,d,h)},getOwnPropertyDescriptor(f,d){var h=Reflect.getOwnPropertyDescriptor(f,d);if(h&&"value"in h){var p=a.get(d);p&&(h.value=R(p))}else if(h===void 0){var m=a.get(d),v=m==null?void 0:m.v;if(m!==void 0&&v!==ct)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(f,d){var v;if(V&&d===Ra||d===_r)return!0;var h=a.get(d),p=h!==void 0&&h.v!==ct||Reflect.has(f,d);if(h!==void 0||te!==null&&(!p||(v=jr(f,d))!=null&&v.writable)){h===void 0&&(h=ut(p?be(f[d],c):ct,n),a.set(d,h));var m=R(h);if(m===ct)return!1}return p},set(f,d,h,p){var w;var m=a.get(d),v=d in f;if(s&&d==="length")for(var y=h;y<m.v;y+=1){var b=a.get(y+"");b!==void 0?re(b,ct):y in f&&(b=ut(ct,n),a.set(y+"",b))}if(m===void 0?(!v||(w=jr(f,d))!=null&&w.writable)&&(m=ut(void 0,n),re(m,be(h,c)),a.set(d,m)):(v=m.v!==ct,re(m,be(h,c))),V){var x=h==null?void 0:h[Ra];x&&(x==null?void 0:x.parent)!==c&&N0(c,x),t3(c)}var E=Reflect.getOwnPropertyDescriptor(f,d);if(E!=null&&E.set&&E.set.call(p,h),!v){if(s&&typeof d=="string"){var _=a.get("length"),k=Number(d);Number.isInteger(k)&&k>=_.v&&re(_,k+1)}r3(o)}return!0},ownKeys(f){R(o);var d=Reflect.ownKeys(f).filter(m=>{var v=a.get(m);return v===void 0||v.v!==ct});for(var[h,p]of a)p.v!==ct&&!(h in f)&&d.push(h);return d},setPrototypeOf(){GC()}})}function r3(e,t=1){re(e,e.v+t)}function Ad(e){return e!==null&&typeof e=="object"&&_r in e?e[_r]:e}function n3(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,s){let o=r.call(this,a,s);if(o===-1){for(let c=s!=null?s:0;c<this.length;c+=1)if(Ad(this[c])===a){Sd("array.indexOf(...)");break}}return o},e.lastIndexOf=function(a,s){let o=n.call(this,a,s!=null?s:this.length-1);if(o===-1){for(let c=0;c<=(s!=null?s:this.length-1);c+=1)if(Ad(this[c])===a){Sd("array.lastIndexOf(...)");break}}return o},e.includes=function(a,s){let o=i.call(this,a,s);if(!o){for(let c=0;c<this.length;c+=1)if(Ad(this[c])===a){Sd("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var j0,i3,a3,s3;function kd(){if(j0===void 0){j0=window,i3=document;var e=Element.prototype,t=Node.prototype;a3=jr(t,"firstChild").get,s3=jr(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0,V&&(e.__svelte_meta=null,n3())}}function zr(e=""){return document.createTextNode(e)}function kt(e){return a3.call(e)}function It(e){return s3.call(e)}function U(e,t){if(!ae)return kt(e);var r=kt(ue);if(r===null)r=ue.appendChild(zr());else if(t&&r.nodeType!==3){var n=zr();return r==null||r.before(n),Qe(n),n}return Qe(r),r}function lr(e,t){var i,a;if(!ae){var r=kt(e);return r instanceof Comment&&r.data===""?It(r):r}if(t&&((i=ue)==null?void 0:i.nodeType)!==3){var n=zr();return(a=ue)==null||a.before(n),Qe(n),n}return ue}function Z(e,t=1,r=!1){let n=ae?ue:e;for(var i;t--;)i=n,n=It(n);if(!ae)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var s=zr();return n===null?i==null||i.after(s):n.before(s),Qe(s),s}return Qe(n),n}function ho(e){e.textContent=""}g();function qe(e){var i;var t=2050;te===null?t|=256:te.f|=1048576;var r=fe!==null&&fe.f&2?fe:null;let n={children:null,ctx:he,deps:null,equals:_d,f:t,fn:e,reactions:null,v:null,version:0,parent:r!=null?r:te};return V&&Qn&&(n.created=ei("CreatedAt")),r!==null&&((i=r.children)!=null?i:r.children=[]).push(n),n}function G0(e){let t=qe(e);return t.equals=ao,t}function H0(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r<t.length;r+=1){var n=t[r];n.f&2?uc(n):Ft(n)}}}var B0=[];function JB(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t;t=t.parent}return null}function z0(e){var t,r=te;if(it(JB(e)),V){let n=Ma;L0(new Set);try{B0.includes(e)&&FC(),B0.push(e),H0(e),t=Td(e)}finally{it(r),L0(n),B0.pop()}}else try{H0(e),t=Td(e)}finally{it(r)}return t}function V0(e){var t=z0(e),r=(ni||e.f&256)&&e.deps!==null?4096:1024;Xt(e,r),e.equals(t)||(e.v=t,e.version=xd())}function uc(e){H0(e),Fa(e,0),Xt(e,16384),e.v=e.children=e.deps=e.ctx=e.reactions=null}function l3(e){te===null&&fe===null&&DC(e),fe!==null&&fe.f&256&&LC(),Pd&&$C(e)}function QB(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function $a(e,t,r,n=!0){var u;var i=(e&64)!==0,a=te;if(V)for(;a!==null&&a.f&262144;)a=a.parent;var s={ctx:he,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|2048,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,version:0};if(V&&(s.component_function=Gr),r){var o=ri;try{so(!0),Ia(s),s.f|=32768}catch(f){throw Ft(s),f}finally{so(o)}}else t!==null&&lo(s);var c=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&1048576)===0;if(!c&&!i&&n&&(a!==null&&QB(s,a),fe!==null&&fe.f&2)){var l=fe;((u=l.children)!=null?u:l.children=[]).push(s)}return s}function Wr(e){let t=$a(8,null,!1);return Xt(t,1024),t.teardown=e,t}function $t(e){var i;l3("$effect");var t=te!==null&&(te.f&32)!==0&&he!==null&&!he.m;if(V&&Mt(e,"name",{value:"$effect"}),t){var r=he;((i=r.e)!=null?i:r.e=[]).push({fn:e,effect:te,reaction:fe})}else{var n=xr(e);return n}}function X0(e){let t=$a(64,e,!0);return()=>{Ft(t)}}function c3(e){let t=$a(64,e,!0);return(r={})=>new Promise(n=>{r.outro?ln(t,()=>{Ft(t),n(void 0)}):(Ft(t),n(void 0))})}function xr(e){return $a(4,e,!1)}function or(e){return $a(8,e,!0)}function xe(e){return V&&Mt(e,"name",{value:"{expression}"}),cr(e)}function cr(e,t=0){return $a(24|t,e,!0)}function Lt(e,t=!0){return $a(40,e,!0,t)}function Z0(e){var t=e.teardown;if(t!==null){let r=Pd,n=fe;W0(!0),Tt(null);try{t.call(null)}finally{W0(r),Tt(n)}}}function K0(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r<t.length;r+=1)uc(t[r])}}function J0(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var n=r.next;Ft(r,t),r=n}}function u3(e){for(var t=e.first;t!==null;){var r=t.next;t.f&32||Ft(t),t=r}}function Ft(e,t=!0){var r=!1;if((t||e.f&524288)&&e.nodes_start!==null){for(var n=e.nodes_start,i=e.nodes_end;n!==null;){var a=n===i?null:It(n);n.remove(),n=a}r=!0}J0(e,t&&!r),K0(e),Fa(e,0),Xt(e,16384);var s=e.transitions;if(s!==null)for(let c of s)c.stop();Z0(e);var o=e.parent;o!==null&&o.first!==null&&Q0(e),V&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Q0(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function ln(e,t){var r=[];Cd(e,r,!0),ev(r,()=>{Ft(e),t&&t()})}function ev(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Cd(e,t,r){if(!(e.f&8192)){if(e.f^=8192,e.transitions!==null)for(let s of e.transitions)(s.is_global||r)&&t.push(s);for(var n=e.first;n!==null;){var i=n.next,a=(n.f&65536)!==0||(n.f&32)!==0;Cd(n,t,a?r:!1),n=i}}}function Gi(e){f3(e,!0)}function f3(e,t){if(e.f&8192){Bi(e)&&Ia(e),e.f^=8192;for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;f3(r,i?t:!1),r=n}if(e.transitions!==null)for(let a of e.transitions)(a.is_global||t)&&a.in()}}g();var Rd=!1,h3=!1,tv=[],d3=[];function p3(){Rd=!1;let e=tv.slice();tv=[],wd(e)}function e7(){h3=!1;let e=d3.slice();d3=[],wd(e)}function ur(e){Rd||(Rd=!0,queueMicrotask(p3)),tv.push(e)}function m3(){Rd&&p3(),h3&&e7()}g();function fc(e){if(V){let t=new Error(`lifecycle_outside_component
\`${e}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var _3=0,n7=1,g3=new WeakSet,Md=!1,Od=_3,dc=!1,mo=null,ri=!1,Pd=!1;function so(e){ri=e}function W0(e){Pd=e}var La=[],go=0,hc=[],fe=null;function Tt(e){fe=e}var te=null;function it(e){te=e}var sn=null;function YC(e){sn=e}var At=null,Sr=0,ti=null;function XC(e){ti=e}var x3=1,ni=!1,oc=null;var he=null;var Gr=null;function xd(){return++x3}function ji(){return!Jn||he!==null&&he.l===null}function Bi(e){var s,o,c,l;var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i;if(t&512){for(i=0;i<r.length;i++)((o=(s=r[i]).reactions)!=null?o:s.reactions=[]).push(e);e.f^=512}for(i=0;i<r.length;i++){var a=r[i];if(Bi(a)&&V0(a),n&&te!==null&&!ni&&!((c=a==null?void 0:a.reactions)!=null&&c.includes(e))&&((l=a.reactions)!=null?l:a.reactions=[]).push(e),a.version>e.version)return!0}}(!n||te!==null&&!ni)&&Xt(e,1024)}return!1}function v3(e,t){for(var r=t;r!==null;){if(r.f&128)try{r.fn(e);return}catch(n){r.f^=128}r=r.parent}throw Md=!1,e}function y3(e){return(e.f&16384)===0&&(e.parent===null||(e.parent.f&128)===0)}function vo(e,t,r,n){var u,f;if(Md){if(r===null&&(Md=!1),y3(t))throw e;return}if(r!==null&&(Md=!0),!V||n===null||!(e instanceof Error)||g3.has(e)){v3(e,t);return}g3.add(e);let i=[],a=(u=t.fn)==null?void 0:u.name;a&&i.push(a);let s=n;for(;s!==null;){if(V){var o=(f=s.function)==null?void 0:f[qt];if(o){let d=o.split("/").pop();i.push(d)}}s=s.p}let c=/Firefox/.test(navigator.userAgent)?" ":" ";Mt(e,"message",{value:e.message+`
${i.map(d=>`
${c}in ${d}`).join("")}
`}),Mt(e,"component_stack",{value:i});let l=e.stack;if(l){let d=l.split(`
`),h=[];for(let p=0;p<d.length;p++){let m=d[p];m.includes("svelte/src/internal")||h.push(m)}Mt(e,"stack",{value:h.join(`
`)})}if(v3(e,t),y3(t))throw e}function Td(e){var d,h;var t=At,r=Sr,n=ti,i=fe,a=ni,s=sn,o=he,c=e.f;At=null,Sr=0,ti=null,fe=c&96?null:e,ni=!ri&&(c&256)!==0,sn=null,he=e.ctx;try{var l=(0,e.fn)(),u=e.deps;if(At!==null){var f;if(Fa(e,Sr),u!==null&&Sr>0)for(u.length=Sr+At.length,f=0;f<At.length;f++)u[Sr+f]=At[f];else e.deps=u=At;if(!ni)for(f=Sr;f<u.length;f++)((h=(d=u[f]).reactions)!=null?h:d.reactions=[]).push(e)}else u!==null&&Sr<u.length&&(Fa(e,Sr),u.length=Sr);return l}finally{At=t,Sr=r,ti=n,fe=i,ni=a,sn=s,he=o}}function i7(e,t){let r=t.reactions;if(r!==null){var n=r.indexOf(e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&2&&(At===null||!At.includes(t))&&(Xt(t,4096),t.f&768||(t.f^=512),Fa(t,0))}function Fa(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)i7(e,r[n])}function Ia(e){var t=e.f;if(!(t&16384)){Xt(e,1024);var r=te,n=he;if(te=e,V){var i=Gr;Gr=e.component_function}try{t&16?u3(e):J0(e),K0(e),Z0(e);var a=Td(e);e.teardown=typeof a=="function"?a:null,e.version=x3,V&&hc.push(e)}catch(s){vo(s,e,r,n||e.ctx)}finally{te=r,V&&(Gr=i)}}}function w3(){console.error("Last ten effects were: ",hc.slice(-10).map(e=>e.fn)),hc=[]}function S3(){if(go>1e3){go=0;try{NC()}catch(e){if(V&&Mt(e,"stack",{value:""}),mo!==null)if(V)try{vo(e,mo,null,null)}catch(t){throw w3(),t}else vo(e,mo,null,null);else throw V&&w3(),e}}go++}function E3(e){var t=e.length;if(t!==0){S3();var r=ri;ri=!0;try{for(var n=0;n<t;n++){var i=e[n];i.f&1024||(i.f^=1024);var a=[];A3(i,a),a7(a)}}finally{ri=r}}}function a7(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];if(!(n.f&24576))try{Bi(n)&&(Ia(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Q0(n):n.fn=null))}catch(i){vo(i,n,null,n.ctx)}}}function s7(){if(dc=!1,go>1001)return;let e=La;La=[],E3(e),dc||(go=0,mo=null,V&&(hc=[]))}function lo(e){Od===_3&&(dc||(dc=!0,queueMicrotask(s7))),mo=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}La.push(t)}function A3(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,a=(i&32)!==0,s=a&&(i&1024)!==0,o=r.next;if(!s&&!(i&8192))if(i&8){if(a)r.f^=1024;else try{Bi(r)&&Ia(r)}catch(f){vo(f,r,null,r.ctx)}var c=r.first;if(c!==null){r=c;continue}}else i&4&&n.push(r);if(o===null){let f=r.parent;for(;f!==null;){if(e===f)break e;var l=f.next;if(l!==null){r=l;continue e}f=f.parent}}r=o}for(var u=0;u<n.length;u++)c=n[u],t.push(c),A3(c,t)}function yo(e){var t=Od,r=La;try{S3();let i=[];Od=n7,La=i,dc=!1,E3(r);var n=e==null?void 0:e();return m3(),(La.length>0||i.length>0)&&yo(),go=0,mo=null,V&&(hc=[]),n}finally{Od=t,La=r}}function R(e){var f,d;var t=e.f,r=(t&2)!==0;if(r&&t&16384){var n=z0(e);return uc(e),n}if(oc!==null&&oc.add(e),fe!==null){sn!==null&&sn.includes(e)&&zC();var i=fe.deps;At===null&&i!==null&&i[Sr]===e?Sr++:At===null?At=[e]:At.push(e),ti!==null&&te!==null&&te.f&1024&&!(te.f&32)&&ti.includes(e)&&(Xt(te,2048),lo(te))}else if(r&&e.deps===null)for(var a=e,s=a.parent,o=a;s!==null;)if(s.f&2){var c=s;o=c,s=c.parent}else{var l=s;(f=l.deriveds)!=null&&f.includes(o)||((d=l.deriveds)!=null?d:l.deriveds=[]).push(o);break}if(r&&(a=e,Bi(a)&&V0(a)),V&&Qn&&sc!==null&&fe!==null&&sc.reaction===fe){if(e.debug)e.debug();else if(e.created){var u=sc.entries.get(e);u===void 0&&(u={read:[]},sc.entries.set(e,u)),u.read.push(ei("TracedAt"))}}return e.v}function Ue(e){let t=fe;try{return fe=null,e()}finally{fe=t}}var o7=-7169;function Xt(e,t){e.f=e.f&o7|t}function Ye(e,t=!1,r){he={p:he,c:null,e:null,m:!1,s:e,x:null,l:null},Jn&&!t&&(he.l={s:null,u:null,r1:[],r2:ut(!1)}),V&&(he.function=r,Gr=r)}function Xe(e){var s,o;let t=he;if(t!==null){e!==void 0&&(t.x=e);let c=t.e;if(c!==null){var r=te,n=fe;t.e=null;try{for(var i=0;i<c.length;i++){var a=c[i];it(a.effect),Tt(a.reaction),xr(a.fn)}}finally{it(r),Tt(n)}}he=t.p,V&&(Gr=(o=(s=t.p)==null?void 0:s.function)!=null?o:null),t.m=!0}return e||{}}if(V){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;HC(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}g();var k3=new Map;function T3(e,t){var r=k3.get(e);r||(r=new Set,k3.set(e,r)),r.add(t)}g();g();g();g();g();g();function rv(e){ae&&kt(e)!==null&&ho(e)}var C3=!1;function nv(){C3||(C3=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(let r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function $d(e){var t=fe,r=te;Tt(null),it(null);try{return e()}finally{Tt(t),it(r)}}function iv(e,t,r,n=r){e.addEventListener(t,()=>$d(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),nv()}var av=new Set,Ld=new Set;function P3(e,t,r,n){function i(a){if(n.capture||wo.call(t,a),!a.cancelBubble)return $d(()=>r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ur(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function Er(e,t,r,n,i){var a={capture:n,passive:i},s=P3(e,t,r,a);(t===document.body||t===window||t===document)&&Wr(()=>{t.removeEventListener(e,s,a)})}function dt(e){for(var t=0;t<e.length;t++)av.add(e[t]);for(var r of Ld)r(e)}function wo(e){var b;var t=this,r=t.ownerDocument,n=e.type,i=((b=e.composedPath)==null?void 0:b.call(e))||[],a=i[0]||e.target,s=0,o=e.__root;if(o){var c=i.indexOf(o);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(s=c)}if(a=i[s]||e.target,a!==t){Mt(e,"currentTarget",{configurable:!0,get(){return a||r}});var u=fe,f=te;Tt(null),it(null);try{for(var d,h=[];a!==null;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var m=a["__"+n];if(m!==void 0&&!a.disabled)if(an(m)){var[v,...y]=m;v.apply(a,[e,...y])}else m.call(a,e)}catch(x){d?h.push(x):d=x}if(e.cancelBubble||p===t||p===null)break;a=p}if(d){for(let x of h)queueMicrotask(()=>{throw x});throw d}}finally{e.__root=t,delete e.currentTarget,Tt(u),it(f)}}}g();var c7;function R3(){c7=void 0}g();g();function Dd(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Mn(e,t){var r=te;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function se(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("<!>");return()=>{if(ae)return Mn(ue,null),ue;i===void 0&&(i=Dd(a?e:"<!>"+e),r||(i=kt(i)));var s=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=kt(s),c=s.lastChild;Mn(o,c)}else Mn(s,s);return s}}function ii(){if(ae)return Mn(ue,null),ue;var e=document.createDocumentFragment(),t=document.createComment(""),r=zr();return e.append(t,r),Mn(t,r),e}function ne(e,t){if(ae){te.nodes_end=ue,Ot();return}e!==null&&e.before(t)}var Nd=!0;function Oe(e,t){var n;var r=t==null?"":typeof t=="object"?t+"":t;r!==((n=e.__t)!=null?n:e.__t=e.nodeValue)&&(e.__t=r,e.nodeValue=r==null?"":r+"")}function zi(e,t){return M3(e,t)}function ov(e,t){var s;kd(),t.intro=(s=t.intro)!=null?s:!1;let r=t.target,n=ae,i=ue;try{for(var a=kt(r);a&&(a.nodeType!==8||a.data!==io);)a=It(a);if(!a)throw Di;sr(!0),Qe(a),Ot();let o=M3(e,{...t,anchor:a});if(ue===null||ue.nodeType!==8||ue.data!==Ca)throw co(),Di;return sr(!1),o}catch(o){if(o===Di)return t.recover===!1&&jC(),kd(),ho(r),sr(!1),zi(e,t);throw o}finally{sr(n),Qe(i),R3()}}var bo=new Map;function M3(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0}){kd();var o=new Set,c=f=>{for(var d=0;d<f.length;d++){var h=f[d];if(!o.has(h)){o.add(h);var p=MC(h);t.addEventListener(h,wo,{passive:p});var m=bo.get(h);m===void 0?(document.addEventListener(h,wo,{passive:p}),bo.set(h,1)):bo.set(h,m+1)}}};c(ac(av)),Ld.add(c);var l=void 0,u=c3(()=>{var f=r!=null?r:t.appendChild(zr());return Lt(()=>{if(a){Ye({});var d=he;d.c=a}i&&(n.$$events=i),ae&&Mn(f,null),Nd=s,l=e(f,n)||{},Nd=!0,ae&&(te.nodes_end=ue),a&&Xe()}),()=>{var p;for(var d of o){t.removeEventListener(d,wo);var h=bo.get(d);--h===0?(document.removeEventListener(d,wo),bo.delete(d)):bo.set(d,h)}Ld.delete(c),f!==r&&((p=f.parentNode)==null||p.removeChild(f))}});return sv.set(l,u),l}var sv=new WeakMap;function ai(e,t){let r=sv.get(e);return r?(sv.delete(e),r(t)):(V&&KC(),Promise.resolve())}g();g();g();g();function ge(e,t,r=!1){ae&&Ot();var n=e,i=null,a=null,s=ct,o=r?65536:0,c=!1;let l=(f,d=!0)=>{c=!0,u(d,f)},u=(f,d)=>{if(s===(s=f))return;let h=!1;if(ae){let p=n.data===Ta;!!s===p&&(n=fo(),Qe(n),sr(!1),h=!0)}s?(i?Gi(i):d&&(i=Lt(()=>d(n))),a&&ln(a,()=>{a=null})):(a?Gi(a):d&&(a=Lt(()=>d(n))),i&&ln(i,()=>{i=null})),h&&sr(!0)};cr(()=>{c=!1,t(l),c||u(null,null)},o),ae&&(n=ue)}g();g();g();var pc=null;function Ar(e,t){return t}function v7(e,t,r,n){for(var i=[],a=t.length,s=0;s<a;s++)Cd(t[s].e,i,!0);var o=a>0&&i.length===0&&r!==null;if(o){var c=r.parentNode;ho(c),c.append(r),n.clear(),Vi(e,t[0].prev,t[a-1].next)}ev(i,()=>{for(var l=0;l<a;l++){var u=t[l];o||(n.delete(u.k),Vi(e,u.prev,u.next)),Ft(u.e,!o)}})}function kr(e,t,r,n,i,a=null){var s=e,o={flags:t,items:new Map,first:null},c=(t&4)!==0;if(c){var l=e;s=ae?Qe(kt(l)):l.appendChild(zr())}ae&&Ot();var u=null,f=!1;cr(()=>{var d=r(),h=an(d)?d:d==null?[]:ac(d),p=h.length;if(f&&p===0)return;f=p===0;let m=!1;if(ae){var v=s.data===Ta;v!==(p===0)&&(s=fo(),Qe(s),sr(!1),m=!0)}if(ae){for(var y=null,b,x=0;x<p;x++){if(ue.nodeType===8&&ue.data===Ca){s=ue,m=!0,sr(!1);break}var E=h[x],_=n(E,x);b=F3(ue,o,y,null,E,_,x,i,t,r),o.items.set(_,b),y=b}p>0&&Qe(fo())}if(!ae){var k=fe;y7(h,o,s,i,t,(k.f&8192)!==0,n,r)}a!==null&&(p===0?u?Gi(u):u=Lt(()=>a(s)):u!==null&&ln(u,()=>{u=null})),m&&sr(!0),r()}),ae&&(s=ue)}function y7(e,t,r,n,i,a,s,o){var Q,de,ee,J;var c=(i&8)!==0,l=(i&3)!==0,u=e.length,f=t.items,d=t.first,h=d,p,m=null,v,y=[],b=[],x,E,_,k;if(c)for(k=0;k<u;k+=1)x=e[k],E=s(x,k),_=f.get(E),_!==void 0&&((Q=_.a)==null||Q.measure(),(v!=null?v:v=new Set).add(_));for(k=0;k<u;k+=1){if(x=e[k],E=s(x,k),_=f.get(E),_===void 0){var w=h?h.e.nodes_start:r;m=F3(w,t,m,m===null?t.first:m.next,x,E,k,n,i,o),f.set(E,m),y=[],b=[],h=m.next;continue}if(l&&w7(_,x,k,i),_.e.f&8192&&(Gi(_.e),c&&((de=_.a)==null||de.unfix(),(v!=null?v:v=new Set).delete(_))),_!==h){if(p!==void 0&&p.has(_)){if(y.length<b.length){var A=b[0],S;m=A.prev;var T=y[0],P=y[y.length-1];for(S=0;S<y.length;S+=1)O3(y[S],A,r);for(S=0;S<b.length;S+=1)p.delete(b[S]);Vi(t,T.prev,P.next),Vi(t,m,T),Vi(t,P,A),h=A,m=P,k-=1,y=[],b=[]}else p.delete(_),O3(_,h,r),Vi(t,_.prev,_.next),Vi(t,_,m===null?t.first:m.next),Vi(t,m,_),m=_;continue}for(y=[],b=[];h!==null&&h.k!==E;)(a||!(h.e.f&8192))&&(p!=null?p:p=new Set).add(h),b.push(h),h=h.next;if(h===null)continue;_=h}y.push(_),m=_,h=_.next}if(h!==null||p!==void 0){for(var O=p===void 0?[]:ac(p);h!==null;)(a||!(h.e.f&8192))&&O.push(h),h=h.next;var j=O.length;if(j>0){var D=i&4&&u===0?r:null;if(c){for(k=0;k<j;k+=1)(ee=O[k].a)==null||ee.measure();for(k=0;k<j;k+=1)(J=O[k].a)==null||J.fix()}v7(t,O,D,f)}}c&&ur(()=>{var Ce;if(v!==void 0)for(_ of v)(Ce=_.a)==null||Ce.apply()}),te.first=t.first&&t.first.e,te.last=m&&m.e}function w7(e,t,r,n){n&1&&oo(e.v,t),n&2?oo(e.i,r):e.i=r}function F3(e,t,r,n,i,a,s,o,c,l){var u=pc,f=(c&1)!==0,d=(c&16)===0,h=f?d?Ni(i):ut(i):i,p=c&2?ut(s):s;V&&f&&(h.debug=()=>{var v=typeof p=="number"?s:p.v;l()[v]});var m={i:p,v:h,k:a,a:null,e:null,prev:r,next:n};pc=m;try{return m.e=Lt(()=>o(e,h,p),ae),m.e.prev=r&&r.e,m.e.next=n&&n.e,r===null?t.first=m:(r.next=m,r.e.next=m.e),n!==null&&(n.prev=m,n.e.prev=m.e),m}finally{pc=u}}function O3(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==n;){var s=It(a);i.before(a),a=s}}function Vi(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}g();g();g();g();g();g();function gt(e,t){ur(()=>{var i;var r=e.getRootNode(),n=r.host?r:(i=r.head)!=null?i:r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){let a=document.createElement("style");a.id=t.hash,a.textContent=t.code,n.appendChild(a),V&&T3(t.hash,a)}})}g();g();g();g();g();function pe(e,t,r,n){var a;var i=(a=e.__attributes)!=null?a:e.__attributes={};if(ae&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||E7(e,t,r!=null?r:"");return}i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[IC]=r),r==null?e.removeAttribute(t):typeof r!="string"&&S7(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var L3=new Map;function S7(e){var t=L3.get(e.nodeName);if(t)return t;L3.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=P0(n);for(var a in r)r[a].set&&t.push(a);n=Pa(n)}return t}function E7(e,t,r){var n;V&&(t==="srcset"&&A7(e,r)||uv((n=e.getAttribute(t))!=null?n:"",r)||ZC(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function uv(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function D3(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function A7(e,t){var r=D3(e.srcset),n=D3(t);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(uv(r[s][0],i)||uv(i,r[s][0])))}g();function at(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}g();g();g();g();var k7=yd?()=>performance.now():()=>Date.now(),cn={tick:e=>(yd?requestAnimationFrame:br)(e),now:()=>k7(),tasks:new Set};function N3(){let e=cn.now();cn.tasks.forEach(t=>{t.c(e)||(cn.tasks.delete(t),t.f())}),cn.tasks.size!==0&&cn.tick(N3)}function j3(e){let t;return cn.tasks.size===0&&cn.tick(N3),{promise:new Promise(r=>{cn.tasks.add(t={c:e,f:r})}),abort(){cn.tasks.delete(t)}}}function jd(e,t){e.dispatchEvent(new CustomEvent(t))}function R7(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;let t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function B3(e){let t={},r=e.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let s=R7(i.trim());t[s]=a.trim()}return t}var M7=e=>e;function un(e,t,r,n){var b;var i=(e&1)!==0,a=(e&2)!==0,s=i&&a,o=(e&4)!==0,c=s?"both":i?"in":"out",l,u=t.inert,f,d;function h(){var _;var x=fe,E=te;Tt(null),it(null);try{return l!=null?l:l=r()(t,(_=n==null?void 0:n())!=null?_:{},{direction:c})}finally{Tt(x),it(E)}}var p={is_global:o,in(){var x;if(t.inert=u,!i){d==null||d.abort(),(x=d==null?void 0:d.reset)==null||x.call(d);return}a||f==null||f.abort(),jd(t,"introstart"),f=fv(t,h(),d,1,()=>{jd(t,"introend"),f==null||f.abort(),f=l=void 0})},out(x){if(!a){x==null||x(),l=void 0;return}t.inert=!0,jd(t,"outrostart"),d=fv(t,h(),f,0,()=>{jd(t,"outroend"),x==null||x()})},stop:()=>{f==null||f.abort(),d==null||d.abort()}},m=te;if(((b=m.transitions)!=null?b:m.transitions=[]).push(p),i&&Nd){var v=o;if(!v){for(var y=m.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||(y.f&32768)!==0}v&&xr(()=>{Ue(()=>p.in())})}}function fv(e,t,r,n,i){var a=n===1;if(M0(t)){var s,o=!1;return ur(()=>{if(!o){var v=t({direction:a?"in":"out"});s=fv(e,v,r,n,i)}}),{abort:()=>{o=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(t!=null&&t.duration))return i(),{abort:br,deactivate:br,reset:br,t:()=>n};let{delay:c=0,css:l,tick:u,easing:f=M7}=t;var d=[];if(a&&r===void 0&&(u&&u(0,1),l)){var h=B3(l(0,1));d.push(h,h)}var p=()=>1-n,m=e.animate(d,{duration:c});return m.onfinish=()=>{var A;var v=(A=r==null?void 0:r.t())!=null?A:1-n;r==null||r.abort();var y=n-v,b=t.duration*Math.abs(y),x=[];if(b>0){if(l)for(var E=Math.ceil(b/16.666666666666668),_=0;_<=E;_+=1){var k=v+y*f(_/E),w=l(k,1-k);x.push(B3(w))}p=()=>{var S=m.currentTime;return v+y*f(S/b)},u&&j3(()=>{if(m.playState!=="running")return!1;var S=p();return u(S,1-S),!0})}m=e.animate(x,{duration:b,fill:"forwards"}),m.onfinish=()=>{p=()=>n,u==null||u(n,1-n),i()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=br)},deactivate:()=>{i=br},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>p()}}g();g();function pv(e,t,r=t){var n=ji();iv(e,"input",i=>{V&&e.type==="checkbox"&&I0();var a=i?e.defaultValue:e.value;if(a=dv(e)?hv(a):a,r(a),n&&a!==(a=t())){var s=e.selectionStart,o=e.selectionEnd;e.value=a!=null?a:"",o!==null&&(e.selectionStart=s,e.selectionEnd=Math.min(o,e.value.length))}}),(ae&&e.defaultValue!==e.value||Ue(t)==null&&e.value)&&r(dv(e)?hv(e.value):e.value),or(()=>{V&&e.type==="checkbox"&&I0();var i=t();dv(e)&&i===hv(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i!=null?i:"")})}function dv(e){var t=e.type;return t==="number"||t==="range"}function hv(e){return e===""?null:+e}g();g();g();g();g();g();function H3(e,t){return e===t||(e==null?void 0:e[_r])===t}function Ge(e={},t,r,n){return xr(()=>{var i,a;return or(()=>{i=a,a=(n==null?void 0:n())||[],Ue(()=>{e!==r(...a)&&(t(e,...a),i&&H3(r(...i),e)&&t(null,...i))})}),()=>{ur(()=>{a&&H3(r(...a),e)&&t(null,...a)})}}),e}g();g();g();g();g();g();g();g();g();function mv(e){he===null&&fc("onMount"),Jn&&he.l!==null?N7(he).m.push(e):$t(()=>{let t=Ue(e);if(typeof t=="function")return t})}function U3(e){he===null&&fc("onDestroy"),mv(()=>()=>Ue(e))}function N7(e){var r;var t=e.l;return(r=t.u)!=null?r:t.u={a:[],b:[],m:[]}}var Hd=!1;function gv(e){var t=Hd;try{return Hd=!1,[e(),Hd]}finally{Hd=t}}function G3(e){for(var t=te,r=te;t!==null&&!(t.f&96);)t=t.parent;try{return it(t),e()}finally{it(r)}}function si(e,t,r,n){var w,A;var i=(r&1)!==0,a=!Jn||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,c=!1,l;s?[l,c]=gv(()=>e[t]):l=e[t];var u=_r in e||bd in e,f=(A=(w=jr(e,t))==null?void 0:w.set)!=null?A:u&&s&&t in e?S=>e[t]=S:void 0,d=n,h=!0,p=!1,m=()=>(p=!0,h&&(h=!1,o?d=Ue(n):d=n),d);l===void 0&&n!==void 0&&(f&&a&&BC(t),l=m(),f&&f(l));var v;if(a)v=()=>{var S=e[t];return S===void 0?m():(h=!0,p=!1,S)};else{var y=G3(()=>(i?qe:G0)(()=>e[t]));y.f|=131072,v=()=>{var S=R(y);return S!==void 0&&(d=void 0),S===void 0?d:S}}if(!(r&4))return v;if(f){var b=e.$$legacy;return function(S,T){return arguments.length>0?((!a||!T||b||c)&&f(T?v():S),S):v()}}var x=!1,E=!1,_=Ni(l),k=G3(()=>qe(()=>{var S=v(),T=R(_);return x?(x=!1,E=!0,T):(E=!1,_.v=S)}));return i||(k.equals=ao),function(S,T){if(oc!==null&&(x=E,v(),R(_)),arguments.length>0){let P=T?R(k):a&&s?be(S):S;return k.equals(P)||(x=!0,re(_,P),p&&d!==void 0&&(d=P),Ue(()=>R(k))),S}return R(k)}}g();g();g();g();function z3(e){return new vv(e)}var oi,qr,vv=class{constructor(t){Rc(this,oi);Rc(this,qr);var a,s;var r=new Map,n=(o,c)=>{var l=Ni(c);return r.set(o,l),l};let i=new Proxy({...t.props||{},$$events:{}},{get(o,c){var l;return R((l=r.get(c))!=null?l:n(c,Reflect.get(o,c)))},has(o,c){var l;return c===bd?!0:(R((l=r.get(c))!=null?l:n(c,Reflect.get(o,c))),Reflect.has(o,c))},set(o,c,l){var u;return re((u=r.get(c))!=null?u:n(c,l),l),Reflect.set(o,c,l)}});Mc(this,qr,(t.hydrate?ov:zi)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:(a=t.intro)!=null?a:!1,recover:t.recover})),(!((s=t==null?void 0:t.props)!=null&&s.$$host)||t.sync===!1)&&yo(),Mc(this,oi,i.$$events);for(let o of Object.keys(Bt(this,qr)))o==="$set"||o==="$destroy"||o==="$on"||Mt(this,o,{get(){return Bt(this,qr)[o]},set(c){Bt(this,qr)[o]=c},enumerable:!0});Bt(this,qr).$set=o=>{Object.assign(i,o)},Bt(this,qr).$destroy=()=>{ai(Bt(this,qr))}}$set(t){Bt(this,qr).$set(t)}$on(t,r){Bt(this,oi)[t]=Bt(this,oi)[t]||[];let n=(...i)=>r.call(this,...i);return Bt(this,oi)[t].push(n),()=>{Bt(this,oi)[t]=Bt(this,oi)[t].filter(i=>i!==n)}}$destroy(){Bt(this,qr).$destroy()}};oi=new WeakMap,qr=new WeakMap;var K7;typeof HTMLElement=="function"&&(K7=class extends HTMLElement{constructor(t,r,n){super();Tr(this,"$$ctor");Tr(this,"$$s");Tr(this,"$$c");Tr(this,"$$cn",!1);Tr(this,"$$d",{});Tr(this,"$$r",!1);Tr(this,"$$p_d",{});Tr(this,"$$l",{});Tr(this,"$$l_u",new Map);Tr(this,"$$me");this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{let s=document.createElement("slot");i!=="default"&&(s.name=i),ne(a,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=J7(this);for(let i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(let i of this.attributes){let a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=yv(a,i.value,this.$$p_d,"toProp"))}for(let i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=z3({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=X0(()=>{or(()=>{var i;this.$$r=!0;for(let a of C0(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];let s=yv(a,this.$$d[a],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,s)}this.$$r=!1})});for(let i in this.$$l)for(let a of this.$$l[i]){let s=this.$$c.$on(i,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=yv(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return C0(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function yv(e,t,r,n){var a;let i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function J7(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}g();g();g();function Da(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(u){try{l(n.next(u))}catch(f){s(f)}}function c(u){try{l(n.throw(u))}catch(f){s(f)}}function l(u){u.done?a(u.value):i(u.value).then(o,c)}l((n=n.apply(e,t||[])).next())})}var _v=require("obsidian");g();var wv=require("obsidian");g();function e9(e){let t=e-1;return t*t*t+1}function In(e,{delay:t=0,duration:r=400,easing:n=e9,axis:i="y"}={}){let a=getComputedStyle(e),s=+a.opacity,o=i==="y"?"height":"width",c=parseFloat(a[o]),l=i==="y"?["top","bottom"]:["left","right"],u=l.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),h=parseFloat(a[`margin${u[0]}`]),p=parseFloat(a[`margin${u[1]}`]),m=parseFloat(a[`border${u[0]}Width`]),v=parseFloat(a[`border${u[1]}Width`]);return{delay:t,duration:r,easing:n,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*s};${o}: ${y*c}px;padding-${l[0]}: ${y*f}px;padding-${l[1]}: ${y*d}px;margin-${l[0]}: ${y*h}px;margin-${l[1]}: ${y*p}px;border-${l[0]}-width: ${y*m}px;border-${l[1]}-width: ${y*v}px;`}}g();var mc=require("obsidian");var t9=se('<div data-icon="go-to-file" aria-label="Open File" class="clickable-icon"></div>'),r9=se('<main class="tree-item nav-file svelte-1wbh8tp"><div class="tree-item-self is-clickable nav-file-title svelte-1wbh8tp"><div class="tree-item-inner nav-file-title-content"> </div> <div class="git-tools"><div class="buttons"><!></div> <span class="type"> </span></div></div></main>'),n9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function gc(e,t){Ye(t,!0),gt(e,n9);let r=be([]),n=qe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");$t(()=>{for(let y of r)y&&(0,mc.setIcon)(y,y.getAttr("data-icon"))});function i(y){y.stopPropagation(),Vs(t.diff.path)?a(y):s(y)}function a(y){var b;y.stopPropagation();let x=t.view.app.vault.getAbstractFileByPath(t.diff.vaultPath);x instanceof mc.TFile&&((b=tn(t.view.app,y))===null||b===void 0||b.openFile(x).catch(E=>t.view.plugin.displayError(E)))}function s(y){var b;t.view.plugin.tools.openDiff({event:y,aFile:(b=t.diff.fromPath)!==null&&b!==void 0?b:t.diff.path,aRef:`${t.diff.hash}^`,bFile:t.diff.path,bRef:t.diff.hash})}var o=r9();o.__click=i;var c=U(o),l=U(c),u=U(l,!0);xe(()=>Oe(u,Tn(t.diff.vaultPath))),H(l);var f=Z(l,2),d=U(f),h=U(d);{var p=y=>{var b=t9();b.__click=a,Ge(b,x=>r[0]=x,()=>r==null?void 0:r[0]),Er("auxclick",b,a),ne(y,b)};ge(h,y=>{t.view.app.vault.getAbstractFileByPath(t.diff.vaultPath)instanceof mc.TFile&&y(p)})}H(d);var m=Z(d,2),v=U(m,!0);H(m),H(f),H(c),H(o),xe(()=>{pe(c,"data-path",t.diff.vaultPath),pe(c,"data-tooltip-position",R(n)),pe(c,"aria-label",t.diff.vaultPath),pe(m,"data-type",t.diff.status),Oe(v,t.diff.status)}),Er("auxclick",o,y=>{y.stopPropagation(),y.button==2?kn(t.view.app,y,t.diff.vaultPath,t.view.leaf,"git-history"):i(y)}),ne(e,o),Xe()}dt(["click"]);g();var i9=se("<div><!></div>"),a9=(e,t,r)=>t(R(r)),s9=se('<div class="tree-item-children nav-folder-children"><!></div>'),o9=se('<div class="tree-item nav-folder"><div class="tree-item-self is-clickable nav-folder-title"><div data-icon="folder" style="padding-right: 5px; display: flex; "></div> <div class="tree-item-icon nav-folder-collapse-indicator collapse-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></div> <div class="tree-item-inner nav-folder-title-content svelte-1lnl15d"> </div></div> <!></div>'),l9=se('<main class="svelte-1lnl15d"></main>'),c9={hash:"svelte-1lnl15d",code:"main.svelte-1lnl15d .nav-folder-title-content:where(.svelte-1lnl15d) {display:flex;align-items:center;}"};function vc(e,t){Ye(t,!0),gt(e,c9);let r=si(t,"topLevel",3,!1),n=be({}),i=qe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function a(o){n[o.title]=!n[o.title]}var s=l9();kr(s,21,()=>t.hierarchy.children,Ar,(o,c)=>{var l=ii(),u=lr(l);{var f=h=>{var p=i9(),m=U(p);gc(m,{get diff(){return R(c).data},get view(){return t.view}}),H(p),ne(h,p)},d=h=>{var p=o9(),m=U(p);m.__click=[a9,a,c];var v=Z(U(m),2),y=Z(v,2),b=U(y,!0);H(y),H(m);var x=Z(m,2);{var E=_=>{var k=s9(),w=U(k);vc(w,{get hierarchy(){return R(c)},get plugin(){return t.plugin},get view(){return t.view}}),H(k),un(3,k,()=>In,()=>({duration:150})),ne(_,k)};ge(x,_=>{n[R(c).title]||_(E)})}H(p),xe(()=>{at(p,"is-collapsed",n[R(c).title]),pe(m,"data-tooltip-position",R(i)),pe(m,"aria-label",R(c).vaultPath),at(v,"is-collapsed",n[R(c).title]),Oe(b,R(c).title)}),ne(h,p)};ge(u,h=>{R(c).data?h(f):h(d,!1)})}ne(o,l)}),H(s),xe(()=>at(s,"topLevel",r())),ne(e,s),Xe()}dt(["click"]);var u9=(e,t)=>re(t,!R(t)),f9=se('<div class="git-ref"> </div>'),d9=se('<div class="git-author"> </div>'),h9=se('<div class="git-date"> </div>'),p9=se('<div class="tree-item-children nav-folder-children"><!></div>'),m9=se('<main><div class="tree-item nav-folder"><div class="tree-item-self is-clickable nav-folder-title"><div class="tree-item-icon nav-folder-collapse-indicator collapse-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></div> <div><!> <!> <!> <div class="tree-item-inner nav-folder-title-content"> </div></div></div> <!></div></main>'),g9={hash:"svelte-45h",code:""};function bv(e,t){Ye(t,!0),gt(e,g9);let r=qe(()=>({title:"",path:"",vaultPath:"",children:t.plugin.gitManager.getTreeStructure(t.log.diff.files)})),n=qe(()=>t.view.leaf.getRoot().side=="left"?"right":"left"),i=ft(!0);function a(_){let k=_.author.name;if(t.plugin.settings.authorInHistoryView=="full")return k;if(t.plugin.settings.authorInHistoryView=="initials")return k.split(" ").filter(A=>A.length>0).map(A=>A[0].toUpperCase()).join("")}var s=m9(),o=U(s),c=U(o);xe(()=>{var _;return pe(c,"aria-label",`${t.log.refs.length>0?t.log.refs.join(", ")+`
`:""}${(_=t.log.author)==null?void 0:_.name}
${(0,wv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat)}
${t.log.message}`)}),c.__click=[u9,i];var l=U(c),u=Z(l,2),f=U(u);{var d=_=>{var k=f9(),w=U(k,!0);xe(()=>Oe(w,t.log.refs.join(", "))),H(k),ne(_,k)};ge(f,_=>{t.log.refs.length>0&&_(d)})}var h=Z(f,2);{var p=_=>{var k=d9(),w=U(k,!0);xe(()=>Oe(w,a(t.log))),H(k),ne(_,k)};ge(h,_=>{var k;t.plugin.settings.authorInHistoryView!="hide"&&((k=t.log.author)!=null&&k.name)&&_(p)})}var m=Z(h,2);{var v=_=>{var k=h9(),w=U(k,!0);xe(()=>Oe(w,(0,wv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat))),H(k),ne(_,k)};ge(m,_=>{t.plugin.settings.dateInHistoryView&&_(v)})}var y=Z(m,2),b=U(y,!0);H(y),H(u),H(c);var x=Z(c,2);{var E=_=>{var k=p9(),w=U(k);{var A=T=>{vc(T,{get hierarchy(){return R(r)},get plugin(){return t.plugin},get view(){return t.view},topLevel:!0})},S=T=>{var P=ii(),O=lr(P);kr(O,17,()=>t.log.diff.files,Ar,(j,D)=>{gc(j,{get view(){return t.view},get diff(){return R(D)}})}),ne(T,P)};ge(w,T=>{t.showTree?T(A):T(S,!1)})}H(k),un(3,k,()=>In,()=>({duration:150})),ne(_,k)};ge(x,_=>{R(i)||_(E)})}H(o),H(s),xe(()=>{at(o,"is-collapsed",R(i)),pe(c,"data-tooltip-position",R(n)),at(l,"is-collapsed",R(i)),Oe(b,t.log.message)}),ne(e,s),Xe()}dt(["click"]);function v9(e,t){t().catch(console.error)}var y9=(e,t,r,n)=>{re(t,!R(t)),(0,_v.setIcon)(r[0],R(t)?"list":"folder"),n(n().settings.treeStructure=R(t),!0),n().saveSettings()},w9=se('<div class="tree-item nav-folder mod-root"></div>'),b9=se('<main><div class="nav-header"><div class="nav-buttons-container"><div id="layoutChange" class="clickable-icon nav-action-button" aria-label="Change Layout"></div> <div id="refresh" class="clickable-icon nav-action-button" data-icon="refresh-cw" aria-label="Refresh" style="margin: 1px;"></div></div></div> <div class="nav-files-container" style="position: relative;"><!></div> <div id="sentinel"></div> <div style="margin-bottom:40px"></div></main>'),_9={hash:"svelte-45h",code:""};function xv(e,t){Ye(t,!0),gt(e,_9);let r=si(t,"plugin",15),n=ft(!1),i=be([]),a=ft(void 0),s=ft(be(r().settings.treeStructure)),o,c;$t(()=>{c&&c.empty()}),o=t.view.app.workspace.on("obsidian-git:head-change",()=>void l().catch(console.error)),$t(()=>{i.forEach(x=>(0,_v.setIcon)(x,x.getAttr("data-icon")))}),U3(()=>{t.view.app.workspace.offref(o)}),mv(()=>{let x=new IntersectionObserver(_=>{_[0].isIntersecting&&!R(n)&&u().catch(console.error)}),E=document.querySelector("#sentinel");return E&&x.observe(E),()=>{x.disconnect()}}),l().catch(console.error);function l(){return Da(this,void 0,void 0,function*(){var x;if(!r().gitReady){re(a,void 0);return}re(n,!0);let E=r().gitManager instanceof Te,_;((x=R(a)===null||R(a)===void 0?void 0:R(a).length)!==null&&x!==void 0?x:0)==0?_=E?50:10:_=R(a).length,re(a,be(yield r().gitManager.log(void 0,!1,_))),re(n,!1)})}function u(){return Da(this,void 0,void 0,function*(){var x;if(!r().gitReady||R(a)===void 0)return;re(n,!0);let _=r().gitManager instanceof Te?50:10,k=yield r().gitManager.log(void 0,!1,_,(x=R(a).last())===null||x===void 0?void 0:x.hash);R(a).push(...k.slice(1)),re(n,!1)})}var f=b9(),d=U(f),h=U(d),p=U(h);p.__click=[y9,s,i,r],Ge(p,x=>i[0]=x,()=>i==null?void 0:i[0]);var m=Z(p,2);m.__click=[v9,l],Ge(m,x=>i[1]=x,()=>i==null?void 0:i[1]),H(h),H(d);var v=Z(d,2),y=U(v);{var b=x=>{var E=w9();kr(E,21,()=>R(a),Ar,(_,k)=>{bv(_,{get view(){return t.view},get showTree(){return R(s)},get log(){return R(k)},get plugin(){return r()}})}),H(E),ne(x,E)};ge(y,x=>{R(a)&&x(b)})}H(v),uo(4),H(f),xe(()=>{pe(p,"data-icon",R(s)?"list":"folder"),at(m,"loading",R(n))}),ne(e,f),Xe()}dt(["click"]);var yc=class extends V3.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return Fr.type}getDisplayText(){return Fr.name}getIcon(){return Fr.icon}onClose(){return this._view&&ai(this._view),super.onClose()}reload(){this._view&&ai(this._view),this._view=zi(xv,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var W3=require("obsidian"),Ud=class extends W3.FuzzySuggestModal{constructor(r,n){super(r.app);this.branches=n;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,n){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};g();var J3=require("obsidian");g();var Ac=require("obsidian");g();var q3=require("obsidian"),Wi=class extends q3.Modal{constructor(r,n,i){super(r);this.deletion=n;this.filename=i;this.resolve=null}myOpen(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText(`${this.deletion?"Delete":"Discard"} this file?`),r.createEl("p").setText(`Do you really want to ${this.deletion?"delete":"discard the changes of"} "${this.filename}"`);let i=r.createDiv({cls:"modal-button-container"}),a=i.createEl("button",{cls:"mod-warning",text:this.deletion?"Delete":"Discard"});a.addEventListener("click",()=>{this.resolve&&this.resolve(!0),this.close()}),a.addEventListener("keypress",()=>{this.resolve&&this.resolve(!0),this.close()});let s=i.createEl("button",{text:"Cancel"});s.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),s.addEventListener("keypress",()=>(this.resolve&&this.resolve(!1),this.close()))}onClose(){let{contentEl:r}=this;r.empty()}};g();var bc=require("obsidian");g();g();var x9=Ze(Y3()),qi=require("obsidian");function Na(e,t,r){let n=e.target;app.workspace.trigger("hover-link",{event:e,source:t.getViewType(),hoverParent:t,targetEl:n,linktext:r})}function S9(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&Na(e,t.view,t.change.vaultPath)}function E9(e,t){e.stopPropagation(),t.manager.stage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function A9(e,t){e.stopPropagation();let r=t.change.workingDir=="U";new Wi(t.view.app,r,t.change.vaultPath).myOpen().then(n=>{if(n===!0)return r?t.view.app.vault.adapter.remove(t.change.vaultPath).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")}):t.manager.discard(t.change.path).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},n=>t.view.plugin.displayError(n))}var k9=se('<div data-icon="go-to-file" aria-label="Open File" class="clickable-icon"></div>'),T9=se('<main class="tree-item nav-file svelte-1wbh8tp"><div class="tree-item-self is-clickable nav-file-title svelte-1wbh8tp"><div class="tree-item-inner nav-file-title-content"> </div> <div class="git-tools"><div class="buttons"><!> <div data-icon="undo" aria-label="Discard" class="clickable-icon"></div> <div data-icon="plus" aria-label="Stage" class="clickable-icon"></div></div> <div class="type"> </div></div></div></main>'),C9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function _c(e,t){Ye(t,!0),gt(e,C9);let r=be([]),n=qe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");$t(()=>{for(let x of r)x&&(0,bc.setIcon)(x,x.getAttr("data-icon"))});function i(x){x.stopPropagation(),Vs(t.change.path)?a(x):s(x)}function a(x){var E;x.stopPropagation();let _=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);_ instanceof bc.TFile&&((E=tn(t.view.app,x))===null||E===void 0||E.openFile(_).catch(k=>t.view.plugin.displayError(k)))}function s(x){x.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"",event:x})}var o=T9();o.__mouseover=[S9,t],o.__click=i;var c=U(o),l=U(c),u=U(l,!0);xe(()=>Oe(u,Tn(t.change.vaultPath))),H(l);var f=Z(l,2),d=U(f),h=U(d);{var p=x=>{var E=k9();E.__click=a,Ge(E,_=>r[0]=_,()=>r==null?void 0:r[0]),Er("auxclick",E,a),ne(x,E)};ge(h,x=>{t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)instanceof bc.TFile&&x(p)})}var m=Z(h,2);m.__click=[A9,t],Ge(m,x=>r[1]=x,()=>r==null?void 0:r[1]);var v=Z(m,2);v.__click=[E9,t],Ge(v,x=>r[2]=x,()=>r==null?void 0:r[2]),H(d);var y=Z(d,2),b=U(y,!0);H(y),H(f),H(c),H(o),xe(()=>{pe(c,"data-path",t.change.vaultPath),pe(c,"data-tooltip-position",R(n)),pe(c,"aria-label",t.change.vaultPath),pe(y,"data-type",t.change.workingDir),Oe(b,t.change.workingDir)}),Er("auxclick",o,x=>{x.stopPropagation(),x.button==2?kn(t.view.app,x,t.change.vaultPath,t.view.leaf,"git-source-control"):i(x)}),ne(e,o),Xe()}dt(["mouseover","click"]);g();var X3=require("obsidian");function P9(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&Na(e,t.view,t.change.vaultPath)}var R9=se('<main class="tree-item nav-file svelte-1wbh8tp"><div class="tree-item-self is-clickable nav-file-title svelte-1wbh8tp"><div class="tree-item-inner nav-file-title-content"> </div> <div class="git-tools"><span class="type"> </span></div></div></main>'),M9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function xc(e,t){Ye(t,!0),gt(e,M9);let r=qe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function n(f){var d;f.stopPropagation();let h=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);h instanceof X3.TFile&&((d=tn(t.view.app,f))===null||d===void 0||d.openFile(h).catch(p=>t.view.plugin.displayError(p)))}var i=R9();i.__mouseover=[P9,t],i.__click=n;var a=U(i),s=U(a),o=U(s,!0);xe(()=>Oe(o,Tn(t.change.vaultPath))),H(s);var c=Z(s,2),l=U(c),u=U(l,!0);H(l),H(c),H(a),H(i),xe(()=>{pe(a,"data-path",t.change.vaultPath),pe(a,"data-tooltip-position",R(r)),pe(a,"aria-label",t.change.vaultPath),pe(l,"data-type",t.change.workingDir),Oe(u,t.change.workingDir)}),Er("auxclick",i,f=>{f.stopPropagation(),f.button==2?kn(t.view.app,f,t.change.vaultPath,t.view.leaf,"git-source-control"):n(f)}),ne(e,i),Xe()}dt(["mouseover","click"]);g();var Sc=require("obsidian");function O9(e,t){t.view.app.vault.getFileByPath(t.change.vaultPath)&&Na(e,t.view,t.change.vaultPath)}function I9(e,t){e.stopPropagation(),t.manager.unstage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}var F9=se('<div data-icon="go-to-file" aria-label="Open File" class="clickable-icon"></div>'),$9=se('<main class="tree-item nav-file svelte-1wbh8tp"><div class="tree-item-self is-clickable nav-file-title svelte-1wbh8tp"><div class="tree-item-inner nav-file-title-content"> </div> <div class="git-tools"><div class="buttons"><!> <div data-icon="minus" aria-label="Unstage" class="clickable-icon"></div></div> <div class="type"> </div></div></div></main>'),L9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function Ec(e,t){Ye(t,!0),gt(e,L9);let r=be([]),n=qe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");$t(()=>{for(let b of r)b&&(0,Sc.setIcon)(b,b.getAttr("data-icon"))});function i(b){b.stopPropagation(),Vs(t.change.path)?a(b):s(b)}function a(b){var x;b.stopPropagation();let E=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);E instanceof Sc.TFile&&((x=tn(t.view.app,b))===null||x===void 0||x.openFile(E).catch(_=>t.view.plugin.displayError(_)))}function s(b){b.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"HEAD",bRef:"",event:b})}var o=$9();o.__mouseover=[O9,t],o.__click=i;var c=U(o),l=U(c),u=U(l,!0);xe(()=>Oe(u,Tn(t.change.vaultPath))),H(l);var f=Z(l,2),d=U(f),h=U(d);{var p=b=>{var x=F9();x.__click=a,Ge(x,E=>r[0]=E,()=>r==null?void 0:r[0]),ne(b,x)};ge(h,b=>{t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)instanceof Sc.TFile&&b(p)})}var m=Z(h,2);m.__click=[I9,t],Ge(m,b=>r[1]=b,()=>r==null?void 0:r[1]),H(d);var v=Z(d,2),y=U(v,!0);H(v),H(f),H(c),H(o),xe(()=>{pe(c,"data-path",t.change.vaultPath),pe(c,"data-tooltip-position",R(n)),pe(c,"aria-label",t.change.vaultPath),pe(v,"data-type",t.change.index),Oe(y,t.change.index)}),Er("auxclick",o,b=>{b.stopPropagation(),b.button==2?kn(t.view.app,b,t.change.vaultPath,t.view.leaf,"git-source-control"):i(b)}),ne(e,o),Xe()}dt(["mouseover","click"]);g();g();var D9=se('<div class="tree-item nav-file"><div class="tree-item-self nav-file-title"><div class="tree-item-inner nav-file-title-content"> </div></div></div>'),N9=se("<main><!></main>");function ja(e,t){Ye(t,!0);var r=N9(),n=U(r);{var i=a=>{var s=D9(),o=U(s),c=U(o),l=U(c,!0);H(c),H(o),H(s),xe(()=>{pe(o,"aria-label","And "+(t.files.length-500)+" more files"),Oe(l,"And "+(t.files.length-500)+" more files")}),ne(a,s)};ge(n,a=>{t.files.length>500&&a(i)})}H(r),ne(e,r),Xe()}var B9=se("<div><!></div>"),H9=(e,t,r)=>t(R(r)),U9=(e,t,r)=>t(e,R(r).path),G9=se('<div data-icon="minus" aria-label="Unstage" class="clickable-icon"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-minus"><line x1="4" y1="9" x2="14" y2="9"></line></svg></div>'),z9=(e,t,r)=>t(e,R(r)),V9=(e,t,r)=>t(e,R(r).path),W9=se('<div data-icon="undo" aria-label="Discard" class="clickable-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-undo"><path d="M3 7v6h6"></path><path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"></path></svg></div> <div data-icon="plus" aria-label="Stage" class="clickable-icon"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-plus"><line x1="9" y1="4" x2="9" y2="14"></line><line x1="4" y1="9" x2="14" y2="9"></line></svg></div>',1),q9=se('<div class="tree-item-children nav-folder-children"><!></div>'),Y9=se('<div class="tree-item nav-folder"><div class="tree-item-self is-clickable nav-folder-title svelte-hup5mn"><div data-icon="folder" style="padding-right: 5px; display: flex; "></div> <div class="tree-item-icon nav-folder-collapse-indicator collapse-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></div> <div class="tree-item-inner nav-folder-title-content"> </div> <div class="git-tools"><div class="buttons"><!> <div style="width:11px"></div></div></div></div> <!></div>'),X9=se('<main class="svelte-hup5mn"><!> <!></main>'),Z9={hash:"svelte-hup5mn",code:"main.svelte-hup5mn .nav-folder-title:where(.svelte-hup5mn) {align-items:center;}"};function Ba(e,t){Ye(t,!0),gt(e,Z9);var r,n;let i=si(t,"topLevel",3,!1),a=be({});for(let p of t.hierarchy.children)a[p.title]=((n=(r=p.children)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>100;let s=qe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function o(p,m){p.stopPropagation(),t.plugin.gitManager.stageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function c(p,m){p.stopPropagation(),t.plugin.gitManager.unstageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function l(p,m){p.stopPropagation(),new Wi(t.view.app,!1,m.vaultPath).myOpen().then(v=>{if(v===!0)return t.plugin.gitManager.discardAll({dir:m.path,status:t.plugin.cachedStatus}).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},v=>t.plugin.displayError(v))}function u(p){a[p.title]=!a[p.title]}var f=X9(),d=U(f);kr(d,17,()=>zl(t.hierarchy.children,500),Ar,(p,m)=>{var v=ii(),y=lr(v);{var b=E=>{var _=B9(),k=U(_);{var w=S=>{Ec(S,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},A=S=>{var T=ii(),P=lr(T);{var O=D=>{_c(D,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},j=D=>{var Q=ii(),de=lr(Q);{var ee=J=>{xc(J,{get change(){return R(m).data},get view(){return t.view}})};ge(de,J=>{t.fileType==2&&J(ee)},!0)}ne(D,Q)};ge(P,D=>{t.fileType==1?D(O):D(j,!1)},!0)}ne(S,T)};ge(k,S=>{t.fileType==0?S(w):S(A,!1)})}H(_),ne(E,_)},x=E=>{var _=Y9();_.__click=[H9,u,m];var k=U(_),w=Z(U(k),2),A=Z(w,2),S=U(A,!0);H(A);var T=Z(A,2),P=U(T),O=U(P);{var j=ee=>{var J=G9();J.__click=[U9,c,m],ne(ee,J)},D=ee=>{var J=W9(),Ce=lr(J);Ce.__click=[z9,l,m];var me=Z(Ce,2);me.__click=[V9,o,m],ne(ee,J)};ge(O,ee=>{t.fileType==0?ee(j):ee(D,!1)})}uo(2),H(P),H(T),H(k);var Q=Z(k,2);{var de=ee=>{var J=q9(),Ce=U(J);Ba(Ce,{get hierarchy(){return R(m)},get plugin(){return t.plugin},get view(){return t.view},get fileType(){return t.fileType}}),H(J),un(3,J,()=>In,()=>({duration:150})),ne(ee,J)};ge(Q,ee=>{a[R(m).title]||ee(de)})}H(_),xe(()=>{at(_,"is-collapsed",a[R(m).title]),pe(k,"data-tooltip-position",R(s)),pe(k,"aria-label",R(m).vaultPath),at(w,"is-collapsed",a[R(m).title]),Oe(S,R(m).title)}),Er("auxclick",_,ee=>kn(t.view.app,ee,R(m).vaultPath,t.view.leaf,"git-source-control")),ne(E,_)};ge(y,E=>{R(m).data?E(b):E(x,!1)})}ne(p,v)});var h=Z(d,2);ja(h,{get files(){return t.hierarchy.children}}),H(f),xe(()=>at(f,"topLevel",i())),ne(e,f),Xe()}dt(["click"]);function K9(e,t,r,n,i,a){return Da(this,void 0,void 0,function*(){if(re(t,!0),R(r)){if(yield n().tools.hasTooBigFiles(R(r).staged))return n().setPluginState({gitAction:0}),!1;n().promiseQueue.addTask(()=>n().gitManager.commit({message:R(i)}).then(()=>Da(this,void 0,void 0,function*(){re(i,be(n().settings.commitMessage)),yield n().automaticsManager.setUpAutoCommitAndSync()})).finally(a))}})}function J9(e,t,r,n,i,a){re(t,!0),R(r)&&n().promiseQueue.addTask(()=>n().commitAndSync(!1,!1,R(i)).then(()=>{re(i,be(n().settings.commitMessage))}).finally(a))}function Z3(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.stageAll({status:R(n)}).finally(i))}function K3(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.unstageAll({status:R(n)}).finally(i))}function Q9(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().push().finally(n))}function eH(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().pullChangesFromRemote().finally(n))}function tH(e,t,r){e.stopPropagation(),new Wi(t.view.app,!1,r().gitManager.getRelativeVaultPath("/")).myOpen().then(n=>{n===!0&&r().promiseQueue.addTask(()=>r().gitManager.discardAll({status:r().cachedStatus}).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")}))},console.error)}var rH=(e,t,r,n)=>{re(t,!R(t)),(0,Ac.setIcon)(r[6],R(t)?"list":"folder"),n().settings.treeStructure=R(t),n().saveSettings()},nH=(e,t)=>re(t,""),iH=se('<div class="git-commit-msg-clear-button svelte-11adhly"></div>'),aH=(e,t)=>re(t,!R(t)),sH=se("<!> <!>",1),oH=se('<div class="tree-item-children nav-folder-children"><!></div>'),lH=(e,t)=>re(t,!R(t)),cH=se("<!> <!>",1),uH=se('<div class="tree-item-children nav-folder-children"><!></div>'),fH=(e,t)=>re(t,!R(t)),dH=se("<!> <!>",1),hH=se('<div class="tree-item-children nav-folder-children"><!></div>'),pH=se('<div class="pulled nav-folder"><div class="tree-item-self is-clickable nav-folder-title svelte-11adhly"><div class="tree-item-icon nav-folder-collapse-indicator collapse-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></div> <div class="tree-item-inner nav-folder-title-content">Recently Pulled Files</div> <span class="tree-item-flair"> </span></div> <!></div>'),mH=se('<div class="tree-item nav-folder mod-root"><div class="staged tree-item nav-folder"><div class="tree-item-self is-clickable nav-folder-title svelte-11adhly"><div class="tree-item-icon nav-folder-collapse-indicator collapse-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></div> <div class="tree-item-inner nav-folder-title-content">Staged Changes</div> <div class="git-tools svelte-11adhly"><div class="buttons"><div data-icon="minus" aria-label="Unstage" class="clickable-icon"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-minus"><line x1="4" y1="9" x2="14" y2="9"></line></svg></div></div> <div class="files-count svelte-11adhly"> </div></div></div> <!></div> <div class="changes tree-item nav-folder"><div class="tree-item-self is-clickable nav-folder-title svelte-11adhly"><div class="tree-item-icon nav-folder-collapse-indicator collapse-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></div> <div class="tree-item-inner nav-folder-title-content">Changes</div> <div class="git-tools svelte-11adhly"><div class="buttons"><div data-icon="undo" aria-label="Discard" class="clickable-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-undo"><path d="M3 7v6h6"></path><path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"></path></svg></div> <div data-icon="plus" aria-label="Stage" class="clickable-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg></div></div> <div class="files-count svelte-11adhly"> </div></div></div> <!></div> <!></div>'),gH=se('<main class="svelte-11adhly"><div class="nav-header"><div class="nav-buttons-container"><div id="backup-btn" data-icon="arrow-up-circle" class="clickable-icon nav-action-button" aria-label="Commit-and-sync"></div> <div id="commit-btn" data-icon="check" class="clickable-icon nav-action-button" aria-label="Commit"></div> <div id="stage-all" class="clickable-icon nav-action-button" data-icon="plus-circle" aria-label="Stage all"></div> <div id="unstage-all" class="clickable-icon nav-action-button" data-icon="minus-circle" aria-label="Unstage all"></div> <div id="push" class="clickable-icon nav-action-button" data-icon="upload" aria-label="Push"></div> <div id="pull" class="clickable-icon nav-action-button" data-icon="download" aria-label="Pull"></div> <div id="layoutChange" class="clickable-icon nav-action-button" aria-label="Change Layout"></div> <div id="refresh" class="clickable-icon nav-action-button" data-icon="refresh-cw" aria-label="Refresh" style="margin: 1px;"></div></div></div> <div class="git-commit-msg svelte-11adhly"><textarea class="commit-msg-input svelte-11adhly" spellcheck="true" placeholder="Commit Message"></textarea> <!></div> <div class="nav-files-container" style="position: relative;"><!></div></main>'),vH={hash:"svelte-11adhly",code:`.commit-msg-input.svelte-11adhly {width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field);}.git-commit-msg.svelte-11adhly {position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto;}main.svelte-11adhly .git-tools:where(.svelte-11adhly) .files-count:where(.svelte-11adhly) {padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center;}.nav-folder-title.svelte-11adhly {align-items:center;}.git-commit-msg-clear-button.svelte-11adhly {position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out;}.git-commit-msg-clear-button.svelte-11adhly:after {content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,<svg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM3.8705 3.09766L6.00003 5.22718L8.12955 3.09766L8.9024 3.8705L6.77287 6.00003L8.9024 8.12955L8.12955 8.9024L6.00003 6.77287L3.8705 8.9024L3.09766 8.12955L5.22718 6.00003L3.09766 3.8705L3.8705 3.09766Z' fill='currentColor'/></svg>");mask-repeat:no-repeat;-webkit-mask-image:url("data:image/svg+xml,<svg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM3.8705 3.09766L6.00003 5.22718L8.12955 3.09766L8.9024 3.8705L6.77287 6.00003L8.9024 8.12955L8.12955 8.9024L6.00003 6.77287L3.8705 8.9024L3.09766 8.12955L5.22718 6.00003L3.09766 3.8705L3.8705 3.09766Z' fill='currentColor'/></svg>");-webkit-mask-repeat:no-repeat;}`};function Ev(e,t){Ye(t,!0),gt(e,vH);let r=si(t,"plugin",7),n=ft(!1),i=ft(void 0),a=ft(be([])),s=ft(be(r().settings.commitMessage)),o=be([]),c=ft(void 0),l=ft(void 0),u=ft(void 0),f=ft(!0),d=ft(!0),h=ft(!0),p=ft(0),m=ft(be(r().settings.treeStructure));t.view.registerEvent(t.view.app.workspace.on("obsidian-git:loading-status",()=>re(n,!0))),t.view.registerEvent(t.view.app.workspace.on("obsidian-git:status-changed",()=>void v().catch(console.error))),t.view.plugin.cachedStatus==null?t.view.plugin.refresh().catch(console.error):v().catch(console.error),$t(()=>{o.forEach(F=>(0,Ac.setIcon)(F,F.getAttr("data-icon")))}),$t(()=>{o.forEach(F=>{var z,N;!F||F.id!="push"||(Ac.Platform.isMobile?(F.removeClass("button-border"),R(p)>0&&F.addClass("button-border")):((z=F.firstElementChild)===null||z===void 0||z.removeAttribute("color"),R(p)>0&&((N=F.firstElementChild)===null||N===void 0||N.setAttr("color","var(--text-accent)"))))})});function v(){return Da(this,void 0,void 0,function*(){if(!r().gitReady){re(i,void 0);return}if(re(p,be(yield r().gitManager.getUnpushedCommits())),re(i,be(r().cachedStatus)),re(n,!1),r().lastPulledFiles&&r().lastPulledFiles!=R(a)&&(re(a,be(r().lastPulledFiles)),re(u,be({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a))}))),R(i)){let F=(z,N)=>z.vaultPath.split("/").last().localeCompare(Tn(N.vaultPath));R(i).changed.sort(F),R(i).staged.sort(F),re(c,be({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(i).changed)})),re(l,be({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(i).staged)}))}else re(c,void 0),re(l,void 0)})}function y(){t.view.app.workspace.trigger("obsidian-git:refresh")}let b=qe(()=>(R(s).match(/\n/g)||[]).length+1||1);var x=gH(),E=U(x),_=U(E),k=U(_);k.__click=[J9,n,i,r,s,y],Ge(k,F=>o[0]=F,()=>o==null?void 0:o[0]);var w=Z(k,2);w.__click=[K9,n,i,r,s,y],Ge(w,F=>o[1]=F,()=>o==null?void 0:o[1]);var A=Z(w,2);A.__click=[Z3,n,r,i,y],Ge(A,F=>o[2]=F,()=>o==null?void 0:o[2]);var S=Z(A,2);S.__click=[K3,n,r,i,y],Ge(S,F=>o[3]=F,()=>o==null?void 0:o[3]);var T=Z(S,2);T.__click=[Q9,n,r,y],Ge(T,F=>o[4]=F,()=>o==null?void 0:o[4]);var P=Z(T,2);P.__click=[eH,n,r,y],Ge(P,F=>o[5]=F,()=>o==null?void 0:o[5]);var O=Z(P,2);O.__click=[rH,m,o,r],Ge(O,F=>o[6]=F,()=>o==null?void 0:o[6]);var j=Z(O,2);j.__click=y,Ge(j,F=>o[7]=F,()=>o==null?void 0:o[7]),H(_),H(E);var D=Z(E,2),Q=U(D);rv(Q);var de=Z(Q,2);{var ee=F=>{var z=iH();z.__click=[nH,s],pe(z,"aria-label","Clear"),ne(F,z)};ge(de,F=>{R(s)&&F(ee)})}H(D);var J=Z(D,2),Ce=U(J);{var me=F=>{var z=mH(),N=U(z),Re=U(N);Re.__click=[aH,d];var Dt=U(Re),_t=Z(Dt,4),Ee=U(_t),st=U(Ee);st.__click=[K3,n,r,i,y],Ge(st,Nt=>o[8]=Nt,()=>o==null?void 0:o[8]),H(Ee);var ot=Z(Ee,2),Ct=U(ot,!0);H(ot),H(_t),H(Re);var $e=Z(Re,2);{var G=Nt=>{var Zt=oH(),li=U(Zt);{var Va=jt=>{Ba(jt,{get hierarchy(){return R(l)},get plugin(){return r()},get view(){return t.view},get fileType(){return 0},topLevel:!0})},Po=jt=>{var Yi=sH(),$n=lr(Yi);kr($n,17,()=>zl(R(i).staged,500),Ar,(Ro,Mo)=>{Ec(Ro,{get change(){return R(Mo)},get view(){return t.view},get manager(){return r().gitManager}})});var ci=Z($n,2);ja(ci,{get files(){return R(i).staged}}),ne(jt,Yi)};ge(li,jt=>{R(m)?jt(Va):jt(Po,!1)})}H(Zt),un(3,Zt,()=>In,()=>({duration:150})),ne(Nt,Zt)};ge($e,Nt=>{R(d)&&Nt(G)})}H(N);var Le=Z(N,2),L=U(Le);L.__click=[lH,f];var Y=U(L),ye=Z(Y,4),De=U(ye),vt=U(De);vt.__click=[tH,t,r];var za=Z(vt,2);za.__click=[Z3,n,r,i,y],Ge(za,Nt=>o[9]=Nt,()=>o==null?void 0:o[9]),H(De);var Lv=Z(De,2),MP=U(Lv,!0);H(Lv),H(ye),H(L);var OP=Z(L,2);{var IP=Nt=>{var Zt=uH(),li=U(Zt);{var Va=jt=>{Ba(jt,{get hierarchy(){return R(c)},get plugin(){return r()},get view(){return t.view},get fileType(){return 1},topLevel:!0})},Po=jt=>{var Yi=cH(),$n=lr(Yi);kr($n,17,()=>zl(R(i).changed,500),Ar,(Ro,Mo)=>{_c(Ro,{get change(){return R(Mo)},get view(){return t.view},get manager(){return r().gitManager}})});var ci=Z($n,2);ja(ci,{get files(){return R(i).changed}}),ne(jt,Yi)};ge(li,jt=>{R(m)?jt(Va):jt(Po,!1)})}H(Zt),un(3,Zt,()=>In,()=>({duration:150})),ne(Nt,Zt)};ge(OP,Nt=>{R(f)&&Nt(IP)})}H(Le);var FP=Z(Le,2);{var $P=Nt=>{var Zt=pH(),li=U(Zt);li.__click=[fH,h];var Va=Z(U(li),4),Po=U(Va,!0);H(Va),H(li);var jt=Z(li,2);{var Yi=$n=>{var ci=hH(),Ro=U(ci);{var Mo=Wa=>{Ba(Wa,{get hierarchy(){return R(u)},get plugin(){return r()},get view(){return t.view},get fileType(){return 2},topLevel:!0})},LP=Wa=>{var Dv=dH(),Nv=lr(Dv);kr(Nv,17,()=>R(a),Ar,(NP,jP)=>{xc(NP,{get change(){return R(jP)},get view(){return t.view}})});var DP=Z(Nv,2);ja(DP,{get files(){return R(a)}}),ne(Wa,Dv)};ge(Ro,Wa=>{R(m)?Wa(Mo):Wa(LP,!1)})}H(ci),un(3,ci,()=>In,()=>({duration:150})),ne($n,ci)};ge(jt,$n=>{R(h)&&$n(Yi)})}H(Zt),xe(()=>{at(Zt,"is-collapsed",!R(h)),Oe(Po,R(a).length)}),ne(Nt,Zt)};ge(FP,Nt=>{R(a).length>0&&R(u)&&Nt($P)})}H(z),xe(()=>{at(N,"is-collapsed",!R(d)),at(Dt,"is-collapsed",!R(d)),Oe(Ct,R(i).staged.length),at(Le,"is-collapsed",!R(f)),at(Y,"is-collapsed",!R(f)),Oe(MP,R(i).changed.length)}),ne(F,z)};ge(Ce,F=>{R(i)&&R(l)&&R(c)&&F(me)})}H(J),H(x),xe(()=>{pe(x,"data-type",St.type),pe(O,"data-icon",R(m)?"list":"folder"),at(j,"loading",R(n)),pe(Q,"rows",R(b))}),pv(Q,()=>R(s),F=>re(s,F)),ne(e,x),Xe()}dt(["click"]);var kc=class extends J3.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return St.type}getDisplayText(){return St.name}getIcon(){return St.icon}onClose(){return this._view&&ai(this._view),super.onClose()}reload(){this._view&&ai(this._view),this._view=zi(Ev,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var Gd=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.statusBarEl.addClass("mod-clickable"),this.statusBarEl.onClickEvent(n=>{this.plugin.switchBranch().catch(i=>r.displayError(i))})}async display(){if(this.plugin.gitReady){let t=await this.plugin.gitManager.branchInfo();t.current!=null?this.statusBarEl.setText(t.current):this.statusBarEl.empty()}else this.statusBarEl.empty()}remove(){this.statusBarEl.remove()}};g();var _o=require("obsidian");var Tc=class{constructor(t){this.plugin=t}async hasTooBigFiles(t){let r=await this.plugin.gitManager.branchInfo(),n=r.tracking?Ii(r.tracking)[0]:null;if(!n)return!1;let i=await this.plugin.gitManager.getRemoteUrl(n);if(i!=null&&i.includes("github.com")){let a=[];for(let s of t){let o=this.plugin.app.vault.getAbstractFileByPath(s.vaultPath);if(o instanceof _o.TFile&&o.stat.size>=1e8){let c=this.plugin.gitManager,l=!1;c instanceof Te&&(l=await c.isFileTrackedByLFS(s.path)),l||a.push(s)}}if(a.length>0)return this.plugin.displayError(`Did not commit, because following files are too big: ${a.map(s=>s.vaultPath).join(`
`)}. Please remove them.`),!0}return!1}async writeAndOpenFile(t){t!==void 0&&await this.plugin.app.vault.adapter.write(Ms,t);let r=!1;this.plugin.app.workspace.iterateAllLeaves(n=>{n.getDisplayText()!=""&&Ms.startsWith(n.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(Ms,"/",!0)}openDiff({aFile:t,bFile:r,aRef:n,bRef:i,event:a}){var c,l;let s=this.plugin.settings.diffStyle;_o.Platform.isMobileApp&&(s="git_unified");let o={aFile:t,bFile:r!=null?r:t,aRef:n,bRef:i};s=="split"?(c=tn(this.plugin.app,a))==null||c.setViewState({type:Ai.type,active:!0,state:o}):s=="git_unified"&&((l=tn(this.plugin.app,a))==null||l.setViewState({type:ki.type,active:!0,state:o}))}async runRawCommand(){let t=this.plugin.gitManager;if(!(t instanceof Te))return;let n=await new Fe(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();n!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let i=new _o.Notice(`Running '${n}'...`,999999);try{let a=await t.rawCommand(n);a?(i.setMessage(a),window.setTimeout(()=>i.hide(),5e3)):i.hide()}catch(a){throw i.hide(),a}})}};g();var To=require("obsidian");var Yr=require("@codemirror/view"),ko=require("@codemirror/state");g();var Pe=require("@codemirror/view"),Se=require("@codemirror/state");g();var Av="\u037C",Q3=typeof Symbol=="undefined"?"__"+Av:Symbol.for(Av),kv=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),eP=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{},zd=class{constructor(t,r){this.rules=[];let{finish:n}=r||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function a(s,o,c,l){let u=[],f=/^@(\w+)\b/.exec(s[0]),d=f&&f[1]=="keyframes";if(f&&o==null)return c.push(s[0]+";");for(let h in o){let p=o[h];if(/&/.test(h))a(h.split(/,\s*/).map(m=>s.map(v=>m.replace(/&/,v))).reduce((m,v)=>m.concat(v)),p,c);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");a(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||d)&&c.push((n&&!f&&!l?s.map(n):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in t)a(i(s),t[s],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let t=eP[Q3]||1;return eP[Q3]=t+1,Av+t.toString(36)}static mount(t,r,n){let i=t[kv],a=n&&n.nonce;i?a&&i.setNonce(a):i=new Tv(t,a),i.mount(Array.isArray(r)?r:[r],t)}},tP=new Map,Tv=class{constructor(t,r){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let a=tP.get(n);if(a)return t[kv]=a;this.sheet=new i.CSSStyleSheet,tP.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],t[kv]=this}mount(t,r){let n=this.sheet,i=0,a=0;for(let s=0;s<t.length;s++){let o=t[s],c=this.modules.indexOf(o);if(c<a&&c>-1&&(this.modules.splice(c,1),a--,c=-1),c==-1){if(this.modules.splice(a++,0,o),n)for(let l=0;l<o.rules.length;l++)n.insertRule(o.rules[l],i++)}else{for(;a<c;)i+=this.modules[a++].rules.length;i+=o.rules.length,a++}}if(n)r.adoptedStyleSheets.indexOf(this.sheet)<0&&(r.adoptedStyleSheets=[this.sheet,...r.adoptedStyleSheets]);else{let s="";for(let c=0;c<this.modules.length;c++)s+=this.modules[c].getRules()+`
`;this.styleTag.textContent=s;let o=r.head||r;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}};var wP=require("@codemirror/language"),yH=require("@lezer/highlight"),ht=class e{constructor(t,r,n,i){this.fromA=t,this.toA=r,this.fromB=n,this.toB=i}offset(t,r=t){return new e(this.fromA+t,this.toA+t,this.fromB+r,this.toB+r)}};function Ua(e,t,r,n,i,a){if(e==n)return[];let s=Fv(e,t,r,n,i,a),o=$v(e,t+s,r,n,i+s,a);t+=s,r-=o,i+=s,a-=o;let c=r-t,l=a-i;if(!c||!l)return[new ht(t,r,i,a)];if(c>l){let f=e.slice(t,r).indexOf(n.slice(i,a));if(f>-1)return[new ht(t,t+f,i,i),new ht(t+f+l,r,a,a)]}else if(l>c){let f=n.slice(i,a).indexOf(e.slice(t,r));if(f>-1)return[new ht(t,t,i,i+f),new ht(r,r,i+f+c,a)]}if(c==1||l==1)return[new ht(t,r,i,a)];let u=_P(e,t,r,n,i,a);if(u){let[f,d,h]=u;return Ua(e,t,f,n,i,d).concat(Ua(e,f+h,r,n,d+h,a))}return wH(e,t,r,n,i,a)}var Cc=1e9;function wH(e,t,r,n,i,a){let s=r-t,o=a-i;if(Cc<1e9&&Math.min(s,o)>Cc*16)return Math.min(s,o)>Cc*64?[new ht(t,r,i,a)]:rP(e,t,r,n,i,a);let c=Math.ceil((s+o)/2);Cv.reset(c),Pv.reset(c);let l=(h,p)=>e.charCodeAt(t+h)==n.charCodeAt(i+p),u=(h,p)=>e.charCodeAt(r-h-1)==n.charCodeAt(a-p-1),f=(s-o)%2!=0?Pv:null,d=f?null:Cv;for(let h=0;h<c;h++){if(h>Cc)return rP(e,t,r,n,i,a);let p=Cv.advance(h,s,o,c,f,!1,l)||Pv.advance(h,s,o,c,d,!0,u);if(p)return bH(e,t,r,t+p[0],n,i,a,i+p[1])}return[new ht(t,r,i,a)]}var Xd=class{constructor(){this.vec=[]}reset(t){this.len=t<<1;for(let r=0;r<this.len;r++)this.vec[r]=-1;this.vec[t+1]=0,this.start=this.end=0}advance(t,r,n,i,a,s,o){for(let c=-t+this.start;c<=t-this.end;c+=2){let l=i+c,u=c==-t||c!=t&&this.vec[l-1]<this.vec[l+1]?this.vec[l+1]:this.vec[l-1]+1,f=u-c;for(;u<r&&f<n&&o(u,f);)u++,f++;if(this.vec[l]=u,u>r)this.end+=2;else if(f>n)this.start+=2;else if(a){let d=i+(r-n)-c;if(d>=0&&d<this.len&&a.vec[d]!=-1)if(s){let h=a.vec[d];if(h>=r-u)return[h,i+h-d]}else{let h=r-a.vec[d];if(u>=h)return[u,f]}}}return null}},Cv=new Xd,Pv=new Xd;function bH(e,t,r,n,i,a,s,o){let c=!1;return!Eo(e,n)&&++n==r&&(c=!0),!Eo(i,o)&&++o==s&&(c=!0),c?[new ht(t,r,a,s)]:Ua(e,t,n,i,a,o).concat(Ua(e,n,r,i,o,s))}function bP(e,t){let r=1,n=Math.min(e,t);for(;r<n;)r=r<<1;return r}function Fv(e,t,r,n,i,a){if(t==r||t==a||e.charCodeAt(t)!=n.charCodeAt(i))return 0;let s=bP(r-t,a-i);for(let o=t,c=i;;){let l=o+s,u=c+s;if(l>r||u>a||e.slice(o,l)!=n.slice(c,u)){if(s==1)return o-t-(Eo(e,o)?0:1);s=s>>1}else{if(l==r||u==a)return l-t;o=l,c=u}}}function $v(e,t,r,n,i,a){if(t==r||i==a||e.charCodeAt(r-1)!=n.charCodeAt(a-1))return 0;let s=bP(r-t,a-i);for(let o=r,c=a;;){let l=o-s,u=c-s;if(l<t||u<i||e.slice(l,o)!=n.slice(u,c)){if(s==1)return r-o-(Eo(e,o)?0:1);s=s>>1}else{if(l==t||u==i)return r-l;o=l,c=u}}}function Rv(e,t,r,n,i,a,s,o){let c=n.slice(i,a),l=null;for(;;){if(l||s<o)return l;for(let u=t+s;;){Eo(e,u)||u++;let f=u+s;if(Eo(e,f)||(f+=f==u+1?1:-1),f>=r)break;let d=e.slice(u,f),h=-1;for(;(h=c.indexOf(d,h+1))!=-1;){let p=Fv(e,f,r,n,i+h+d.length,a),m=$v(e,t,u,n,i,i+h),v=d.length+p+m;(!l||l[2]<v)&&(l=[u-m,i+h-m,v])}u=f}if(o<0)return l;s=s>>1}}function _P(e,t,r,n,i,a){let s=r-t,o=a-i;if(s<o){let c=_P(n,i,a,e,t,r);return c&&[c[1],c[0],c[2]]}return s<4||o*2<s?null:Rv(e,t,r,n,i,a,Math.floor(s/4),-1)}function rP(e,t,r,n,i,a){let s=r-t,o=a-i,c;if(s<o){let d=Rv(n,i,a,e,t,r,Math.floor(s/6),50);c=d&&[d[1],d[0],d[2]]}else c=Rv(e,t,r,n,i,a,Math.floor(o/6),50);if(!c)return[new ht(t,r,i,a)];let[l,u,f]=c;return Ua(e,t,l,n,i,u).concat(Ua(e,l+f,r,n,u+f,a))}function xP(e,t){for(let r=1;r<e.length;r++){let n=e[r-1],i=e[r];n.toA>i.fromA-t&&n.toB>i.fromB-t&&(e[r-1]=new ht(n.fromA,i.toA,n.fromB,i.toB),e.splice(r--,1))}}function _H(e,t,r){for(;;){xP(r,1);let n=!1;for(let i=0;i<r.length;i++){let a=r[i],s,o;(s=Fv(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=r[i]=new ht(a.fromA+s,a.toA,a.fromB+s,a.toB)),(o=$v(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=r[i]=new ht(a.fromA,a.toA-o,a.fromB,a.toB-o));let c=a.toA-a.fromA,l=a.toB-a.fromB;if(c&&l)continue;let u=a.fromA-(i?r[i-1].toA:0),f=(i<r.length-1?r[i+1].fromA:e.length)-a.toA;if(!u||!f)continue;let d=c?e.slice(a.fromA,a.toA):t.slice(a.fromB,a.toB);u<=d.length&&e.slice(a.fromA-u,a.fromA)==d.slice(d.length-u)?(r[i]=new ht(a.fromA-u,a.toA-u,a.fromB-u,a.toB-u),n=!0):f<=d.length&&e.slice(a.toA,a.toA+f)==d.slice(0,f)&&(r[i]=new ht(a.fromA+f,a.toA+f,a.fromB+f,a.toB+f),n=!0)}if(!n)break}return r}function xH(e,t,r){for(let n=0,i=0;i<e.length;i++){let a=e[i],s=a.toA-a.fromA,o=a.toB-a.fromB;if(s&&o||s>3||o>3){let c=i==e.length-1?t.length:e[i+1].fromA,l=a.fromA-n,u=c-a.toA,f=iP(t,a.fromA,Math.min(l,5)),d=nP(t,a.toA,Math.min(u,5)),h=a.fromA-f,p=d-a.toA;if(!s||!o){let m=Math.max(s,o),[v,y,b]=s?[t,a.fromA,a.toA]:[r,a.fromB,a.toB];h&&p&&(m>h&&t.slice(f,a.fromA)==v.slice(b-h,b)?(a=e[i]=new ht(f,f+s,a.fromB-h,a.toB-h),f=a.fromA,d=nP(t,a.toA,Math.min(c-a.toA,5))):m>p&&t.slice(a.toA,d)==v.slice(y,y+p)&&(a=e[i]=new ht(d-s,d,a.fromB+p,a.toB+p),d=a.toA,f=iP(t,a.fromA,Math.min(a.fromA-n,5))),h=a.fromA-f,p=d-a.toA)}if(h||p)a=e[i]=new ht(a.fromA-h,a.toA+p,a.fromB-h,a.toB+p);else if(s){if(!o){let m=sP(t,a.fromA,a.toA),v,y=m<0?-1:aP(t,a.toA,a.fromA);m>-1&&(v=m-a.fromA)<=u&&t.slice(a.fromA,m)==t.slice(a.toA,a.toA+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toA-y)<=l&&t.slice(a.fromA-v,a.fromA)==t.slice(y,a.toA)&&(a=e[i]=a.offset(-v))}}else{let m=sP(r,a.fromB,a.toB),v,y=m<0?-1:aP(r,a.toB,a.fromB);m>-1&&(v=m-a.fromB)<=u&&r.slice(a.fromB,m)==r.slice(a.toB,a.toB+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toB-y)<=l&&r.slice(a.fromB-v,a.fromB)==r.slice(y,a.toB)&&(a=e[i]=a.offset(-v))}n=a.toA}}return xP(e,3),e}var Ha;try{Ha=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch(e){}function SP(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function EP(e,t){if(t==e.length)return 0;let r=e.charCodeAt(t);return r<192?SP(r)?1:0:Ha?!kP(r)||t==e.length-1?Ha.test(String.fromCharCode(r))?1:0:Ha.test(e.slice(t,t+2))?2:0:0}function AP(e,t){if(!t)return 0;let r=e.charCodeAt(t-1);return r<192?SP(r)?1:0:Ha?!TP(r)||t==1?Ha.test(String.fromCharCode(r))?1:0:Ha.test(e.slice(t-2,t))?2:0:0}function nP(e,t,r){if(t==e.length||!AP(e,t))return t;for(let n=t,i=t+r;;){let a=EP(e,n);if(!a)return n;if(n+=a,n>i)return t}}function iP(e,t,r){if(!t||!EP(e,t))return t;for(let n=t,i=t-r;;){let a=AP(e,n);if(!a)return n;if(n-=a,n<i)return t}}function aP(e,t,r){for(;t!=r;t--)if(e.charCodeAt(t-1)==10)return t;return-1}function sP(e,t,r){for(;t!=r;t++)if(e.charCodeAt(t)==10)return t;return-1}var kP=e=>e>=55296&&e<=56319,TP=e=>e>=56320&&e<=57343;function Eo(e,t){return!t||t==e.length||!kP(e.charCodeAt(t-1))||!TP(e.charCodeAt(t))}function SH(e,t,r){var n;return Cc=((n=r==null?void 0:r.scanLimit)!==null&&n!==void 0?n:1e9)>>1,_H(e,t,Ua(e,0,e.length,t,0,t.length))}function CP(e,t,r){return xH(SH(e,t,r),e,t)}var Fn=Se.Facet.define({combine:e=>e[0]}),Mv=Se.StateEffect.define(),Ao=Se.StateField.define({create(e){return null},update(e,t){for(let r of t.effects)r.is(Mv)&&(e=r.value);return e}});var So=class e{constructor(t,r,n,i,a){this.changes=t,this.fromA=r,this.toA=n,this.fromB=i,this.toB=a}offset(t,r){return t||r?new e(this.changes,this.fromA+t,this.toA+t,this.fromB+r,this.toB+r):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(t,r,n){return PP(CP(t.toString(),r.toString(),n),t,r,0,0)}static updateA(t,r,n,i,a){return fP(uP(t,i,!0,n.length),t,r,n,a)}static updateB(t,r,n,i,a){return fP(uP(t,i,!1,r.length),t,r,n,a)}};function oP(e,t,r,n){let i=r.lineAt(e),a=n.lineAt(t);return i.to==e&&a.to==t&&e<r.length&&t<n.length?[e+1,t+1]:[i.from,a.from]}function lP(e,t,r,n){let i=r.lineAt(e),a=n.lineAt(t);return i.from==e&&a.from==t?[e,t]:[i.to+1,a.to+1]}function PP(e,t,r,n,i){let a=[];for(let s=0;s<e.length;s++){let o=e[s],[c,l]=oP(o.fromA+n,o.fromB+i,t,r),[u,f]=lP(o.toA+n,o.toB+i,t,r),d=[o.offset(-c+n,-l+i)];for(;s<e.length-1;){let h=e[s+1],[p,m]=oP(h.fromA+n,h.fromB+i,t,r);if(p>u+1&&m>f+1)break;d.push(h.offset(-c+n,-l+i)),[u,f]=lP(h.toA+n,h.toB+i,t,r),s++}a.push(new So(d,c,Math.max(c,u),l,Math.max(l,f)))}return a}var Vd=1e3;function cP(e,t,r,n){let i=0,a=e.length;for(;;){if(i==a){let u=0,f=0;i&&({toA:u,toB:f}=e[i-1]);let d=t-(r?u:f);return[u+d,f+d]}let s=i+a>>1,o=e[s],[c,l]=r?[o.fromA,o.toA]:[o.fromB,o.toB];if(c>t)a=s;else if(l<=t)i=s+1;else return n?[o.fromA,o.fromB]:[o.toA,o.toB]}}function uP(e,t,r,n){let i=[];return t.iterChangedRanges((a,s,o,c)=>{let l=0,u=r?t.length:n,f=0,d=r?n:t.length;a>Vd&&([l,f]=cP(e,a-Vd,r,!0)),s<t.length-Vd&&([u,d]=cP(e,s+Vd,r,!1));let h=c-o-(s-a),p,[m,v]=r?[h,0]:[0,h];i.length&&(p=i[i.length-1]).toA>=l?i[i.length-1]={fromA:p.fromA,fromB:p.fromB,toA:u,toB:d,diffA:p.diffA+m,diffB:p.diffB+v}:i.push({fromA:l,toA:u,fromB:f,toB:d,diffA:m,diffB:v})}),i}function fP(e,t,r,n,i){if(!e.length)return t;let a=[];for(let s=0,o=0,c=0,l=0;;s++){let u=s==e.length?null:e[s],f=u?u.fromA+o:r.length,d=u?u.fromB+c:n.length;for(;l<t.length;){let v=t[l];if(v.toA+o>f||v.toB+c>d)break;a.push(v.offset(o,c)),l++}if(!u)break;let h=u.toA+o+u.diffA,p=u.toB+c+u.diffB,m=CP(r.sliceString(f,h),n.sliceString(d,p),i);for(let v of PP(m,r,n,f,d))a.push(v);for(o+=u.diffA,c+=u.diffB;l<t.length;){let v=t[l];if(v.fromA+o>h&&v.fromB+c>p)break;l++}}return a}var EH={scanLimit:500},RP=Pe.ViewPlugin.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=pP(e))}update(e){(e.docChanged||e.viewportChanged||AH(e.startState,e.state)||kH(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=pP(e.view))}},{decorations:e=>e.deco}),Wd=Se.Prec.low((0,Pe.gutter)({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(RP))===null||t===void 0?void 0:t.gutter)||Se.RangeSet.empty}}));function AH(e,t){return e.field(Ao,!1)!=t.field(Ao,!1)}function kH(e,t){return e.facet(Fn)!=t.facet(Fn)}var dP=Pe.Decoration.line({class:"cm-changedLine"}),TH=Pe.Decoration.mark({class:"cm-changedText"}),CH=Pe.Decoration.mark({tagName:"ins",class:"cm-insertedLine"}),PH=Pe.Decoration.mark({tagName:"del",class:"cm-deletedLine"}),hP=new class extends Pe.GutterMarker{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function RH(e,t,r,n,i,a){let s=r?e.fromA:e.fromB,o=r?e.toA:e.toB,c=0;if(s!=o){i.add(s,s,dP),i.add(s,o,r?PH:CH),a&&a.add(s,s,hP);for(let l=t.iterRange(s,o-1),u=s;!l.next().done;){if(l.lineBreak){u++,i.add(u,u,dP),a&&a.add(u,u,hP);continue}let f=u+l.value.length;if(n)for(;c<e.changes.length;){let d=e.changes[c],h=s+(r?d.fromA:d.fromB),p=s+(r?d.toA:d.toB),m=Math.max(u,h),v=Math.min(f,p);if(m<v&&i.add(m,v,TH),p<f)c++;else break}u=f}}}function pP(e){let t=e.state.field(Ao),{side:r,highlightChanges:n,markGutter:i}=e.state.facet(Fn),a=r=="a",s=new Se.RangeSetBuilder,o=i?new Se.RangeSetBuilder:null,{from:c,to:l}=e.viewport;for(let u of t){if((a?u.fromA:u.fromB)>=l)break;(a?u.toA:u.toB)>c&&RH(u,e.state.doc,a,n,s,o)}return{deco:s.finish(),gutter:o&&o.finish()}}var xo=class extends Pe.WidgetType{constructor(t){super(),this.height=t}eq(t){return this.height==t.height}toDOM(){let t=document.createElement("div");return t.className="cm-mergeSpacer",t.style.height=this.height+"px",t}updateDOM(t){return t.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Zd=Se.StateEffect.define({map:(e,t)=>e.map(t)}),Pc=Se.StateField.define({create:()=>Pe.Decoration.none,update:(e,t)=>{for(let r of t.effects)if(r.is(Zd))return r.value;return e.map(t.changes)},provide:e=>Pe.EditorView.decorations.from(e)}),qd=.01;function mP(e,t){if(e.size!=t.size)return!1;let r=e.iter(),n=t.iter();for(;r.value;){if(r.from!=n.from||Math.abs(r.value.spec.widget.height-n.value.spec.widget.height)>1)return!1;r.next(),n.next()}return!0}function MH(e,t,r){let n=new Se.RangeSetBuilder,i=new Se.RangeSetBuilder,a=e.state.field(Pc).iter(),s=t.state.field(Pc).iter(),o=0,c=0,l=0,u=0,f=e.viewport,d=t.viewport;for(let v=0;;v++){let y=v<r.length?r[v]:null,b=y?y.fromA:e.state.doc.length,x=y?y.fromB:t.state.doc.length;if(o<b){let E=e.lineBlockAt(o).top+l,_=t.lineBlockAt(c).top+u,k=E-_;k<-qd?(l-=k,n.add(o,o,Pe.Decoration.widget({widget:new xo(-k),block:!0,side:-1}))):k>qd&&(u+=k,i.add(c,c,Pe.Decoration.widget({widget:new xo(k),block:!0,side:-1})))}if(b>o+1e3&&o<f.from&&b>f.from&&c<d.from&&x>d.from){let E=Math.min(f.from-o,d.from-c);o+=E,c+=E,v--}else if(y)o=y.toA,c=y.toB;else break;for(;a.value&&a.from<o;)l-=a.value.spec.widget.height,a.next();for(;s.value&&s.from<c;)u-=s.value.spec.widget.height,s.next()}for(;a.value;)l-=a.value.spec.widget.height,a.next();for(;s.value;)u-=s.value.spec.widget.height,s.next();let h=e.contentHeight+l-(t.contentHeight+u);h<qd?n.add(e.state.doc.length,e.state.doc.length,Pe.Decoration.widget({widget:new xo(-h),block:!0,side:1})):h>qd&&i.add(t.state.doc.length,t.state.doc.length,Pe.Decoration.widget({widget:new xo(h),block:!0,side:1}));let p=n.finish(),m=i.finish();mP(p,e.state.field(Pc))||e.dispatch({effects:Zd.of(p)}),mP(m,t.state.field(Pc))||t.dispatch({effects:Zd.of(m)})}var Ov=Se.StateEffect.define({map:(e,t)=>t.mapPos(e)}),Iv=class extends Pe.WidgetType{constructor(t){super(),this.lines=t}eq(t){return this.lines==t.lines}toDOM(t){let r=document.createElement("div");return r.className="cm-collapsedLines",r.textContent=t.state.phrase("$ unchanged lines",this.lines),r.addEventListener("click",n=>{let i=t.posAtDOM(n.target);t.dispatch({effects:Ov.of(i)});let{side:a,sibling:s}=t.state.facet(Fn);s&&s().dispatch({effects:Ov.of(OH(i,t.state.field(Ao),a=="a"))})}),r}ignoreEvent(t){return t instanceof MouseEvent}get estimatedHeight(){return 27}};function OH(e,t,r){let n=0,i=0;for(let a=0;;a++){let s=a<t.length?t[a]:null;if(!s||(r?s.fromA:s.fromB)>=e)return i+(e-n);[n,i]=r?[s.toA,s.toB]:[s.toB,s.toA]}}var IH=Se.StateField.define({create(e){return Pe.Decoration.none},update(e,t){e=e.map(t.changes);for(let r of t.effects)r.is(Ov)&&(e=e.update({filter:n=>n!=r.value}));return e},provide:e=>Pe.EditorView.decorations.from(e)});function gP({margin:e=3,minSize:t=4}){return IH.init(r=>FH(r,e,t))}function FH(e,t,r){let n=new Se.RangeSetBuilder,i=e.facet(Fn).side=="a",a=e.field(Ao),s=1;for(let o=0;;o++){let c=o<a.length?a[o]:null,l=o?s+t:1,u=c?e.doc.lineAt(i?c.fromA:c.fromB).number-1-t:e.doc.lines,f=u-l+1;if(f>=r&&n.add(e.doc.line(l).from,e.doc.line(u).to,Pe.Decoration.replace({widget:new Iv(f),block:!0})),!c)break;s=e.doc.lineAt(Math.min(e.doc.length,i?c.toA:c.toB)).number}return n.finish()}var $H=Pe.EditorView.styleModule.of(new zd({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),LH=Pe.EditorView.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb2266, #22bb2266) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff8866, #88ff8866) bottom/100% 2px no-repeat"},".cm-insertedLine, .cm-deletedLine":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"}}),vP=new Se.Compartment,Yd=new Se.Compartment,Kd=class{constructor(t){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=t.diffConfig||EH;let r=[Se.Prec.low(RP),LH,$H,Pc,Pe.EditorView.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(d=>d.effects.some(h=>h.is(Zd)))&&this.measure()})],n=[Fn.of({side:"a",sibling:()=>this.b,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&n.push(Wd);let i=Se.EditorState.create({doc:t.a.doc,selection:t.a.selection,extensions:[t.a.extensions||[],Pe.EditorView.editorAttributes.of({class:"cm-merge-a"}),Yd.of(n),r]}),a=[Fn.of({side:"b",sibling:()=>this.a,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&a.push(Wd);let s=Se.EditorState.create({doc:t.b.doc,selection:t.b.selection,extensions:[t.b.extensions||[],Pe.EditorView.editorAttributes.of({class:"cm-merge-b"}),Yd.of(a),r]});this.chunks=So.build(i.doc,s.doc,this.diffConf);let o=[Ao.init(()=>this.chunks),vP.of(t.collapseUnchanged?gP(t.collapseUnchanged):[])];i=i.update({effects:Se.StateEffect.appendConfig.of(o)}).state,s=s.update({effects:Se.StateEffect.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let c=t.orientation||"a-b",l=document.createElement("div");l.className="cm-mergeViewEditor";let u=document.createElement("div");u.className="cm-mergeViewEditor",this.editorDOM.appendChild(c=="a-b"?l:u),this.editorDOM.appendChild(c=="a-b"?u:l),this.a=new Pe.EditorView({state:i,parent:l,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new Pe.EditorView({state:s,parent:u,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!t.revertControls,t.revertControls=="b-to-a",t.renderRevertControl),t.parent&&t.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(t,r){if(t.some(n=>n.docChanged)){let n=t[t.length-1],i=t.reduce((s,o)=>s.compose(o.changes),Se.ChangeSet.empty(t[0].startState.doc.length));this.chunks=r==this.a?So.updateA(this.chunks,n.newDoc,this.b.state.doc,i,this.diffConf):So.updateB(this.chunks,this.a.state.doc,n.newDoc,i,this.diffConf),r.update([...t,n.state.update({effects:Mv.of(this.chunks)})]);let a=r==this.a?this.b:this.a;a.update([a.state.update({effects:Mv.of(this.chunks)})]),this.scheduleMeasure()}else r.update(t)}reconfigure(t){if("diffConfig"in t&&(this.diffConf=t.diffConfig),"orientation"in t){let a=t.orientation!="b-a";if(a!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(a?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(a?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in t||"renderRevertControl"in t){let a=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in t&&(a=!!t.revertControls,s=t.revertControls=="b-to-a"),"renderRevertControl"in t&&(o=t.renderRevertControl),this.setupRevertControls(a,s,o)}let r="highlightChanges"in t,n="gutter"in t,i="collapseUnchanged"in t;if(r||n||i){let a=[],s=[];if(r||n){let o=this.a.state.facet(Fn),c=n?t.gutter!==!1:o.markGutter,l=r?t.highlightChanges!==!1:o.highlightChanges;a.push(Yd.reconfigure([Fn.of({side:"a",sibling:()=>this.b,highlightChanges:l,markGutter:c}),c?Wd:[]])),s.push(Yd.reconfigure([Fn.of({side:"b",sibling:()=>this.a,highlightChanges:l,markGutter:c}),c?Wd:[]]))}if(i){let o=vP.reconfigure(t.collapseUnchanged?gP(t.collapseUnchanged):[]);a.push(o),s.push(o)}this.a.dispatch({effects:a}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(t,r,n){this.revertToA=r,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=n,!t&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):t&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let t=this.dom.ownerDocument.defaultView||window;this.measuring=t.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){MH(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let t=this.revertDOM,r=t.firstChild,n=this.a.viewport,i=this.b.viewport;for(let a=0;a<this.chunks.length;a++){let s=this.chunks[a];if(s.fromA>n.to||s.fromB>i.to)break;if(s.fromA<n.from||s.fromB<i.from)continue;let o=this.a.lineBlockAt(s.fromA).top+"px";for(;r&&+r.dataset.chunk<a;)r=yP(r);r&&r.dataset.chunk==String(a)?(r.style.top!=o&&(r.style.top=o),r=r.nextSibling):t.insertBefore(this.renderRevertButton(o,a),r)}for(;r;)r=yP(r)}renderRevertButton(t,r){let n;if(this.renderRevert)n=this.renderRevert();else{n=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");n.setAttribute("aria-label",i),n.setAttribute("title",i),n.textContent=this.revertToLeft?"\u21DC":"\u21DD"}return n.style.top=t,n.setAttribute("data-chunk",String(r)),n}revertClicked(t){let r=t.target,n;for(;r&&r.parentNode!=this.revertDOM;)r=r.parentNode;if(r&&(n=this.chunks[r.dataset.chunk])){let[i,a,s,o,c,l]=this.revertToA?[this.b,this.a,n.fromB,n.toB,n.fromA,n.toA]:[this.a,this.b,n.fromA,n.toA,n.fromB,n.toB],u=i.state.sliceDoc(s,Math.max(s,o-1));s!=o&&l<=a.state.doc.length&&(u+=i.state.lineBreak),a.dispatch({changes:{from:c,to:Math.min(a.state.doc.length,l),insert:u},userEvent:"revert"}),t.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function yP(e){let t=e.nextSibling;return e.remove(),t}var Co=require("@codemirror/commands"),Jd=require("@codemirror/search");var Ga=class extends To.ItemView{constructor(r,n){super(r);this.plugin=n;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",i=>{this.state.bRef==null&&i.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(i,a)=>{this.state.bRef==null&&(i.path===this.state.bFile||a===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,To.debounce)(i=>{let a=this.state.bFile;a&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(a,i).catch(s=>this.plugin.displayError(s)))},1e3,!1)}getViewType(){return Ai.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return Ai.name}getIcon(){return Ai.icon}async setState(r,n){this.state=r,To.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,n),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,n){try{return await this.plugin.gitManager.show(r,n,!1)}catch(i){if(i instanceof yr&&(i.message.includes("does not exist")||i.message.includes("unknown revision or path")||i.message.includes("exists on disk, but not in")))return"";throw i}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let n=await this.app.vault.adapter.read(this.state.bFile);if(n!=r.state.doc.toString()){let i=r.state.update({changes:{from:0,to:r.state.doc.length,insert:n},annotations:[ko.Transaction.remote.of(!0)]});r.dispatch(i)}this.refreshing=!1}async updateRefEditors(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.a,n=this.mergeView.b;this.refreshing=!0;let i=await this.gitShow(this.state.aRef,this.state.aFile),a;if(this.state.bRef!=null&&(a=await this.gitShow(this.state.bRef,this.state.bFile)),i!=r.state.doc.toString()){let s=r.state.update({changes:{from:0,to:r.state.doc.length,insert:i}});r.dispatch(s)}if(a!=null&&a!=n.state.doc.toString()){let s=n.state.update({changes:{from:0,to:n.state.doc.length,insert:a}});n.dispatch(s)}this.refreshing=!1}async createMergeView(){var r,n,i;if((r=this.state)!=null&&r.aFile&&((n=this.state)!=null&&n.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(i=this.mergeView)==null||i.destroy();let a=this.containerEl.children[1];a.empty(),this.contentEl.addClass("git-split-diff-view"),this.bIsEditable=await this.bShouldBeEditable();let s=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let p=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(p)?o=await this.app.vault.adapter.read(p):o=""}let c=[(0,Yr.lineNumbers)(),(0,Jd.highlightSelectionMatches)(),(0,Yr.drawSelection)(),Yr.keymap.of([...Co.standardKeymap,Co.indentWithTab]),(0,Co.history)(),(0,Jd.search)(),Yr.EditorView.lineWrapping],l=this,u=Yr.ViewPlugin.define(p=>({update(m){if(m.docChanged&&!m.transactions.some(v=>v.annotation(ko.Transaction.remote))){let v=p.state.doc.toString();l.fileSaveDebouncer(v)}}})),f={doc:s,extensions:[...c,Yr.EditorView.editable.of(!1),ko.EditorState.readOnly.of(!0)]},d=[...c];this.bIsEditable?d.push(u):d.push(Yr.EditorView.editable.of(!1),ko.EditorState.readOnly.of(!0));let h={doc:o,extensions:d};a.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]),this.mergeView=new Kd({b:h,a:f,diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:a}),this.refreshing=!1}}};var Qd=class extends Me.Plugin{constructor(){super(...arguments);this.automaticsManager=new Zl(this);this.tools=new Tc(this);this.localStorage=new dd(this);this.state={gitAction:0,offlineMode:!1};this.gitReady=!1;this.promiseQueue=new sd(this);this.intervalsToClear=[];this.lineAuthoringFeature=new ad(this)}setPluginState(r){var n;this.state=Object.assign(this.state,r),(n=this.statusBar)==null||n.display()}async updateCachedStatus(){var r,n;return this.app.workspace.trigger("obsidian-git:loading-status"),this.cachedStatus=await this.gitManager.status(),this.cachedStatus.conflicted.length>0?(this.localStorage.setConflict(!0),await((r=this.branchBar)==null?void 0:r.display())):(this.localStorage.setConflict(!1),await((n=this.branchBar)==null?void 0:n.display())),this.app.workspace.trigger("obsidian-git:status-changed",this.cachedStatus),this.cachedStatus}async refresh(){if(!this.gitReady)return;let r=this.app.workspace.getLeavesOfType(St.type),n=this.app.workspace.getLeavesOfType(Fr.type);(this.settings.changedFilesInStatusBar||r.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)})||n.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)}))&&await this.updateCachedStatus().catch(i=>this.displayError(i)),this.app.workspace.trigger("obsidian-git:refreshed")}refreshUpdatedHead(){this.lineAuthoringFeature.refreshLineAuthorViews()}async onload(){console.log("loading "+this.manifest.name+" plugin: v"+this.manifest.version),Xl.plugin=this,this.localStorage.migrate(),await this.loadSettings(),await this.migrateSettings(),this.settingsTab=new Vf(this.app,this),this.addSettingTab(this.settingsTab),this.localStorage.getPluginDisabled()||(this.registerStuff(),this.app.workspace.onLayoutReady(()=>this.init({fromReload:!1}).catch(r=>this.displayError(r))))}onExternalSettingsChange(){this.reloadSettings().catch(r=>this.displayError(r))}async reloadSettings(){let r=JSON.stringify(this.settings);await this.loadSettings();let n=JSON.stringify(this.settings);r!==n&&(this.log("Reloading settings"),this.unloadPlugin(),await this.init({fromReload:!0}),this.app.workspace.getLeavesOfType(St.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}),this.app.workspace.getLeavesOfType(Fr.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}))}registerStuff(){this.registerEvent(this.app.workspace.on("obsidian-git:refresh",()=>{this.refresh().catch(r=>this.displayError(r))})),this.registerEvent(this.app.workspace.on("obsidian-git:head-change",()=>{this.refreshUpdatedHead()})),this.registerEvent(this.app.workspace.on("file-menu",(r,n,i)=>{this.handleFileMenu(r,n,i)})),this.registerEvent(this.app.workspace.on("active-leaf-change",r=>{this.onActiveLeafChange(r)})),this.registerEvent(this.app.vault.on("modify",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("delete",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("create",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("rename",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerView(St.type,r=>new kc(r,this)),this.registerView(Fr.type,r=>new yc(r,this)),this.registerView(ki.type,r=>new ka(r,this)),this.registerView(Ai.type,r=>new Ga(r,this)),this.addRibbonIcon("git-pull-request","Open Git source control",async()=>{var i;let r=this.app.workspace.getLeavesOfType(St.type),n;r.length===0?(n=(i=this.app.workspace.getRightLeaf(!1))!=null?i:this.app.workspace.getLeaf(),await n.setViewState({type:St.type})):n=r.first(),await this.app.workspace.revealLeaf(n)}),this.registerHoverLinkSource(St.type,{display:"Git View",defaultMod:!0}),this.lineAuthoringFeature.onLoadPlugin(),this.setRefreshDebouncer(),oC(this)}setRefreshDebouncer(){var r;(r=this.debRefresh)==null||r.cancel(),this.debRefresh=(0,Me.debounce)(()=>{this.settings.refreshSourceControl&&this.refresh().catch(console.error)},this.settings.refreshSourceControlTimer,!0)}async addFileToGitignore(r){return await this.app.vault.adapter.append(this.gitManager.getRelativeVaultPath(".gitignore"),`
`+this.gitManager.getRelativeRepoPath(r.path,!0)),this.refresh()}handleFileMenu(r,n,i){this.gitReady&&this.settings.showFileMenu&&n&&(this.settings.showFileMenu&&i=="file-explorer-context-menu"&&(r.addItem(a=>{a.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(s=>{this.promiseQueue.addTask(async()=>{n instanceof Me.TFile?await this.gitManager.stage(n.path,!0):await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(n.path,!0)}),this.displayMessage(`Staged ${n.path}`)})})}),r.addItem(a=>{a.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(s=>{this.promiseQueue.addTask(async()=>{n instanceof Me.TFile?await this.gitManager.unstage(n.path,!0):await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(n.path,!0)}),this.displayMessage(`Unstaged ${n.path}`)})})}),r.addItem(a=>{a.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(s=>{this.addFileToGitignore(n).catch(o=>this.displayError(o))})})),i=="git-source-control"&&r.addItem(a=>{a.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(s=>{this.addFileToGitignore(n).catch(o=>this.displayError(o))})}))}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,n;this.gitReady=!1,this.lineAuthoringFeature.deactivateFeature(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(n=this.statusBar)==null||n.remove(),this.gitManager.unload(),this.promiseQueue.clear();for(let i of this.intervalsToClear)window.clearInterval(i);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=Ex(Sn,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return Me.Platform.isDesktopApp}async init({fromReload:r=!1}){var n;if(this.settings.showStatusBar){let i=this.addStatusBarItem();this.statusBar=new od(i,this),this.intervalsToClear.push(window.setInterval(()=>{var a;return(a=this.statusBar)==null?void 0:a.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Te(this),await this.gitManager.setGitInstance()):this.gitManager=new nn(this);let i=await this.gitManager.checkRequirements();switch(i){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new Me.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,this.setPluginState({gitAction:0}),Me.Platform.isDesktop&&this.settings.showBranchStatusBar){let a=this.addStatusBarItem();this.branchBar=new Gd(a,this),this.intervalsToClear.push(window.setInterval(()=>{var s;return void((s=this.branchBar)==null?void 0:s.display().catch(console.error))},6e4))}await((n=this.branchBar)==null?void 0:n.display()),this.lineAuthoringFeature.conditionallyActivateBySettings(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),await this.automaticsManager.init();break;default:this.log("Something weird happened. The 'checkRequirements' result is "+i)}}catch(i){this.displayError(i),console.error(i)}}async createNewRepo(){try{await this.gitManager.init(),new Me.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let n=await new Fe(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(n){let i="Vault Root",a=await new Fe(this,{options:this.gitManager instanceof nn?[i]:[],placeholder:"Enter directory for clone. It needs to be empty or not existent.",allowEmpty:this.gitManager instanceof nn}).openAndGetResult();if(a==null)return;if(a===i&&(a="."),a=(0,Me.normalizePath)(a),a==="/"&&(a="."),a==="."){let f=await new Fe(this,{options:["NO","YES"],placeholder:`Does your remote repo contain a ${this.app.vault.configDir} directory at the root?`,onlySelection:!0}).openAndGetResult();if(f===void 0){new Me.Notice("Aborted clone");return}else if(f==="YES"){let d="DELETE ALL YOUR LOCAL CONFIG AND PLUGINS";if(await new Fe(this,{options:["Abort clone",d],placeholder:`To avoid conflicts, the local ${this.app.vault.configDir} directory needs to be deleted.`,onlySelection:!0}).openAndGetResult()===d)await this.app.vault.adapter.rmdir(this.app.vault.configDir,!0);else{new Me.Notice("Aborted clone");return}}}let s=await new Fe(this,{placeholder:"Specify depth of clone. Leave empty for full clone.",allowEmpty:!0}).openAndGetResult(),o;if(s!==""&&(o=parseInt(s),isNaN(o))){new Me.Notice("Invalid depth. Aborting clone.");return}new Me.Notice(`Cloning new repo into "${a}"`);let c=this.settings.basePath,l=a&&a!==".";l&&(this.settings.basePath=a);try{await this.gitManager.clone(n,a,o),new Me.Notice("Cloned new repo."),new Me.Notice("Please restart Obsidian"),l&&await this.saveSettings()}catch(u){this.displayError(u),this.settings.basePath=c,await this.saveSettings()}}}async isAllInitialized(){return this.gitReady||await this.init({fromReload:!0}),this.gitReady}async pullChangesFromRemote(){if(!await this.isAllInitialized())return;let r=await this.pull();if(await this.automaticsManager.setUpAutoCommitAndSync(),r!==!1){if(r||this.displayMessage("Pull: Everything is up-to-date"),this.gitManager instanceof Te){let n=await this.updateCachedStatus();n.conflicted.length>0&&(this.displayError(`You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted))}this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0})}}async commitAndSync(r,n=!1,i){!await this.isAllInitialized()||(this.settings.syncMethod=="reset"&&this.settings.pullBeforePush&&await this.pull(),!await this.commit({fromAuto:r,requestCustomMessage:n,commitMessage:i}))||(this.settings.syncMethod!="reset"&&this.settings.pullBeforePush&&await this.pull(),this.settings.disablePush||(await this.remotesAreSet()&&await this.gitManager.canPush()?await this.push():this.displayMessage("No commits to push")),this.setPluginState({gitAction:0}))}async commit({fromAuto:r,requestCustomMessage:n=!1,onlyStaged:i=!1,commitMessage:a,amend:s=!1}){if(!await this.isAllInitialized())return!1;try{let o=this.localStorage.getConflict(),c,l,u;if(this.gitManager instanceof Te){if(await this.mayDeleteConflictFile(),l=await this.updateCachedStatus(),l.conflicted.length==0&&(o=!1),r&&l.conflicted.length>0)return this.displayError(`Did not commit, because you have conflicts in ${l.conflicted.length} ${l.conflicted.length==1?"file":"files"}. Please resolve them and commit per command.`),await this.handleConflict(l.conflicted),!1;c=[...l.changed,...l.staged]}else{if(r&&o)return this.displayError("Did not commit, because you have conflicts. Please resolve them and commit per command."),!1;if(o)await this.mayDeleteConflictFile(),l=await this.updateCachedStatus(),c=[...l.changed,...l.staged];else{let f=this.gitManager;i?c=await f.getStagedFiles():(u=await f.getUnstagedFiles(),c=u.map(({path:d})=>({vaultPath:this.gitManager.getRelativeVaultPath(d),path:d})))}}if(await this.tools.hasTooBigFiles(c))return this.setPluginState({gitAction:0}),!1;if(c.length!==0||o){let f=a!=null?a:a=r?this.settings.autoCommitMessage:this.settings.commitMessage;if(r&&this.settings.customMessageOnAutoBackup||n){!this.settings.disablePopups&&r&&new Me.Notice("Auto backup: Please enter a custom commit message. Leave empty to abort");let p=await new ld(this).openAndGetResult();if(p!=null&&p!=""&&p!="...")f=p;else return this.setPluginState({gitAction:0}),!1}let d;i?d=await this.gitManager.commit({message:f,amend:s}):d=await this.gitManager.commitAll({message:f,status:l,unstagedFiles:u,amend:s}),this.gitManager instanceof Te&&await this.updateCachedStatus();let h=!1;d===void 0&&(h=!0,d=c.length),await this.automaticsManager.setUpAutoCommitAndSync(),this.displayMessage(`Committed${h?" approx.":""} ${d} ${d==1?"file":"files"}`)}else this.displayMessage("No changes to commit");return this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(o){return this.displayError(o),!1}}async push(){if(!await this.isAllInitialized()||!await this.remotesAreSet())return!1;let r=this.localStorage.getConflict();try{this.gitManager instanceof Te&&await this.mayDeleteConflictFile();let n;if(this.gitManager instanceof Te&&(n=await this.updateCachedStatus()).conflicted.length>0)return this.displayError(`Cannot push. You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted),!1;if(this.gitManager instanceof nn&&r)return this.displayError("Cannot push. You have conflicts"),!1;this.log("Pushing....");let i=await this.gitManager.push();return i!==void 0&&(i>0?this.displayMessage(`Pushed ${i} ${i==1?"file":"files"} to remote`):this.displayMessage("No commits to push")),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(n){return n instanceof Is?this.handleNoNetworkError(n):this.displayError(n),!1}}async pull(){if(!await this.remotesAreSet())return!1;try{this.log("Pulling....");let r=await this.gitManager.pull()||[];return this.setPluginState({offlineMode:!1}),r.length>0&&(this.displayMessage(`Pulled ${r.length} ${r.length==1?"file":"files"} from remote`),this.lastPulledFiles=r),r.length}catch(r){return this.displayError(r),!1}}async fetch(){if(await this.remotesAreSet())try{await this.gitManager.fetch(),this.displayMessage("Fetched from remote"),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh")}catch(r){this.displayError(r)}}async mayDeleteConflictFile(){let r=this.app.vault.getAbstractFileByPath(Ms);r&&(this.app.workspace.iterateAllLeaves(n=>{var i;n.view instanceof Me.MarkdownView&&((i=n.view.file)==null?void 0:i.path)==r.path&&n.detach()}),await this.app.vault.delete(r))}async stageFile(r){return await this.isAllInitialized()?(await this.gitManager.stage(r.path,!0),this.displayMessage(`Staged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async unstageFile(r){return await this.isAllInitialized()?(await this.gitManager.unstage(r.path,!0),this.displayMessage(`Unstaged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async switchBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo(),n=await new Ud(this,r.branches).openAndGetReslt();if(n!=null)return await this.gitManager.checkout(n),this.displayMessage(`Switched to ${n}`),this.app.workspace.trigger("obsidian-git:refresh"),await((i=this.branchBar)==null?void 0:i.display()),n}async switchRemoteBranch(){var a;if(!await this.isAllInitialized())return;let r=await this.selectRemoteBranch()||"",[n,i]=Ii(r);if(i!=null&&n!=null)return await this.gitManager.checkout(i,n),this.displayMessage(`Switched to ${r}`),await((a=this.branchBar)==null?void 0:a.display()),r}async createBranch(){var n;if(!await this.isAllInitialized())return;let r=await new Fe(this,{placeholder:"Create new branch"}).openAndGetResult();if(r!=null)return await this.gitManager.createBranch(r),this.displayMessage(`Created new branch ${r}`),await((n=this.branchBar)==null?void 0:n.display()),r}async deleteBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo();r.current&&r.branches.remove(r.current);let n=await new Fe(this,{options:r.branches,placeholder:"Delete branch",onlySelection:!0}).openAndGetResult();if(n!=null){let a=!1;if(!await this.gitManager.branchIsMerged(n)){let o=await new Fe(this,{options:["YES","NO"],placeholder:"This branch isn't merged into HEAD. Force delete?",onlySelection:!0}).openAndGetResult();if(o!=="YES")return;a=o==="YES"}return await this.gitManager.deleteBranch(n,a),this.displayMessage(`Deleted branch ${n}`),await((i=this.branchBar)==null?void 0:i.display()),n}}async remotesAreSet(){return this.settings.updateSubmodules||(await this.gitManager.branchInfo()).tracking?!0:(new Me.Notice("No upstream branch is set. Please select one."),await this.setUpstreamBranch())}async setUpstreamBranch(){let r=await this.selectRemoteBranch();return r==null?(this.displayError("Aborted. No upstream-branch is set!",1e4),this.setPluginState({gitAction:0}),!1):(await this.gitManager.updateUpstreamBranch(r),this.displayMessage(`Set upstream branch to ${r}`),this.setPluginState({gitAction:0}),!0)}async discardAll(){await this.gitManager.discardAll({status:this.cachedStatus}),new Me.Notice("All local changes have been discarded. New files remain untouched."),this.app.workspace.trigger("obsidian-git:refresh")}async handleConflict(r){this.localStorage.setConflict(!0);let n;r!==void 0&&(n=["# Conflicts","Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`","(This file will automatically be deleted before commit)","[[#Additional Instructions]] available below file list","",...r.map(i=>{let a=this.app.vault.getAbstractFileByPath(i);return a instanceof Me.TFile?`- [[${this.app.metadataCache.fileToLinktext(a,"/")}]]`:`- Not a file: ${i}`}),`
# Additional Instructions
I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text.
\`\`\`diff
<<<<<<< HEAD
File changes in local repository
=======
File changes in remote repository
>>>>>>> origin/main
\`\`\``]),await this.tools.writeAndOpenFile(n==null?void 0:n.join(`
`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new Fe(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new Fe(this,{initialValue:a}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,o),i}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),n;r.length===0&&(n=await this.editRemotes(),n==null&&(r=await this.gitManager.getRemotes()));let i=new Fe(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=n!=null?n:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a);return await new Fe(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult()}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new Fe(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}onActiveLeafChange(r){var s,o;let n=r==null?void 0:r.view;if(!(n!=null&&n.getState().file)&&!(n instanceof ka||n instanceof Ga))return;let i=this.app.workspace.getLeavesOfType(St.type).first(),a=this.app.workspace.getLeavesOfType(Fr.type).first();if((s=i==null?void 0:i.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||s.removeClass("is-active"),(o=a==null?void 0:a.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof ka||(r==null?void 0:r.view)instanceof Ga){let c=r.view.state.bFile;this.lastDiffViewState=r.view.getState();let l;i&&r.view.state.aRef=="HEAD"?l=i.view.containerEl.querySelector(`div.staged div.nav-file-title[data-path='${c}']`):i&&r.view.state.aRef==""?l=i.view.containerEl.querySelector(`div.changes div.nav-file-title[data-path='${c}']`):a&&(l=a.view.containerEl.querySelector(`div.nav-file-title[data-path='${c}']`)),l==null||l.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(r,n=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(r.toLowerCase(),n),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new Me.Notice(r,5*1e3),this.log(r)}displayError(r,n=10*1e3){var a;if(r instanceof gl.UserCanceledError){new Me.Notice("Aborted");return}let i;r instanceof Error?i=r:i=new Error(String(r)),this.setPluginState({gitAction:0}),new Me.Notice(i.message,n),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),n)}log(...r){console.log(`${this.manifest.id}:`,...r)}};
/*! Bundled license information:
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
crc-32/crc32.js:
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
js-sha256/src/sha256.js:
(**
* [js-sha256]{@link https://github.com/emn178/js-sha256}
*
* @version 0.9.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
*)
feather-icons/dist/feather.js:
(*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*)
*/
/* nosourcemap */