2 lines
171 KiB
JavaScript
Executable File
2 lines
171 KiB
JavaScript
Executable File
/*! For license information please see Diff.js.LICENSE.txt */
|
||
(()=>{var e={67526(e,t){"use strict";t.toByteArray=function(e){var t,n,o=function(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}(e),a=o[0],u=o[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,u)),l=0,c=u>0?a-4:a;for(n=0;n<c;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,s[l++]=255&t),1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,u=0,l=r-i;u<l;u+=a)o.push(s(e,u,u+a>l?l:u+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function s(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48287(e,t,n){"use strict";const r=n(67526),i=n(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.INSPECT_MAX_BYTES=50;const a=2147483647;function u(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=u(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);const i=function(e){if(s.isBuffer(e)){const t=0|d(e.length),n=u(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?u(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)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 f(e){return c(e),u(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),n=u(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,s.prototype),r}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){let o,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;o<u;o++)if(l(e,o)===l(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===s)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+s>u&&(n=u-s),o=n;o>=0;o--){let n=!0;for(let r=0;r<s;r++)if(l(e,o+r)!==l(t,r)){n=!1;break}if(n)return o}return-1}function b(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(Z(r))return a;e[n+a]=r}return a}function x(e,t,n,r){return J(V(t,e.length-n),e,n,r)}function B(e,t,n,r){return J(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return J(Y(t),e,n,r)}function F(e,t,n,r){return J(function(e,t){let n,r,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,u,s;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[i+1],r=e[i+2],u=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&u)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&u,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}s.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?u(e):void 0!==t?"string"==typeof n?u(e).fill(t,n):u(e).fill(t):u(e)}(e,t,n)},s.allocUnsafe=function(e){return f(e)},s.allocUnsafeSlow=function(e){return f(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).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}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=s.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(q(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},s.byteLength=m,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},s.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},s.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},s.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const u=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n);for(let e=0;e<u;++e)if(l[e]!==c[e]){o=l[e],a=c[e];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return B(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function I(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function S(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=X[e[r]];return i}function O(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r,i){G(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function N(e,t,n,r,i){G(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function _(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,o){return t=+t,n>>>=0,o||_(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return t=+t,n>>>=0,o||_(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=K(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=K(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=K(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),s.prototype.readBigInt64BE=K(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=K(function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=K(function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=K(function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=K(function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=s.isBuffer(e)?e:s.from(e,r),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%a]}return this};const M={};function j(e,t,n){M[e]=class extends n{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(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function G(e,t,n,r,i,o){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new M.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||z(t,e.length-(n+1))}(r,i,o)}function W(e,t){if("number"!=typeof e)throw new M.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new M.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),j("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=$(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},251(e,t){t.read=function(e,t,n,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,l=s>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=u;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,u,s,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?h/s:h*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=c?(u=0,a=c):a+f>=1?(u=(t*s-1)*Math.pow(2,i),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&u,p+=d,u/=256,i-=8);for(a=a<<i|u,l+=i;l>0;e[n+p]=255&a,p+=d,a/=256,l-=8);e[n+p-d]|=128*m}},73065(e,t,n){var r,i;!function(){"use strict";r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function a(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function u(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(){for(var n=this.getLevel(),i=0;i<r.length;i++){var o=r[i];this[o]=i<n?e:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function l(e){return function(){typeof console!==t&&(s.call(this),this[e].apply(this,arguments))}}function c(r,i,o){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?u:void 0!==console[r]?a(console,r):void 0!==console.log?a(console,"log"):e)}(r)||l.apply(this,arguments)}function f(e,n){var a,u,l,f=this,h="loglevel";function p(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(h),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===f.levels[e]&&(e=void 0),e}}function d(e){var t=e;if("string"==typeof t&&void 0!==f.levels[t.toUpperCase()]&&(t=f.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=f.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=n||c,f.getLevel=function(){return null!=l?l:null!=u?u:a},f.setLevel=function(e,n){return l=d(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+n+";"}catch(e){}}}(l),s.call(f)},f.setDefaultLevel=function(e){u=d(e),p()||f.setLevel(e,!1)},f.resetLevel=function(){l=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),s.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(o!==f&&(a=d(o.getLevel())),s.call(f),o===f)for(var e in i)i[e].rebuild()},a=d(o?o.getLevel():"WARN");var m=p();null!=m&&(l=d(m)),s.call(f)}(o=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new f(e,o.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=h),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=r.call(t,n,t,e))||(e.exports=i)}()},65606(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var u,s=[],l=!1,c=-1;function f(){l&&u&&(l=!1,u.length?s=u.concat(s):c=-1,s.length&&h())}function h(){if(!l){var e=a(f);l=!0;for(var t=s.length;t;){for(u=s,s=[];++c<t;)u&&u[c].run();c=-1,t=s.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function d(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new p(e,t)),1!==s.length||l||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},90031(e,t){!function(e){var t,n,r,i=String.fromCharCode;function o(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function a(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function u(e,t){return i(e>>t&63|128)}function s(e){if(!(4294967168&e))return i(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=i(e>>18&7|240),t+=u(e,12),t+=u(e,6)):(a(e),t=i(e>>12&15|224),t+=u(e,6)):t=i(e>>6&31|192),t+i(63&e|128)}function l(){if(r>=n)throw Error("Invalid byte index");var e=255&t[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,i;if(r>n)throw Error("Invalid byte index");if(r==n)return!1;if(e=255&t[r],r++,!(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|l())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|l()<<6|l())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),n=t.length,r=-1,i="";++r<n;)i+=s(t[r]);return i},e.decode=function(e){t=o(e),n=t.length,r=0;for(var a,u=[];!1!==(a=c());)u.push(a);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(u)}}(t)},25172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},16993(e,t,n){var r=n(75546);function i(){var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function s(e,i,o,a){var u=i&&i.prototype instanceof c?i:c,s=Object.create(u.prototype);return r(s,"_invoke",function(e,r,i){var o,a,u,s=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,a=0,u=t,h.n=n,l}};function p(e,r){for(a=e,u=r,n=0;!f&&s&&!i&&n<c.length;n++){var i,o=c[n],p=h.p,d=o[2];e>3?(i=d===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=e<2&&p<o[1])?(a=0,h.v=r,h.n=o[1]):p<d&&(i=e<3||o[0]>r||r>d)&&(o[4]=e,o[5]=r,h.n=d,a=0))}if(i||e>1)return l;throw f=!0,r}return function(i,c,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,d),a=c,u=d;(n=a<2?t:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),p(a,u)):h.n=u:h.v=u);try{if(s=2,o){if(a||(i="next"),n=o[i]){if(!(n=n.call(o,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,a<2&&(a=0)}else 1===a&&(n=o.return)&&n.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((n=(f=h.n<0)?u:e.call(r,h))!==l)break}catch(e){o=t,a=1,u=e}finally{s=1}}return{value:n,done:f}}}(e,o,a),!0),s}var l={};function c(){}function f(){}function h(){}n=Object.getPrototypeOf;var p=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),d=h.prototype=c.prototype=Object.create(p);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,u,"GeneratorFunction")),e.prototype=Object.create(d),e}return f.prototype=h,r(d,"constructor",h),r(h,"constructor",f),f.displayName="GeneratorFunction",r(h,u,"GeneratorFunction"),r(d),r(d,u,"Generator"),r(d,a,function(){return this}),r(d,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:s,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},55869(e,t,n){var r=n(887);e.exports=function(e,t,n,i,o){var a=r(e,t,n,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(16993),i=n(11791);e.exports=function(e,t,n,o,a){return new i(r().w(e,t,n,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},11791(e,t,n){var r=n(25172),i=n(75546);e.exports=function e(t,n){function o(e,i,a,u){try{var s=t[e](i),l=s.value;return l instanceof r?n.resolve(l.v).then(function(e){o("next",e,a,u)},function(e){o("throw",e,a,u)}):n.resolve(l).then(function(e){s.value=e,a(s)},function(e){return o("throw",e,a,u)})}catch(e){u(e)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,r){function i(){return new n(function(t,n){o(e,r,t,n)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},75546(e){function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,i){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(25172),i=n(16993),o=n(55869),a=n(887),u=n(11791),s=n(4373),l=n(30579);function c(){"use strict";var t=i(),n=t.m(c),f=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function d(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,l(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,n,r,i){return t.w(d(e),n,r,i&&i.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:u,async:function(e,t,n,r,i){return(h(t)?a:o)(d(e),t,n,r,i)},keys:s,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports},30579(e,t,n){var r=n(73738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},73738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},54756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}};const t={};function n(r){const i=t[r];if(void 0!==i)return i.exports;const o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var i=t[r++],o=t[r++];n.o(e,i)?0===o&&r++:0===o?Object.defineProperty(e,i,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,i,{enumerable:!0,get:o})}else for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.dn=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{oO:()=>qe,jr:()=>jt,Uy:()=>Mt,Jg:()=>$t,X6:()=>Dt,$i:()=>Nt,ZQ:()=>It,dw:()=>Ct,LG:()=>Ze,VE:()=>Yt,Vw:()=>Jt,B8:()=>Ht,ss:()=>zt,Pc:()=>At,E3:()=>Tt,JJ:()=>Xe,pw:()=>Ft,gH:()=>kt,Pp:()=>vt,C0:()=>Bt,LW:()=>yt,b2:()=>ht,pR:()=>mt,Gu:()=>Wt,G4:()=>Et,gf:()=>gt,iz:()=>Rt,Lr:()=>Ut,tz:()=>xt,YB:()=>Gt,sw:()=>ft,dZ:()=>dt});var t={};function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function m(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function g(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){m(o,r,i,a,u,"next",e)}function u(e){m(o,r,i,a,u,"throw",e)}a(void 0)})}}n.r(t),n.d(t,{Diff:()=>qe,FILE_HEADERS_ONLY:()=>jt,INCLUDE_HEADERS:()=>Mt,OMIT_HEADERS:()=>$t,applyPatch:()=>Dt,applyPatches:()=>Nt,arrayDiff:()=>It,canonicalize:()=>Ct,characterDiff:()=>Ze,convertChangesToDMP:()=>Yt,convertChangesToXML:()=>Jt,createPatch:()=>Ht,createTwoFilesPatch:()=>zt,cssDiff:()=>At,diffArrays:()=>Tt,diffChars:()=>Xe,diffCss:()=>Ft,diffJson:()=>kt,diffLines:()=>vt,diffSentences:()=>Bt,diffTrimmedLines:()=>yt,diffWords:()=>ht,diffWordsWithSpace:()=>mt,formatPatch:()=>Wt,jsonDiff:()=>Et,lineDiff:()=>gt,parsePatch:()=>Rt,reversePatch:()=>Ut,sentenceDiff:()=>xt,structuredPatch:()=>Gt,wordDiff:()=>ft,wordsWithSpaceDiff:()=>dt});var v=n(54756),y=n.n(v);function w(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b=n(73065),x=n.n(b),B=n(90031),A=n.n(B);function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(F=function(){return!!e})()}function E(e){var t="function"==typeof Map?new Map:void 0;return E=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(F())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&p(i,n.prototype),i}(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),p(n,e)},E(e)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}const C=function(e){function t(){var e,n,r,i;a(this,t);for(var o=arguments.length,u=new Array(o),s=0;s<o;s++)u[s]=arguments[s];return n=this,r=t,i=[].concat(u),r=h(r),(e=f(n,k()?Reflect.construct(r,i||[],h(n).constructor):r.apply(n,i))).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(e,t),e}return d(t,e),c(t)}(E(Error));function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";if("string"==typeof e&&(e=M.strToArrayBuffer(e)),e instanceof ArrayBuffer&&(e=new Uint8Array(e)),64!==(t=M.expandAlphRange(t).join("")).length&&65!==t.length)throw new C(`Invalid Base64 alphabet length (${t.length}): ${t}`);for(var n,r,i,o,a,u,s,l="",c=0;c<e.length;)o=(n=e[c++])>>2,a=(3&n)<<4|(r=e[c++])>>4,u=(15&r)<<2|(i=e[c++])>>6,s=63&i,isNaN(r)?u=s=64:isNaN(i)&&(s=64),l+=t.charAt(o)+t.charAt(a)+t.charAt(u)+t.charAt(s);return l}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!e)return"string"===n?"":[];if(t=t||"A-Za-z0-9+/=",64!==(t=M.expandAlphRange(t).join("")).length&&65!==t.length)throw new C(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${t.length}: ${t}`);if(r){var o=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(o,"")}if(i){if(e.length%4==1)throw new C(`Error: Invalid Base64 input length (${e.length}). Cannot be 4n+1, even without padding chars.`);if(65===t.length){var a=t.charAt(64),u=e.indexOf(a);if(u>=0){if(u<e.length-2||e.charAt(e.length-1)!==a)throw new C(`Error: Base64 padding character (${a}) not used in the correct place.`);if(e.length%4!=0)throw new C("Error: Base64 not padded to a multiple of 4.")}}}for(var s,l,c,f,h,p,d,m=[],g=0;g<e.length;){if(f=t.indexOf(e.charAt(g++)||null),h=t.indexOf(e.charAt(g++)||null),p=t.indexOf(e.charAt(g++)||null),d=t.indexOf(e.charAt(g++)||null),i&&(f<0||h<0||p<0||d<0))throw new C("Error: Base64 input contains non-alphabet char(s)");l=(15&h)<<4|p>>2,c=(3&p)<<6|d,(s=f<<2|h>>4)>=0&&s<256&&m.push(s),l>=0&&l<256&&64!==p&&m.push(l),c>=0&&c<256&&64!==d&&m.push(c)}return"string"===n?M.byteArrayToUtf8(m):m}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(n<1||Math.round(n)!==n)throw new C("Byte length must be a positive integer");if("None"!==t){var r="Auto"===t?/[^a-f\d]|0x/gi:M.regexRep(t);e=e.split(r)}else e=[e];for(var i=[],o=0;o<e.length;o++)for(var a=0;a<e[o].length;a+=n)i.push(parseInt(e[o].substr(a,n),16));return i}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",n="Auto"===t?/[^\d-]+/:M.regexRep(t),r=e.split(n);r=r.filter(function(e){return""!==e});for(var i=[],o=0;o<r.length;o++)i[o]=parseInt(r[o],10);return i}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(n<1||Math.round(n)!==n)throw new C("Byte length must be a positive integer");var r=M.regexRep(t);e=e.replace(r,"");for(var i=[],o=0;o<e.length;o+=n)i.push(parseInt(e.substr(o,n),2));return i}["Auto"].concat(["Space","Percent","Comma","Semi-colon","Colon","Line feed","CRLF","0x","0x with comma","\\x","None"]);var L=n(48287).Buffer,D=n(65606),N=function(){function e(){a(this,e)}return c(e,null,[{key:"chr",value:function(e){if(e>65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),n=e.charCodeAt(1);if(t>=55296&&t<56320&&n>=56320&&n<57344)return 1024*(t-55296)+n-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new Array(t);return r.fill(n),w(e).forEach(function(e,t){r[t]=e}),r}},{key:"truncate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-n.length)+n),e}},{key:"hex",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(n,"0")}},{key:"bin",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(n,"0")}},{key:"printable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e.replace(/[^\x20-\x7e]/g,"."):(e=e.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),t||(e=e.replace(/[\x09-\x10\u2028\u2029]/g,".")),e)}},{key:"escapeWhitespace",value:function(e){return e.replace(/[\x09-\x10]/g,function(e){return String.fromCharCode(57344+e.charCodeAt(0))})}},{key:"parseEscapedChars",value:function(e){return e.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,function(e,t){switch(t[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(t,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(t.substr(1),16));case"u":return"{"===t[1]?String.fromCodePoint(parseInt(t.slice(2,-1),16)):String.fromCharCode(parseInt(t.substr(1),16))}})}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(t){for(var n=[],r=0;r<t.length;r++)if(r<t.length-2&&"-"===t[r+1]&&"\\"!==t[r]){for(var i=e.ord(t[r]),o=e.ord(t[r+2]),a=i;a<=o;a++)n.push(e.chr(a));r+=2}else r<t.length-2&&"\\"===t[r]&&"-"===t[r+1]?(n.push("-"),r++):n.push(t[r]);return n}},{key:"convertToByteArray",value:function(t,n){switch(n.toLowerCase()){case"binary":return R(t);case"hex":return S(t);case"decimal":return O(t);case"base64":return T(t,null,"byteArray");case"utf8":return e.strToUtf8ByteArray(t);default:return e.strToByteArray(t)}}},{key:"convertToByteString",value:function(t,n){switch(n.toLowerCase()){case"binary":return e.byteArrayToChars(R(t));case"hex":return e.byteArrayToChars(S(t));case"decimal":return e.byteArrayToChars(O(t));case"base64":return e.byteArrayToChars(T(t,null,"byteArray"));case"utf8":return A().encode(t);default:return t}}},{key:"byteArrayToInt",value:function(e,t){var n=0;if("big"===t)for(var r=0;r<e.length;r++)n=256*n+e[r];else for(var i=e.length-1;i>=0;i--)n=256*n+e[i];return n}},{key:"intToByteArray",value:function(e,t,n){var r=new Array(t);if("little"===n)for(var i=0;i<t;i++)r[i]=255&e,e>>>=8;else for(var o=t-1;o>=0;o--)r[o]=255&e,e>>>=8;return r}},{key:"strToArrayBuffer",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to array buffer`),!t)return new ArrayBuffer;for(var n,r=new Uint8Array(t.length),i=t.length;i--;)if(n=t.charCodeAt(i),r[i]=n,n>255)return e.strToUtf8ArrayBuffer(t);return r.buffer}},{key:"strToUtf8ArrayBuffer",value:function(e){if(x().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 array buffer`),!e)return new ArrayBuffer;var t=new TextEncoder("utf-8").encode(e);return e.length!==t.length&&(P()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),t.buffer}},{key:"strToByteArray",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to byte array`),!t)return[];for(var n,r=new Array(t.length),i=t.length;i--;)if(n=t.charCodeAt(i),r[i]=n,n>255)return e.strToUtf8ByteArray(t);return r}},{key:"strToUtf8ByteArray",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to UTF8 byte array`),!t)return[];var n=A().encode(t);return t.length!==n.length&&(P()?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),e.strToByteArray(n)}},{key:"strToCharcode",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to charcode`),!t)return[];for(var n=[],r=0;r<t.length;r++){var i=t.charCodeAt(r);if(r<t.length-1&&i>=55296&&i<56320){var o=t[r+1].charCodeAt(0);o>=56320&&o<57344&&(i=e.ord(t[r]+t[++r]))}n.push(i)}return n}},{key:"byteArrayToUtf8",value:function(t){var n;if(x().debug(`Converting byte array[${null===(n=t)||void 0===n?void 0:n.length}] to UTF8`),!t||!t.length)return"";t instanceof Uint8Array||(t=new Uint8Array(t));try{var r=new TextDecoder("utf-8",{fatal:!0}).decode(t);return r.length!==t.length&&(P()?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),r}catch(n){return e.byteArrayToChars(t)}}},{key:"byteArrayToChars",value:function(e){if(x().debug(`Converting byte array[${null==e?void 0:e.length}] to chars`),!e||!e.length)return"";for(var t="",n=0;n<e.length;n+=2e4)t+=String.fromCharCode.apply(String,w(e.slice(n,n+2e4)));return t}},{key:"arrayBufferToStr",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(x().debug(`Converting array buffer[${null==t?void 0:t.byteLength}] to str`),!t||!t.byteLength)return"";var r=new Uint8Array(t);return n?e.byteArrayToUtf8(r):e.byteArrayToChars(r)}},{key:"calculateShannonEntropy",value:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,n=[],r=new Array(256).fill(0);for(t=0;t<e.length;t++)r[e[t]]++;for(t=0;t<r.length;t++)r[t]>0&&n.push(r[t]/e.length);var i,o=0;for(t=0;t<n.length;t++)o+=(i=n[t])*Math.log(i)/Math.log(2);return-o}},{key:"parseCSV",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,a=!1,u="",s=[],l=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var c=0;c<e.length;c++)t=e[c],n=e[c+1]||"",o?(u+=t,o=!1):'"'!==t||a?'"'===t&&a?'"'===n?o=!0:a=!1:!a&&r.indexOf(t)>=0?(s.push(u),u=""):!a&&i.indexOf(t)>=0?(s.push(u),u="",l.push(s),s=[],i.indexOf(n)>=0&&n!==t&&c++):u+=t:a=!0;return s.length&&(s.push(u),l.push(s)),l}},{key:"stripHtmlTags",value:function(e){function t(e,n){var r=n.replace(e,"");return r.length===n.length?r:t(e,r)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=t(/<script[^>]*>(\s|\S)*?<\/script[^>]*>/gi,e),e=t(/<style[^>]*>(\s|\S)*?<\/style[^>]*>/gi,e)),t(/<[^>]+>/g,e)}},{key:"escapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\0":""};return e?e.replace(/[&<>"'`\u0000]/g,function(e){return t[e]}):e}},{key:"unescapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","":"\0"};return e.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,function(e){return t[e]||e})}},{key:"toTitleCase",value:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,function(e){return t[e]||e})}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="",r="",i="",o="",a="";return e.forEach(function(e){r=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=e.disabled?"/disabled":"",a=e.breakpoint?"/breakpoint":"",n+=`${r}(${i}${o}${a})`,t&&(n+="\n")}),n}},{key:"parseRecipeConfig",value:function(t){if(0===(t=t.trim()).length)return[];if("["===t[0])return JSON.parse(t);var n,r;t=t.replace(/\n/g,""),e._validatePrettyRecipe(t);for(var i=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,o=[];n=i.exec(t);){r="["+(r=n[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var a={op:n[1].replace(/_/g," "),args:JSON.parse(r)};n[3]&&n[3].indexOf("disabled")>0&&(a.disabled=!0),n[3]&&n[3].indexOf("breakpoint")>0&&(a.breakpoint=!0),o.push(a)}return o}},{key:"_validatePrettyRecipe",value:function(e){for(var t=0;t<e.length;){var n=e.indexOf("(",t);if(-1===n||n===t)throw new Error("Invalid recipe");t=n+1;for(var r=!1,i=!1,o=!1;t<e.length;t++){var a=e[t];if(r)i?i=!1:"\\"===a?i=!0:"'"===a&&(r=!1);else if("'"===a)r=!0;else if(")"===a){o=!0,t++;break}}if(!o||r||i)throw new Error("Invalid recipe")}}},{key:"displayFilesAsHTML",value:(t=g(y().mark(function t(n){var r,i,o,a,u,s;return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=function(t){return`<div class='card' style='white-space: normal;'>\n <div class='card-header'>\n <h6 class="mb-0">\n ${e.escapeHtml(t.name)}\n </h6>\n </div>\n </div>`},i=function(t,n){if(n.startsWith("image")){var r="data:";return r+=n+";","<img style='max-width: 100%;' src='"+(r+="base64,"+I(t))+"'>"}return`<pre>${e.escapeHtml(e.arrayBufferToStr(t.buffer))}</pre>`},o=function(){var t=g(y().mark(function t(n,r){var o,a,u,s;return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.readFile(n);case 1:return o=t.sent,a=new Blob([o],{type:n.type||"octet/stream"}),u=URL.createObjectURL(a),s=`<div class='card' style='white-space: normal;'>\n <div class='card-header' id='heading${r}'>\n <h6 class='mb-0'>\n <a class='collapsed'\n data-toggle='collapse'\n href='#collapse${r}'\n aria-expanded='false'\n aria-controls='collapse${r}'\n title="Show/hide contents of '${e.escapeHtml(n.name)}'">\n ${e.escapeHtml(n.name)}</a>\n <span class='float-right' style="margin-top: -3px">\n ${n.size.toLocaleString()} bytes\n <a title="Download ${e.escapeHtml(n.name)}"\n href="${u}"\n download="${e.escapeHtml(n.name)}"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">save</i>\n </a>\n <a title="Move to input"\n href="#"\n blob-url="${u}"\n file-name="${e.escapeHtml(n.name)}"\n class="extract-file"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">open_in_browser</i>\n </a>\n </span>\n </h6>\n </div>\n <div id='collapse${r}' class='collapse' aria-labelledby='heading${r}' data-parent="#files">\n <div class='card-body'>\n ${i(o,n.type)}\n </div>\n </div>\n </div>`,t.abrupt("return",s);case 2:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}(),a=`<div style='padding: 5px; white-space: normal;'>\n ${n.length} file(s) found\n </div><div id="files" style="padding: 20px">`,u=0;case 1:if(!(u<n.length)){t.next=5;break}if(!n[u].name.endsWith("/")){t.next=2;break}a+=r(n[u]),t.next=4;break;case 2:return s=a,t.next=3,o(n[u],u);case 3:a=s+=t.sent;case 4:u++,t.next=1;break;case 5:return t.abrupt("return",a+="</div>");case 6:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)})},{key:"parseURIParams",value:function(e){if(""===e)return{};"?"!==e[0]&&"#"!==e[0]||(e=e.substr(1));for(var t=e.split("&"),n={},r=0;r<t.length;r++){var i=t[r].split("=");2!==i.length?n[t[r]]=!0:n[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return n}},{key:"readFile",value:function(e){return _()?L.from(e).buffer:new Promise(function(t,n){var r=new FileReader,i=new Uint8Array(e.size),o=0,a=10485760,u=function(){if(o>=e.size)t(i);else{var n=e.slice(o,o+a);r.readAsArrayBuffer(n)}};r.onload=function(e){i.set(new Uint8Array(r.result),o),o+=a,u()},r.onerror=function(e){n(r.error.message)},u()})}},{key:"readFileSync",value:function(e){if(!_())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(e.data).buffer}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(t,n){return n?e.gcd(n,t%n):t}},{key:"modInv",value:function(e,t){e%=t;for(var n=1;n<t;n++)if(e*n%26==1)return n}},{key:"charRep",value:function(e){return{Space:" ",Percent:"%",Comma:",","Semi-colon":";",Colon:":",Tab:"\t","Line feed":"\n",CRLF:"\r\n","Forward slash":"/",Backslash:"\\","0x":"0x","\\x":"\\x","Nothing (separate chars)":"",None:""}[e]}},{key:"regexRep",value:function(e){return{Space:/\s+/g,Percent:/%/g,Comma:/,/g,"Semi-colon":/;/g,Colon:/:/g,"Line feed":/\n/g,CRLF:/\r\n/g,"Forward slash":/\//g,Backslash:/\\/g,"0x with comma":/,?0x/g,"0x":/0x/g,"\\x":/\\x/g,None:/\s+/g}[e]}},{key:"chunked",value:y().mark(function e(t,n){var r,i,o,a;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t[Symbol.iterator]();case 1:i=[],o=0;case 2:if(!(o<n)){e.next=5;break}if(!(a=r.next()).done){e.next=3;break}return e.abrupt("continue",5);case 3:i.push(a.value);case 4:o++,e.next=2;break;case 5:if(!i.length){e.next=7;break}return e.next=6,i;case 6:e.next=8;break;case 7:return e.abrupt("return");case 8:e.next=1;break;case 9:case"end":return e.stop()}},e)})}]);var t}();function _(){return void 0!==D&&null!=D.versions&&null!=D.versions.node}function U(){return"object"==typeof window}function P(){return"function"==typeof importScripts}const M=N;function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}Array.prototype.unique=function(){for(var e={},t=[],n=0,r=this.length;n<r;n++)Object.prototype.hasOwnProperty.call(e,this[n])||(t.push(this[n]),e[this[n]]=1);return t},Array.prototype.max=function(){return Math.max.apply(null,this)},Array.prototype.min=function(){return Math.min.apply(null,this)},Array.prototype.sum=function(){return this.reduce(function(e,t){return e+t},0)},Array.prototype.equals=function(e){if(!e)return!1;var t=this.length;if(t!==e.length)return!1;for(;t--;)if(this[t]!==e[t])return!1;return!0},String.prototype.count=function(e){return this.split(e).length-1},String.prototype.padStart||(String.prototype.padStart=function(e,t){return e|=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e|=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))});const $=function(e){function t(){var e,n,r,i;a(this,t);for(var o=arguments.length,u=new Array(o),s=0;s<o;s++)u[s]=arguments[s];return n=this,r=t,i=[].concat(u),r=h(r),(e=f(n,j()?Reflect.construct(r,i||[],h(n).constructor):r.apply(n,i))).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(e,t),e}return d(t,e),c(t)}(E(Error));var G=function e(t){var n,r,i,o,a=/^(-?)0([xbo])(?=[^.])/i,u=/^-?(Infinity|NaN)$/,s=/^\s*\+(?!-)|^\s+|\s+$/g,l=A.prototype={constructor:A,toString:null,valueOf:null},c=new A(1),f=20,h=4,p=-7,d=21,m=-1e7,g=1e7,v=!1,y=!0,w=1,b=0,x={prefix:"",negativeSign:"-",positiveSign:"",groupSeparator:",",groupSize:3,secondaryGroupSize:0,decimalSeparator:".",fractionGroupSeparator:"",fractionGroupSize:0,suffix:""},B="0123456789abcdefghijklmnopqrstuvwxyz";function A(e,t){var n,r,i,o,l=this;if(!(l instanceof A))return new A(e,t);if(o=typeof e,null==t){if(C(e))return l.s=e.s,void(!e.c||e.e>g?l.c=l.e=null:e.e<m?l.c=[l.e=0]:(l.e=e.e,l.c=e.c.slice()));if("number"==o){if(0*e!=0)return l.s=isNaN(e)?null:e<0?-1:1,void(l.c=l.e=null);if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(n=0,r=e;r>=10;r/=10,n++);return void(n>g?l.c=l.e=null:(l.e=n,l.c=[e]))}return F(l,String(e))}if("bigint"==o)return l.s=e<0?(e=-e,-1):1,F(l,String(e));if("string"==o)i=e;else{if(y)throw Error(V+"BigNumber, string, number, or BigInt expected: "+e);i=String(e)}if(W.test(i))return l.s=45==i.charCodeAt(0)?(i=i.slice(1),-1):1,F(l,i);if(i=i.replace(s,""),u.test(i))return l.s=isNaN(i)?null:i<0?-1:1,void(l.c=l.e=null);if(i=i.replace(a,function(e,n,r){return t="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n}),t)return E(l,i,t,e);if(i=i.replace(/(\d)_(?=\d)/g,"$1"),W.test(i))return l.s=45==i.charCodeAt(0)?(i=i.slice(1),-1):1,F(l,i);if(y)throw Error(V+"Not a number: "+e);l.s=l.c=l.e=null}else{if("string"!=o){if(y)throw Error(V+"String expected: "+e);e=String(e)}ne(t,2,B.length,"Base"),E(l,e.replace(s,""),t,e)}}function F(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(--i););if(t=t.slice(r,++i))if(i-=r,(n=n-r-1)>g)e.c=e.e=null;else if(n<m)e.c=[e.e=0];else{if(e.e=n,e.c=[],r=(n+1)%J,n<0&&(r+=J),r<i){for(r&&e.c.push(+t.slice(0,r)),i-=J;r<i;)e.c.push(+t.slice(r,r+=J));r=J-(t=t.slice(r)).length}else r-=i;for(;r--;t+="0");e.c.push(+t)}else e.c=[e.e=0]}function E(e,t,n,i){var o,a,u=B.slice(0,n),s=0,l="",c=!1,f=!1,h=!1;for(e.s=45===t.charCodeAt(0)?(t=t.slice(1),-1):1,a=t.length;s<a;s++){if(o=t.charAt(s),!(u.indexOf(o)>=0)){if("_"==o){if(f&&s+1<a){f=!1;continue}}else if("."==o){if(0==s||!c&&f){if(s+1==a)break;0==s&&(l="0"),l+=o,c=!0,f=!1;continue}}else if(!h&&(t==t.toUpperCase()&&u==u.toLowerCase()&&(t=t.toLowerCase())||t==t.toLowerCase()&&u==u.toUpperCase()&&(t=t.toUpperCase()))){s=-1,l="",h=!0,c=f=!1;continue}if(y)throw Error(V+"Not a base "+n+" number: "+i);return void(e.s=e.c=e.e=null)}l+=o,f=!0}F(e,r(l,n,10,e.s))}function k(e,t,n,r){var i,o,a,u,s;if(n=null==n?h:ne(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)s=ee(e.c),s=1==r||2==r&&(a<=p||a>=d)?oe(s,a):ae(s,a,"0");else if(o=(e=O(new A(e),t,n)).e,u=(s=ee(e.c)).length,1==r||2==r&&(t<=o||o<=p)){for(;u<t;s+="0",u++);s=oe(s,o)}else if(t-=a+(2===r&&o>a),s=ae(s,o,"0"),o+1>u){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=o-u)>0)for(o+1==u&&(s+=".");t--;s+="0");return e.s<0&&i?"-"+s:s}function C(e){return e instanceof A||!!e&&!0===e._isBigNumber}function I(e,t){for(var n,r,i=1,o=new A(e[0]);i<e.length;i++)(!(r=new A(e[i])).s||(n=te(o,r))===t||0===n&&o.s===t)&&(o=r);return o}function T(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*J-1)>g?e.c=e.e=null:n<m?e.c=[e.e=0]:(e.e=n,e.c=t),e}function S(e){var t,n={};for(t in x)x.hasOwnProperty(t)&&(n[t]=e.hasOwnProperty(t)?e[t]:x[t]);return n}function O(e,t,n,r){var i,o,a,u,s,l,c,f=e.c,h=Z;if(f){e:{for(i=1,u=f[0];u>=10;u/=10,i++);if((o=t-i)<0)o+=J,a=t,s=f[l=0],c=H(s/h[i-a-1]%10);else if((l=z((o+1)/J))>=f.length){if(!r)break e;for(;f.length<=l;f.push(0));s=c=0,i=1,a=(o%=J)-J+1}else{for(s=u=f[l],i=1;u>=10;u/=10,i++);c=(a=(o%=J)-J+i)<0?0:H(s/h[i-a-1]%10)}if(r=r||t<0||null!=f[l+1]||(a<0?s:s%h[i-a-1]),r=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||r||6==n&&(o>0?a>0?s/h[i-a]:0:f[l-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=h[(J-t%J)%J],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=l,u=1,l--):(f.length=l+1,u=h[J-o],f[l]=a>0?H(s/h[i-a]%h[a])*u:0),r)for(;;){if(0==l){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=u,u=1;a>=10;a/=10,u++);o!=u&&(e.e++,f[0]==Y&&(f[0]=1));break}if(f[l]+=u,f[l]!=Y)break;f[l--]=0,u=1}for(o=f.length;0===f[--o];f.pop());}e.e>g?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function R(e){var t,n=e.e;return null===n?e.toString():(t=ee(e.c),t=n<=p||n>=d?oe(t,n):ae(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(V+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(f=ne(e[t],0,K,t)),e.hasOwnProperty(t="ROUNDING_MODE")&&(h=ne(e[t],0,8,t)),e.hasOwnProperty(t="EXPONENTIAL_AT")&&(re(n=e[t])?(ne(n[0],-K,0,t),ne(n[1],0,K,t),p=n[0],d=n[1]):p=-(d=ne(n,-K,K,t)<0?-n:n)),e.hasOwnProperty(t="RANGE")){if(!(n=e[t]))throw Error(V+t+" cannot be zero: "+n);re(n)?(ne(n[0],-K,-1,t),ne(n[1],1,K,t),m=n[0],g=n[1]):m=-(g=ne(n,-K,K,t)<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(V+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!n,Error(V+"crypto unavailable");v=n}else v=n}if(e.hasOwnProperty(t="STRICT")){if((n=e[t])!==!!n)throw Error(V+t+" not true or false: "+n);y=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w=ne(e[t],0,9,t)),e.hasOwnProperty(t="POW_PRECISION")&&(b=ne(e[t],0,K,t)),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(V+t+" not an object: "+n);for(t in n)n.hasOwnProperty(t)&&x.hasOwnProperty(t)&&(x[t]=n[t])}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(V+t+" invalid: "+n);B=n}}return{DECIMAL_PLACES:f,ROUNDING_MODE:h,EXPONENTIAL_AT:[p,d],RANGE:[m,g],CRYPTO:v,STRICT:y,MODULO_MODE:w,POW_PRECISION:b,FORMAT:x,ALPHABET:B}},A.fromFormat=function(e,t){if("string"!=typeof e)throw Error(V+"Not a string: "+e);if(null==t)t=x;else{if("object"!=typeof t)throw Error(V+"Argument not an object: "+t);t=S(t)}var n,r,i,o,a=t.negativeSign||"-",u=t.positiveSign||"",s=t.prefix||"",l=t.suffix||"",c=t.groupSeparator||"",f=t.decimalSeparator||".",h=t.fractionGroupSeparator||"";if(s&&0===e.indexOf(s)&&(e=e.slice(s.length)),l&&e.lastIndexOf(l)===e.length-l.length&&(e=e.slice(0,-l.length)),a&&0===e.indexOf(a)?(e=e.slice(a.length),r=!0):u&&0===e.indexOf(u)&&(e=e.slice(u.length)),(n=e.indexOf(f))<0){if(c)for(;e.indexOf(c)>-1;)e=e.replace(c,"")}else{if(i=e.slice(0,n),o=e.slice(n+f.length),c)for(;i.indexOf(c)>-1;)i=i.replace(c,"");if(h)for(;o.indexOf(h)>-1;)o=o.replace(h,"");e=i+"."+o}return new A(r?"-"+e:e)},A.isBigNumber=function(e){if(!C(e))return!1;var t,n,r=e.c,i=e.e,o=e.s;if(!re(r))return null===r&&null===i&&(null===o||1===o||-1===o);if(1!==o&&-1!==o||i<-K||i>K||i!==H(i))return!1;if(0===r[0])return 0===i&&1===r.length;if((t=(i+1)%J)<1&&(t+=J),String(r[0]).length!==t)return!1;for(t=0;t<r.length;t++)if((n=r[t])<0||n>=Y||n!==H(n))return!1;return 0!==n},A.maximum=A.max=function(){return I(arguments,-1)},A.minimum=A.min=function(){return I(arguments,1)},A.random=(i=9007199254740992,o=Math.random()*i&2097151?function(){return H(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,u=0,s=[],l=new A(c);if(e=null==e?f:ne(e,0,K),i=z(e/J),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));u<i;)(a=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(s.push(a%1e14),u+=2);u=i/2}else{if(!crypto.randomBytes)throw v=!1,Error(V+"crypto unavailable");for(t=crypto.randomBytes(i*=7);u<i;)(a=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(s.push(a%1e14),u+=7);u=i/7}if(!v)for(;u<i;)(a=o())<9e15&&(s[u++]=a%1e14);for(i=s[--u],e%=J,i&&e&&(a=Z[J-e],s[u]=H(i/a)*a);0===s[u];s.pop(),u--);if(u<0)s=[r=0];else{for(r=-1;0===s[0];s.splice(0,1),r-=J);for(u=1,a=s[0];a>=10;a/=10,u++);u<J&&(r-=J-u)}return l.e=r,l.c=s,l}),A.sum=function(){for(var e=0,t=new A(0);e<arguments.length;)t=t.plus(arguments[e++]);return t},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,a=[0],u=0,s=e.length;u<s;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(u++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,o,a,u){var s,l,c,p,d,m,g,v,y=r.indexOf("."),w=f,x=h;for(y>=0&&(p=b,b=0,r=r.replace(".",""),m=(v=new A(i)).pow(r.length-y),b=p,v.c=t(ae(ee(m.c),m.e,"0"),10,o,e),v.e=v.c.length),c=p=(g=t(r,i,o,u?(s=B,e):(s=e,B))).length;0==g[--p];g.pop());if(!g[0])return s.charAt(0);if(y<0?--c:(m.c=g,m.e=c,m.s=a,g=(m=n(m,v,w,x,o)).c,d=m.r,c=m.e),y=g[l=c+w+1],p=o/2,d=d||l<0||null!=g[l+1],d=x<4?(null!=y||d)&&(0==x||x==(m.s<0?3:2)):y>p||y==p&&(4==x||d||6==x&&1&g[l-1]||x==(m.s<0?8:7)),l<1||!g[0])r=d?ae(s.charAt(1),-w,s.charAt(0)):s.charAt(0);else{if(l<g.length&&(g.length=l),d)for(--o;++g[--l]>o;)g[l]=0,l||(++c,g=[1].concat(g));for(p=g.length;!g[--p];);for(y=0,r="";y<=p;r+=s.charAt(g[y++]));r=ae(r,c,s.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,a,u=0,s=e.length,l=t%X,c=t/X|0;for(e=e.slice();s--;)u=((i=l*(o=e[s]%X)+(r=c*o+(a=e[s]/X|0)*l)%X*X+u)/n|0)+(r/X|0)+c*a,e[s]=i%n;return u&&(e=[u].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,a,u){var s,l,c,f,h,p,d,m,g,v,y,w,b,x,B,F,E,k=r.s==i.s?1:-1,C=r.c,I=i.c;if(!(C&&C[0]&&I&&I[0]))return new A(r.s&&i.s&&(C?!I||C[0]!=I[0]:I)?C&&0==C[0]||!I?0*k:k/0:NaN);for(g=(m=new A(k)).c=[],k=o+(l=r.e-i.e)+1,u||(u=Y,l=Q(r.e/J)-Q(i.e/J),k=k/J|0),c=0;I[c]==(C[c]||0);c++);if(I[c]>(C[c]||0)&&l--,k<0)g.push(1),f=!0;else{for(x=C.length,F=I.length,c=0,k+=2,(h=H(u/(I[0]+1)))>1&&(I=e(I,h,u),C=e(C,h,u),F=I.length,x=C.length),b=F,y=(v=C.slice(0,F)).length;y<F;v[y++]=0);E=I.slice(),E=[0].concat(E),B=I[0],I[1]>=u/2&&B++;do{if(h=0,(s=t(I,v,F,y))<0){if(w=v[0],F!=y&&(w=w*u+(v[1]||0)),(h=H(w/B))>1)for(h>=u&&(h=u-1),d=(p=e(I,h,u)).length,y=v.length;1==t(p,v,d,y);)h--,n(p,F<d?E:I,d,u),d=p.length,s=1;else 0==h&&(s=h=1),d=(p=I.slice()).length;if(d<y&&(p=[0].concat(p)),n(v,p,y,u),y=v.length,-1==s)for(;t(I,v,F,y)<1;)h++,n(v,F<y?E:I,y,u),y=v.length}else 0===s&&(h++,v=[0]);g[c++]=h,v[0]?v[y++]=C[b]||0:(v=[C[b]],y=1)}while((b++<x||null!=v[0])&&k--);f=null!=v[0],g[0]||g.splice(0,1)}if(u==Y){for(c=1,k=g[0];k>=10;k/=10,c++);O(m,o+(m.e=c+l*J-1)+1,a,f)}else m.e=l,m.r=+f;return m}}(),l.absoluteValue=l.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},l.comparedTo=function(e,t){return te(this,new A(e,t))},l.decimalPlaces=l.dp=function(e,t){var n,r,i,o=this;if(null!=e)return O(new A(o),ne(e,-K,K)+o.e+1,null==t?h:ne(t,0,8));if(!(n=o.c))return null;if(r=((i=n.length-1)-Q(this.e/J))*J,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},l.dividedBy=l.div=function(e,t){return n(this,new A(e,t),f,h)},l.dividedToIntegerBy=l.idiv=function(e,t){return n(this,new A(e,t),0,1)},l.exponentiatedBy=l.pow=function(e,t){var n,r,i,o,a,u,s,l,f=this;if((e=new A(e)).c&&!e.isInteger())throw Error(V+"Exponent not an integer: "+R(e));if(null!=t&&(t=new A(t)),a=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return l=new A(Math.pow(+R(f),a?e.s*(2-ie(e)):+R(e))),t?l.mod(t):l;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(r=!u&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||a&&f.c[1]>=24e7:f.c[0]<8e13||a&&f.c[0]<=9999975e7)))return o=f.s<0&&ie(e)?-0:0,f.e>-1&&(o=1/o),new A(u?1/o:o);b&&(o=z(b/J+2))}for(a?(n=new A(.5),u&&(e.s=1),s=ie(e)):s=(i=Math.abs(+R(e)))%2,l=new A(c);;){if(s){if(!(l=l.times(f)).c)break;o?l.c.length>o&&(l.c.length=o):r&&(l=l.mod(t))}if(i){if(0===(i=H(i/2)))break;s=i%2}else if(O(e=e.times(n),e.e+1,1),e.e>14)s=ie(e);else{if(0===(i=+R(e)))break;s=i%2}f=f.times(f),o?f.c&&f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}return r?l:(u&&(l=c.div(l)),t?l.mod(t):o?O(l,b,h,void 0):l)},l.integerValue=function(e){var t=new A(this);return O(t,t.e+1,null==e?h:ne(e,0,8))},l.isEqualTo=l.eq=function(e,t){return 0===te(this,new A(e,t))},l.isFinite=function(){return!!this.c},l.isGreaterThan=l.gt=function(e,t){return te(this,new A(e,t))>0},l.isGreaterThanOrEqualTo=l.gte=function(e,t){return 1===(t=te(this,new A(e,t)))||0===t},l.isInteger=function(){return!!this.c&&Q(this.e/J)>this.c.length-2},l.isLessThan=l.lt=function(e,t){return te(this,new A(e,t))<0},l.isLessThanOrEqualTo=l.lte=function(e,t){return-1===(t=te(this,new A(e,t)))||0===t},l.isNaN=function(){return!this.s},l.isNegative=function(){return this.s<0},l.isPositive=function(){return this.s>0},l.isZero=function(){return!!this.c&&0==this.c[0]},l.minus=function(e,t){var n,r,i,o,a=this,u=a.s;if(t=(e=new A(e,t)).s,!u||!t)return new A(NaN);if(u!=t)return e.s=-t,a.plus(e);var s=a.e/J,l=e.e/J,c=a.c,f=e.c;if(!s||!l){if(!c||!f)return c?(e.s=-t,e):new A(f?a:NaN);if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new A(c[0]?a:3==h?-0:0)}if(s=Q(s),l=Q(l),c=c.slice(),u=s-l){for((o=u<0)?(u=-u,i=c):(l=s,i=f),i.reverse(),t=u;t--;i.push(0));i.reverse()}else for(r=(o=(u=c.length)<(t=f.length))?u:t,u=t=0;t<r;t++)if(c[t]!=f[t]){o=c[t]<f[t];break}if(o&&(i=c,c=f,f=i,e.s=-e.s),(t=(r=f.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=Y-1;r>u;){if(c[--r]<f[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=Y}c[r]-=f[r]}for(;0==c[0];c.splice(0,1),--l);return c[0]?T(e,c,l):(e.s=3==h?-1:1,e.c=[e.e=0],e)},l.modulo=l.mod=function(e,t){var r,i,o=this;return e=new A(e,t),!o.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||o.c&&!o.c[0]?new A(o):(9==w?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,w),(e=o.minus(r.times(e))).c[0]||1!=w||(e.s=o.s),e)},l.multipliedBy=l.times=function(e,t){var n,r,i,o,a,u,s,l,c,f,h,p,d,m,g,v=this,y=v.c,w=(e=new A(e,t)).c;if(!(y&&w&&y[0]&&w[0]))return!v.s||!e.s||y&&!y[0]&&!w||w&&!w[0]&&!y?e.c=e.e=e.s=null:(e.s*=v.s,y&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=Q(v.e/J)+Q(e.e/J),e.s*=v.s,(s=y.length)<(f=w.length)&&(d=y,y=w,w=d,i=s,s=f,f=i),i=s+f,d=[];i--;d.push(0));for(m=Y,g=X,i=f;--i>=0;){for(n=0,h=w[i]%g,p=w[i]/g|0,o=i+(a=s);o>i;)n=((l=h*(l=y[--a]%g)+(u=p*l+(c=y[a]/g|0)*h)%g*g+d[o]+n)/m|0)+(u/g|0)+p*c,d[o--]=l%m;d[o]=n}return n?++r:d.splice(0,1),T(e,d,r)},l.negated=function(){var e=new A(this);return e.s=-e.s||null,e},l.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new A(e,t)).s,!i||!t)return new A(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/J,a=e.e/J,u=r.c,s=e.c;if(!o||!a){if(!u||!s)return new A(i/0);if(!u[0]||!s[0])return s[0]?e:new A(u[0]?r:0*i)}if(o=Q(o),a=Q(a),u=u.slice(),i=o-a){for(i>0?(a=o,n=s):(i=-i,n=u),n.reverse();i--;n.push(0));n.reverse()}for((i=u.length)-(t=s.length)<0&&(n=s,s=u,u=n,t=i),i=0;t;)i=(u[--t]=u[t]+s[t]+i)/Y|0,u[t]=Y===u[t]?0:u[t]%Y;return i&&(u=[i].concat(u),++a),T(e,u,a)},l.precision=l.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return O(new A(o),ne(e,1,K),null==t?h:ne(t,0,8));if(!(n=o.c))return null;if(r=(i=n.length-1)*J+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},l.shiftedBy=function(e){return this.times("1e"+ne(e,-q,q))},l.squareRoot=l.sqrt=function(){var e,t,r,i,o,a=this,u=a.c,s=a.s,l=a.e,c=f+4,p=new A("0.5");if(1!==s||!u||!u[0])return new A(!s||s<0&&(!u||u[0])?NaN:u?a:1/0);if(0==(s=Math.sqrt(+R(a)))||s==1/0?(((t=ee(u)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=Q((l+1)/2)-(l<0||l%2),r=new A(t=s==1/0?"5e"+l:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new A(s+""),r.c[0])for((s=(l=r.e)+c)<3&&(s=0);;)if(o=r,r=p.times(o.plus(n(a,o,c,1))),ee(o.c).slice(0,s)===(t=ee(r.c)).slice(0,s)){if(r.e<l&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(O(r,r.e+f+2,1),e=!r.times(r).eq(a));break}if(!i&&(O(o,o.e+f+2,0),o.times(o).eq(a))){r=o;break}c+=4,s+=4,i=1}return O(r,r.e+f+1,h,e)},"function"==typeof BigInt&&(l.toBigInt=function(e){var t=this;return t.c?BigInt(k(t,t.e+1,e)):null}),l.toExponential=function(e,t){return k(this,null==e?e:ne(e,0,K)+1,t,1)},l.toFixed=function(e,t){return k(this,null==e?e:ne(e,-K,K)+this.e+1,t)},l.toFormat=function(e,t,n){var r,i,o,a,u=this;if(null==n)n=x,null!=e&&(null!=t?"object"==typeof t&&(n=S(t),t=null):"object"!=typeof e||re(e)||(n=S(e),e=t=null));else{if("object"!=typeof n)throw Error(V+"Argument not an object: "+n);n=S(n)}if(null!=e)if(re(e)&&e.length<=2){if(i=e[0],o=e[1],e=u.dp(),null!=o&&e>ne(o,0,K)&&(e=o),null!=i&&0!==ne(i,0,K)){if(null!=o&&i>o)throw Error(V+"Minimum must not exceed maximum");e<i&&(e=i)}}else ne(e,-K,K);if((r=45===(a=u.toFixed(e,t)).charCodeAt(0))&&(a=a.slice(1)),u.c){var s,l=a.split("."),c=+n.groupSize,f=+n.secondaryGroupSize,h=n.groupSeparator||"",p=l[0],d=l[1],m=p.length;if(f&&(s=c,c=f,f=s,m-=s),c>0&&m>0){for(s=m%c||c,a=p.substr(0,s);s<m;s+=c)a+=h+p.substr(s,c);f>0&&(a+=h+p.slice(s))}else a=p;d&&((s=+n.fractionGroupSize)&&(d=d.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(n.fractionGroupSeparator||""))),a+=(n.decimalSeparator||"")+d)}return(n.prefix||"")+(r?n.negativeSign||"":u.s>0&&n.positiveSign||"")+a+(n.suffix||"")},l.toFraction=function(e){var t,r,i,o,a,u,s,l,f,h,p,d,m,v,y=this,w=y.c;if(null!=e&&(!(s=new A(e)).isInteger()&&(s.c||1!==s.s)||s.lt(c)))throw Error(V+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+R(s));if(!w)return[new A(y.s||0),new A(0)];for(t=new A(c),f=r=new A(c),i=l=new A(c),d=ee(w),a=t.e=d.length-y.e-1,t.c[0]=Z[(u=a%J)<0?J+u:u],e=!e||s.comparedTo(t)>0?a>0?t:f:s,u=g,g=1/0,v=s=new A(d),m=t,l.c[0]=0;h=n(s,t,0,1),1!=(o=r.plus(h.times(i))).comparedTo(e);)r=i,i=o,f=l.plus(h.times(o=f)),l=o,t=s.minus(h.times(o=t)),s=o;return o=n(e.minus(r),i,0,1),l=l.plus(o.times(f)),r=r.plus(o.times(i)),(p=f.times(m).minus(v.times(i)).abs().times(r).comparedTo(l.times(m).minus(v.times(r)).abs().times(i))<1?[f,i]:[l,r])[0].s=y.s,g=u,p},l.toNumber=function(){return+R(this)},l.toObject=function(){var e=this;return{c:e.c?e.c.slice():null,e:e.e,s:e.s}},l.toPrecision=function(e,t){return k(this,null==e?e:ne(e,1,K),t,2)},l.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=p||o>=d?oe(ee(n.c),o):ae(ee(n.c),o,"0"):(ne(e,2,B.length,"Base"),t=r(ae(ee(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},l.valueOf=l.toJSON=function(){return R(this)},l._isBigNumber=!0,null!=t&&A.set(t),A}(),W=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,z=Math.ceil,H=Math.floor,V="[BigNumber Error] ",Y=1e14,J=14,q=9007199254740991,Z=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],X=1e7,K=1e9;function Q(e){var t=0|e;return e>0||e===t?t:t-1}function ee(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=J-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function te(e,t){var n,r,i=e.c,o=t.c,a=e.s,u=t.s,s=e.e,l=t.e;if(!a||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:a;if(a!=u)return a;if(n=a<0,r=s==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>l^n?1:-1;for(u=(s=i.length)<(l=o.length)?s:l,a=0;a<u;a++)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return s==l?0:s>l^n?1:-1}function ne(e,t,n,r){if(e<t||e>n||e!==H(e))throw Error(V+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e));return e}function re(e){return"[object Array]"=={}.toString.call(e)}function ie(e){var t=e.c.length-1;return Q(e.e/J)==t&&e.c[t]%2!=0}function oe(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ae(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}const ue=G;var se=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;a(this,e),this.bytes=t,this.length=this.bytes.length,this.position=n,this.bitPos=r}return c(e,[{key:"clone",value:function(){return new e(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var t=null!==e?this.position+e:this.length,n=this.bytes.slice(this.position,t);return this.position=t,this.bitPos=0,n}}},{key:"readString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===e&&(e=this.length-this.position);for(var t="",n=this.position;n<this.position+e;n++){var r=this.bytes[n];if(0===r)break;t+=String.fromCharCode(r)}return this.position+=e,this.bitPos=0,t}}},{key:"readInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var n=0;if("be"===t)for(var r=this.position;r<this.position+e;r++)n<<=8,n|=this.bytes[r];else for(var i=this.position+e-1;i>=this.position;i--)n<<=8,n|=this.bytes[i];return this.position+=e,this.bitPos=0,n}}},{key:"readBits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var n,r=0,i=0;for(r=this.bytes[this.position++]&(n=this.bitPos,"be"===t?(1<<8-n)-1:256-(1<<n)),"be"!==t&&(r>>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;i<e;)"be"===t?r=r<<i|this.bytes[this.position++]:r|=this.bytes[this.position++]<<i,i+=8;if(i>e){var o=i-e;"be"===t?r>>>=o:r&=(1<<e)-1,i-=o,this.position--,this.bitPos=8-o}return r}}},{key:"continueUntil",value:function(e){if(!(this.position>this.length))if(this.bitPos=0,"number"!=typeof e){var t=e.length,n=e[t-1];this.position=t;for(var r,i=function(e,t){var n=new Array;return e.forEach(function(e,r){n[e]=t-r}),n}(e,t);this.position<this.length;){for(;this.position<this.length&&this.bytes[this.position++]!==n;);r=!0;for(var o=t-1;o>=0;o--)if(this.bytes[this.position-t+o]!==e[o]){r=!1,this.position+=i[e[o]];break}if(r){this.position-=t;break}}}else for(;++this.position<this.length&&this.bytes[this.position]!==e;);}},{key:"consumeWhile",value:function(e){for(;this.position<this.length&&this.bytes[this.position]===e;)this.position++;this.bitPos=0}},{key:"consumeIf",value:function(e){this.bytes[this.position]===e&&(this.position++,this.bitPos=0)}},{key:"moveForwardsBy",value:function(e){var t=this.position+e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsBy",value:function(e){var t=this.position-e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(e){if(e<=this.bitPos)this.bitPos-=e;else for(this.bitPos>0&&(e-=this.bitPos,this.bitPos=0);e>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(e),e-=8}},{key:"moveTo",value:function(e){if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"hasMore",value:function(){return this.position<this.length}},{key:"carve",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&t++,this.bytes.slice(e,t)}}])}();function le(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var fe={Images:[{name:"Joint Photographic Experts Group image",extension:"jpg,jpeg,jpe,thm,mpo",mime:"image/jpeg",description:"",signature:{0:255,1:216,2:255,3:[192,196,219,221,224,225,226,227,228,229,231,232,234,235,236,237,238,254]},extractor:function(e,t){for(var n=new se(e.slice(t));n.hasMore();){var r=n.getBytes(2);if(255!==r[0])throw new Error(`Invalid marker while parsing JPEG at pos ${n.position}: ${r}`);var i=0;switch(r[1]){case 216:case 1:break;case 217:return n.carve();case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 219:case 222:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=n.readInt(2,"be"),n.position+=i-2;break;case 223:n.position++;break;case 220:case 221:n.position+=2;break;case 218:i=n.readInt(2,"be"),n.position+=i-2,n.continueUntil(255);break;default:n.continueUntil(255)}}throw new Error("Unable to parse JPEG successfully")}},{name:"Graphics Interchange Format image",extension:"gif",mime:"image/gif",description:"",signature:{0:71,1:73,2:70,3:56,4:[55,57],5:97},extractor:function(e,t){var n=new se(e.slice(t));for(n.continueUntil([33,255]),n.continueUntil([33,249]),n.moveForwardsBy(2);n.hasMore();){for(n.moveForwardsBy(n.readInt(1)+1),n.moveForwardsBy(11);!Array.from(n.getBytes(2)).equals([33,249])&&(n.moveBackwardsBy(2),n.moveForwardsBy(n.readInt(1)),n.readInt(1));)n.moveBackwardsBy(1);if(59===n.readInt(1))break;n.moveForwardsBy(1)}return n.carve()}},{name:"Portable Network Graphics image",extension:"png",mime:"image/png",description:"",signature:{0:137,1:80,2:78,3:71,4:13,5:10,6:26,7:10},extractor:function(e,t){var n=new se(e.slice(t));n.moveForwardsBy(8);for(var r=0,i="";"IEND"!==i;)r=n.readInt(4,"be"),i=n.readString(4),n.moveForwardsBy(r+4);return n.carve()}},{name:"WEBP Image",extension:"webp",mime:"image/webp",description:"",signature:{8:87,9:69,10:66,11:80},extractor:function(e,t){var n=new se(e.slice(t));n.moveForwardsBy(4);var r=n.readInt(4,"le");return n.moveForwardsBy(r),n.carve()}},{name:"High Efficiency Image File Format",extension:"heic,heif",mime:"image/heif",description:"",signature:{0:0,1:0,2:0,3:[36,24],4:102,5:116,6:121,7:112,8:104,9:101,10:105,11:99},extractor:null},{name:"Camera Image File Format",extension:"crw",mime:"image/x-canon-crw",description:"",signature:{6:72,7:69,8:65,9:80,10:67,11:67,12:68,13:82},extractor:null},{name:"Canon CR2 raw image",extension:"cr2",mime:"image/x-canon-cr2",description:"",signature:[{0:73,1:73,2:42,3:0,8:67,9:82},{0:77,1:77,2:0,3:42,8:67,9:82}],extractor:null},{name:"Tagged Image File Format image",extension:"tif",mime:"image/tiff",description:"",signature:[{0:73,1:73,2:42,3:0},{0:77,1:77,2:0,3:42}],extractor:null},{name:"Bitmap image",extension:"bmp",mime:"image/bmp",description:"",signature:{0:66,1:77,7:0,9:0,14:[12,40,56,64,108,124],15:0,16:0,17:0},extractor:function(e,t){var n=new se(e.slice(t));n.moveForwardsBy(2);var r=n.readInt(4,"le");return n.moveForwardsBy(r-6),n.carve()}},{name:"JPEG Extended Range image",extension:"jxr",mime:"image/vnd.ms-photo",description:"",signature:{0:73,1:73,2:188},extractor:null},{name:"Photoshop image",extension:"psd",mime:"image/vnd.adobe.photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:1,6:0,7:0,8:0,9:0,10:0,11:0},extractor:null},{name:"Photoshop Large Document",extension:"psb",mime:"application/x-photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:2,6:0,7:0,8:0,9:0,10:0,11:0,12:0},extractor:null},{name:"Paint Shop Pro image",extension:"psp",mime:"image/psp",description:"",signature:[{0:80,1:97,2:105,3:110,4:116,5:32,6:83,7:104,8:111,9:112,10:32,11:80,12:114,13:111,14:32,15:73,16:109},{0:126,1:66,2:75,3:0}],extractor:null},{name:"The GIMP image",extension:"xcf",mime:"image/x-xcf",description:"",signature:{0:103,1:105,2:109,3:112,4:32,5:120,6:99,7:102,8:32,9:[102,118],10:[105,48],11:[108,48],12:[101,49,50,51]},extractor:null},{name:"Icon image",extension:"ico",mime:"image/x-icon",description:"",signature:{0:0,1:0,2:1,3:0,4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],5:0,6:[16,32,48,64,128],7:[16,32,48,64,128],9:0,10:[0,1]},extractor:function(e,t){var n=new se(e.slice(t));n.moveTo(4);var r=n.readInt(2,"le");n.moveForwardsBy(8+16*(r-1));var i=n.readInt(4,"le"),o=n.readInt(4,"le");return n.moveTo(o+i),n.carve()}},{name:"Radiance High Dynamic Range image",extension:"hdr",mime:"image/vnd.radiance",description:"",signature:{0:35,1:63,2:82,3:65,4:68,5:73,6:65,7:78,8:67,9:69,10:10},extractor:null},{name:"Sony ARW image",extension:"arw",mime:"image/x-raw",description:"",signature:{0:5,1:0,2:0,3:0,4:65,5:87,6:49,7:46},extractor:null},{name:"Fujifilm Raw Image",extension:"raf",mime:"image/x-raw",description:"",signature:{0:70,1:85,2:74,3:73,4:70,5:73,6:76,7:77,8:67,9:67,10:68,11:45,12:82,13:65,14:87},extractor:null},{name:"Minolta RAW image",extension:"mrw",mime:"image/x-raw",description:"",signature:{0:0,1:77,2:82,3:77},extractor:null},{name:"Adobe Bridge Thumbnail Cache",extension:"bct",mime:"application/octet-stream",description:"",signature:{0:108,1:110,2:98,3:116,4:2,5:0,6:0,7:0},extractor:null},{name:"Microsoft Document Imaging",extension:"mdi",mime:"image/vnd.ms-modi",description:"",signature:{0:69,1:80,2:42,3:0},extractor:null},{name:"Joint Photographic Experts Group image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:47,1:57,2:106,3:47,4:52},extractor:null},{name:"Portable Network Graphics image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:105,1:86,2:66,3:79,4:82,5:119,6:48},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,123d",mime:"application/acad",description:"",signature:{0:65,1:67,2:49,3:48,4:[48,49],5:[48,49,50,51,52,53],6:0},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,dwt",mime:"application/acad",description:"",signature:[{0:65,1:67,2:49,3:48,4:49,5:56,6:0},{0:65,1:67,2:49,3:48,4:50,5:52,6:0},{0:65,1:67,2:49,3:48,4:50,5:55,6:0}],extractor:null},{name:"Targa Image",extension:"tga",mime:"image/x-targa",description:"",signature:[{0:84,1:82,2:85,3:69,4:86,5:73,6:83,7:73,8:79,9:78,10:45,11:88,12:70,13:73,14:76,15:69,16:46}],extractor:function(e,t){var n=new se(e);n.moveTo(t-8);var r=n.readInt(4,"le"),i=n.readInt(4,"le");function o(e,t){for(var r=0;r<e;r++){n.moveBackwardsBy(1);var i=n.readInt(t,"le")-1;if(n.moveBackwardsBy(t),i===r)break}}return n.moveBackwardsBy(8),r||i?r?(o(65535,2),n.moveBackwardsBy(r)):i&&(o(4294967295,4),n.moveBackwardsBy(6),n.moveBackwardsBy(i)):(function(){n.moveBackwardsBy(5);for(var e=0;e<1048576&&n.readInt(2,"le")*n.readInt(2,"le")*n.readInt(1)/8!=e-1;e++)n.moveBackwardsBy(6)}(),n.moveBackwardsBy(17)),n.carve(n.position,t+18)}}],Video:[{name:"Matroska Multimedia Container",extension:"mkv",mime:"video/x-matroska",description:"",signature:{31:109,32:97,33:116,34:114,35:111,36:115,37:107,38:97},extractor:null},{name:"WEBM video",extension:"webm",mime:"video/webm",description:"",signature:{0:26,1:69,2:223,3:163},extractor:null},{name:"Flash MP4 video",extension:"f4v",mime:"video/mp4",description:"",signature:{4:102,5:116,6:121,7:112,8:[102,70],9:52,10:[118,86],11:32},extractor:null},{name:"MPEG-4 video",extension:"mp4",mime:"video/mp4",description:"",signature:[{0:0,1:0,2:0,3:[24,32],4:102,5:116,6:121,7:112},{0:51,1:103,2:112,3:53},{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:109,9:112,10:52,11:50,16:109,17:112,18:52,19:49,20:109,21:112,22:52,23:50,24:105,25:115,26:111,27:109}],extractor:null},{name:"M4V video",extension:"m4v",mime:"video/x-m4v",description:"",signature:{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:77,9:52,10:86},extractor:null},{name:"Quicktime video",extension:"mov",mime:"video/quicktime",description:"",signature:{0:0,1:0,2:0,3:20,4:102,5:116,6:121,7:112},extractor:null},{name:"Audio Video Interleave",extension:"avi",mime:"video/x-msvideo",description:"",signature:{0:82,1:73,2:70,3:70,8:65,9:86,10:73},extractor:null},{name:"Windows Media Video",extension:"wmv",mime:"video/x-ms-wmv",description:"",signature:{0:48,1:38,2:178,3:117,4:142,5:102,6:207,7:17,8:166,9:217},extractor:null},{name:"MPEG video",extension:"mpg",mime:"video/mpeg",description:"",signature:{0:0,1:0,2:1,3:186},extractor:null},{name:"Flash Video",extension:"flv",mime:"video/x-flv",description:"",signature:{0:70,1:76,2:86,3:1},extractor:function(e,t){var n=new se(e.slice(t));n.moveForwardsBy(5);var r=n.readInt(4,"be");n.moveForwardsBy(r-9);for(var i=-11;n.hasMore();){var o=n.readInt(4,"be"),a=n.readInt(1);if([8,9,18].indexOf(a)<0){n.moveBackwardsBy(1);break}if(o!==i+11){n.moveBackwardsBy(i+11+5);break}i=n.readInt(3,"be"),n.moveForwardsBy(7+i)}return n.carve()}},{name:"OGG Video",extension:"ogv,ogm,opus,ogx",mime:"video/ogg",description:"",signature:[{0:79,1:103,2:103,3:83,4:0,5:2,28:1,29:118,30:105,31:100,32:101,33:111},{0:79,1:103,2:103,3:83,4:0,5:2,28:128,29:116,30:104,31:101,32:111,33:114,34:97},{0:79,1:103,2:103,3:83,4:0,5:2,28:102,29:105,30:115,31:104,32:101,33:97,34:100}],extractor:null}],Audio:[{name:"Waveform Audio",extension:"wav",mime:"audio/x-wav",description:"",signature:{0:82,1:73,2:70,3:70,8:87,9:65,10:86,11:69},extractor:function(e,t){var n=new se(e.slice(t));return n.moveTo(4),n.moveTo(n.readInt(4,"le")+8),n.carve()}},{name:"OGG audio",extension:"ogg",mime:"audio/ogg",description:"",signature:{0:79,1:103,2:103,3:83},extractor:null},{name:"Musical Instrument Digital Interface audio",extension:"midi",mime:"audio/midi",description:"",signature:{0:77,1:84,2:104,3:100},extractor:null},{name:"MPEG-3 audio",extension:"mp3",mime:"audio/mpeg",description:"",signature:[{0:73,1:68,2:51},{0:255,1:251}],extractor:function(e,t){var n=new se(e.slice(t)),r=["free",32e3,4e4,48e3,56e3,64e3,8e4,96e3,112e3,128e3,16e4,192e3,224e3,256e3,32e4,"bad"],i=[44100,48e3,32e3,"reserved"];if(n.getBytes(3).toString()===[73,68,51].toString()){n.moveTo(6);var o=n.readInt(1)<<21|n.readInt(1)<<14|n.readInt(1)<<7|n.readInt(1);n.moveForwardsBy(o)}else n.moveTo(0);for(;n.hasMore();){if(n.getBytes(3)===[84,65,71].toString()){n.moveForwardsBy(125);break}if(n.getBytes(2).toString()!==[255,251].toString()){n.moveBackwardsBy(2);break}var a=n.readInt(1),u=r[a>>4],s=i[(15&a)>>2],l=(2&a)>>1;if("free"===u||"bad"===u||"reserved"===s){n.moveBackwardsBy(1);break}var c=Math.floor(144*u/s+l);if(n.position+c>n.length){n.moveTo(n.length);break}n.moveForwardsBy(c-3)}return n.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(e,t){var n=new se(e.slice(t));return n.continueUntil([37,37,69,79,70]),n.moveForwardsBy(5),n.consumeIf(13),n.consumeIf(10),n.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(e,t){var n=new se(e.slice(t)),r=0;if(123!==n.readInt(1))throw new Error("Not a valid RTF file");for(r++;r>0&&n.hasMore();)switch(n.readInt(1)){case 123:r++;break;case 125:r--;break;case 92:n.consumeIf(92),n.position++}return n.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:he},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:he}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(e,t){var n=new se(e.slice(t));n.moveTo(60);var r=n.readInt(4,"le");n.moveTo(r),n.moveForwardsBy(6);var i=n.readInt(2,"le");n.moveForwardsBy(16);var o=523===n.readInt(2,"le")?112:96;n.moveForwardsBy(o-2),n.moveForwardsBy(32);var a=n.readInt(4,"le"),u=n.readInt(4,"le");if(a>0)return n.moveTo(a+u),n.carve();n.moveForwardsBy(88),n.moveForwardsBy(40*(i-1)),n.moveForwardsBy(16);var s=n.readInt(4,"le"),l=n.readInt(4,"le");return n.moveTo(l+s),n.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(e,t){var n=new se(e.slice(t));n.moveForwardsBy(4);var r=1===n.readInt(1),i=1===n.readInt(1)?"le":"be";n.moveForwardsBy(r?26:34);var o=r?n.readInt(4,i):n.readInt(8,i);n.moveForwardsBy(10);var a=n.readInt(2,i),u=n.readInt(2,i);return n.moveTo(o),n.moveForwardsBy(a*u),n.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:pe},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:pe},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:he},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(e,t){for(var n=new se(e.slice(t)),r=function(){if(n.moveForwardsBy(257),n.getBytes(5).join("")!==[117,115,116,97,114].join(""))return n.moveBackwardsBy(262),1;n.moveBackwardsBy(138);var e=0;n.getBytes(11).forEach(function(t,n){e+=(t-48).toString()}),e=512*Math.ceil(parseInt(e,8)/512),n.moveForwardsBy(e+377)};n.hasMore()&&!r(););return n.consumeWhile(0),n.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(e,t){var n=new se(e.slice(t));n.moveForwardsBy(3);var r=n.readInt(1);if(n.moveForwardsBy(4),n.readInt(1),n.moveForwardsBy(1),4&r){var i=n.readInt(2,"le");n.moveForwardsby(i)}return 8&r&&(n.continueUntil(0),n.moveForwardsBy(1)),16&r&&(n.continueUntil(0),n.moveForwardsBy(1)),2&r&&n.moveForwardsBy(2),we(n),n.moveForwardsBy(8),n.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(e,t){for(var n=new se(e.slice(t)),r=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i<r.length&&(n.continueUntil(r[i]),n.getBytes(5).join("")!==r[i].join(""));i++)n.moveTo(0);return n.moveForwardsBy(4),n.carve()}},{name:"7zip",extension:"7z",mime:"application/x-7z-compressed",description:"",signature:{0:55,1:122,2:188,3:175,4:39,5:28},extractor:null},{name:"Zlib Deflate",extension:"zlib",mime:"application/x-deflate",description:"",signature:{0:120,1:[1,156,218,94]},extractor:function(e,t){var n=new se(e.slice(t));return n.moveForwardsBy(1),32&n.readInt(1)&&n.moveForwardsBy(4),we(n),n.moveForwardsBy(4),n.carve()}},{name:"xz compression",extension:"xz",mime:"application/x-xz",description:"",signature:{0:253,1:55,2:122,3:88,4:90,5:0},extractor:function(e,t){var n=new se(e.slice(t));return n.continueUntil([0,0,0,0,4,89,90]),n.moveForwardsBy(7),n.carve()}},{name:"Tarball",extension:"tar.z",mime:"application/x-gtar",description:"",signature:{0:31,1:[157,160]},extractor:null},{name:"ISO disk image",extension:"iso",mime:"application/octet-stream",description:"ISO 9660 CD/DVD image file",signature:[{32769:67,32770:68,32771:48,32772:48,32773:49},{34817:67,34818:68,34819:48,34820:48,34821:49},{36865:67,36866:68,36867:48,36868:48,36869:49}],extractor:null},{name:"Virtual Machine Disk",extension:"vmdk",mime:"application/vmdk,application/x-virtualbox-vmdk",description:"",signature:{0:75,1:68,2:77,3:86,5:0,6:0,7:0},extractor:null},{name:"Virtual Hard Drive",extension:"vhd",mime:"application/x-vhd",description:"",signature:{0:99,1:111,2:110,3:101,4:99,5:116,6:105,7:120},extractor:null},{name:"Macintosh disk image",extension:"dmf,dmg",mime:"application/octet-stream",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96,7:96},extractor:null},{name:"ARJ Archive",extension:"arj",mime:"application/x-arj-compressed",description:"",signature:{0:96,1:234,8:[0,16,20],9:0,10:2},extractor:null},{name:"WinAce Archive",extension:"ace",mime:"application/x-ace-compressed",description:"",signature:{7:42,8:42,9:65,10:67,11:69,12:42,13:42},extractor:null},{name:"Macintosh BinHex Encoded File",extension:"hqx",mime:"application/mac-binhex",description:"",signature:{11:109,12:117,13:115,14:116,15:32,16:98,17:101,18:32,19:99,20:111,21:110,22:118,23:101,24:114,25:116,26:101,27:100,28:32,29:119,30:105,31:116,32:104,33:32,34:66,35:105,36:110,37:72,38:101,39:120},extractor:null},{name:"ALZip Archive",extension:"alz",mime:"application/octet-stream",description:"",signature:{0:65,1:76,2:90,3:1,4:10,5:0,6:0,7:0},extractor:null},{name:"KGB Compressed Archive",extension:"kgb",mime:"application/x-kgb-compressed",description:"",signature:{0:75,1:71,2:66,3:95,4:97,5:114,6:99,7:104,8:32,9:45},extractor:null},{name:"Microsoft Cabinet",extension:"cab",mime:"vnd.ms-cab-compressed",description:"",signature:{0:77,1:83,2:67,3:70,4:0,5:0,6:0,7:0},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:95,1:39,2:168,3:137},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:80,1:75,2:3,3:4,4:20,5:0,6:8,7:0,8:8,9:0},extractor:he},{name:"lzop compressed",extension:"lzop,lzo",mime:"application/x-lzop",description:"",signature:{0:137,1:76,2:90,3:79,4:0,5:13,6:10,7:26},extractor:function(e,t){var n=new se(e.slice(t)),r=0,i=0;n.moveForwardsBy(9);var o=n.readInt(2,"be");n.moveForwardsBy(6);var a=n.readInt(4,"be");2048&o&&n.moveForwardsBy(4),2&a&&r++,512&a&&r++,1&a&&i++,256&a&&i++,n.moveForwardsBy(8),o>=2368&&n.moveForwardsBy(4);var u=n.readInt(1,"be");if(n.moveForwardsBy(u),64&a){var s=n.readInt(4,"be");n.moveForwardsBy(s)}for(n.moveForwardsBy(4);n.hasMore();){var l=n.readInt(4,"be");if(0===l)break;var c=n.readInt(4,"be"),f=l===c?i:i+r;n.moveForwardsBy(c+4*f)}return n.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(e,t){var n=new se(e.slice(t));for(n.moveForwardsBy(8);n.hasMore();){n.moveForwardsBy(48);var r,i="",o=le(n.getBytes(10));try{for(o.s();!(r=o.n()).done;){var a=r.value;i+=String.fromCharCode(a)}}catch(e){o.e(e)}finally{o.f()}i=parseInt(i.trim(),10),n.moveForwardsBy(2),n.moveForwardsBy(i)}return n.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(e,t){var n=new se(e.slice(t));n.moveTo(16);var r=n.readInt(2);n.moveTo(28);var i=n.readInt(4);return n.moveTo(r*i),n.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(e,t){var n=new se(e.slice(t));n.moveTo(20);var r=n.readInt(4,"le");n.moveTo(r);var i=n.readInt(4,"le");return n.moveForwardsBy(i-4),n.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(e,t){var n=new se(e.slice(t));n.moveTo(40);var r=n.readInt(4,"le")-44;for(n.moveForwardsBy(r);n.hasMore()&&n.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)n.moveForwardsBy(65529);return n.consumeWhile(0),n.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(e,t){var n=new se(e.slice(t));return n.moveTo(112),n.moveTo(4096*(n.readInt(4,"le")+1)),n.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(e,t){var n=new se(e.slice(t));return n.moveTo(12),n.moveTo(n.readInt(4,"be")),n.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(e,t){var n=new se(e.slice(t));return n.moveTo(n.readInt(4,"be")),n.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(e,t){var n=new se(e.slice(t)),r=0;for(n.continueUntil([60,112,108,105,115,116]),n.moveForwardsBy(6),r++;r>0&&n.hasMore();)60===n.readInt(1)&&(n.getBytes(5).join("")===[112,108,105,115,116].join("")?r++:n.moveBackwardsBy(5),n.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?r--:n.moveBackwardsBy(7));return n.consumeIf(10),n.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(e,t){var n=new se(e.slice(t));return n.moveTo(20),n.moveForwardsBy(n.readInt(4)),n.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(e){return e>=1&&e<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(e){return e>=1&&e<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(e){return 0!==e},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(e,t){var n=new se(e.slice(t));return n.moveTo(52),n.moveTo(n.readInt(4,"le")),n.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function he(e,t){var n=new se(e.slice(t));n.continueUntil([80,75,5,6]),n.moveForwardsBy(20);var r=n.readInt(2,"le");return n.moveForwardsBy(r),n.carve()}function pe(e,t){var n="207250237254",r=new se(e.slice(t)),i=r.getBytes(4).join("");return r.moveTo(function(e,t,n){var r=28;t&&(r+=4),e.moveTo(16);var i=e.readInt(4,n);return function(e,t,n,r){for(var i=0,o=0;o<r;o++){e.moveTo(t);var a=e.readInt(4,n);25===a?(e.moveTo(t+48),i+=e.readInt(8,n),e.moveTo(t+4),t+=e.readInt(4,n)):1===a&&(e.moveTo(t+36),i+=e.readInt(4,n),e.moveTo(t+4),t+=e.readInt(4,n))}return i}(e,r,n,i)}(r,function(e){return e===n||"254237250207"===e}(i),function(e){return"206250237254"===e||e===n}(i)?"le":"be")),r.carve()}for(var de=new Array(288),me=0;me<de.length;me++)de[me]=me<=143?8:me<=255?9:me<=279?7:8;var ge=Ae(de),ve=Ae(new Array(30).fill(5)),ye=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function we(e){for(var t=0;!t;){t=e.readBits(1,"le");var n=e.readBits(2,"le");if(0===n){e.moveForwardsBy(1);var r=e.readInt(2,"le");e.moveForwardsBy(2+r)}else if(1===n)Be(e,ge,ve);else{if(2!==n)throw new Error(`Invalid block type while parsing DEFLATE stream at pos ${e.position}`);for(var i=e.readBits(5,"le")+257,o=e.readBits(5,"le")+1,a=e.readBits(4,"le")+4,u=new Uint8Array(ye.length),s=0;s<a;s++)u[ye[s]]=e.readBits(3,"le");for(var l=Ae(u),c=new Uint8Array(i+o),f=void 0,h=void 0,p=void 0,d=0;d<i+o;)switch(f=Fe(e,l)){case 16:for(h=3+e.readBits(2,"le");h--;)c[d++]=p;break;case 17:for(h=3+e.readBits(3,"le");h--;)c[d++]=0;p=0;break;case 18:for(h=11+e.readBits(7,"le");h--;)c[d++]=0;p=0;break;default:c[d++]=f,p=f}Be(e,Ae(c.subarray(0,i)),Ae(c.subarray(i)))}}e.bitPos>0&&e.moveForwardsBy(1)}var be=[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,0,0],xe=[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];function Be(e,t,n){for(var r,i=0;(r=Fe(e,t))&&256!==r;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");r<256||(e.readBits(be[r-257],"le"),r=Fe(e,n),e.readBits(xe[r],"le"))}}function Ae(e){for(var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e),r=1<<t,i=new Uint32Array(r),o=1,a=0,u=2;o<=t;){for(var s=0;s<e.length;s++)if(e[s]===o){var l=void 0,c=void 0,f=void 0;for(l=0,c=a,f=0;f<o;f++)l=l<<1|1&c,c>>=1;for(var h=o<<16|s,p=l;p<r;p+=u)i[p]=h;a++}o++,a<<=1,u<<=1}return[i,t,n]}function Fe(e,t){var n=o(t,2),r=n[0],i=n[1],a=r[e.readBits(i,"le")&(1<<i)-1],u=a>>>16;if(u>i)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${e.position}: ${u}`);return e.moveBackwardsByBits(i-u),65535&a}function Ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.length){for(var r=0;r<e.length;r++)if(ke(e[r],t,n))return!0;return!1}return ke(e,t,n)}function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(var r in e){var i=parseInt(r,10)+n;switch(typeof e[r]){case"number":if(t[i]!==e[r])return!1;break;case"object":if(e[r].indexOf(t[i])<0)return!1;break;case"function":if(!e[r](t[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${r}`)}}return!0}const Ce=function(){return c(function e(){a(this,e)},null,[{key:"checkForValue",value:function(e){if(void 0===e)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}])}();function Ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ie=function(){return!!e})()}const Te=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,Ie()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}])}(Ce);function Se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Se=function(){return!!e})()}const Oe=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,Se()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=ue.isBigNumber(this.value)?M.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value);try{this.value=new ue(M.arrayBufferToStr(this.value))}catch(e){this.value=new ue(NaN)}}}])}(Ce);function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}const Le=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,Re()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){var e=this;if(t.checkForValue(this.value),!_())return new Promise(function(t,n){M.readFile(e.value).then(function(t){return e.value=t.buffer}).then(t).catch(n)});this.value=M.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new File(this.value,"unknown")}}])}(Ce);function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(De=function(){return!!e})()}const Ne=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,De()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?M.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?M.arrayBufferToStr(this.value):""}}])}(Ce);function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_e=function(){return!!e})()}const Ue=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,_e()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?M.strToArrayBuffer(M.unescapeHtml(M.stripHtmlTags(this.value,!0))):new ArrayBuffer}}])}(Ne);function Pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pe=function(){return!!e})()}const Me=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,Pe()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=void 0!==this.value?M.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=JSON.parse(M.arrayBufferToStr(this.value))}}])}(Ce);function je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(je=function(){return!!e})()}const $e=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,je()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:(r=g(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.checkForValue(this.value),!_()){e.next=1;break}this.value=this.value.map(function(e){return Uint8Array.from(e.data)}),e.next=3;break;case 1:return e.next=2,t.concatenateTypedArraysWithTypedElements.apply(t,w(this.value));case 2:this.value=e.sent;case 3:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(n=g(y().mark(function e(){var t,n,r,i,o,a,u,s,l,c,f,h,p,d=arguments;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=0,n=d.length,r=new Array(n),i=0;i<n;i++)r[i]=d[i];for(o=0,a=r;o<a.length;o++)u=a[o],t+=u.size;s=new Uint8Array(t),l=0,c=0,f=r;case 1:if(!(c<f.length)){e.next=4;break}return h=f[c],e.next=2,M.readFile(h);case 2:p=e.sent,s.set(p,l),l+=p.length;case 3:c++,e.next=1;break;case 4:return e.abrupt("return",s);case 5:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"concatenateTypedArrays",value:function(){for(var e=0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++)e+=o[i].length;for(var a=new Uint8Array(e),u=0,s=0,l=n;s<l.length;s++){var c=l[s];a.set(c,u),u+=c.length}return a}}]);var n,r}(Ce);function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ge=function(){return!!e})()}const We=function(e){function t(){return a(this,t),e=this,r=arguments,n=h(n=t),f(e,Ge()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value="number"==typeof this.value?M.strToArrayBuffer(this.value.toString()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?parseFloat(M.arrayBufferToStr(this.value)):0}}])}(Ce);var ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(a(this,e),this.value=new ArrayBuffer(0),this.type=e.ARRAY_BUFFER,t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"type"))this.set(t.value,t.type);else if(t&&null!==n)this.set(t,n);else if(t){var r=e.typeEnum(t.constructor.name);this.set(t,r)}}return c(e,[{key:"get",value:function(t){var n=this;return"string"==typeof t&&(t=e.typeEnum(t)),this.type!==t?_()?(this._translate(t),this.value):new Promise(function(e,r){n._translate(t).then(function(){e(n.value)}).catch(r)}):this.value}},{key:"set",value:function(t,n){if("string"==typeof n&&(n=e.typeEnum(n)),x().debug("Dish type: "+e.enumLookup(n)),this.value=t,this.type=n,!this.valid()){var r=M.truncate(JSON.stringify(this.value),25);throw new $(`Data is not a valid ${e.enumLookup(n)}: ${r}`)}}},{key:"presentAs",value:function(e){return this.clone().get(e)}},{key:"detectDishType",value:function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(fe);if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e&&e.length>1))return[];var n=[],r={};for(var i in fe)t.includes(i)&&(r[i]=fe[i]);for(var o in r)r[o].forEach(function(t){Ee(t.signature,e)&&n.push(t)});return n}(new Uint8Array(this.value.slice(0,2048)));return e.length&&e[0].mime&&"text/plain"===e[0].mime?e[0].mime:null}},{key:"getTitle",value:(t=g(y().mark(function t(n){var r,i,o,a;return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r="",o=this.type,t.next=o===e.FILE?1:o===e.LIST_FILE?2:o===e.JSON?3:o===e.NUMBER||o===e.BIG_NUMBER?4:o===e.ARRAY_BUFFER||o===e.BYTE_ARRAY?5:6;break;case 1:return r=this.value.name,t.abrupt("continue",9);case 2:return r=`${this.value.length} file(s)`,t.abrupt("continue",9);case 3:return r="application/json",t.abrupt("continue",9);case 4:return r=this.value.toString(),t.abrupt("continue",9);case 5:if(null===(r=this.detectDishType())){t.next=6;break}return t.abrupt("continue",9);case 6:return t.prev=6,(i=this.clone()).value=i.value.slice(0,256),t.next=7,i.get(e.STRING);case 7:r=t.sent,t.next=9;break;case 8:t.prev=8,a=t.catch(6),x().error(`${e.enumLookup(this.type)} cannot be sliced. ${a}`);case 9:return t.abrupt("return",r.slice(0,n));case 10:case"end":return t.stop()}},t,this,[[6,8]])})),function(e){return t.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var t=0;t<this.value.length;t++)if("number"!=typeof this.value[t]||this.value[t]<0||this.value[t]>255)return!1;return!0;case e.STRING:case e.HTML:return"string"==typeof this.value;case e.NUMBER:return"number"==typeof this.value;case e.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case e.BIG_NUMBER:return!!ue.isBigNumber(this.value)||!!Object.keys(this.value).sort().equals(["c","e","s"])&&(this.value=new ue({s:this.value.s,e:this.value.e,c:this.value.c,_isBigNumber:!0}),!0);case e.JSON:return!0;case e.FILE:return this.value instanceof File;case e.LIST_FILE:return this.value instanceof Array&&this.value.reduce(function(e,t){return e&&t instanceof File},!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case e.BYTE_ARRAY:case e.STRING:case e.HTML:return this.value.length;case e.NUMBER:case e.BIG_NUMBER:return this.value.toString().length;case e.ARRAY_BUFFER:return this.value.byteLength;case e.JSON:return JSON.stringify(this.value).length;case e.FILE:return this.value.size;case e.LIST_FILE:return this.value.reduce(function(e,t){return e+t.size},0);default:return-1}}},{key:"clone",value:function(){var t=new e;switch(this.type){case e.STRING:case e.HTML:case e.NUMBER:case e.BIG_NUMBER:t.set(this.value,this.type);break;case e.BYTE_ARRAY:case e.JSON:t.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case e.ARRAY_BUFFER:t.set(this.value.slice(0),this.type);break;case e.FILE:t.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case e.LIST_FILE:t.set(this.value.map(function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})}),this.type);break;default:throw new $("Cannot clone Dish, unknown type")}return t}},{key:"_translate",value:function(t){var n=this;if(x().debug(`Translating Dish from ${e.enumLookup(this.type)} to ${e.enumLookup(t)}`),!_())return new Promise(function(r,i){n._toArrayBuffer().then(function(){return n.type=e.ARRAY_BUFFER}).then(function(){n._fromArrayBuffer(t),r()}).catch(i)});this._toArrayBuffer(),this.type=e.ARRAY_BUFFER,this._fromArrayBuffer(t)}},{key:"_toArrayBuffer",value:function(){var t=this,n={browser:{[e.STRING]:function(){return Promise.resolve(Ne.toArrayBuffer.bind(t)())},[e.NUMBER]:function(){return Promise.resolve(We.toArrayBuffer.bind(t)())},[e.HTML]:function(){return Promise.resolve(Ue.toArrayBuffer.bind(t)())},[e.ARRAY_BUFFER]:function(){return Promise.resolve()},[e.BIG_NUMBER]:function(){return Promise.resolve(Oe.toArrayBuffer.bind(t)())},[e.JSON]:function(){return Promise.resolve(Me.toArrayBuffer.bind(t)())},[e.FILE]:function(){return Le.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Promise.resolve($e.toArrayBuffer.bind(t)())},[e.BYTE_ARRAY]:function(){return Promise.resolve(Te.toArrayBuffer.bind(t)())}},node:{[e.STRING]:function(){return Ne.toArrayBuffer.bind(t)()},[e.NUMBER]:function(){return We.toArrayBuffer.bind(t)()},[e.HTML]:function(){return Ue.toArrayBuffer.bind(t)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Oe.toArrayBuffer.bind(t)()},[e.JSON]:function(){return Me.toArrayBuffer.bind(t)()},[e.FILE]:function(){return Le.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return $e.toArrayBuffer.bind(t)()},[e.BYTE_ARRAY]:function(){return Te.toArrayBuffer.bind(t)()}}};try{return n[_()?"node":"browser"][this.type]()}catch(t){throw new $(`Error translating from ${e.enumLookup(this.type)} to ArrayBuffer: ${t}`)}}},{key:"_fromArrayBuffer",value:function(t){var n=this,r={[e.STRING]:function(){return Ne.fromArrayBuffer.bind(n)()},[e.NUMBER]:function(){return We.fromArrayBuffer.bind(n)()},[e.HTML]:function(){return Ue.fromArrayBuffer.bind(n)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Oe.fromArrayBuffer.bind(n)()},[e.JSON]:function(){return Me.fromArrayBuffer.bind(n)()},[e.FILE]:function(){return Le.fromArrayBuffer.bind(n)()},[e.LIST_FILE]:function(){return $e.fromArrayBuffer.bind(n)()},[e.BYTE_ARRAY]:function(){return Te.fromArrayBuffer.bind(n)()}};try{r[t](),this.type=t}catch(n){throw new $(`Error translating from ArrayBuffer to ${e.enumLookup(t)}: ${n}`)}}}],[{key:"typeEnum",value:function(t){switch(t.toLowerCase()){case"bytearray":case"byte array":return e.BYTE_ARRAY;case"string":return e.STRING;case"number":return e.NUMBER;case"html":return e.HTML;case"arraybuffer":case"array buffer":return e.ARRAY_BUFFER;case"bignumber":case"big number":return e.BIG_NUMBER;case"json":case"object":return e.JSON;case"file":return e.FILE;case"list<file>":return e.LIST_FILE;default:throw new $("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(t){switch(t){case e.BYTE_ARRAY:return"byteArray";case e.STRING:return"string";case e.NUMBER:return"number";case e.HTML:return"html";case e.ARRAY_BUFFER:return"ArrayBuffer";case e.BIG_NUMBER:return"BigNumber";case e.JSON:return"JSON";case e.FILE:return"File";case e.LIST_FILE:return"List<File>";default:throw new $("Invalid data type enum. No matching type.")}}}]);var t}();ze.BYTE_ARRAY=0,ze.STRING=1,ze.NUMBER=2,ze.HTML=3,ze.ARRAY_BUFFER=4,ze.BIG_NUMBER=5,ze.JSON=6,ze.FILE=7,ze.LIST_FILE=8;const He=ze,Ve=function(){function e(t){a(this,e),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,this.integer=!1,this.allowEmpty=!0,t&&this._parseConfig(t)}return c(e,[{key:"_parseConfig",value:function(e){this.name=e.name,this.type=e.type,this.defaultValue=e.value,this.disabled=!!e.disabled,this.hint=e.hint||!1,this.rows=e.rows||!1,this.toggleValues=e.toggleValues,this.target=void 0!==e.target?e.target:null,this.defaultIndex=void 0!==e.defaultIndex?e.defaultIndex:0,this.maxLength=e.maxLength||null,this.min=e.min,this.max=e.max,this.step=e.step,this.integer=void 0!==e.integer&&!!e.integer,this.allowEmpty=void 0===e.allowEmpty||!!e.allowEmpty}},{key:"validate",value:function(e){if(this.disabled)return!0;var t,n,r,i=e;null==i&&(i=this.defaultValue),"toggleString"===this.type&&i&&"object"==typeof i&&"string"in i&&(i=i.string),"option"===this.type&&Array.isArray(i)&&(i=i[null!==(t=this.defaultIndex)&&void 0!==t?t:0]),"argSelector"===this.type&&Array.isArray(i)&&(i=(null===(n=i[null!==(r=this.defaultIndex)&&void 0!==r?r:0])||void 0===n?void 0:n.name)||"");var o=!1;if((null==i||""===i||"number"==typeof i.length&&0===i.length)&&(o=!0),o){var a=!1;if("option"===this.type&&Array.isArray(this.defaultValue)?a=this.defaultValue.includes(""):"argSelector"===this.type&&Array.isArray(this.defaultValue)&&(a=this.defaultValue.some(function(e){return""===e.name})),!1===this.allowEmpty||("option"===this.type||"argSelector"===this.type)&&!a)throw new C(`${this.name} cannot be empty.`);return!0}if("number"==typeof this.maxLength&&null!=i){if("string"==typeof i&&i.length>this.maxLength)throw new C(`${this.name} length cannot exceed ${this.maxLength}.`);if(Array.isArray(i)&&i.length>this.maxLength)throw new C(`${this.name} length cannot exceed ${this.maxLength}.`);if(i instanceof Uint8Array&&i.length>this.maxLength)throw new C(`${this.name} length cannot exceed ${this.maxLength}.`)}if("number"===this.type){if(null==i||isNaN(i))throw new C(`${this.name} must be a number.`);if(this.integer&&!Number.isInteger(i))throw new C(`${this.name} must be an integer.`);if("number"==typeof this.min&&i<this.min)throw new C(`${this.name} must be greater than or equal to ${this.min}.`);if("number"==typeof this.max&&i>this.max)throw new C(`${this.name} must be less than or equal to ${this.max}.`)}if("option"===this.type&&Array.isArray(this.defaultValue)){var u=this.defaultValue.filter(function(e){return"string"==typeof e&&!e.match(/^\[\/?[a-z0-9 -()^]+\]$/i)}),s=null!=i?String(i).toLowerCase():"";if(!u.find(function(e){return e.toLowerCase()===s}))throw new C(`${this.name} must be one of the following: ${u.join(", ")}.`)}if("argSelector"===this.type&&Array.isArray(this.defaultValue)){var l=this.defaultValue.map(function(e){return e.name}).filter(function(e){return"string"==typeof e&&!e.match(/^\[\/?[a-z0-9 -()^]+\]$/i)}),c=null!=i?String(i).toLowerCase():"";if(!l.find(function(e){return e.toLowerCase()===c}))throw new C(`${this.name} must be one of the following: ${l.join(", ")}.`)}return!0}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(t){this._value=e.prepare(t,this.type)}}],[{key:"prepare",value:function(e,t){var n;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return M.parseEscapedChars(e);case"byteArray":return"string"==typeof e?S(e=e.replace(/\s+/g,"")):e;case"number":if(null===e)return e;if(n=parseFloat(e),isNaN(n)){var r=M.truncate(e.toString(),10);throw new C("Invalid ingredient value. Not a number: "+r)}return n;default:return e}}}])}();var Ye=function(){return c(function e(){a(this,e),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null},[{key:"run",value:function(e,t){return e}},{key:"highlight",value:function(e,t){return!1}},{key:"highlightReverse",value:function(e,t){return!1}},{key:"present",value:function(e,t){return e}},{key:"inputType",get:function(){return He.enumLookup(this._inputType)},set:function(e){this._inputType=He.typeEnum(e)}},{key:"outputType",get:function(){return He.enumLookup(this._outputType)},set:function(e){this._outputType=He.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return He.enumLookup(this._presentType)},set:function(e){this._presentType=He.typeEnum(e)}},{key:"args",get:function(){return this._ingList.map(function(e){var t={name:e.name,type:e.type,value:e.defaultValue};return e.toggleValues&&(t.toggleValues=e.toggleValues),e.hint&&(t.hint=e.hint),e.rows&&(t.rows=e.rows),e.disabled&&(t.disabled=e.disabled),e.target&&(t.target=e.target),e.defaultIndex&&(t.defaultIndex=e.defaultIndex),e.maxLength&&(t.maxLength=e.maxLength),"number"==typeof e.min&&(t.min=e.min),"number"==typeof e.max&&(t.max=e.max),e.step&&(t.step=e.step),void 0!==e.integer&&(t.integer=e.integer),void 0!==e.allowEmpty&&(t.allowEmpty=e.allowEmpty),t})},set:function(e){var t=this;e.forEach(function(e){var n=new Ve(e);t.addIngredient(n)})}},{key:"validateIngredients",value:function(e){var t=e||this.ingValues;return this._ingList.forEach(function(e,n){n<t.length&&e.validate(t[n])}),!0}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map(function(e){return e.config})}}},{key:"addIngredient",value:function(e){this._ingList.push(e)}},{key:"ingValues",get:function(){return this._ingList.map(function(e){return e.value})},set:function(e){var t=this;e.forEach(function(e,n){try{t._ingList[n].value=e}catch(e){throw new C(`Failed to set value of ingredient '${t._ingList[n].name}': ${e}`)}})}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(e){this._breakpoint=!!e}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=!!e}},{key:"flowControl",get:function(){return this._flowControl},set:function(e){this._flowControl=!!e}},{key:"manualBake",get:function(){return this._manualBake},set:function(e){this._manualBake=!!e}}])}();const Je=Ye;class qe{diff(e,t,n={}){let r;"function"==typeof n?(r=n,n={}):"callback"in n&&(r=n.callback);const i=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(i,n)),u=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,u,n,r)}diffWithOptionsObj(e,t,n,r){var i;const o=e=>(e=this.postProcess(e,n),r?void setTimeout(function(){r(e)},0):e),a=t.length,u=e.length;let s=1,l=a+u;null!=n.maxEditLength&&(l=Math.min(l,n.maxEditLength));const c=null!==(i=n.timeout)&&void 0!==i?i:1/0,f=Date.now()+c,h=[{oldPos:-1,lastComponent:void 0}];let p=this.extractCommon(h[0],t,e,0,n);if(h[0].oldPos+1>=u&&p+1>=a)return o(this.buildValues(h[0].lastComponent,t,e));let d=-1/0,m=1/0;const g=()=>{for(let r=Math.max(d,-s);r<=Math.min(m,s);r+=2){let i;const s=h[r-1],l=h[r+1];s&&(h[r-1]=void 0);let c=!1;if(l){const e=l.oldPos-r;c=l&&0<=e&&e<a}const f=s&&s.oldPos+1<u;if(c||f){if(i=!f||c&&s.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(s,!1,!0,1,n),p=this.extractCommon(i,t,e,r,n),i.oldPos+1>=u&&p+1>=a)return o(this.buildValues(i.lastComponent,t,e))||!0;h[r]=i,i.oldPos+1>=u&&(m=Math.min(m,r-1)),p+1>=a&&(d=Math.max(d,r+1))}else h[r]=void 0}s++};if(r)!function e(){setTimeout(function(){if(s>l||Date.now()>f)return r(void 0);g()||e()},0)}();else for(;s<=l&&Date.now()<=f;){const e=g();if(e)return e}}addToPath(e,t,n,r,i){const o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,r,i){const o=t.length,a=n.length;let u=e.oldPos,s=u-r,l=0;for(;s+1<o&&u+1<a&&this.equals(n[u+1],t[s+1],i);)s++,u++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=u,s}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const r=[];let i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();const o=r.length;let a=0,u=0,s=0;for(;a<o;a++){const e=r[a];if(e.removed)e.value=this.join(n.slice(s,s+e.count)),s+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(u,u+e.count);r=r.map(function(e,t){const r=n[s+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(u,u+e.count));u+=e.count,e.added||(s+=e.count)}}return r}}const Ze=new class extends qe{};function Xe(e,t,n){return Ze.diff(e,t,n)}function Ke(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function Qe(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function et(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function tt(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function nt(e,t){return et(e,t,"")}function rt(e,t){return tt(e,t,"")}function it(e,t){return t.slice(0,function(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);const i=Array(r);let o=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[o]?i[e]=i[o]:i[e]=o;o>0&&t[e]!=t[o];)o=i[o];t[e]==t[o]&&o++}o=0;for(let r=n;r<e.length;r++){for(;o>0&&e[r]!=t[o];)o=i[o];e[r]==t[o]&&o++}return o}(e,t))}function ot(e,t){const n=[];for(const r of Array.from(t.segment(e))){const e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function at(e,t){if(t)return st(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function ut(e,t){if(t)return st(e,t)[0];const n=e.match(/^\s*/);return n?n[0]:""}function st(e,t){if(!t)return[ut(e),at(e)];if("word"!=t.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');const n=ot(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:"",/\s/.test(i)?i:""]}const lt="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",ct=new RegExp(`[${lt}]+|\\s+|[^${lt}]`,"ug"),ft=new class extends qe{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){const r=t.intlSegmenter;if("word"!=r.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');n=ot(e,r)}else n=e.match(ct)||[];const r=[];let i=null;return n.forEach(e=>{/\s/.test(e)?null==i?r.push(e):r.push(r.pop()+e):null!=i&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>0==t?e:e.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&pt(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&pt(n,i,r,null,t.intlSegmenter),e}};function ht(e,t,n){return null==(null==n?void 0:n.ignoreWhitespace)||n.ignoreWhitespace?ft.diff(e,t,n):mt(e,t,n)}function pt(e,t,n,r,i){if(t&&n){const[o,a]=st(t.value,i),[u,s]=st(n.value,i);if(e){const r=Ke(o,u);e.value=tt(e.value,u,r),t.value=nt(t.value,r),n.value=nt(n.value,r)}if(r){const e=Qe(a,s);r.value=et(r.value,s,e),t.value=rt(t.value,e),n.value=rt(n.value,e)}}else if(n){if(e){const e=ut(n.value,i);n.value=n.value.substring(e.length)}if(r){const e=ut(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){const n=ut(r.value,i),[o,a]=st(t.value,i),u=Ke(n,o);t.value=nt(t.value,u);const s=Qe(nt(n,u),a);t.value=rt(t.value,s),r.value=et(r.value,n,s),e.value=tt(e.value,n,n.slice(0,n.length-s.length))}else if(r){const e=ut(r.value,i),n=it(at(t.value,i),e);t.value=rt(t.value,n)}else if(e){const n=it(at(e.value,i),ut(t.value,i));t.value=nt(t.value,n)}}const dt=new class extends qe{tokenize(e){const t=new RegExp(`(\\r?\\n)|[${lt}]+|[^\\S\\n\\r]+|[^${lt}]`,"ug");return e.match(t)||[]}};function mt(e,t,n){return dt.diff(e,t,n)}const gt=new class extends qe{constructor(){super(...arguments),this.tokenize=wt}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes("\n")||(e=e.trim()),n.newlineIsToken&&t.includes("\n")||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith("\n")&&(e=e.slice(0,-1)),t.endsWith("\n")&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function vt(e,t,n){return gt.diff(e,t,n)}function yt(e,t,n){return n=function(e,t){if("function"==typeof e)t.callback=e;else if(e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}(n,{ignoreWhitespace:!0}),gt.diff(e,t,n)}function wt(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){const i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function bt(e){return"."==e||"!"==e||"?"==e}const xt=new class extends qe{tokenize(e){var t;const n=[];let r=0;for(let i=0;i<e.length;i++){if(i==e.length-1){n.push(e.slice(r));break}if(bt(e[i])&&e[i+1].match(/\s/)){for(n.push(e.slice(r,i+1)),i=r=i+1;null===(t=e[i+1])||void 0===t?void 0:t.match(/\s/);)i++;n.push(e.slice(r,i+1)),r=i+1}}return n}};function Bt(e,t,n){return xt.diff(e,t,n)}const At=new class extends qe{tokenize(e){return e.split(/([{}:;,]|\s+)/)}};function Ft(e,t,n){return At.diff(e,t,n)}const Et=new class extends qe{constructor(){super(...arguments),this.tokenize=wt}get useLongestToken(){return!0}castInput(e,t){const{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>void 0===t?n:t}=t;return"string"==typeof e?e:JSON.stringify(Ct(e,null,null,r),null," ")}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),n)}};function kt(e,t,n){return Et.diff(e,t,n)}function Ct(e,t,n,r,i){let o,a;for(t=t||[],n=n||[],r&&(e=r(void 0===i?"":i,e)),o=0;o<t.length;o+=1)if(t[o]===e)return n[o];if("[object Array]"===Object.prototype.toString.call(e)){for(t.push(e),a=new Array(e.length),n.push(a),o=0;o<e.length;o+=1)a[o]=Ct(e[o],t,n,r,String(o));return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),"object"==typeof e&&null!==e){t.push(e),a={},n.push(a);const i=[];let u;for(u in e)Object.prototype.hasOwnProperty.call(e,u)&&i.push(u);for(i.sort(),o=0;o<i.length;o+=1)u=i[o],a[u]=Ct(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}const It=new class extends qe{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function Tt(e,t,n){return It.diff(e,t,n)}function St(e){return Array.isArray(e)?e.map(e=>St(e)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map((t,n)=>{var r;return t.startsWith("\\")||t.endsWith("\r")||(null===(r=e.lines[n+1])||void 0===r?void 0:r.startsWith("\\"))?t:t+"\r"})}))})}function Ot(e){return Array.isArray(e)?e.map(e=>Ot(e)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map(e=>e.endsWith("\r")?e.substring(0,e.length-1):e)}))})}function Rt(e){const t=e.split(/\n/),n=[];let r=0;function i(e){return/^diff --git /.test(e)}function o(e){return i(e)||/^Index:\s/.test(e)||/^diff(?: -r \w+)+\s/.test(e)}function a(e){return/^(---|\+\+\+)\s/.test(e)}function u(e){return/^@@\s/.test(e)}function s(){var e;const s={hunks:[]};n.push(s);let f=!1;for(;r<t.length;){const e=t[r];if(a(e)||u(e))break;if(i(e)){if(f)return;f=!0,s.isGit=!0;const n=l(e);for(n&&(s.oldFileName=n.oldFileName,s.newFileName=n.newFileName),r++;r<t.length;){const e=t[r];if(a(e)||u(e)||o(e))break;const n=/^rename from (.*)/.exec(e);n&&(s.oldFileName="a/"+c(n[1]),s.isRename=!0);const i=/^rename to (.*)/.exec(e);i&&(s.newFileName="b/"+c(i[1]),s.isRename=!0);const l=/^copy from (.*)/.exec(e);l&&(s.oldFileName="a/"+c(l[1]),s.isCopy=!0);const f=/^copy to (.*)/.exec(e);f&&(s.newFileName="b/"+c(f[1]),s.isCopy=!0);const h=/^new file mode (\d+)/.exec(e);h&&(s.isCreate=!0,s.newMode=h[1]);const p=/^deleted file mode (\d+)/.exec(e);p&&(s.isDelete=!0,s.oldMode=p[1]);const d=/^old mode (\d+)/.exec(e);d&&(s.oldMode=d[1]);const m=/^new mode (\d+)/.exec(e);m&&(s.newMode=m[1]),/^Binary files /.test(e)&&(s.isBinary=!0),r++}continue}if(o(e)){if(f)return;f=!0;const t=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(e);t&&(s.index=e.substring(t[0].length).trim())}r++}if(h(s),h(s),void 0===s.oldFileName!=(void 0===s.newFileName))throw new Error("Missing "+(void 0!==s.oldFileName?'"+++ ..."':'"--- ..."')+" file header for "+(null!==(e=s.oldFileName)&&void 0!==e?e:s.newFileName));for(;r<t.length;){const e=t[r];if(o(e)||a(e)||/^===================================================================/.test(e))break;u(e)?s.hunks.push(p()):r++}}function l(e){const t=e.substring(11);if(t.startsWith('"')){const e=f(t);if(null===e)return null;const n=t.substring(e.rawLength+1);let r;if(n.startsWith('"')){const e=f(n);if(null===e)return null;r=e.fileName}else r=n;return{oldFileName:e.fileName,newFileName:r}}const n=t.indexOf('"');if(n>0){const e=t.substring(0,n-1),r=f(t.substring(n));return null===r?null:{oldFileName:e,newFileName:r.fileName}}if(t.startsWith("a/")){const e=[];let n=0;for(;n=t.indexOf(" b/",n+1),-1!==n;)e.push(n);if(e.length>0){const n=e[Math.floor(e.length/2)];return{oldFileName:t.substring(0,n),newFileName:t.substring(n+1)}}}return null}function c(e){if(e.startsWith('"')){const t=f(e);if(t)return t.fileName}return e}function f(e){if(!e.startsWith('"'))return null;let t="",n=1;for(;n<e.length;){if('"'===e[n])return{fileName:t,rawLength:n+1};if("\\"===e[n]&&n+1<e.length)switch(n++,e[n]){case"a":t+="";break;case"b":t+="\b";break;case"f":t+="\f";break;case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"v":t+="\v";break;case"\\":t+="\\";break;case'"':t+='"';break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{if(n+2>=e.length||e[n+1]<"0"||e[n+1]>"7"||e[n+2]<"0"||e[n+2]>"7")return null;const r=[parseInt(e.substring(n,n+3),8)];for(n+=3;"\\"===e[n]&&e[n+1]>="0"&&e[n+1]<="7";){if(n+3>=e.length||e[n+2]<"0"||e[n+2]>"7"||e[n+3]<"0"||e[n+3]>"7")return null;r.push(parseInt(e.substring(n+1,n+4),8)),n+=4}t+=new TextDecoder("utf-8").decode(new Uint8Array(r));continue}default:return null}else t+=e[n];n++}return null}function h(e){const n=/^(---|\+\+\+)\s+/.exec(t[r]);if(n){const i=n[1],o=t[r].substring(3).trim().split("\t",2),a=(o[1]||"").trim();let u=o[0];u=u.startsWith('"')?c(u):u.replace(/\\\\/g,"\\"),"---"===i?(e.oldFileName=u,e.oldHeader=a):(e.newFileName=u,e.newHeader=a),r++}}function p(){var e;const n=r,i=t[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),o={oldStart:+i[1],oldLines:void 0===i[2]?1:+i[2],newStart:+i[3],newLines:void 0===i[4]?1:+i[4],lines:[]};0===o.oldLines&&(o.oldStart+=1),0===o.newLines&&(o.newStart+=1);let u=0,s=0;for(;r<t.length&&(s<o.oldLines||u<o.newLines||(null===(e=t[r])||void 0===e?void 0:e.startsWith("\\")));r++){const e=0==t[r].length&&r!=t.length-1?" ":t[r][0];if("+"!==e&&"-"!==e&&" "!==e&&"\\"!==e)throw new Error(`Hunk at line ${n+1} contained invalid line ${t[r]}`);o.lines.push(t[r]),"+"===e?u++:"-"===e?s++:" "===e&&(u++,s++)}if(u||1!==o.newLines||(o.newLines=0),s||1!==o.oldLines||(o.oldLines=0),u!==o.newLines)throw new Error("Added line count did not match for hunk at line "+(n+1));if(s!==o.oldLines)throw new Error("Removed line count did not match for hunk at line "+(n+1));if(r<t.length&&t[r]&&/^[+ -]/.test(t[r])&&!a(t[r]))throw new Error("Hunk at line "+(n+1)+" has more lines than expected (expected "+o.oldLines+" old lines and "+o.newLines+" new lines)");return o}for(;r<t.length;)s();return n}function Lt(e,t,n){let r=!0,i=!1,o=!1,a=1;return function u(){if(r&&!o){if(i?a++:r=!1,e+a<=n)return e+a;o=!0}if(!i)return o||(r=!0),t<=e-a?e-a++:(i=!0,u())}}function Dt(e,t,n={}){let r;if(r="string"==typeof t?Rt(t):Array.isArray(t)?t:[t],r.length>1)throw new Error("applyPatch only works with a single input.");return function(e,t,n={}){var r;(n.autoConvertLineEndings||null==n.autoConvertLineEndings)&&((r=e).includes("\r\n")&&!r.startsWith("\n")&&!r.match(/[^\r]\n/)&&function(e){return Array.isArray(e)||(e=[e]),!e.some(e=>e.hunks.some(e=>e.lines.some(e=>!e.startsWith("\\")&&e.endsWith("\r"))))}(t)?t=St(t):function(e){return!e.includes("\r\n")&&e.includes("\n")}(e)&&function(e){return Array.isArray(e)||(e=[e]),e.some(e=>e.hunks.some(e=>e.lines.some(e=>e.endsWith("\r"))))&&e.every(e=>e.hunks.every(e=>e.lines.every((t,n)=>{var r;return t.startsWith("\\")||t.endsWith("\r")||(null===(r=e.lines[n+1])||void 0===r?void 0:r.startsWith("\\"))})))}(t)&&(t=Ot(t)));const i=e.split("\n"),o=t.hunks,a=n.compareLine||((e,t,n,r)=>t===r),u=n.fuzzFactor||0;let s=0;if(u<0||!Number.isInteger(u))throw new Error("fuzzFactor must be a non-negative integer");if(!o.length)return e;let l="",c=!1,f=!1;for(let e=0;e<o[o.length-1].lines.length;e++){const t=o[o.length-1].lines[e];"\\"==t[0]&&("+"==l[0]?c=!0:"-"==l[0]&&(f=!0)),l=t}if(c){if(f){if(!u&&""==i[i.length-1])return!1}else if(""==i[i.length-1])i.pop();else if(!u)return!1}else if(f)if(""!=i[i.length-1])i.push("");else if(!u)return!1;function h(e,t,n,r=0,o=!0,u=[],s=0){let l=0,c=!1;for(;r<e.length;r++){const f=e[r],p=f.length>0?f[0]:" ",d=f.length>0?f.substr(1):f;if("-"===p){if(!a(t+1,i[t],p,d))return n&&null!=i[t]?(u[s]=i[t],h(e,t+1,n-1,r,!1,u,s+1)):null;t++,l=0}if("+"===p){if(!o)return null;u[s]=d,s++,l=0,c=!0}if(" "===p){if(l++,u[s]=i[t],!a(t+1,i[t],p,d))return c||!n?null:i[t]&&(h(e,t+1,n-1,r+1,!1,u,s+1)||h(e,t+1,n-1,r,!1,u,s+1))||h(e,t,n-1,r+1,!1,u,s);s++,o=!0,c=!1,t++}}return s-=l,t-=l,u.length=s,{patchedLines:u,oldLineLastI:t-1}}const p=[];let d=0;for(let e=0;e<o.length;e++){const t=o[e];let n;const r=i.length-t.oldLines+u;let a;for(let e=0;e<=u;e++){a=t.oldStart+d-1;const i=Lt(a,s,r);for(;void 0!==a&&(n=h(t.lines,a,e),!n);a=i());if(n)break}if(!n)return!1;for(let e=s;e<a;e++)p.push(i[e]);for(let e=0;e<n.patchedLines.length;e++){const t=n.patchedLines[e];p.push(t)}s=n.oldLineLastI+1,d=a+1-t.oldStart}for(let e=s;e<i.length;e++)p.push(i[e]);return p.join("\n")}(e,r[0],n)}function Nt(e,t){const n="string"==typeof e?Rt(e):e;let r=0;!function e(){const i=n[r++];if(!i)return t.complete();t.loadFile(i,function(n,r){if(n)return t.complete(n);const o=Dt(r,i,t);t.patched(i,o,function(n){if(n)return t.complete(n);e()})})}()}function _t(e){return void 0===e||"/dev/null"===e?e:e.startsWith("a/")?"b/"+e.slice(2):e.startsWith("b/")?"a/"+e.slice(2):e}function Ut(e){if(Array.isArray(e))return e.map(e=>Ut(e)).reverse();const t=Object.assign(Object.assign({},e),{oldFileName:e.isGit?_t(e.newFileName):e.newFileName,oldHeader:e.newHeader,newFileName:e.isGit?_t(e.oldFileName):e.oldFileName,newHeader:e.oldHeader,oldMode:e.newMode,newMode:e.oldMode,isCreate:e.isDelete,isDelete:e.isCreate,hunks:e.hunks.map(e=>({oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,lines:e.lines.map(e=>e.startsWith("-")?`+${e.slice(1)}`:e.startsWith("+")?`-${e.slice(1)}`:e)}))});return e.isCopy&&(t.newFileName="/dev/null",t.newHeader=void 0,t.isDelete=!0,delete t.isCreate,delete t.isCopy,delete t.isRename,t.hunks=[]),t}function Pt(e){if(!function(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||'"'===e[t]||"\\"===e[t])return!0;return!1}(e))return e;let t='"';const n=(new TextEncoder).encode(e);let r=0;for(;r<n.length;){const e=n[r];t+=7===e?"\\a":8===e?"\\b":9===e?"\\t":10===e?"\\n":11===e?"\\v":12===e?"\\f":13===e?"\\r":34===e?'\\"':92===e?"\\\\":e>=32&&e<=126?String.fromCharCode(e):"\\"+e.toString(8).padStart(3,"0"),r++}return t+='"',t}n.dn(Lt);const Mt={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},jt={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},$t={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function Gt(e,t,n,r,i,o,a){let u;u=a?"function"==typeof a?{callback:a}:a:{},void 0===u.context&&(u.context=4);const s=u.context;if(u.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(!u.callback)return l(vt(n,r,u));{const{callback:e}=u;vt(n,r,Object.assign(Object.assign({},u),{callback:t=>{const n=l(t);e(n)}}))}function l(n){if(!n)return;function r(e){return e.map(function(e){return" "+e})}n.push({value:"",lines:[]});const a=[];let u=0,l=0,c=[],f=1,h=1;for(let e=0;e<n.length;e++){const t=n[e],i=t.lines||Vt(t.value);if(t.lines=i,t.added||t.removed){if(!u){const t=n[e-1];u=f,l=h,t&&(c=s>0?r(t.lines.slice(-s)):[],u-=c.length,l-=c.length)}for(const e of i)c.push((t.added?"+":"-")+e);t.added?h+=i.length:f+=i.length}else{if(u)if(i.length<=2*s&&e<n.length-2)for(const e of r(i))c.push(e);else{const e=Math.min(i.length,s);for(const t of r(i.slice(0,e)))c.push(t);const t={oldStart:u,oldLines:f-u+e,newStart:l,newLines:h-l+e,lines:c};a.push(t),u=0,l=0,c=[]}f+=i.length,h+=i.length}}for(const e of a)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith("\n")?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,"\\ No newline at end of file"),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:o,hunks:a}}}function Wt(e,t){var n,r,i,o,a,u;if(t||(t=Mt),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(e=>Wt(e,t)).join("\n")}const s=[];if(e.isGit){if(t=Mt,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let l=e.oldFileName,c=e.newFileName;e.isCreate&&"/dev/null"===l?l=c.replace(/^b\//,"a/"):e.isDelete&&"/dev/null"===c&&(c=l.replace(/^a\//,"b/")),s.push("diff --git "+Pt(l)+" "+Pt(c)),e.isDelete&&s.push("deleted file mode "+(null!==(n=e.oldMode)&&void 0!==n?n:"100644")),e.isCreate&&s.push("new file mode "+(null!==(r=e.newMode)&&void 0!==r?r:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(s.push("old mode "+e.oldMode),s.push("new mode "+e.newMode)),e.isRename&&(s.push("rename from "+Pt((null!==(i=e.oldFileName)&&void 0!==i?i:"").replace(/^a\//,""))),s.push("rename to "+Pt((null!==(o=e.newFileName)&&void 0!==o?o:"").replace(/^b\//,"")))),e.isCopy&&(s.push("copy from "+Pt((null!==(a=e.oldFileName)&&void 0!==a?a:"").replace(/^a\//,""))),s.push("copy to "+Pt((null!==(u=e.newFileName)&&void 0!==u?u:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&void 0!==e.oldFileName&&s.push("Index: "+e.oldFileName),t.includeUnderline&&s.push("===================================================================");const l=e.hunks.length>0;!t.includeFileHeaders||void 0===e.oldFileName||void 0===e.newFileName||e.isGit&&!l||(s.push("--- "+Pt(e.oldFileName)+(e.oldHeader?"\t"+e.oldHeader:"")),s.push("+++ "+Pt(e.newFileName)+(e.newHeader?"\t"+e.newHeader:"")));for(let t=0;t<e.hunks.length;t++){const n=e.hunks[t],r=0===n.oldLines?n.oldStart-1:n.oldStart,i=0===n.newLines?n.newStart-1:n.newStart;s.push("@@ -"+r+","+n.oldLines+" +"+i+","+n.newLines+" @@");for(const e of n.lines)s.push(e)}return s.join("\n")+"\n"}function zt(e,t,n,r,i,o,a){if("function"==typeof a&&(a={callback:a}),!(null==a?void 0:a.callback)){const u=Gt(e,t,n,r,i,o,a);if(!u)return;return Wt(u,null==a?void 0:a.headerOptions)}{const{callback:u}=a;Gt(e,t,n,r,i,o,Object.assign(Object.assign({},a),{callback:e=>{u(e?Wt(e,a.headerOptions):void 0)}}))}}function Ht(e,t,n,r,i,o){return zt(e,e,t,n,r,i,o)}function Vt(e){const t=e.endsWith("\n"),n=e.split("\n").map(e=>e+"\n");return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Yt(e){const t=[];let n,r;for(let i=0;i<e.length;i++)n=e[i],r=n.added?1:n.removed?-1:0,t.push([r,n.value]);return t}function Jt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push(qt(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}function qt(e){let t=e;return t=t.replace(/&/g,"&"),t=t.replace(/</g,"<"),t=t.replace(/>/g,">"),t=t.replace(/"/g,"""),t}function Zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zt=function(){return!!e})()}var Xt=function(n){function r(){var e,t,n,i;return a(this,r),t=this,n=h(n=r),(e=f(t,Zt()?Reflect.construct(n,[],h(t).constructor):n.apply(t,i))).name="Diff",e.module="Diff",e.description="Compares two inputs (separated by the specified delimiter) and highlights the differences between them.",e.infoURL="https://wikipedia.org/wiki/File_comparison",e.inputType="string",e.outputType="html",e.args=[{name:"Sample delimiter",type:"binaryString",value:"\\n\\n"},{name:"Diff by",type:"option",value:["Character","Word","Line","Sentence","CSS","JSON"]},{name:"Show added",type:"boolean",value:!0},{name:"Show removed",type:"boolean",value:!0},{name:"Show subtraction",type:"boolean",value:!1},{name:"Ignore whitespace",type:"boolean",value:!1,hint:"Relevant for word and line"}],e}return d(r,n),c(r,[{key:"run",value:function(n,r){var i,a=o(r,6),u=a[0],s=a[1],l=a[2],c=a[3],f=a[4],h=a[5],p=n.split(u),d="",m=e.default?e.default:t;if(!p||2!==p.length)throw new C("Incorrect number of samples, perhaps you need to modify the sample delimiter or add more samples?");switch(s){case"Character":i=m.diffChars(p[0],p[1]);break;case"Word":i=h?m.diffWords(p[0],p[1]):m.diffWordsWithSpace(p[0],p[1]);break;case"Line":i=h?m.diffTrimmedLines(p[0],p[1]):m.diffLines(p[0],p[1]);break;case"Sentence":i=m.diffSentences(p[0],p[1]);break;case"CSS":i=m.diffCss(p[0],p[1]);break;case"JSON":i=m.diffJson(p[0],p[1]);break;default:throw new C("Invalid 'Diff by' option.")}for(var g=0;g<i.length;g++)i[g].added?l&&(d+="<ins>"+M.escapeHtml(i[g].value)+"</ins>"):i[g].removed?c&&(d+="<del>"+M.escapeHtml(i[g].value)+"</del>"):f||(d+=M.escapeHtml(i[g].value));return d}}])}(Je);const Kt=Xt;("undefined"==typeof self?{}:self.OpModules||{}).Diff={Diff:Kt}})()})(); |