Добавлена ДБ
This commit is contained in:
81
node_modules/effect/dist/cjs/internal/encoding/base64.js
generated
vendored
Normal file
81
node_modules/effect/dist/cjs/internal/encoding/base64.js
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.stripCrlf = exports.encode = exports.decode = void 0;
|
||||
var Either = _interopRequireWildcard(require("../../Either.js"));
|
||||
var _common = require("./common.js");
|
||||
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
||||
/** @internal */
|
||||
const encode = bytes => {
|
||||
const length = bytes.length;
|
||||
let result = "";
|
||||
let i;
|
||||
for (i = 2; i < length; i += 3) {
|
||||
result += base64abc[bytes[i - 2] >> 2];
|
||||
result += base64abc[(bytes[i - 2] & 0x03) << 4 | bytes[i - 1] >> 4];
|
||||
result += base64abc[(bytes[i - 1] & 0x0f) << 2 | bytes[i] >> 6];
|
||||
result += base64abc[bytes[i] & 0x3f];
|
||||
}
|
||||
if (i === length + 1) {
|
||||
// 1 octet yet to write
|
||||
result += base64abc[bytes[i - 2] >> 2];
|
||||
result += base64abc[(bytes[i - 2] & 0x03) << 4];
|
||||
result += "==";
|
||||
}
|
||||
if (i === length) {
|
||||
// 2 octets yet to write
|
||||
result += base64abc[bytes[i - 2] >> 2];
|
||||
result += base64abc[(bytes[i - 2] & 0x03) << 4 | bytes[i - 1] >> 4];
|
||||
result += base64abc[(bytes[i - 1] & 0x0f) << 2];
|
||||
result += "=";
|
||||
}
|
||||
return result;
|
||||
};
|
||||
/** @internal */
|
||||
exports.encode = encode;
|
||||
const decode = str => {
|
||||
const stripped = stripCrlf(str);
|
||||
const length = stripped.length;
|
||||
if (length % 4 !== 0) {
|
||||
return Either.left((0, _common.DecodeException)(stripped, `Length must be a multiple of 4, but is ${length}`));
|
||||
}
|
||||
const index = stripped.indexOf("=");
|
||||
if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) {
|
||||
return Either.left((0, _common.DecodeException)(stripped, "Found a '=' character, but it is not at the end"));
|
||||
}
|
||||
try {
|
||||
const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
|
||||
const result = new Uint8Array(3 * (length / 4) - missingOctets);
|
||||
for (let i = 0, j = 0; i < length; i += 4, j += 3) {
|
||||
const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
|
||||
result[j] = buffer >> 16;
|
||||
result[j + 1] = buffer >> 8 & 0xff;
|
||||
result[j + 2] = buffer & 0xff;
|
||||
}
|
||||
return Either.right(result);
|
||||
} catch (e) {
|
||||
return Either.left((0, _common.DecodeException)(stripped, e instanceof Error ? e.message : "Invalid input"));
|
||||
}
|
||||
};
|
||||
/** @internal */
|
||||
exports.decode = decode;
|
||||
const stripCrlf = str => str.replace(/[\n\r]/g, "");
|
||||
/** @internal */
|
||||
exports.stripCrlf = stripCrlf;
|
||||
function getBase64Code(charCode) {
|
||||
if (charCode >= base64codes.length) {
|
||||
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
||||
}
|
||||
const code = base64codes[charCode];
|
||||
if (code === 255) {
|
||||
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
/** @internal */
|
||||
const base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
||||
/** @internal */
|
||||
const base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
|
||||
//# sourceMappingURL=base64.js.map
|
||||
1
node_modules/effect/dist/cjs/internal/encoding/base64.js.map
generated
vendored
Normal file
1
node_modules/effect/dist/cjs/internal/encoding/base64.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
30
node_modules/effect/dist/cjs/internal/encoding/base64Url.js
generated
vendored
Normal file
30
node_modules/effect/dist/cjs/internal/encoding/base64Url.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.encode = exports.decode = void 0;
|
||||
var Either = _interopRequireWildcard(require("../../Either.js"));
|
||||
var Base64 = _interopRequireWildcard(require("./base64.js"));
|
||||
var _common = require("./common.js");
|
||||
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
||||
/** @internal */
|
||||
const encode = data => Base64.encode(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
||||
/** @internal */
|
||||
exports.encode = encode;
|
||||
const decode = str => {
|
||||
const stripped = Base64.stripCrlf(str);
|
||||
const length = stripped.length;
|
||||
if (length % 4 === 1) {
|
||||
return Either.left((0, _common.DecodeException)(stripped, `Length should be a multiple of 4, but is ${length}`));
|
||||
}
|
||||
if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) {
|
||||
return Either.left((0, _common.DecodeException)(stripped, "Invalid input"));
|
||||
}
|
||||
// Some variants allow or require omitting the padding '=' signs
|
||||
let sanitized = length % 4 === 2 ? `${stripped}==` : length % 4 === 3 ? `${stripped}=` : stripped;
|
||||
sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
|
||||
return Base64.decode(sanitized);
|
||||
};
|
||||
exports.decode = decode;
|
||||
//# sourceMappingURL=base64Url.js.map
|
||||
1
node_modules/effect/dist/cjs/internal/encoding/base64Url.js.map
generated
vendored
Normal file
1
node_modules/effect/dist/cjs/internal/encoding/base64Url.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"base64Url.js","names":["Either","_interopRequireWildcard","require","Base64","_common","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","encode","data","replace","exports","decode","str","stripped","stripCrlf","length","left","DecodeException","test","sanitized"],"sources":["../../../../src/internal/encoding/base64Url.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAA6C,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAE7C;AACO,MAAMkB,MAAM,GAAIC,IAAgB,IACrCtB,MAAM,CAACqB,MAAM,CAACC,IAAI,CAAC,CAACC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AAE/E;AAAAC,OAAA,CAAAH,MAAA,GAAAA,MAAA;AACO,MAAMI,MAAM,GAAIC,GAAW,IAAyD;EACzF,MAAMC,QAAQ,GAAG3B,MAAM,CAAC4B,SAAS,CAACF,GAAG,CAAC;EACtC,MAAMG,MAAM,GAAGF,QAAQ,CAACE,MAAM;EAC9B,IAAIA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACpB,OAAOhC,MAAM,CAACiC,IAAI,CAChB,IAAAC,uBAAe,EAACJ,QAAQ,EAAE,4CAA4CE,MAAM,EAAE,CAAC,CAChF;EACH;EAEA,IAAI,CAAC,uBAAuB,CAACG,IAAI,CAACL,QAAQ,CAAC,EAAE;IAC3C,OAAO9B,MAAM,CAACiC,IAAI,CAAC,IAAAC,uBAAe,EAACJ,QAAQ,EAAE,eAAe,CAAC,CAAC;EAChE;EAEA;EACA,IAAIM,SAAS,GAAGJ,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,GAAGF,QAAQ,IAAI,GAAGE,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,GAAGF,QAAQ,GAAG,GAAGA,QAAQ;EACjGM,SAAS,GAAGA,SAAS,CAACV,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;EAE3D,OAAOvB,MAAM,CAACyB,MAAM,CAACQ,SAAS,CAAC;AACjC,CAAC;AAAAT,OAAA,CAAAC,MAAA,GAAAA,MAAA","ignoreList":[]}
|
||||
48
node_modules/effect/dist/cjs/internal/encoding/common.js
generated
vendored
Normal file
48
node_modules/effect/dist/cjs/internal/encoding/common.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isEncodeException = exports.isDecodeException = exports.encoder = exports.decoder = exports.EncodeExceptionTypeId = exports.EncodeException = exports.DecodeExceptionTypeId = exports.DecodeException = void 0;
|
||||
var _Predicate = require("../../Predicate.js");
|
||||
/** @internal */
|
||||
const DecodeExceptionTypeId = exports.DecodeExceptionTypeId = /*#__PURE__*/Symbol.for("effect/Encoding/errors/Decode");
|
||||
/** @internal */
|
||||
const DecodeException = (input, message) => {
|
||||
const out = {
|
||||
_tag: "DecodeException",
|
||||
[DecodeExceptionTypeId]: DecodeExceptionTypeId,
|
||||
input
|
||||
};
|
||||
if ((0, _Predicate.isString)(message)) {
|
||||
out.message = message;
|
||||
}
|
||||
return out;
|
||||
};
|
||||
/** @internal */
|
||||
exports.DecodeException = DecodeException;
|
||||
const isDecodeException = u => (0, _Predicate.hasProperty)(u, DecodeExceptionTypeId);
|
||||
/** @internal */
|
||||
exports.isDecodeException = isDecodeException;
|
||||
const EncodeExceptionTypeId = exports.EncodeExceptionTypeId = /*#__PURE__*/Symbol.for("effect/Encoding/errors/Encode");
|
||||
/** @internal */
|
||||
const EncodeException = (input, message) => {
|
||||
const out = {
|
||||
_tag: "EncodeException",
|
||||
[EncodeExceptionTypeId]: EncodeExceptionTypeId,
|
||||
input
|
||||
};
|
||||
if ((0, _Predicate.isString)(message)) {
|
||||
out.message = message;
|
||||
}
|
||||
return out;
|
||||
};
|
||||
/** @internal */
|
||||
exports.EncodeException = EncodeException;
|
||||
const isEncodeException = u => (0, _Predicate.hasProperty)(u, EncodeExceptionTypeId);
|
||||
/** @interal */
|
||||
exports.isEncodeException = isEncodeException;
|
||||
const encoder = exports.encoder = /*#__PURE__*/new TextEncoder();
|
||||
/** @interal */
|
||||
const decoder = exports.decoder = /*#__PURE__*/new TextDecoder();
|
||||
//# sourceMappingURL=common.js.map
|
||||
1
node_modules/effect/dist/cjs/internal/encoding/common.js.map
generated
vendored
Normal file
1
node_modules/effect/dist/cjs/internal/encoding/common.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.js","names":["_Predicate","require","DecodeExceptionTypeId","exports","Symbol","for","DecodeException","input","message","out","_tag","isString","isDecodeException","u","hasProperty","EncodeExceptionTypeId","EncodeException","isEncodeException","encoder","TextEncoder","decoder","TextDecoder"],"sources":["../../../../src/internal/encoding/common.ts"],"sourcesContent":[null],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAGA;AACO,MAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,gBAAmCE,MAAM,CAACC,GAAG,CAC7E,+BAA+B,CACE;AAEnC;AACO,MAAMC,eAAe,GAAGA,CAACC,KAAa,EAAEC,OAAgB,KAA8B;EAC3F,MAAMC,GAAG,GAAsC;IAC7CC,IAAI,EAAE,iBAAiB;IACvB,CAACR,qBAAqB,GAAGA,qBAAqB;IAC9CK;GACD;EACD,IAAI,IAAAI,mBAAQ,EAACH,OAAO,CAAC,EAAE;IACrBC,GAAG,CAACD,OAAO,GAAGA,OAAO;EACvB;EACA,OAAOC,GAAG;AACZ,CAAC;AAED;AAAAN,OAAA,CAAAG,eAAA,GAAAA,eAAA;AACO,MAAMM,iBAAiB,GAAIC,CAAU,IAAoC,IAAAC,sBAAW,EAACD,CAAC,EAAEX,qBAAqB,CAAC;AAErH;AAAAC,OAAA,CAAAS,iBAAA,GAAAA,iBAAA;AACO,MAAMG,qBAAqB,GAAAZ,OAAA,CAAAY,qBAAA,gBAAmCX,MAAM,CAACC,GAAG,CAC7E,+BAA+B,CACE;AAEnC;AACO,MAAMW,eAAe,GAAGA,CAACT,KAAa,EAAEC,OAAgB,KAA8B;EAC3F,MAAMC,GAAG,GAAsC;IAC7CC,IAAI,EAAE,iBAAiB;IACvB,CAACK,qBAAqB,GAAGA,qBAAqB;IAC9CR;GACD;EACD,IAAI,IAAAI,mBAAQ,EAACH,OAAO,CAAC,EAAE;IACrBC,GAAG,CAACD,OAAO,GAAGA,OAAO;EACvB;EACA,OAAOC,GAAG;AACZ,CAAC;AAED;AAAAN,OAAA,CAAAa,eAAA,GAAAA,eAAA;AACO,MAAMC,iBAAiB,GAAIJ,CAAU,IAAoC,IAAAC,sBAAW,EAACD,CAAC,EAAEE,qBAAqB,CAAC;AAErH;AAAAZ,OAAA,CAAAc,iBAAA,GAAAA,iBAAA;AACO,MAAMC,OAAO,GAAAf,OAAA,CAAAe,OAAA,gBAAG,IAAIC,WAAW,EAAE;AAExC;AACO,MAAMC,OAAO,GAAAjB,OAAA,CAAAiB,OAAA,gBAAG,IAAIC,WAAW,EAAE","ignoreList":[]}
|
||||
57
node_modules/effect/dist/cjs/internal/encoding/hex.js
generated
vendored
Normal file
57
node_modules/effect/dist/cjs/internal/encoding/hex.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.encode = exports.decode = void 0;
|
||||
var Either = _interopRequireWildcard(require("../../Either.js"));
|
||||
var _common = require("./common.js");
|
||||
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
||||
/** @internal */
|
||||
const encode = bytes => {
|
||||
let result = "";
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
result += bytesToHex[bytes[i]];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
/** @internal */
|
||||
exports.encode = encode;
|
||||
const decode = str => {
|
||||
const bytes = new TextEncoder().encode(str);
|
||||
if (bytes.length % 2 !== 0) {
|
||||
return Either.left((0, _common.DecodeException)(str, `Length must be a multiple of 2, but is ${bytes.length}`));
|
||||
}
|
||||
try {
|
||||
const length = bytes.length / 2;
|
||||
const result = new Uint8Array(length);
|
||||
for (let i = 0; i < length; i++) {
|
||||
const a = fromHexChar(bytes[i * 2]);
|
||||
const b = fromHexChar(bytes[i * 2 + 1]);
|
||||
result[i] = a << 4 | b;
|
||||
}
|
||||
return Either.right(result);
|
||||
} catch (e) {
|
||||
return Either.left((0, _common.DecodeException)(str, e instanceof Error ? e.message : "Invalid input"));
|
||||
}
|
||||
};
|
||||
/** @internal */
|
||||
exports.decode = decode;
|
||||
const bytesToHex = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
|
||||
/** @internal */
|
||||
const fromHexChar = byte => {
|
||||
// '0' <= byte && byte <= '9'
|
||||
if (48 <= byte && byte <= 57) {
|
||||
return byte - 48;
|
||||
}
|
||||
// 'a' <= byte && byte <= 'f'
|
||||
if (97 <= byte && byte <= 102) {
|
||||
return byte - 97 + 10;
|
||||
}
|
||||
// 'A' <= byte && byte <= 'F'
|
||||
if (65 <= byte && byte <= 70) {
|
||||
return byte - 65 + 10;
|
||||
}
|
||||
throw new TypeError("Invalid input");
|
||||
};
|
||||
//# sourceMappingURL=hex.js.map
|
||||
1
node_modules/effect/dist/cjs/internal/encoding/hex.js.map
generated
vendored
Normal file
1
node_modules/effect/dist/cjs/internal/encoding/hex.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user