From 325e185171488d891e41f2df67b45483ca6ddf75 Mon Sep 17 00:00:00 2001 From: Sam Thorogood Date: Mon, 29 Aug 2022 23:04:59 +1000 Subject: [PATCH] var --- src/buffer.js | 5 +++-- src/lowlevel.js | 48 ++++++++++++++++++++++++------------------------ src/o-decoder.js | 18 ++++++++++-------- src/o-encoder.js | 2 +- src/shared.js | 4 ++-- src/support.js | 2 +- src/xhr.js | 6 +++--- text.min.js | 9 +++------ text.min.js.map | 11 +++++------ 9 files changed, 52 insertions(+), 53 deletions(-) diff --git a/src/buffer.js b/src/buffer.js index 8139204..1462cbe 100644 --- a/src/buffer.js +++ b/src/buffer.js @@ -6,8 +6,9 @@ */ export function decodeBuffer(bytes, encoding) { /** @type {Buffer} */ - let b; + var b; if (bytes instanceof Buffer) { + // @ts-ignore b = bytes; } else { b = Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength); @@ -20,4 +21,4 @@ export function decodeBuffer(bytes, encoding) { * @param {string} string * @return {Uint8Array} */ -export const encodeBuffer = (string) => Buffer.from(string); +export var encodeBuffer = (string) => Buffer.from(string); diff --git a/src/lowlevel.js b/src/lowlevel.js index cf585b3..377c4a5 100644 --- a/src/lowlevel.js +++ b/src/lowlevel.js @@ -4,20 +4,20 @@ * @return {string} */ export function decodeFallback(bytes) { - let inputIndex = 0; + var inputIndex = 0; // Create a working buffer for UTF-16 code points, but don't generate one // which is too large for small input sizes. UTF-8 to UCS-16 conversion is // going to be at most 1:1, if all code points are ASCII. The other extreme // is 4-byte UTF-8, which results in two UCS-16 points, but this is still 50% // fewer entries in the output. - const pendingSize = Math.min(256 * 256, bytes.length + 1); - const pending = new Uint16Array(pendingSize); - const chunks = []; - let pendingIndex = 0; + var pendingSize = Math.min(256 * 256, bytes.length + 1); + var pending = new Uint16Array(pendingSize); + var chunks = []; + var pendingIndex = 0; for (; ;) { - const more = inputIndex < bytes.length; + var more = inputIndex < bytes.length; // If there's no more data or there'd be no room for two UTF-16 values, // create a chunk. This isn't done at the end by simply slicing the data @@ -28,8 +28,8 @@ export function decodeFallback(bytes) { // the output code expands pretty fast in this case. // These extra vars get compiled out: they're just to make TS happy. // Turns out you can pass an ArrayLike to .apply(). - const subarray = pending.subarray(0, pendingIndex); - const arraylike = /** @type {number[]} */ (/** @type {unknown} */ (subarray)); + var subarray = pending.subarray(0, pendingIndex); + var arraylike = /** @type {number[]} */ (/** @type {unknown} */ (subarray)); chunks.push(String.fromCharCode.apply(null, arraylike)); if (!more) { @@ -46,23 +46,23 @@ export function decodeFallback(bytes) { // input data is invalid. Here, we blindly parse the data even if it's // wrong: e.g., if a 3-byte sequence doesn't have two valid continuations. - const byte1 = bytes[inputIndex++]; + var byte1 = bytes[inputIndex++]; if ((byte1 & 0x80) === 0) { // 1-byte or null pending[pendingIndex++] = byte1; } else if ((byte1 & 0xe0) === 0xc0) { // 2-byte - const byte2 = bytes[inputIndex++] & 0x3f; + var byte2 = bytes[inputIndex++] & 0x3f; pending[pendingIndex++] = ((byte1 & 0x1f) << 6) | byte2; } else if ((byte1 & 0xf0) === 0xe0) { // 3-byte - const byte2 = bytes[inputIndex++] & 0x3f; - const byte3 = bytes[inputIndex++] & 0x3f; + var byte2 = bytes[inputIndex++] & 0x3f; + var byte3 = bytes[inputIndex++] & 0x3f; pending[pendingIndex++] = ((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3; } else if ((byte1 & 0xf8) === 0xf0) { // 4-byte - const byte2 = bytes[inputIndex++] & 0x3f; - const byte3 = bytes[inputIndex++] & 0x3f; - const byte4 = bytes[inputIndex++] & 0x3f; + var byte2 = bytes[inputIndex++] & 0x3f; + var byte3 = bytes[inputIndex++] & 0x3f; + var byte4 = bytes[inputIndex++] & 0x3f; // this can be > 0xffff, so possibly generate surrogates - let codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; + var codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; if (codepoint > 0xffff) { // codepoint &= ~0x10000; codepoint -= 0x10000; @@ -82,19 +82,19 @@ export function decodeFallback(bytes) { * @return {Uint8Array} */ export function encodeFallback(string) { - let pos = 0; - const len = string.length; + var pos = 0; + var len = string.length; - let at = 0; // output position - let tlen = Math.max(32, len + (len >>> 1) + 7); // 1.5x size - let target = new Uint8Array((tlen >>> 3) << 3); // ... but at 8 byte offset + var at = 0; // output position + var tlen = Math.max(32, len + (len >>> 1) + 7); // 1.5x size + var target = new Uint8Array((tlen >>> 3) << 3); // ... but at 8 byte offset while (pos < len) { - let value = string.charCodeAt(pos++); + var value = string.charCodeAt(pos++); if (value >= 0xd800 && value <= 0xdbff) { // high surrogate if (pos < len) { - const extra = string.charCodeAt(pos); + var extra = string.charCodeAt(pos); if ((extra & 0xfc00) === 0xdc00) { ++pos; value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; @@ -111,7 +111,7 @@ export function encodeFallback(string) { tlen *= (1.0 + (pos / string.length) * 2); // take 2x the remaining tlen = (tlen >>> 3) << 3; // 8 byte offset - const update = new Uint8Array(tlen); + var update = new Uint8Array(tlen); update.set(target); target = update; } diff --git a/src/o-decoder.js b/src/o-decoder.js index 5256eac..88cc0dc 100644 --- a/src/o-decoder.js +++ b/src/o-decoder.js @@ -4,11 +4,11 @@ import { failedToString, maybeThrowFailedToOption } from './shared.js'; import { hasBufferFrom } from './support.js'; import { decodeSyncXHR } from './xhr.js'; -const trySyncXHR = !hasBufferFrom && (typeof Blob === 'function' && typeof URL === 'function' && typeof URL.createObjectURL === 'function'); -const validUtfLabels = ['utf-8', 'utf8', 'unicode-1-1-utf-8']; +var trySyncXHR = !hasBufferFrom && (typeof Blob === 'function' && typeof URL === 'function' && typeof URL.createObjectURL === 'function'); +var validUtfLabels = ['utf-8', 'utf8', 'unicode-1-1-utf-8']; /** @type {(bytes: Uint8Array, encoding: string) => string} */ -let decodeImpl = decodeFallback; +var decodeImpl = decodeFallback; if (hasBufferFrom) { decodeImpl = decodeBuffer; } else if (trySyncXHR) { @@ -22,8 +22,8 @@ if (hasBufferFrom) { } -const ctorString = `construct 'TextDecoder'`; -const errorPrefix = `${failedToString} ${ctorString}: the `; +var ctorString = `construct 'TextDecoder'`; +var errorPrefix = `${failedToString} ${ctorString}: the `; /** @@ -31,11 +31,13 @@ const errorPrefix = `${failedToString} ${ctorString}: the `; * @param {string=} utfLabel * @param {{fatal: boolean}=} options */ -export function FastTextDecoder(utfLabel = 'utf-8', options) { +export function FastTextDecoder(utfLabel, options) { maybeThrowFailedToOption(options && options.fatal, ctorString, 'fatal'); + utfLabel = utfLabel || 'utf-8'; + /** @type {boolean} */ - let ok; + var ok; if (hasBufferFrom) { ok = Buffer.isEncoding(utfLabel); } else { @@ -58,7 +60,7 @@ export function FastTextDecoder(utfLabel = 'utf-8', options) { FastTextDecoder.prototype.decode = function (buffer, options) { maybeThrowFailedToOption(options && options.stream, 'decode', 'stream'); - let bytes; + var bytes; if (buffer instanceof Uint8Array) { // Accept Uint8Array instances as-is. This is also a Node buffer. diff --git a/src/o-encoder.js b/src/o-encoder.js index 9ada541..eb8bcfe 100644 --- a/src/o-encoder.js +++ b/src/o-encoder.js @@ -3,7 +3,7 @@ import { encodeFallback } from './lowlevel.js'; import { maybeThrowFailedToOption } from './shared.js'; import { hasBufferFrom } from './support.js'; -export const encodeImpl = hasBufferFrom ? encodeFallback : encodeBuffer; +export var encodeImpl = hasBufferFrom ? encodeFallback : encodeBuffer; /** * @constructor diff --git a/src/shared.js b/src/shared.js index f225fa3..9688734 100644 --- a/src/shared.js +++ b/src/shared.js @@ -1,12 +1,12 @@ -export const failedToString = 'Failed to '; +export var failedToString = 'Failed to '; /** * @param {boolean|undefined} check * @param {string} operation * @param {string} fieldName */ -export const maybeThrowFailedToOption = (check, operation, fieldName) => { +export var maybeThrowFailedToOption = (check, operation, fieldName) => { if (check) { throw new Error(`${failedToString}${operation}: the '${fieldName}' option is unsupported.`); } diff --git a/src/support.js b/src/support.js index 2551dc7..103abfa 100644 --- a/src/support.js +++ b/src/support.js @@ -1,2 +1,2 @@ -export const hasBufferFrom = (typeof Buffer === 'function' && Buffer.from); \ No newline at end of file +export var hasBufferFrom = (typeof Buffer === 'function' && Buffer.from); \ No newline at end of file diff --git a/src/xhr.js b/src/xhr.js index 159e1ea..e09fdce 100644 --- a/src/xhr.js +++ b/src/xhr.js @@ -9,15 +9,15 @@ * @return {string} */ export function decodeSyncXHR(bytes) { - let u; + var u; // This hack will fail in non-Edgium Edge because sync XHRs are disabled (and // possibly in other places), so ensure there's a fallback call. try { - const b = new Blob([bytes], { type: 'text/plain;charset=UTF-8' }); + var b = new Blob([bytes], { type: 'text/plain;charset=UTF-8' }); u = URL.createObjectURL(b); - const x = new XMLHttpRequest(); + var x = new XMLHttpRequest(); x.open('GET', u, false); x.send(); return x.responseText; diff --git a/text.min.js b/text.min.js index 21fc033..fccdebd 100644 --- a/text.min.js +++ b/text.min.js @@ -1,6 +1,3 @@ -(function(l){function m(){}function k(a,c){a=void 0===a?"utf-8":a;c=void 0===c?{fatal:!1}:c;if(-1===r.indexOf(a.toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+a+"') is invalid.");if(c.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.");}function t(a){return Buffer.from(a.buffer,a.byteOffset,a.byteLength).toString("utf-8")}function u(a){try{var c=URL.createObjectURL(new Blob([a],{type:"text/plain;charset=UTF-8"})); -var f=new XMLHttpRequest;f.open("GET",c,!1);f.send();return f.responseText}catch(e){return q(a)}finally{c&&URL.revokeObjectURL(c)}}function q(a){for(var c=0,f=Math.min(65536,a.length+1),e=new Uint16Array(f),h=[],d=0;;){var b=c=f-1){h.push(String.fromCharCode.apply(null,e.subarray(0,d)));if(!b)return h.join("");a=a.subarray(c);d=c=0}b=a[c++];if(0===(b&128))e[d++]=b;else if(192===(b&224)){var g=a[c++]&63;e[d++]=(b&31)<<6|g}else if(224===(b&240)){g=a[c++]&63;var n=a[c++]&63;e[d++]= -(b&31)<<12|g<<6|n}else if(240===(b&248)){g=a[c++]&63;n=a[c++]&63;var v=a[c++]&63;b=(b&7)<<18|g<<12|n<<6|v;65535>>10&1023|55296,b=56320|b&1023);e[d++]=b}}}if(l.TextEncoder&&l.TextDecoder)return!1;var r=["utf-8","utf8","unicode-1-1-utf-8"];Object.defineProperty(m.prototype,"encoding",{value:"utf-8"});m.prototype.encode=function(a,c){c=void 0===c?{stream:!1}:c;if(c.stream)throw Error("Failed to encode: the 'stream' option is unsupported.");c=0;for(var f=a.length,e=0,h=Math.max(32, -f+(f>>>1)+7),d=new Uint8Array(h>>>3<<3);c=b){if(c=b)continue}e+4>d.length&&(h+=8,h*=1+c/a.length*2,h=h>>>3<<3,g=new Uint8Array(h),g.set(d),d=g);if(0===(b&4294967168))d[e++]=b;else{if(0===(b&4294965248))d[e++]=b>>>6&31|192;else if(0===(b&4294901760))d[e++]=b>>>12&15|224,d[e++]=b>>>6&63|128;else if(0===(b&4292870144))d[e++]=b>>>18&7|240,d[e++]=b>>>12& -63|128,d[e++]=b>>>6&63|128;else continue;d[e++]=b&63|128}}return d.slice?d.slice(0,e):d.subarray(0,e)};Object.defineProperty(k.prototype,"encoding",{value:"utf-8"});Object.defineProperty(k.prototype,"fatal",{value:!1});Object.defineProperty(k.prototype,"ignoreBOM",{value:!1});var p=q;"function"===typeof Buffer&&Buffer.from?p=t:"function"===typeof Blob&&"function"===typeof URL&&"function"===typeof URL.createObjectURL&&(p=u);k.prototype.decode=function(a,c){c=void 0===c?{stream:!1}:c;if(c.stream)throw Error("Failed to decode: the 'stream' option is unsupported."); -a=a instanceof Uint8Array?a:a.buffer instanceof ArrayBuffer?new Uint8Array(a.buffer):new Uint8Array(a);return p(a)};l.TextEncoder=m;l.TextDecoder=k})("undefined"!==typeof window?window:"undefined"!==typeof global?global:this); +(function(scope) {'use strict'; +function B(r,e){var f;return r instanceof Buffer?f=r:f=Buffer.from(r.buffer,r.byteOffset,r.byteLength),f.toString(e)}var w=function(r){return Buffer.from(r)};function h(r){for(var e=0,f=Math.min(256*256,r.length+1),n=new Uint16Array(f),i=[],o=0;;){var t=e=f-1){var s=n.subarray(0,o),m=s;if(i.push(String.fromCharCode.apply(null,m)),!t)return i.join("");r=r.subarray(e),e=0,o=0}var a=r[e++];if((a&128)===0)n[o++]=a;else if((a&224)===192){var d=r[e++]&63;n[o++]=(a&31)<<6|d}else if((a&240)===224){var d=r[e++]&63,l=r[e++]&63;n[o++]=(a&31)<<12|d<<6|l}else if((a&248)===240){var d=r[e++]&63,l=r[e++]&63,R=r[e++]&63,c=(a&7)<<18|d<<12|l<<6|R;c>65535&&(c-=65536,n[o++]=c>>>10&1023|55296,c=56320|c&1023),n[o++]=c}}}function F(r){for(var e=0,f=r.length,n=0,i=Math.max(32,f+(f>>>1)+7),o=new Uint8Array(i>>>3<<3);e=55296&&t<=56319){if(e=55296&&t<=56319)continue}if(n+4>o.length){i+=8,i*=1+e/r.length*2,i=i>>>3<<3;var m=new Uint8Array(i);m.set(o),o=m}if((t&4294967168)===0){o[n++]=t;continue}else if((t&4294965248)===0)o[n++]=t>>>6&31|192;else if((t&4294901760)===0)o[n++]=t>>>12&15|224,o[n++]=t>>>6&63|128;else if((t&4292870144)===0)o[n++]=t>>>18&7|240,o[n++]=t>>>12&63|128,o[n++]=t>>>6&63|128;else continue;o[n++]=t&63|128}return o.slice?o.slice(0,n):o.subarray(0,n)}var u="Failed to ",p=function(r,e,f){if(r)throw new Error("".concat(u).concat(e,": the '").concat(f,"' option is unsupported."))};var x=typeof Buffer=="function"&&Buffer.from;var A=x?F:w;function v(){this.encoding="utf-8"}v.prototype.encode=function(r,e){return p(e&&e.stream,"encode","stream"),A(r)};function U(r){var e;try{var f=new Blob([r],{type:"text/plain;charset=UTF-8"});e=URL.createObjectURL(f);var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(),n.responseText}finally{e&&URL.revokeObjectURL(e)}}var O=!x&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",S=["utf-8","utf8","unicode-1-1-utf-8"],T=h;x?T=B:O&&(T=function(r){try{return U(r)}catch(e){return h(r)}});var y="construct 'TextDecoder'",E="".concat(u," ").concat(y,": the ");function g(r,e){p(e&&e.fatal,y,"fatal"),r=r||"utf-8";var f;if(x?f=Buffer.isEncoding(r):f=S.indexOf(r.toLowerCase())!==-1,!f)throw new RangeError("".concat(E," encoding label provided ('").concat(r,"') is invalid."));this.encoding=r,this.fatal=!1,this.ignoreBOM=!1}g.prototype.decode=function(r,e){p(e&&e.stream,"decode","stream");var f;return r instanceof Uint8Array?f=r:r.buffer instanceof ArrayBuffer?f=new Uint8Array(r.buffer):f=new Uint8Array(r),T(f,this.encoding)};scope.TextEncoder=scope.TextEncoder||v;scope.TextDecoder=scope.TextDecoder||g; +}(typeof window !== 'undefined' ? window : (typeof global !== 'undefined' ? global : this))); diff --git a/text.min.js.map b/text.min.js.map index 13b5201..e471ac9 100644 --- a/text.min.js.map +++ b/text.min.js.map @@ -1,8 +1,7 @@ { -"version":3, -"file":"text.min.js", -"lineCount":6, -"mappings":"AAsBC,SAAQ,CAACA,CAAD,CAAQ,CAcjBC,QAASA,EAAe,EAAG,EAgF3BC,QAASA,EAAe,CAACC,CAAD,CAAmBC,CAAnB,CAA2C,CAA1CD,CAAA,CAAA,IAAA,EAAA,GAAAA,CAAA,CAAS,OAAT,CAAAA,CAAkBC,EAAA,CAAA,IAAA,EAAA,GAAAA,CAAA,CAAQ,CAACC,MAAO,CAAA,CAAR,CAAR,CAAAD,CACzC,IAAuD,CAAC,CAAxD,GAAIE,CAAeC,CAAAA,OAAf,CAAuBJ,CAASK,CAAAA,WAAT,EAAvB,CAAJ,CACE,KAAM,KAAIC,UAAJ,CACH,mEADG,CACgEN,CADhE,CACH,gBADG,CAAN,CAGF,GAAIC,CAAQC,CAAAA,KAAZ,CACE,KAAUK,MAAJ,CAAW,uEAAX,CAAN,CAN+D,CAoBnEC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,MA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CAAQ,CAACwD,OAAQ,CAAA,CAAT,CAAR,CAAAxD,CACrD,IAAIA,CAAA,CAAA,MAAJ,CACE,KAAUM,MAAJ,CAAW,uDAAX,CAAN;AAOAE,CAAA,CAFEG,CAAJ,WAAsBoD,WAAtB,CAEUpD,CAFV,CAGWA,CAAOA,CAAAA,MAAX,WAA6B2D,YAA7B,CAIG,IAAIP,UAAJ,CAAepD,CAAOA,CAAAA,MAAtB,CAJH,CASG,IAAIoD,UAAJ,CAAepD,CAAf,CAGV,OAAO0D,EAAA,CAAuC7D,CAAvC,CAtBuE,CAyBhFZ,EAAA,CAAA,WAAA,CAAuBC,CACvBD,EAAA,CAAA,WAAA,CAAuBE,CAnQN,CAAhB,CAAA,CAqQmB,WAAlB,GAAA,MAAOyE,OAAP,CAAgCA,MAAhC,CAA4D,WAAlB,GAAA,MAAOC,OAAP,CAAgCA,MAAhC,CAAyC,IArQpF;", -"sources":["text.js"], -"names":["scope","FastTextEncoder","FastTextDecoder","utfLabel","options","fatal","validUtfLabels","indexOf","toLowerCase","RangeError","Error","decodeBuffer","bytes","Buffer","from","buffer","byteOffset","byteLength","toString","decodeSyncXHR","u","URL","createObjectURL","b","Blob","type","x","XMLHttpRequest","open","send","responseText","e","decodeFallback","revokeObjectURL","inputIndex","pendingSize","Math","min","length","pending","Uint16Array","chunks","pendingIndex","more","push","String","fromCharCode","apply","subarray","join","byte1","byte2","byte3","byte4","codepoint","Object","defineProperty","prototype","value","string","stream","pos","len","at","tlen","max","target","Uint8Array","charCodeAt","extra","update","set","slice","decodeImpl","ArrayBuffer","window","global"] + "version": 3, + "sources": ["src/buffer.js", "src/lowlevel.js", "src/shared.js", "src/support.js", "src/o-encoder.js", "src/xhr.js", "src/o-decoder.js", "src/polyfill.js"], + "sourcesContent": ["\n/**\n * @param {Uint8Array} bytes\n * @param {string} encoding\n * @return {string}\n */\nexport function decodeBuffer(bytes, encoding) {\n /** @type {Buffer} */\n var b;\n if (bytes instanceof Buffer) {\n // @ts-ignore\n b = bytes;\n } else {\n b = Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n }\n return b.toString(/** @type {BufferEncoding} */(encoding));\n}\n\n\n/**\n * @param {string} string\n * @return {Uint8Array}\n */\nexport var encodeBuffer = (string) => Buffer.from(string);\n", "\n/**\n * @param {Uint8Array} bytes\n * @return {string}\n */\nexport function decodeFallback(bytes) {\n var inputIndex = 0;\n\n // Create a working buffer for UTF-16 code points, but don't generate one\n // which is too large for small input sizes. UTF-8 to UCS-16 conversion is\n // going to be at most 1:1, if all code points are ASCII. The other extreme\n // is 4-byte UTF-8, which results in two UCS-16 points, but this is still 50%\n // fewer entries in the output.\n var pendingSize = Math.min(256 * 256, bytes.length + 1);\n var pending = new Uint16Array(pendingSize);\n var chunks = [];\n var pendingIndex = 0;\n\n for (; ;) {\n var more = inputIndex < bytes.length;\n\n // If there's no more data or there'd be no room for two UTF-16 values,\n // create a chunk. This isn't done at the end by simply slicing the data\n // into equal sized chunks as we might hit a surrogate pair.\n if (!more || (pendingIndex >= pendingSize - 1)) {\n // nb. .apply and friends are *really slow*. Low-hanging fruit is to\n // expand this to literally pass pending[0], pending[1], ... etc, but\n // the output code expands pretty fast in this case.\n // These extra vars get compiled out: they're just to make TS happy.\n // Turns out you can pass an ArrayLike to .apply().\n var subarray = pending.subarray(0, pendingIndex);\n var arraylike = /** @type {number[]} */ (/** @type {unknown} */ (subarray));\n chunks.push(String.fromCharCode.apply(null, arraylike));\n\n if (!more) {\n return chunks.join('');\n }\n\n // Move the buffer forward and create another chunk.\n bytes = bytes.subarray(inputIndex);\n inputIndex = 0;\n pendingIndex = 0;\n }\n\n // The native TextDecoder will generate \"REPLACEMENT CHARACTER\" where the\n // input data is invalid. Here, we blindly parse the data even if it's\n // wrong: e.g., if a 3-byte sequence doesn't have two valid continuations.\n\n var byte1 = bytes[inputIndex++];\n if ((byte1 & 0x80) === 0) { // 1-byte or null\n pending[pendingIndex++] = byte1;\n } else if ((byte1 & 0xe0) === 0xc0) { // 2-byte\n var byte2 = bytes[inputIndex++] & 0x3f;\n pending[pendingIndex++] = ((byte1 & 0x1f) << 6) | byte2;\n } else if ((byte1 & 0xf0) === 0xe0) { // 3-byte\n var byte2 = bytes[inputIndex++] & 0x3f;\n var byte3 = bytes[inputIndex++] & 0x3f;\n pending[pendingIndex++] = ((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3;\n } else if ((byte1 & 0xf8) === 0xf0) { // 4-byte\n var byte2 = bytes[inputIndex++] & 0x3f;\n var byte3 = bytes[inputIndex++] & 0x3f;\n var byte4 = bytes[inputIndex++] & 0x3f;\n\n // this can be > 0xffff, so possibly generate surrogates\n var codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;\n if (codepoint > 0xffff) {\n // codepoint &= ~0x10000;\n codepoint -= 0x10000;\n pending[pendingIndex++] = (codepoint >>> 10) & 0x3ff | 0xd800;\n codepoint = 0xdc00 | codepoint & 0x3ff;\n }\n pending[pendingIndex++] = codepoint;\n } else {\n // invalid initial byte\n }\n }\n}\n\n\n/**\n * @param {string} string\n * @return {Uint8Array}\n */\nexport function encodeFallback(string) {\n var pos = 0;\n var len = string.length;\n\n var at = 0; // output position\n var tlen = Math.max(32, len + (len >>> 1) + 7); // 1.5x size\n var target = new Uint8Array((tlen >>> 3) << 3); // ... but at 8 byte offset\n\n while (pos < len) {\n var value = string.charCodeAt(pos++);\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < len) {\n var extra = string.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n if (value >= 0xd800 && value <= 0xdbff) {\n continue; // drop lone surrogate\n }\n }\n\n // expand the buffer if we couldn't write 4 bytes\n if (at + 4 > target.length) {\n tlen += 8; // minimum extra\n tlen *= (1.0 + (pos / string.length) * 2); // take 2x the remaining\n tlen = (tlen >>> 3) << 3; // 8 byte offset\n\n var update = new Uint8Array(tlen);\n update.set(target);\n target = update;\n }\n\n if ((value & 0xffffff80) === 0) { // 1-byte\n target[at++] = value; // ASCII\n continue;\n } else if ((value & 0xfffff800) === 0) { // 2-byte\n target[at++] = ((value >>> 6) & 0x1f) | 0xc0;\n } else if ((value & 0xffff0000) === 0) { // 3-byte\n target[at++] = ((value >>> 12) & 0x0f) | 0xe0;\n target[at++] = ((value >>> 6) & 0x3f) | 0x80;\n } else if ((value & 0xffe00000) === 0) { // 4-byte\n target[at++] = ((value >>> 18) & 0x07) | 0xf0;\n target[at++] = ((value >>> 12) & 0x3f) | 0x80;\n target[at++] = ((value >>> 6) & 0x3f) | 0x80;\n } else {\n continue; // out of range\n }\n\n target[at++] = (value & 0x3f) | 0x80;\n }\n\n // Use subarray if slice isn't supported (IE11). This will use more memory\n // because the original array still exists.\n return target.slice ? target.slice(0, at) : target.subarray(0, at);\n}\n", "\nexport var failedToString = 'Failed to ';\n\n/**\n * @param {boolean|undefined} check \n * @param {string} operation \n * @param {string} fieldName \n */\nexport var maybeThrowFailedToOption = (check, operation, fieldName) => {\n if (check) {\n throw new Error(`${failedToString}${operation}: the '${fieldName}' option is unsupported.`);\n }\n};", "\nexport var hasBufferFrom = (typeof Buffer === 'function' && Buffer.from);", "import { encodeBuffer } from './buffer.js';\nimport { encodeFallback } from './lowlevel.js';\nimport { maybeThrowFailedToOption } from './shared.js';\nimport { hasBufferFrom } from './support.js';\n\nexport var encodeImpl = hasBufferFrom ? encodeFallback : encodeBuffer;\n\n/**\n * @constructor\n */\nexport function FastTextEncoder() {\n // This does not accept an encoding, and always uses UTF-8:\n // https://www.w3.org/TR/encoding/#dom-textencoder\n this.encoding = 'utf-8';\n}\n\n/**\n * @param {string} string\n * @param {{stream: boolean}=} options\n * @return {Uint8Array}\n */\nFastTextEncoder.prototype.encode = function (string, options) {\n maybeThrowFailedToOption(options && options.stream, 'encode', 'stream');\n return encodeImpl(string);\n};\n", "\n/**\n * This is a horrible hack which works in some old browsers. We can tell them to decode bytes via\n * sync XHR.\n *\n * Throws if fails. Should be wrapped in something to check that.\n *\n * @param {Uint8Array} bytes\n * @return {string}\n */\nexport function decodeSyncXHR(bytes) {\n var u;\n\n // This hack will fail in non-Edgium Edge because sync XHRs are disabled (and\n // possibly in other places), so ensure there's a fallback call.\n try {\n var b = new Blob([bytes], { type: 'text/plain;charset=UTF-8' });\n u = URL.createObjectURL(b);\n\n var x = new XMLHttpRequest();\n x.open('GET', u, false);\n x.send();\n return x.responseText;\n } finally {\n if (u) {\n URL.revokeObjectURL(u);\n }\n }\n}", "import { decodeBuffer } from './buffer.js';\nimport { decodeFallback } from './lowlevel.js';\nimport { failedToString, maybeThrowFailedToOption } from './shared.js';\nimport { hasBufferFrom } from './support.js';\nimport { decodeSyncXHR } from './xhr.js';\n\nvar trySyncXHR = !hasBufferFrom && (typeof Blob === 'function' && typeof URL === 'function' && typeof URL.createObjectURL === 'function');\nvar validUtfLabels = ['utf-8', 'utf8', 'unicode-1-1-utf-8'];\n\n/** @type {(bytes: Uint8Array, encoding: string) => string} */\nvar decodeImpl = decodeFallback;\nif (hasBufferFrom) {\n decodeImpl = decodeBuffer;\n} else if (trySyncXHR) {\n decodeImpl = (string) => {\n try {\n return decodeSyncXHR(string);\n } catch (e) {\n return decodeFallback(string);\n }\n };\n}\n\n\nvar ctorString = `construct 'TextDecoder'`;\nvar errorPrefix = `${failedToString} ${ctorString}: the `;\n\n\n/**\n * @constructor\n * @param {string=} utfLabel\n * @param {{fatal: boolean}=} options\n */\nexport function FastTextDecoder(utfLabel, options) {\n maybeThrowFailedToOption(options && options.fatal, ctorString, 'fatal');\n\n utfLabel = utfLabel || 'utf-8';\n\n /** @type {boolean} */\n var ok;\n if (hasBufferFrom) {\n ok = Buffer.isEncoding(utfLabel);\n } else {\n ok = validUtfLabels.indexOf(utfLabel.toLowerCase()) !== -1;\n }\n if (!ok) {\n throw new RangeError(`${errorPrefix} encoding label provided ('${utfLabel}') is invalid.`);\n }\n\n this.encoding = utfLabel;\n this.fatal = false;\n this.ignoreBOM = false;\n}\n\n/**\n * @param {(ArrayBuffer|ArrayBufferView)} buffer\n * @param {{stream: boolean}=} options\n * @return {string}\n */\nFastTextDecoder.prototype.decode = function (buffer, options) {\n maybeThrowFailedToOption(options && options.stream, 'decode', 'stream');\n\n var bytes;\n\n if (buffer instanceof Uint8Array) {\n // Accept Uint8Array instances as-is. This is also a Node buffer.\n bytes = buffer;\n } else if (buffer['buffer'] instanceof ArrayBuffer) {\n // Look for ArrayBufferView, which isn't a real type, but basically\n // represents all the valid TypedArray types plus DataView. They all have\n // \".buffer\" as an instance of ArrayBuffer.\n bytes = new Uint8Array(/** @type {ArrayBufferView} */(buffer).buffer);\n } else {\n // The only other valid argument here is that \"buffer\" is an ArrayBuffer.\n // We also try to convert anything else passed to a Uint8Array, as this\n // catches anything that's array-like. Native code would throw here.\n bytes = new Uint8Array(/** @type {any} */(buffer));\n }\n\n return decodeImpl(bytes, this.encoding);\n};\n", "\nimport { FastTextEncoder } from './o-encoder.js';\nimport { FastTextDecoder } from './o-decoder.js';\n\n// /** @type {object} */\n// const scope = typeof window !== 'undefined' ? window : (typeof global !== 'undefined' ? global : this);\n\nscope['TextEncoder'] = scope['TextEncoder'] || FastTextEncoder;\nscope['TextDecoder'] = scope['TextDecoder'] || FastTextDecoder;\n\n// export {};\n"], + "mappings": ";AAMO,SAASA,EAAaC,EAAOC,EAAU,CAE5C,IAAIC,EACJ,OAAIF,aAAiB,OAEnBE,EAAIF,EAEJE,EAAI,OAAO,KAAKF,EAAM,OAAQA,EAAM,WAAYA,EAAM,UAAU,EAE3DE,EAAE,SAAuCD,CAAS,CAC3D,CAOO,IAAIE,EAAe,SAACC,EAAQ,CAAG,cAAO,KAAKA,CAAM,GClBjD,SAASC,EAAeC,EAAO,CAapC,QAZIC,EAAa,EAObC,EAAc,KAAK,IAAI,IAAM,IAAKF,EAAM,OAAS,CAAC,EAClDG,EAAU,IAAI,YAAYD,CAAW,EAC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B,CAOAD,EAAgB,UAAU,OAAS,SAAUK,EAAQH,EAAS,CAC5DC,EAAyBD,GAAWA,EAAQ,OAAQ,SAAU,QAAQ,EAEtE,IAAII,EAEJ,OAAID,aAAkB,WAEpBC,EAAQD,EACCA,EAAO,kBAAqB,YAIrCC,EAAQ,IAAI,WAA0CD,EAAQ,MAAM,EAKpEC,EAAQ,IAAI,WAA8BD,CAAO,EAG5Cb,EAAWc,EAAO,KAAK,QAAQ,CACxC,ECzEA,MAAM,YAAiB,MAAM,aAAkBC,EAC/C,MAAM,YAAiB,MAAM,aAAkBC", + "names": ["decodeBuffer", "bytes", "encoding", "b", "encodeBuffer", "string", "decodeFallback", "bytes", "inputIndex", "pendingSize", "pending", "chunks", "pendingIndex", "more", "subarray", "arraylike", "byte1", "byte2", "byte3", "byte4", "codepoint", "encodeFallback", "string", "pos", "len", "at", "tlen", "target", "value", "extra", "update", "failedToString", "maybeThrowFailedToOption", "check", "operation", "fieldName", "hasBufferFrom", "encodeImpl", "hasBufferFrom", "encodeFallback", "encodeBuffer", "FastTextEncoder", "string", "options", "maybeThrowFailedToOption", "decodeSyncXHR", "bytes", "u", "b", "x", "trySyncXHR", "hasBufferFrom", "validUtfLabels", "decodeImpl", "decodeFallback", "decodeBuffer", "string", "decodeSyncXHR", "ctorString", "errorPrefix", "failedToString", "FastTextDecoder", "utfLabel", "options", "maybeThrowFailedToOption", "ok", "buffer", "bytes", "FastTextEncoder", "FastTextDecoder"] }