mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-01 05:31:01 +01:00
2 lines
514 KiB
JavaScript
2 lines
514 KiB
JavaScript
|
/*! For license information please see Compression.js.LICENSE.txt */
|
||
|
(()=>{var __webpack_modules__={67526:(A,e)=>{"use strict";e.byteLength=function(A){var e=n(A),t=e[0],I=e[1];return 3*(t+I)/4-I},e.toByteArray=function(A){var e,t,g=n(A),i=g[0],o=g[1],a=new r(function(A,e,t){return 3*(e+t)/4-t}(0,i,o)),C=0,B=o>0?i-4:i;for(t=0;t<B;t+=4)e=I[A.charCodeAt(t)]<<18|I[A.charCodeAt(t+1)]<<12|I[A.charCodeAt(t+2)]<<6|I[A.charCodeAt(t+3)],a[C++]=e>>16&255,a[C++]=e>>8&255,a[C++]=255&e;return 2===o&&(e=I[A.charCodeAt(t)]<<2|I[A.charCodeAt(t+1)]>>4,a[C++]=255&e),1===o&&(e=I[A.charCodeAt(t)]<<10|I[A.charCodeAt(t+1)]<<4|I[A.charCodeAt(t+2)]>>2,a[C++]=e>>8&255,a[C++]=255&e),a},e.fromByteArray=function(A){for(var e,I=A.length,r=I%3,g=[],i=16383,n=0,a=I-r;n<a;n+=i)g.push(o(A,n,n+i>a?a:n+i));return 1===r?(e=A[I-1],g.push(t[e>>2]+t[e<<4&63]+"==")):2===r&&(e=(A[I-2]<<8)+A[I-1],g.push(t[e>>10]+t[e>>4&63]+t[e<<2&63]+"=")),g.join("")};for(var t=[],I=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)t[i]=g[i],I[g.charCodeAt(i)]=i;function n(A){var e=A.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=A.indexOf("=");return-1===t&&(t=e),[t,t===e?0:4-t%4]}function o(A,e,I){for(var r,g,i=[],n=e;n<I;n+=3)r=(A[n]<<16&16711680)+(A[n+1]<<8&65280)+(255&A[n+2]),i.push(t[(g=r)>>18&63]+t[g>>12&63]+t[g>>6&63]+t[63&g]);return i.join("")}I["-".charCodeAt(0)]=62,I["_".charCodeAt(0)]=63},48287:(A,e,t)=>{"use strict";const I=t(67526),r=t(251),g="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.INSPECT_MAX_BYTES=50;const i=2147483647;function n(A){if(A>i)throw new RangeError('The value "'+A+'" is invalid for option "size"');const e=new Uint8Array(A);return Object.setPrototypeOf(e,o.prototype),e}function o(A,e,t){if("number"==typeof A){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return B(A)}return a(A,e,t)}function a(A,e,t){if("string"==typeof A)return function(A,e){if("string"==typeof e&&""!==e||(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=0|Q(A,e);let I=n(t);const r=I.write(A,e);return r!==t&&(I=I.slice(0,r)),I}(A,e);if(ArrayBuffer.isView(A))return function(A){if(Z(A,Uint8Array)){const e=new Uint8Array(A);return E(e.buffer,e.byteOffset,e.byteLength)}return s(A)}(A);if(null==A)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(Z(A,ArrayBuffer)||A&&Z(A.buffer,ArrayBuffer))return E(A,e,t);if("undefined"!=typeof SharedArrayBuffer&&(Z(A,SharedArrayBuffer)||A&&Z(A.buffer,SharedArrayBuffer)))return E(A,e,t);if("number"==typeof A)throw new TypeError('The "value" argument must not be of type number. Received type number');const I=A.valueOf&&A.valueOf();if(null!=I&&I!==A)return o.from(I,e,t);const r=function(A){if(o.isBuffer(A)){const e=0|h(A.length),t=n(e);return 0===t.length||A.copy(t,0,0,e),t}return void 0!==A.length?"number"!=typeof A.length||j(A.length)?n(0):s(A):"Buffer"===A.type&&Array.isArray(A.data)?s(A.data):void 0}(A);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof A[Symbol.toPrimitive])return o.from(A[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}function C(A){if("number"!=typeof A)throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function B(A){return C(A),n(A<0?0:0|h(A))}function s(A){const e=A.length<0?0:0|h(A.length),t=n(e);for(let I=0;I<e;I+=1)t[I]=255&A[I];return t}function E(A,e,t){if(e<0||A.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let I;return I=void 0===e&&void 0===t?new Uint8Array(A):void 0===t?new Uint8Array(A,e):new Uint8Array(A,e,t),Object.setPrototypeOf(I,o.p
|