@ywfe/fe-tools 1.2.1-beta.13 → 1.2.1-beta.15
Sign up to get free protection for your applications and to get access to all the features.
- package/JSON2String.ts +13 -0
- package/index.ts +1 -1
- package/lib/JSON2String.d.ts +4 -0
- package/lib/index.d.ts +1 -1
- package/lib/ywfe-tools.cjs +2013 -47
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +2013 -47
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/lib/ywfe-tools.umd.js +4 -0
- package/lib/ywfe-tools.umd.js.map +1 -0
- package/package.json +5 -4
- package/request.ts +40 -34
- package/lib/userInputToJson.d.ts +0 -8
- package/userInputToJson.ts +0 -24
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ywfe-tools.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../node_modules/rollup-plugin-node-polyfills/polyfills/global.js","../node_modules/rollup-plugin-node-polyfills/polyfills/buffer-es6.js","../node_modules/rollup-plugin-node-polyfills/polyfills/empty.js","../node_modules/@ywfe/utils/lib/ywfe-utils.esm.js","../JSON2String.ts","../request.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});","var lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n\n revLookup['-'.charCodeAt(0)] = 62;\n revLookup['_'.charCodeAt(0)] = 63;\n}\n\nfunction toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr;\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders);\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len;\n\n var L = 0;\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)];\n arr[L++] = (tmp >> 16) & 0xFF;\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[L++] = tmp & 0xFF;\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var output = '';\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n output += lookup[tmp >> 2];\n output += lookup[(tmp << 4) & 0x3F];\n output += '==';\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1]);\n output += lookup[tmp >> 10];\n output += lookup[(tmp >> 4) & 0x3F];\n output += lookup[(tmp << 2) & 0x3F];\n output += '=';\n }\n\n parts.push(output);\n\n return parts.join('')\n}\n\nfunction read (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nfunction write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n}\n\nvar toString = {}.toString;\n\nvar isArray = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license MIT\n */\n\nvar INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : true;\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength();\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr\n};\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n};\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n};\n\nfunction allocUnsafe (that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n};\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n\n var actual = that.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len);\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0;\n }\n return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n};\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer\n};\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n\n var len = string.length;\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\n\nfunction swap (b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this\n};\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this\n};\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this\n};\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0;\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n};\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n};\n\nBuffer.prototype.inspect = function inspect () {\n var str = '';\n var max = INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return '<Buffer ' + str + '>'\n};\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n};\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n};\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed;\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8';\n\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n};\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return fromByteArray(buf)\n } else {\n return fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1;\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n );\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length;\n\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n\n return newBuf\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset]\n};\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | (this[offset + 1] << 8)\n};\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return (this[offset] << 8) | this[offset + 1]\n};\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n};\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n};\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | (this[offset + 1] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | (this[offset] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n};\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, true, 23, 4)\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, false, 23, 4)\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, true, 52, 8)\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, false, 52, 8)\n};\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8;\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n};\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff;\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24);\n this[offset + 2] = (value >>> 16);\n this[offset + 1] = (value >>> 8);\n this[offset] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n this[offset + 2] = (value >>> 16);\n this[offset + 3] = (value >>> 24);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n};\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n};\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n var len = end - start;\n var i;\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n );\n }\n\n return len\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n\n if (!val) val = 0;\n\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint;\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i];\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nfunction isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n\nexport { Buffer, INSPECT_MAX_BYTES, SlowBuffer, isBuffer, _kMaxLength as kMaxLength };\n","export default {};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar require$$0 = require('fs');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);\n\n/*\n * @author 春风\n * @date 2021/7/8 下午2:53\n **/\nfunction basePullAt(array, indexes) {\n let length = array ? indexes.length : 0, lastIndex = length - 1, previous = 0;\n while (length--) {\n const index = indexes[length];\n if (length == lastIndex || index !== previous) {\n previous = index;\n Array.prototype.splice.call(array, index, 1);\n }\n }\n return array;\n}\n\nfunction remove(array, predicate) {\n const result = [];\n if (!(array && array.length)) {\n return result;\n }\n let index = -1, indexes = [], length = array.length;\n while (++index < length) {\n const value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n}\n\nfunction _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nfunction _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nfunction _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}\n\n/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nfunction _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n idx = 0;\n\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n\n idx = 0;\n\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n\n return result;\n}\n\nfunction _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}\n\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nfunction _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n\n combined[combinedIdx] = result;\n\n if (!_isPlaceholder(result)) {\n left -= 1;\n }\n\n combinedIdx += 1;\n }\n\n return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));\n };\n}\n\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * const sumArgs = (...args) => R.sum(args);\n *\n * const curriedAddFourNumbers = R.curryN(4, sumArgs);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n */\n\nvar curryN =\n/*#__PURE__*/\n_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n\n return _arity(length, _curryN(length, [], fn));\n});\n\nvar curryN$1 = curryN;\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nfunction _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}\n\n/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nvar _isArray = Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};\n\nfunction _isTransformer(obj) {\n return obj != null && typeof obj['@@transducer/step'] === 'function';\n}\n\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer [xf] to return a new transformer (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} xf transducer to initialize if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\n\nfunction _dispatchable(methodNames, xf, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n\n var args = Array.prototype.slice.call(arguments, 0);\n var obj = args.pop();\n\n if (!_isArray(obj)) {\n var idx = 0;\n\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, args);\n }\n\n idx += 1;\n }\n\n if (_isTransformer(obj)) {\n var transducer = xf.apply(null, args);\n return transducer(obj);\n }\n }\n\n return fn.apply(this, arguments);\n };\n}\n\nfunction _reduced(x) {\n return x && x['@@transducer/reduced'] ? x : {\n '@@transducer/value': x,\n '@@transducer/reduced': true\n };\n}\n\nvar _xfBase = {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};\n\nfunction _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n\n return result;\n}\n\nfunction _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\n\nvar _isArrayLike =\n/*#__PURE__*/\n_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n\n if (!x) {\n return false;\n }\n\n if (typeof x !== 'object') {\n return false;\n }\n\n if (_isString(x)) {\n return false;\n }\n\n if (x.nodeType === 1) {\n return !!x.length;\n }\n\n if (x.length === 0) {\n return true;\n }\n\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n\n return false;\n});\n\nvar _isArrayLike$1 = _isArrayLike;\n\nvar XWrap =\n/*#__PURE__*/\nfunction () {\n function XWrap(fn) {\n this.f = fn;\n }\n\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nfunction _xwrap(fn) {\n return new XWrap(fn);\n}\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\nvar bind =\n/*#__PURE__*/\n_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\n\nvar bind$1 = bind;\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n idx += 1;\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n step = iter.next();\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind$1(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nfunction _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n\n if (_isArrayLike$1(list)) {\n return _arrayReduce(fn, acc, list);\n }\n\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}\n\nvar XMap =\n/*#__PURE__*/\nfunction () {\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n\n return XMap;\n}();\n\nvar _xmap =\n/*#__PURE__*/\n_curry2(function _xmap(f, xf) {\n return new XMap(f, xf);\n});\n\nvar _xmap$1 = _xmap;\n\nfunction _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar toString$2 = Object.prototype.toString;\n\nvar _isArguments =\n/*#__PURE__*/\nfunction () {\n return toString$2.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString$2.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nvar _isArguments$1 = _isArguments;\n\nvar hasEnumBug = !\n/*#__PURE__*/\n{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug\n\nvar hasArgsEnumBug =\n/*#__PURE__*/\nfunction () {\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n};\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\n\n\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?\n/*#__PURE__*/\n_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) :\n/*#__PURE__*/\n_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n\n var prop, nIdx;\n var ks = [];\n\n var checkArgsLength = hasArgsEnumBug && _isArguments$1(obj);\n\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n\n nIdx -= 1;\n }\n }\n\n return ks;\n});\nvar keys$1 = keys;\n\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex\n * @example\n *\n * const double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\n\nvar map =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/map', 'map'], _xmap$1, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN$1(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n\n case '[object Object]':\n return _reduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys$1(functor));\n\n default:\n return _map(fn, functor);\n }\n}));\n\nvar map$1 = map;\n\n/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nvar _isInteger = Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};\n\n/**\n * Returns the nth element of the given list or string. If n is negative the\n * element at index length + n is returned.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> a | Undefined\n * @sig Number -> String -> String\n * @param {Number} offset\n * @param {*} list\n * @return {*}\n * @example\n *\n * const list = ['foo', 'bar', 'baz', 'quux'];\n * R.nth(1, list); //=> 'bar'\n * R.nth(-1, list); //=> 'quux'\n * R.nth(-99, list); //=> undefined\n *\n * R.nth(2, 'abc'); //=> 'c'\n * R.nth(3, 'abc'); //=> ''\n * @symb R.nth(-1, [a, b, c]) = c\n * @symb R.nth(0, [a, b, c]) = a\n * @symb R.nth(1, [a, b, c]) = b\n */\n\nvar nth =\n/*#__PURE__*/\n_curry2(function nth(offset, list) {\n var idx = offset < 0 ? list.length + offset : offset;\n return _isString(list) ? list.charAt(idx) : list[idx];\n});\n\nvar nth$1 = nth;\n\n/**\n * Retrieves the values at given paths of an object.\n *\n * @func\n * @memberOf R\n * @since v0.27.1\n * @category Object\n * @typedefn Idx = [String | Int]\n * @sig [Idx] -> {a} -> [a | Undefined]\n * @param {Array} pathsArray The array of paths to be fetched.\n * @param {Object} obj The object to retrieve the nested properties from.\n * @return {Array} A list consisting of values at paths specified by \"pathsArray\".\n * @see R.path\n * @example\n *\n * R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3]\n * R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined]\n */\n\nvar paths =\n/*#__PURE__*/\n_curry2(function paths(pathsArray, obj) {\n return pathsArray.map(function (paths) {\n var val = obj;\n var idx = 0;\n var p;\n\n while (idx < paths.length) {\n if (val == null) {\n return;\n }\n\n p = paths[idx];\n val = _isInteger(p) ? nth$1(p, val) : val[p];\n idx += 1;\n }\n\n return val;\n });\n});\n\nvar paths$1 = paths;\n\n/**\n * Retrieve the value at a given path.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {a} -> a | Undefined\n * @param {Array} path The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop, R.nth\n * @example\n *\n * R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1\n * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2\n */\n\nvar path =\n/*#__PURE__*/\n_curry2(function path(pathAr, obj) {\n return paths$1([pathAr], obj)[0];\n});\n\nvar path$1 = path;\n\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig Idx -> {s: a} -> a | Undefined\n * @param {String|Number} p The property name or array index\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path, R.nth\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n * R.prop(0, [100]); //=> 100\n * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\nvar prop =\n/*#__PURE__*/\n_curry2(function prop(p, obj) {\n return path$1([p], obj);\n});\n\nvar prop$1 = prop;\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\nvar reduce =\n/*#__PURE__*/\n_curry3(_reduce);\n\nvar reduce$1 = reduce;\n\n/**\n * ap applies a list of functions to a list of values.\n *\n * Dispatches to the `ap` method of the second argument, if present. Also\n * treats curried functions as applicatives.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig [a -> b] -> [a] -> [b]\n * @sig Apply f => f (a -> b) -> f a -> f b\n * @sig (r -> a -> b) -> (r -> a) -> (r -> b)\n * @param {*} applyF\n * @param {*} applyX\n * @return {*}\n * @example\n *\n * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6]\n * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> [\"tasty pizza\", \"tasty salad\", \"PIZZA\", \"SALAD\"]\n *\n * // R.ap can also be used as S combinator\n * // when only two functions are passed\n * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA'\n * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)]\n */\n\nvar ap =\n/*#__PURE__*/\n_curry2(function ap(applyF, applyX) {\n return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) {\n return applyF(x)(applyX(x));\n } : _reduce(function (acc, f) {\n return _concat(acc, map$1(f, applyX));\n }, [], applyF);\n});\n\nvar ap$1 = ap;\n\n/**\n * Returns a list of all the enumerable own properties of the supplied object.\n * Note that the order of the output array is not guaranteed across different\n * JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [v]\n * @param {Object} obj The object to extract values from\n * @return {Array} An array of the values of the object's own properties.\n * @see R.valuesIn, R.keys\n * @example\n *\n * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]\n */\n\nvar values =\n/*#__PURE__*/\n_curry1(function values(obj) {\n var props = keys$1(obj);\n var len = props.length;\n var vals = [];\n var idx = 0;\n\n while (idx < len) {\n vals[idx] = obj[props[idx]];\n idx += 1;\n }\n\n return vals;\n});\n\nvar values$1 = values;\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\n\nvar isNil =\n/*#__PURE__*/\n_curry1(function isNil(x) {\n return x == null;\n});\n\nvar isNil$1 = isNil;\n\nfunction _isFunction(x) {\n var type = Object.prototype.toString.call(x);\n return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';\n}\n\n/**\n * \"lifts\" a function to be the specified arity, so that it may \"map over\" that\n * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig Number -> (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.lift, R.ap\n * @example\n *\n * const madd3 = R.liftN(3, (...args) => R.sum(args));\n * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]\n */\n\nvar liftN =\n/*#__PURE__*/\n_curry2(function liftN(arity, fn) {\n var lifted = curryN$1(arity, fn);\n return curryN$1(arity, function () {\n return _reduce(ap$1, map$1(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1));\n });\n});\n\nvar liftN$1 = liftN;\n\n/**\n * \"lifts\" a function of arity > 1 so that it may \"map over\" a list, Function or other\n * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.liftN\n * @example\n *\n * const madd3 = R.lift((a, b, c) => a + b + c);\n *\n * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]\n *\n * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e);\n *\n * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24]\n */\n\nvar lift =\n/*#__PURE__*/\n_curry1(function lift(fn) {\n return liftN$1(fn.length, fn);\n});\n\nvar lift$1 = lift;\n\n/**\n * Returns a curried equivalent of the provided function. The curried function\n * has two unusual capabilities. First, its arguments needn't be provided one\n * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (* -> a) -> (* -> a)\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curryN, R.partial\n * @example\n *\n * const addFourNumbers = (a, b, c, d) => a + b + c + d;\n *\n * const curriedAddFourNumbers = R.curry(addFourNumbers);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n */\n\nvar curry =\n/*#__PURE__*/\n_curry1(function curry(fn) {\n return curryN$1(fn.length, fn);\n});\n\nvar curry$1 = curry;\n\n/**\n * `_makeFlat` is a helper function that returns a one-level or fully recursive\n * function based on the flag passed in.\n *\n * @private\n */\n\nfunction _makeFlat(recursive) {\n return function flatt(list) {\n var value, jlen, j;\n var result = [];\n var idx = 0;\n var ilen = list.length;\n\n while (idx < ilen) {\n if (_isArrayLike$1(list[idx])) {\n value = recursive ? flatt(list[idx]) : list[idx];\n j = 0;\n jlen = value.length;\n\n while (j < jlen) {\n result[result.length] = value[j];\n j += 1;\n }\n } else {\n result[result.length] = list[idx];\n }\n\n idx += 1;\n }\n\n return result;\n };\n}\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\nvar type =\n/*#__PURE__*/\n_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\n\nvar type$1 = type;\n\n/**\n * A function that returns the `!` of its argument. It will return `true` when\n * passed false-y value, and `false` when passed a truth-y one.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig * -> Boolean\n * @param {*} a any value\n * @return {Boolean} the logical inverse of passed argument.\n * @see R.complement\n * @example\n *\n * R.not(true); //=> false\n * R.not(false); //=> true\n * R.not(0); //=> true\n * R.not(1); //=> false\n */\n\nvar not =\n/*#__PURE__*/\n_curry1(function not(a) {\n return !a;\n});\n\nvar not$1 = not;\n\n/**\n * Takes a function `f` and returns a function `g` such that if called with the same arguments\n * when `f` returns a \"truthy\" value, `g` returns `false` and when `f` returns a \"falsy\" value `g` returns `true`.\n *\n * `R.complement` may be applied to any functor\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category Logic\n * @sig (*... -> *) -> (*... -> Boolean)\n * @param {Function} f\n * @return {Function}\n * @see R.not\n * @example\n *\n * const isNotNil = R.complement(R.isNil);\n * isNil(null); //=> true\n * isNotNil(null); //=> false\n * isNil(7); //=> false\n * isNotNil(7); //=> true\n */\n\nvar complement =\n/*#__PURE__*/\nlift$1(not$1);\nvar complement$1 = complement;\n\nfunction _pipe(f, g) {\n return function () {\n return g.call(this, f.apply(this, arguments));\n };\n}\n\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implemtation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\n\nfunction _checkForMethod(methodname, fn) {\n return function () {\n var length = arguments.length;\n\n if (length === 0) {\n return fn();\n }\n\n var obj = arguments[length - 1];\n return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n };\n}\n\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']\n * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(0, 3, 'ramda'); //=> 'ram'\n */\n\nvar slice =\n/*#__PURE__*/\n_curry3(\n/*#__PURE__*/\n_checkForMethod('slice', function slice(fromIndex, toIndex, list) {\n return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\n\nvar slice$1 = slice;\n\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n * R.tail([1, 2, 3]); //=> [2, 3]\n * R.tail([1, 2]); //=> [2]\n * R.tail([1]); //=> []\n * R.tail([]); //=> []\n *\n * R.tail('abc'); //=> 'bc'\n * R.tail('ab'); //=> 'b'\n * R.tail('a'); //=> ''\n * R.tail(''); //=> ''\n */\n\nvar tail =\n/*#__PURE__*/\n_curry1(\n/*#__PURE__*/\n_checkForMethod('tail',\n/*#__PURE__*/\nslice$1(1, Infinity)));\n\nvar tail$1 = tail;\n\n/**\n * Performs left-to-right function composition. The first argument may have\n * any arity; the remaining arguments must be unary.\n *\n * In some libraries this function is named `sequence`.\n *\n * **Note:** The result of pipe is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.compose\n * @example\n *\n * const f = R.pipe(Math.pow, R.negate, R.inc);\n *\n * f(3, 4); // -(3^4) + 1\n * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))\n */\n\nfunction pipe() {\n if (arguments.length === 0) {\n throw new Error('pipe requires at least one argument');\n }\n\n return _arity(arguments[0].length, reduce$1(_pipe, arguments[0], tail$1(arguments)));\n}\n\n/**\n * Returns a new list or string with the elements or characters in reverse\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {Array|String} list\n * @return {Array|String}\n * @example\n *\n * R.reverse([1, 2, 3]); //=> [3, 2, 1]\n * R.reverse([1, 2]); //=> [2, 1]\n * R.reverse([1]); //=> [1]\n * R.reverse([]); //=> []\n *\n * R.reverse('abc'); //=> 'cba'\n * R.reverse('ab'); //=> 'ba'\n * R.reverse('a'); //=> 'a'\n * R.reverse(''); //=> ''\n */\n\nvar reverse =\n/*#__PURE__*/\n_curry1(function reverse(list) {\n return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse();\n});\n\nvar reverse$1 = reverse;\n\n/**\n * Performs right-to-left function composition. The last argument may have\n * any arity; the remaining arguments must be unary.\n *\n * **Note:** The result of compose is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)\n * @param {...Function} ...functions The functions to compose\n * @return {Function}\n * @see R.pipe\n * @example\n *\n * const classyGreeting = (firstName, lastName) => \"The name's \" + lastName + \", \" + firstName + \" \" + lastName\n * const yellGreeting = R.compose(R.toUpper, classyGreeting);\n * yellGreeting('James', 'Bond'); //=> \"THE NAME'S BOND, JAMES BOND\"\n *\n * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7\n *\n * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))\n */\n\nfunction compose() {\n if (arguments.length === 0) {\n throw new Error('compose requires at least one argument');\n }\n\n return pipe.apply(this, reverse$1(arguments));\n}\n\nfunction _identity(x) {\n return x;\n}\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\n\nvar identity =\n/*#__PURE__*/\n_curry1(_identity);\n\nvar identity$1 = identity;\n\nfunction _arrayFromIterator(iter) {\n var list = [];\n var next;\n\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n\n return list;\n}\n\nfunction _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n}\n\nfunction _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}\n\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nvar _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n } // if *a* array contains any element that is not included in *b*\n\n\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nfunction _equals(a, b, stackA, stackB) {\n if (_objectIs$1(a, b)) {\n return true;\n }\n\n var typeA = type$1(a);\n\n if (typeA !== type$1(b)) {\n return false;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n\n break;\n\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs$1(a.valueOf(), b.valueOf()))) {\n return false;\n }\n\n break;\n\n case 'Date':\n if (!_objectIs$1(a.valueOf(), b.valueOf())) {\n return false;\n }\n\n break;\n\n case 'Error':\n return a.name === b.name && a.message === b.message;\n\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n\n break;\n }\n\n var idx = stackA.length - 1;\n\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys$1(a);\n\n if (keysA.length !== keys$1(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n idx = keysA.length - 1;\n\n while (idx >= 0) {\n var key = keysA[idx];\n\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n\n idx -= 1;\n }\n\n return true;\n}\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\nvar equals =\n/*#__PURE__*/\n_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\n\nvar equals$1 = equals;\n\nfunction _indexOf(list, a, idx) {\n var inf, item; // Array.prototype.indexOf doesn't exist below IE9\n\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n\n while (idx < list.length) {\n item = list[idx];\n\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } // non-zero numbers can utilise Set\n\n\n return list.indexOf(a, idx);\n // all these types can utilise Set\n\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n\n }\n } // anything else not covered above, defer to R.equals\n\n\n while (idx < list.length) {\n if (equals$1(list[idx], a)) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n}\n\nfunction _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}\n\nfunction _quote(s) {\n var escaped = s.replace(/\\\\/g, '\\\\\\\\').replace(/[\\b]/g, '\\\\b') // \\b matches word boundary; [\\b] matches backspace\n .replace(/\\f/g, '\\\\f').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t').replace(/\\v/g, '\\\\v').replace(/\\0/g, '\\\\0');\n return '\"' + escaped.replace(/\"/g, '\\\\\"') + '\"';\n}\n\n/**\n * Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nvar _toISOString$1 = _toISOString;\n\nfunction _complement(f) {\n return function () {\n return !f.apply(this, arguments);\n };\n}\n\nfunction _filter(fn, list) {\n var idx = 0;\n var len = list.length;\n var result = [];\n\n while (idx < len) {\n if (fn(list[idx])) {\n result[result.length] = list[idx];\n }\n\n idx += 1;\n }\n\n return result;\n}\n\nfunction _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}\n\nvar XFilter =\n/*#__PURE__*/\nfunction () {\n function XFilter(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XFilter.prototype['@@transducer/init'] = _xfBase.init;\n XFilter.prototype['@@transducer/result'] = _xfBase.result;\n\n XFilter.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n };\n\n return XFilter;\n}();\n\nvar _xfilter =\n/*#__PURE__*/\n_curry2(function _xfilter(f, xf) {\n return new XFilter(f, xf);\n});\n\nvar _xfilter$1 = _xfilter;\n\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar filter =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['filter'], _xfilter$1, function (pred, filterable) {\n return _isObject(filterable) ? _reduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n\n return acc;\n }, {}, keys$1(filterable)) : // else\n _filter(pred, filterable);\n}));\n\nvar filter$1 = filter;\n\n/**\n * The complement of [`filter`](#filter).\n *\n * Acts as a transducer if a transformer is given in list position. Filterable\n * objects include plain objects or any object that has a filter method such\n * as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array}\n * @see R.filter, R.transduce, R.addIndex\n * @example\n *\n * const isOdd = (n) => n % 2 === 1;\n *\n * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar reject =\n/*#__PURE__*/\n_curry2(function reject(pred, filterable) {\n return filter$1(_complement(pred), filterable);\n});\n\nvar reject$1 = reject;\n\nfunction _toString(x, seen) {\n var recur = function recur(y) {\n var xs = seen.concat([x]);\n return _includes(y, xs) ? '<Circular>' : _toString(y, xs);\n }; // mapPairs :: (Object, [String]) -> [String]\n\n\n var mapPairs = function (obj, keys) {\n return _map(function (k) {\n return _quote(k) + ': ' + recur(obj[k]);\n }, keys.slice().sort());\n };\n\n switch (Object.prototype.toString.call(x)) {\n case '[object Arguments]':\n return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';\n\n case '[object Array]':\n return '[' + _map(recur, x).concat(mapPairs(x, reject$1(function (k) {\n return /^\\d+$/.test(k);\n }, keys$1(x)))).join(', ') + ']';\n\n case '[object Boolean]':\n return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();\n\n case '[object Date]':\n return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString$1(x))) + ')';\n\n case '[object Null]':\n return 'null';\n\n case '[object Number]':\n return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);\n\n case '[object String]':\n return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);\n\n case '[object Undefined]':\n return 'undefined';\n\n default:\n if (typeof x.toString === 'function') {\n var repr = x.toString();\n\n if (repr !== '[object Object]') {\n return repr;\n }\n }\n\n return '{' + mapPairs(x, keys$1(x)).join(', ') + '}';\n }\n}\n\n/**\n * Returns the string representation of the given value. `eval`'ing the output\n * should result in a value equivalent to the input value. Many of the built-in\n * `toString` methods do not satisfy this requirement.\n *\n * If the given value is an `[object Object]` with a `toString` method other\n * than `Object.prototype.toString`, this method is invoked with no arguments\n * to produce the return value. This means user-defined constructor functions\n * can provide a suitable `toString` method. For example:\n *\n * function Point(x, y) {\n * this.x = x;\n * this.y = y;\n * }\n *\n * Point.prototype.toString = function() {\n * return 'new Point(' + this.x + ', ' + this.y + ')';\n * };\n *\n * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category String\n * @sig * -> String\n * @param {*} val\n * @return {String}\n * @example\n *\n * R.toString(42); //=> '42'\n * R.toString('abc'); //=> '\"abc\"'\n * R.toString([1, 2, 3]); //=> '[1, 2, 3]'\n * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{\"bar\": 2, \"baz\": 3, \"foo\": 1}'\n * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date(\"2001-02-03T04:05:06.000Z\")'\n */\n\nvar toString =\n/*#__PURE__*/\n_curry1(function toString(val) {\n return _toString(val, []);\n});\n\nvar toString$1 = toString;\n\n/**\n * Returns the result of concatenating the given lists or strings.\n *\n * Note: `R.concat` expects both arguments to be of the same type,\n * unlike the native `Array.prototype.concat` method. It will throw\n * an error if you `concat` an Array with a non-Array value.\n *\n * Dispatches to the `concat` method of the first argument, if present.\n * Can also concatenate two members of a [fantasy-land\n * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @sig String -> String -> String\n * @param {Array|String} firstList The first list\n * @param {Array|String} secondList The second list\n * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of\n * `secondList`.\n *\n * @example\n *\n * R.concat('ABC', 'DEF'); // 'ABCDEF'\n * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n * R.concat([], []); //=> []\n */\n\nvar concat =\n/*#__PURE__*/\n_curry2(function concat(a, b) {\n if (_isArray(a)) {\n if (_isArray(b)) {\n return a.concat(b);\n }\n\n throw new TypeError(toString$1(b) + ' is not an array');\n }\n\n if (_isString(a)) {\n if (_isString(b)) {\n return a + b;\n }\n\n throw new TypeError(toString$1(b) + ' is not a string');\n }\n\n if (a != null && _isFunction(a['fantasy-land/concat'])) {\n return a['fantasy-land/concat'](b);\n }\n\n if (a != null && _isFunction(a.concat)) {\n return a.concat(b);\n }\n\n throw new TypeError(toString$1(a) + ' does not have a method named \"concat\" or \"fantasy-land/concat\"');\n});\n\nvar concat$1 = concat;\n\nvar _Set =\n/*#__PURE__*/\nfunction () {\n function _Set() {\n /* globals Set */\n this._nativeSet = typeof Set === 'function' ? new Set() : null;\n this._items = {};\n }\n\n // until we figure out why jsdoc chokes on this\n // @param item The item to add to the Set\n // @returns {boolean} true if the item did not exist prior, otherwise false\n //\n _Set.prototype.add = function (item) {\n return !hasOrAdd(item, true, this);\n }; //\n // @param item The item to check for existence in the Set\n // @returns {boolean} true if the item exists in the Set, otherwise false\n //\n\n\n _Set.prototype.has = function (item) {\n return hasOrAdd(item, false, this);\n }; //\n // Combines the logic for checking whether an item is a member of the set and\n // for adding a new item to the set.\n //\n // @param item The item to check or add to the Set instance.\n // @param shouldAdd If true, the item will be added to the set if it doesn't\n // already exist.\n // @param set The set instance to check or add to.\n // @return {boolean} true if the item already existed, otherwise false.\n //\n\n\n return _Set;\n}();\n\nfunction hasOrAdd(item, shouldAdd, set) {\n var type = typeof item;\n var prevSize, newSize;\n\n switch (type) {\n case 'string':\n case 'number':\n // distinguish between +0 and -0\n if (item === 0 && 1 / item === -Infinity) {\n if (set._items['-0']) {\n return true;\n } else {\n if (shouldAdd) {\n set._items['-0'] = true;\n }\n\n return false;\n }\n } // these types can all utilise the native Set\n\n\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n\n set._nativeSet.add(item);\n\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = {};\n set._items[type][item] = true;\n }\n\n return false;\n } else if (item in set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][item] = true;\n }\n\n return false;\n }\n }\n\n case 'boolean':\n // set._items['boolean'] holds a two element array\n // representing [ falseExists, trueExists ]\n if (type in set._items) {\n var bIdx = item ? 1 : 0;\n\n if (set._items[type][bIdx]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][bIdx] = true;\n }\n\n return false;\n }\n } else {\n if (shouldAdd) {\n set._items[type] = item ? [false, true] : [true, false];\n }\n\n return false;\n }\n\n case 'function':\n // compare functions for reference equality\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n\n set._nativeSet.add(item);\n\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n\n return false;\n }\n\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n\n return false;\n }\n\n return true;\n }\n\n case 'undefined':\n if (set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type] = true;\n }\n\n return false;\n }\n\n case 'object':\n if (item === null) {\n if (!set._items['null']) {\n if (shouldAdd) {\n set._items['null'] = true;\n }\n\n return false;\n }\n\n return true;\n }\n\n /* falls through */\n\n default:\n // reduce the search size of heterogeneous sets by creating buckets\n // for each type.\n type = Object.prototype.toString.call(item);\n\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n\n return false;\n } // scan through all previously applied items\n\n\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n\n return false;\n }\n\n return true;\n }\n} // A simple Set type that honours R.equals semantics\n\n\nvar _Set$1 = _Set;\n\n/**\n * Returns the empty value of its argument's type. Ramda defines the empty\n * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other\n * types are supported if they define `<Type>.empty`,\n * `<Type>.prototype.empty` or implement the\n * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).\n *\n * Dispatches to the `empty` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig a -> a\n * @param {*} x\n * @return {*}\n * @example\n *\n * R.empty(Just(42)); //=> Nothing()\n * R.empty([1, 2, 3]); //=> []\n * R.empty('unicorns'); //=> ''\n * R.empty({x: 1, y: 2}); //=> {}\n */\n\nvar empty =\n/*#__PURE__*/\n_curry1(function empty(x) {\n return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments$1(x) ? function () {\n return arguments;\n }() : void 0 // else\n ;\n});\n\nvar empty$1 = empty;\n\nvar XFind =\n/*#__PURE__*/\nfunction () {\n function XFind(f, xf) {\n this.xf = xf;\n this.f = f;\n this.found = false;\n }\n\n XFind.prototype['@@transducer/init'] = _xfBase.init;\n\n XFind.prototype['@@transducer/result'] = function (result) {\n if (!this.found) {\n result = this.xf['@@transducer/step'](result, void 0);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XFind.prototype['@@transducer/step'] = function (result, input) {\n if (this.f(input)) {\n this.found = true;\n result = _reduced(this.xf['@@transducer/step'](result, input));\n }\n\n return result;\n };\n\n return XFind;\n}();\n\nvar _xfind =\n/*#__PURE__*/\n_curry2(function _xfind(f, xf) {\n return new XFind(f, xf);\n});\n\nvar _xfind$1 = _xfind;\n\n/**\n * Returns the first element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Dispatches to the `find` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n * const xs = [{a: 1}, {a: 2}, {a: 3}];\n * R.find(R.propEq('a', 2))(xs); //=> {a: 2}\n * R.find(R.propEq('a', 4))(xs); //=> undefined\n */\n\nvar find =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['find'], _xfind$1, function find(fn, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (fn(list[idx])) {\n return list[idx];\n }\n\n idx += 1;\n }\n}));\n\nvar find$1 = find;\n\n/**\n * Returns a new list by pulling every item out of it (and all its sub-arrays)\n * and putting them in a new array, depth-first.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b]\n * @param {Array} list The array to consider.\n * @return {Array} The flattened list.\n * @see R.unnest\n * @example\n *\n * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);\n * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n */\n\nvar flatten =\n/*#__PURE__*/\n_curry1(\n/*#__PURE__*/\n_makeFlat(true));\n\nvar flatten$1 = flatten;\n\n/**\n * Creates a new object from a list key-value pairs. If a key appears in\n * multiple pairs, the rightmost pair is included in the object.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig [[k,v]] -> {k: v}\n * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object.\n * @return {Object} The object made by pairing up `keys` and `values`.\n * @see R.toPairs, R.pair\n * @example\n *\n * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3}\n */\n\nvar fromPairs =\n/*#__PURE__*/\n_curry1(function fromPairs(pairs) {\n var result = {};\n var idx = 0;\n\n while (idx < pairs.length) {\n result[pairs[idx][0]] = pairs[idx][1];\n idx += 1;\n }\n\n return result;\n});\n\nvar fromPairs$1 = fromPairs;\n\n/**\n * Returns whether or not a path exists in an object. Only the object's\n * own properties are checked.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {a} -> Boolean\n * @param {Array} path The path to use.\n * @param {Object} obj The object to check the path in.\n * @return {Boolean} Whether the path exists.\n * @see R.has\n * @example\n *\n * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true\n * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true\n * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false\n * R.hasPath(['a', 'b'], {}); // => false\n */\n\nvar hasPath =\n/*#__PURE__*/\n_curry2(function hasPath(_path, obj) {\n if (_path.length === 0 || isNil$1(obj)) {\n return false;\n }\n\n var val = obj;\n var idx = 0;\n\n while (idx < _path.length) {\n if (!isNil$1(val) && _has(_path[idx], val)) {\n val = val[_path[idx]];\n idx += 1;\n } else {\n return false;\n }\n }\n\n return true;\n});\n\nvar hasPath$1 = hasPath;\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list, based upon the value returned by applying the supplied function to\n * each list element. Prefers the first item if the supplied function produces\n * the same value on two items. [`R.equals`](#equals) is used for comparison.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> b) -> [a] -> [a]\n * @param {Function} fn A function used to produce a value to use during comparisons.\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10]\n */\n\nvar uniqBy =\n/*#__PURE__*/\n_curry2(function uniqBy(fn, list) {\n var set = new _Set$1();\n var result = [];\n var idx = 0;\n var appliedItem, item;\n\n while (idx < list.length) {\n item = list[idx];\n appliedItem = fn(item);\n\n if (set.add(appliedItem)) {\n result.push(item);\n }\n\n idx += 1;\n }\n\n return result;\n});\n\nvar uniqBy$1 = uniqBy;\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list. [`R.equals`](#equals) is used to determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniq([1, 1, 2, 1]); //=> [1, 2]\n * R.uniq([1, '1']); //=> [1, '1']\n * R.uniq([[42], [42]]); //=> [[42]]\n */\n\nvar uniq =\n/*#__PURE__*/\nuniqBy$1(identity$1);\nvar uniq$1 = uniq;\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n\n while (idx < length) {\n var source = arguments[idx];\n\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n\n idx += 1;\n }\n\n return output;\n}\n\nvar _objectAssign$1 = typeof Object.assign === 'function' ? Object.assign : _objectAssign;\n\n/**\n * Turns a named method with a specified arity into a function that can be\n * called directly supplied with arguments and a target object.\n *\n * The returned function is curried and accepts `arity + 1` parameters where\n * the final parameter is the target object.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *)\n * @param {Number} arity Number of arguments the returned function should take\n * before the target object.\n * @param {String} method Name of any of the target object's methods to call.\n * @return {Function} A new curried function.\n * @see R.construct\n * @example\n *\n * const sliceFrom = R.invoker(1, 'slice');\n * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm'\n * const sliceFrom6 = R.invoker(2, 'slice')(6);\n * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh'\n *\n * const dog = {\n * speak: async () => 'Woof!'\n * };\n * const speak = R.invoker(0, 'speak');\n * speak(dog).then(console.log) //~> 'Woof!'\n *\n * @symb R.invoker(0, 'method')(o) = o['method']()\n * @symb R.invoker(1, 'method')(a, o) = o['method'](a)\n * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b)\n */\n\nvar invoker =\n/*#__PURE__*/\n_curry2(function invoker(arity, method) {\n return curryN$1(arity + 1, function () {\n var target = arguments[arity];\n\n if (target != null && _isFunction(target[method])) {\n return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity));\n }\n\n throw new TypeError(toString$1(target) + ' does not have a method named \"' + method + '\"');\n });\n});\n\nvar invoker$1 = invoker;\n\n/**\n * See if an object (`val`) is an instance of the supplied constructor. This\n * function will check up the inheritance chain, if any.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Type\n * @sig (* -> {*}) -> a -> Boolean\n * @param {Object} ctor A constructor\n * @param {*} val The value to test\n * @return {Boolean}\n * @example\n *\n * R.is(Object, {}); //=> true\n * R.is(Number, 1); //=> true\n * R.is(Object, 1); //=> false\n * R.is(String, 's'); //=> true\n * R.is(String, new String('')); //=> true\n * R.is(Object, new String('')); //=> true\n * R.is(Object, 's'); //=> false\n * R.is(Number, {}); //=> false\n */\n\nvar is =\n/*#__PURE__*/\n_curry2(function is(Ctor, val) {\n return val != null && val.constructor === Ctor || val instanceof Ctor;\n});\n\nvar is$1 = is;\n\n/**\n * Returns `true` if the given value is its type's empty value; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> Boolean\n * @param {*} x\n * @return {Boolean}\n * @see R.empty\n * @example\n *\n * R.isEmpty([1, 2, 3]); //=> false\n * R.isEmpty([]); //=> true\n * R.isEmpty(''); //=> true\n * R.isEmpty(null); //=> false\n * R.isEmpty({}); //=> true\n * R.isEmpty({length: 0}); //=> false\n */\n\nvar isEmpty =\n/*#__PURE__*/\n_curry1(function isEmpty(x) {\n return x != null && equals$1(x, empty$1(x));\n});\n\nvar isEmpty$1 = isEmpty;\n\n/**\n * Merges a list of objects together into one object.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig [{k: v}] -> {k: v}\n * @param {Array} list An array of objects\n * @return {Object} A merged object.\n * @see R.reduce\n * @example\n *\n * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3}\n * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2}\n * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 }\n */\n\nvar mergeAll =\n/*#__PURE__*/\n_curry1(function mergeAll(list) {\n return _objectAssign$1.apply(null, [{}].concat(list));\n});\n\nvar mergeAll$1 = mergeAll;\n\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\n\nvar omit =\n/*#__PURE__*/\n_curry2(function omit(names, obj) {\n var result = {};\n var index = {};\n var idx = 0;\n var len = names.length;\n\n while (idx < len) {\n index[names[idx]] = 1;\n idx += 1;\n }\n\n for (var prop in obj) {\n if (!index.hasOwnProperty(prop)) {\n result[prop] = obj[prop];\n }\n }\n\n return result;\n});\n\nvar omit$1 = omit;\n\n/**\n * Returns `true` if the specified object property is equal, in\n * [`R.equals`](#equals) terms, to the given value; `false` otherwise.\n * You can test multiple properties with [`R.whereEq`](#whereEq).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig String -> a -> Object -> Boolean\n * @param {String} name\n * @param {*} val\n * @param {*} obj\n * @return {Boolean}\n * @see R.whereEq, R.propSatisfies, R.equals\n * @example\n *\n * const abby = {name: 'Abby', age: 7, hair: 'blond'};\n * const fred = {name: 'Fred', age: 12, hair: 'brown'};\n * const rusty = {name: 'Rusty', age: 10, hair: 'brown'};\n * const alois = {name: 'Alois', age: 15, disposition: 'surly'};\n * const kids = [abby, fred, rusty, alois];\n * const hasBrownHair = R.propEq('hair', 'brown');\n * R.filter(hasBrownHair, kids); //=> [fred, rusty]\n */\n\nvar propEq =\n/*#__PURE__*/\n_curry3(function propEq(name, val, obj) {\n return equals$1(val, obj[name]);\n});\n\nvar propEq$1 = propEq;\n\n/**\n * Replace a substring or regex match in a string with a replacement.\n *\n * The first two parameters correspond to the parameters of the\n * `String.prototype.replace()` function, so the second parameter can also be a\n * function.\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category String\n * @sig RegExp|String -> String -> String -> String\n * @param {RegExp|String} pattern A regular expression or a substring to match.\n * @param {String} replacement The string to replace the matches with.\n * @param {String} str The String to do the search and replacement in.\n * @return {String} The result.\n * @example\n *\n * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo'\n * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo'\n *\n * // Use the \"g\" (global) flag to replace all occurrences:\n * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar'\n */\n\nvar replace =\n/*#__PURE__*/\n_curry3(function replace(regex, replacement, str) {\n return str.replace(regex, replacement);\n});\n\nvar replace$1 = replace;\n\n/**\n * Splits a string into an array of strings based on the given\n * separator.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category String\n * @sig (String | RegExp) -> String -> [String]\n * @param {String|RegExp} sep The pattern.\n * @param {String} str The string to separate into an array.\n * @return {Array} The array of strings from `str` separated by `sep`.\n * @see R.join\n * @example\n *\n * const pathComponents = R.split('/');\n * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node']\n *\n * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd']\n */\n\nvar split$1 =\n/*#__PURE__*/\ninvoker$1(1, 'split');\nvar split$2 = split$1;\n\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\n\nvar trim = !hasProtoTrim ||\n/*#__PURE__*/\nws.trim() || !\n/*#__PURE__*/\nzeroWidth.trim() ?\n/*#__PURE__*/\n_curry1(function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n}) :\n/*#__PURE__*/\n_curry1(function trim(str) {\n return str.trim();\n});\nvar trim$1 = trim;\n\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of the elements\n * of each list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} as The first list.\n * @param {Array} bs The second list.\n * @return {Array} The first and second lists concatenated, with\n * duplicates removed.\n * @example\n *\n * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4]\n */\n\nvar union =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\ncompose(uniq$1, _concat));\n\nvar union$1 = union;\n\nconst trimAll = (data) => {\n if (isNil$1(data) || isEmpty$1(data)) {\n return data;\n }\n const type = type$1(data);\n switch (type) {\n case 'String': {\n return trim$1(data);\n }\n case 'Array': {\n return filter$1(complement$1(isEmpty$1))(data);\n }\n default: {\n return data;\n }\n }\n};\n\nconst split = (separator, data) => {\n if (isEmpty$1(data) || isNil$1(data)) {\n return [];\n }\n return pipe(split$2(separator), trimAll)(data);\n};\n\n// sessionStorage\nconst YS = {\n set: (name, value) => {\n if (typeof window !== 'undefined') {\n window.sessionStorage.setItem(name, value);\n }\n },\n get: (name) => {\n if (typeof window !== 'undefined') {\n return window.sessionStorage.getItem(name);\n }\n return null;\n },\n remove: (name) => {\n if (typeof window !== 'undefined') {\n window.sessionStorage.removeItem(name);\n }\n },\n clear: () => {\n if (typeof window !== 'undefined') {\n window.sessionStorage.clear();\n }\n }\n};\n// locationStorage\nconst YL = {\n set: (name, value) => {\n if (typeof window !== 'undefined') {\n window.localStorage.setItem(name, value);\n }\n },\n get: (name) => {\n if (typeof window !== 'undefined') {\n return window.localStorage.getItem(name);\n }\n return null;\n },\n remove: (name) => {\n if (typeof window !== 'undefined') {\n window.localStorage.removeItem(name);\n }\n },\n clear: () => {\n if (typeof window !== 'undefined') {\n window.localStorage.clear();\n }\n }\n};\n\n// cookie\nconst YC = {\n set: (name, value, exdays) => {\n const d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n const expires = `expires=${d.toUTCString()}`;\n document.cookie = `${name}=${escape(value)};${expires};path=/`;\n },\n get: (name) => {\n const str = `${name}=`;\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i += 1) {\n let c = ca[i];\n while (c.charAt(0) === ' ')\n c = c.substring(1);\n if (c.indexOf(str) !== -1)\n return c.substring(str.length, c.length);\n }\n return undefined;\n },\n};\n\n/**\n * 仅触发一次事件\n *\n * @private\n *\n * @param node DOM 节点\n * @param name 事件名称\n * @param callback 回调函数\n */\nfunction once(node, name, fn, options) {\n function listener(event) {\n node.removeEventListener(name, listener);\n fn(event);\n }\n node.addEventListener(name, listener, options);\n}\n/**\n * 监听脚本加载事件 - IE 兼容\n *\n * @private\n *\n * @param node DOM 节点\n * @param callback 回调函数\n */\nfunction listenWithIE(node, callback) {\n node.onreadystatechange = function () {\n if (node.readyState === 'loaded' || node.readyState === 'complete') {\n node.onreadystatechange = null;\n callback();\n }\n };\n}\n/**\n * 监听脚本加载事件 - 其他浏览器\n *\n * @private\n *\n * @param node DOM 节点\n * @param callback 回调函数\n */\nfunction listen(node, onSuccess, onError) {\n once(node, 'load', onSuccess);\n once(node, 'error', onError);\n}\n// 允许的属性名单\nconst allowLists = [\n 'id',\n 'type',\n 'async',\n 'defer',\n 'crossOrigin',\n 'integrity',\n 'noModule',\n];\n/**\n * 动态加载脚本\n *\n * @param src 文件地址\n * @param attrs 可选的属性\n *\n * @returns dom 节点\n *\n * @example\n *\n * try {\n * const src = 'https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js'\n *\n * await loadScript(src, { id: 'jquery.3.6.0.min' })\n * } catch {\n * alert('加载失败')\n * }\n */\nfunction loadScript(umd, progectId, attrs) {\n return new Promise((resolve, reject) => {\n const scriptNode = document.createElement('script');\n // const styleNode: HTMLLinkElement = document.createElement('link');\n // const id = uuidv4();\n scriptNode.id = progectId;\n // styleNode.id = id;\n // 监听事件\n if (scriptNode.readyState) {\n listenWithIE(scriptNode, () => resolve(scriptNode));\n }\n else {\n listen(scriptNode, () => resolve(scriptNode), () => {\n reject();\n document.removeChild(document.getElementById(progectId));\n });\n }\n // 设置白名单属性\n if (attrs) {\n allowLists.forEach(attrName => {\n if (attrName in attrs) {\n const value = attrs[attrName];\n if (typeof value === 'string') {\n scriptNode.setAttribute(attrName, value);\n // styleNode.setAttribute(attrName, value);\n }\n else if (typeof value === 'boolean') {\n // 布尔值与字符串的设置不太一样\n scriptNode[attrName] = value;\n }\n }\n });\n }\n // 设置资源地址\n scriptNode.src = umd.js;\n // styleNode.href = umd.css;\n // 插入到页面中\n document.body.appendChild(scriptNode);\n // document.body.appendChild(styleNode);\n });\n}\nfunction unLoadScript(progectId) {\n if (document.getElementById(progectId)) {\n const scriptNode = document.getElementById(progectId);\n document.body.removeChild(scriptNode);\n }\n}\n\nconst isDate = (value) => {\n let date = value;\n if (value instanceof Date) {\n date = value;\n }\n else if (typeof value === 'string' &&\n String(value).length >= 13 &&\n !isNaN(value)) {\n date = Number(value);\n }\n else if (typeof value === 'string' && value.includes('-')) {\n date = value.replace(/-/g, '/');\n }\n return new Date(date) && String(new Date(date)) !== 'Invalid Date';\n};\n\nconst toDate = (value) => {\n if (isDate(value)) {\n let date = value;\n if (value instanceof Date) {\n date = value;\n }\n else if (typeof value === 'string' &&\n String(value).length >= 13 &&\n !isNaN(value)) {\n date = Number(value);\n }\n else if (typeof value === 'string' && value.includes('-')) {\n date = value.replace(/-/g, '/');\n }\n return new Date(date).getTime();\n }\n return 0;\n};\n\n/**\n * 获取时间搓 消除-连接时,默认时间为8点的问题\n * @param date 时间\n * return number 时间搓。单位:毫秒\n * */\nconst getDate = (date) => {\n const dateStr = date.replace(/-/g, '/');\n return new Date(dateStr).valueOf();\n};\n\nconst dateFormat = (date, format) => {\n if (!isDate(date))\n return null;\n // 时间格式化函数\n let time;\n if (!isNaN(date)) {\n date = Number(date);\n }\n else if (typeof date === 'string' && date.includes('-')) {\n date = date.replace(/-/g, '/');\n }\n time = new Date(date);\n const o = {\n YYYY: time.getFullYear(),\n YY: `${time.getFullYear()}`.slice(-2),\n MM: `0${time.getMonth() + 1}`.slice(-2),\n M: time.getMonth() + 1,\n DD: `0${time.getDate()}`.slice(-2),\n D: time.getDate(),\n HH: `0${time.getHours()}`.slice(-2),\n H: time.getHours(),\n hh: `0${time.getHours() % 12}`.slice(-2),\n h: time.getHours() % 12,\n mm: `0${time.getMinutes()}`.slice(-2),\n m: time.getMinutes(),\n ss: `0${time.getSeconds()}`.slice(-2),\n s: time.getSeconds(),\n w: (function () {\n return ['日', '一', '二', '三', '四', '五', '六'][time.getDay()];\n })(),\n };\n for (const k in o) {\n format = format.replace(k, o[k]);\n }\n return format;\n};\n\n/**\n * 时光流逝\n * @param startDate string 开始时间\n * @param flowTime number 流逝时长 单位秒\n * @param format string 返回格式 默认: 'HH:mm:ss'\n */\nconst timeFlow = (startDate, flowTime, format = 'HH:mm:ss') => (dateFormat(getDate(startDate) + flowTime * 1000, format));\n\n/**\n * 字符串填充\n * @param type sting 填充左侧还是右侧\n * @param sourceStr string 原字符串\n * @param len number 填充后长度\n * @param charStr string 填充的字符\n * @returns string\n */\nconst strPad = (type, sourceStr, len, charStr) => {\n let retStr = '';\n if (sourceStr.length > len)\n return sourceStr;\n if (type === 'left') {\n // leftPad\n retStr = new Array(len - sourceStr.length + 1).join(charStr) + sourceStr;\n }\n else {\n // rightPad\n retStr = sourceStr + new Array(len - sourceStr.length + 1).join(charStr);\n }\n return retStr;\n};\n\n/**\n * 时长展示 比如:300秒 展示为:0:5\n * @param time number 单位:秒\n * @param format 返回的结果格式 {mm}\n * @param allowEmpty 是否允许time为空\n */\nconst [oneDay$1, oneHour$1, oneMinute$1] = [86400, 3600, 60];\nconst formatTime = (time, format, allowEmpty = true) => {\n let timelen = time < 0 ? 0 : parseFloat(`${time}`);\n if ((isNaN(timelen) || !timelen) && !(allowEmpty && timelen === 0)) { // 0代表无数据,显示-\n return '-';\n }\n let [days, hours, minutes, seconds] = [undefined, undefined, undefined, undefined];\n if (format.indexOf('{DD}') > -1) {\n days = Math.floor(timelen / oneDay$1);\n timelen = Math.floor(timelen % oneDay$1);\n }\n if (format.indexOf('{HH}') > -1) {\n hours = Math.floor(timelen / oneHour$1);\n timelen = Math.floor(timelen % oneHour$1);\n }\n if (format.indexOf('{mm}') > -1) {\n minutes = Math.floor(timelen / oneMinute$1);\n timelen = Math.floor(timelen % oneMinute$1);\n }\n seconds = timelen;\n const timeStr = format\n .replace('{ss}', typeof seconds === 'number' ? strPad('left', String(seconds), 2, '0') : '')\n .replace('{mm}', typeof minutes === 'number' ? strPad('left', String(minutes), 2, '0') : '')\n .replace('{HH}', typeof hours === 'number' ? strPad('left', String(hours), 2, '0') : '')\n .replace('{DD}', typeof days === 'number' ? strPad('left', String(days), 2, '0') : '');\n return timeStr;\n};\n\n/**\n * 计算两个时间の间隔\n * @param startTime 开始时间\n * @param endTime 结束时间\n * @param unit 返回的时间单位 s:秒(默认) m:分钟 h: 小时 d: 天\n * @param fixed 小数位\n * return number 间隔时长。单位:秒\n * */\nconst [oneDay, oneHour, oneMinute] = [86400, 3600, 60];\nconst calTimeLen = (startTime, endTime, unit = 's', fixed) => {\n let unitTime;\n switch (unit) {\n case 'm':\n unitTime = 1000 * oneMinute;\n break;\n case 'h':\n unitTime = 1000 * oneHour;\n break;\n case 'd':\n unitTime = 1000 * oneDay;\n break;\n default:\n unitTime = 1000;\n }\n let interval = (getDate(endTime) - getDate(startTime)) / unitTime;\n // 四舍五入\n interval = typeof fixed === 'number' ? Number(interval.toFixed(fixed)) : interval;\n return interval;\n};\n\nconst treeReduce = (target, childKey, data) => {\n const hasChildren = (node) => {\n return hasPath$1([childKey], node);\n };\n const Tree = {\n reduce: curry$1((reducerFn, init, node) => {\n const acc = reducerFn(init, node);\n if (!hasChildren(node)) {\n return acc;\n }\n return node[childKey]\n ? node[childKey].reduce(Tree.reduce(reducerFn), acc)\n : acc;\n }),\n find: curry$1((findFn, init, node) => {\n return pipe(map$1(Tree.reduce(findFn, init)), flatten$1)(node);\n })\n };\n const fn = (arr, data) => {\n if ((target.value && data[target.key] && data[target.key] === target.value) ||\n (!target.value && data[target.key])) {\n return arr.concat([omit$1([childKey], data)]);\n }\n else {\n return arr;\n }\n };\n const type = type$1(data);\n switch (type) {\n case 'Object': {\n return Tree.reduce(fn, [])(data);\n }\n case 'Array': {\n return Tree.find(fn, [])(data);\n }\n default: {\n return data;\n }\n }\n};\n\nconst treeFind = (target, childKey, data) => {\n const hasChildren = (node) => {\n return childKey && hasPath$1([childKey], node) && !isEmpty$1(node[childKey]);\n };\n const Tree = {\n reduce: curry$1((fn, init, node) => {\n const acc = fn(init, node);\n if (!hasChildren(node) && node[target.key] === target.value) {\n return acc;\n }\n return childKey && node[childKey] && !isEmpty$1(node[childKey]) ? Tree.reduce(findFn, acc)(node[childKey]) : acc;\n }),\n find: curry$1((fn, init, node) => {\n return pipe(map$1(Tree.reduce(fn, init)), flatten$1, union$1(init))(node);\n })\n };\n const reducerFn = (arr, data) => {\n if ((target.value && data[target.key] && data[target.key] === target.value) ||\n (!target.value && data[target.key])) {\n return childKey ? arr.concat([omit$1([childKey], data)]) : arr.concat([data]);\n }\n else {\n return arr;\n }\n };\n const findFn = (arr, data) => {\n const keys = Object.keys(data);\n const result = [];\n keys.map((key) => {\n result.push(data[key]);\n });\n return Tree.find(reducerFn, arr)(result);\n };\n const type = type$1(data);\n switch (type) {\n case 'Object': {\n return Tree.reduce(findFn, [])(data);\n }\n case 'Array': {\n return Tree.find(reducerFn, [])(data);\n }\n default: {\n return [];\n }\n }\n};\n\nconst treePaths = (target, childKey, data) => {\n const hasChildren = (node) => {\n return hasPath$1([childKey], node) && !isEmpty$1(node[childKey]);\n };\n const Tree = {\n reduce: curry$1((reducerFn, init, preNode, node) => {\n const acc = reducerFn(init, preNode, node);\n if (!hasChildren(node) && node[target.key] === target.value) {\n if (preNode.path) {\n acc.splice(0, 0, preNode.path);\n }\n return acc;\n }\n return node[childKey] && !isEmpty$1(node[childKey]) ? Tree.reduce(findFn, [], omit$1([childKey], node))(node[childKey]) : acc;\n }),\n find: curry$1((findFn, init, preNode, node) => {\n return pipe(map$1(Tree.reduce(findFn, init, preNode)), flatten$1)(node);\n })\n };\n const reducerFn = (arr, _preNode, data) => {\n if ((target.value && data[target.key] && data[target.key] === target.value) ||\n (!target.value && data[target.key])) {\n return arr.concat([data.path]);\n }\n else {\n return arr;\n }\n };\n const findFn = (arr, preNode, data) => {\n if (!data || isEmpty$1(data)) {\n return arr;\n }\n const keys = Object.keys(data);\n const result = [];\n keys.map((key) => {\n result.push(data[key]);\n });\n return Tree.find(reducerFn, arr, preNode)(result);\n };\n const type = type$1(data);\n switch (type) {\n case 'Object': {\n return Tree.reduce(findFn, [], {})(data);\n }\n case 'Array': {\n return Tree.find(reducerFn, [], {})(data);\n }\n default: {\n return [];\n }\n }\n};\n\nconst pickAll = (key, childKey, data) => {\n const hasChildren = (node) => {\n return hasPath$1([childKey], node);\n };\n const Tree = {\n reduce: curry$1((reducerFn, init, node) => {\n const acc = reducerFn(init, node);\n if (!hasChildren(node)) {\n const res = acc && acc.length ? map$1((item) => {\n return item[key] || item;\n })(acc) : [];\n return res;\n }\n return node[childKey]\n ? node[childKey].reduce(Tree.reduce(reducerFn), acc)\n : acc;\n }),\n find: curry$1((findFn, init, node) => {\n return pipe(map$1(Tree.reduce(findFn, init)), flatten$1)(node);\n })\n };\n const fn = (arr, data) => {\n if (data[key]) {\n return arr.concat([omit$1([childKey], data)]);\n }\n else {\n return arr;\n }\n };\n const type = type$1(data);\n switch (type) {\n case 'Object': {\n return Tree.reduce(fn, [])(data);\n }\n case 'Array': {\n return Tree.find(fn, [])(data);\n }\n default: {\n return data;\n }\n }\n};\n\nconst getRoutes = (permissionList, routerConfig, defaultConfig, pathname) => {\n if (isEmpty$1(permissionList) || isEmpty$1(routerConfig)) {\n return {\n menus: [],\n defaultSelectedMenus: [],\n defaultOpenMenus: [],\n defaultMenu: {},\n permissions: [],\n };\n }\n let paths;\n if (pathname !== '/' && pathname !== '/undefined' && pathname !== '/null') {\n paths = split('/', pathname);\n }\n else {\n paths = [];\n }\n let defaultOpenMenus = [];\n let defaultSelectedMenus = [];\n let defaultMenu = {};\n const resetData = (item) => {\n const currentItem = routerConfig[item.url];\n if (!currentItem) {\n return {};\n }\n const path = item.url.indexOf('/') === 0 ? item.url || '' : `/${item.url}`;\n const result = {\n path,\n param: currentItem.param || '',\n url: currentItem.url,\n name: item.resourceId,\n meta: {\n title: item.name,\n icon: currentItem.icon,\n },\n component: currentItem.component,\n hidden: currentItem.hidden,\n origion_url: path,\n };\n if (((defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.primaryDefaultMenu) &&\n item.url === (defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.primaryDefaultMenu)) ||\n ((defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.secondaryDefaultMenu) &&\n item.url === (defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.secondaryDefaultMenu))) {\n defaultOpenMenus = [item.resourceParentId];\n defaultSelectedMenus = [item.resourceId];\n defaultMenu = result;\n }\n return result;\n };\n const result = [];\n let permissions = [];\n permissionList.map((item) => {\n const children = [];\n const currentItem = routerConfig[item.url];\n const btns = treeReduce({ key: 'resourceType', value: 'BUTTON' }, 'childMenus', item);\n if (btns && btns.length) {\n const urls = pipe(map$1(prop$1('url')))(btns);\n permissions = concat$1(permissions, urls);\n }\n if (item.childMenus && item.childMenus.length) {\n const childMenus = treeReduce({ key: 'resourceId' }, 'childMenus', item.childMenus);\n childMenus.map((child) => {\n if (child) {\n const data = resetData(child);\n if (data && data.name) {\n children.push(data);\n }\n }\n });\n }\n const data = resetData(item);\n if (currentItem) {\n result.push(Object.assign(Object.assign({}, data), { children }));\n }\n });\n if (paths.length && result.length) {\n const res = setPathToDefaultMenu(paths, result);\n defaultSelectedMenus = res.defaultSelectedMenus;\n defaultOpenMenus = res.defaultOpenMenus;\n defaultMenu = res.defaultMenu;\n }\n else if (!defaultSelectedMenus.length ||\n !defaultOpenMenus.length ||\n !defaultMenu) {\n const res = setFistChildToDefaultMenu(result);\n defaultSelectedMenus = res.defaultSelectedMenus;\n defaultOpenMenus = res.defaultOpenMenus;\n defaultMenu = res.defaultMenu;\n }\n return {\n menus: result,\n defaultSelectedMenus,\n defaultOpenMenus,\n defaultMenu: defaultMenu,\n permissions,\n };\n};\nconst setPathToDefaultMenu = (paths, menus) => {\n let defaultOpenMenus = [];\n let defaultSelectedMenus = [];\n let defaultMenu = {};\n const openMenus = find$1(propEq$1('origion_url', `/${paths[0]}`))(menus);\n if (openMenus) {\n defaultOpenMenus = [openMenus.name];\n if (paths.length > 1 && openMenus.children && openMenus.children.length) {\n const defaultPath = paths.join('/');\n defaultMenu = find$1(propEq$1('origion_url', `/${defaultPath}`))(openMenus.children);\n }\n else {\n defaultMenu =\n openMenus.children && openMenus.children.length\n ? openMenus.children[0]\n : openMenus;\n }\n defaultSelectedMenus = (defaultMenu === null || defaultMenu === void 0 ? void 0 : defaultMenu.name) ? [defaultMenu.name] : [];\n }\n return {\n defaultOpenMenus,\n defaultSelectedMenus,\n defaultMenu,\n };\n};\nconst setFistChildToDefaultMenu = (menus) => {\n var _a, _b;\n let defaultOpenMenus = [];\n let defaultSelectedMenus = [];\n let defaultMenu = {};\n if (menus[0] && menus[0].children && menus[0].children.length) {\n defaultOpenMenus = [menus[0].name];\n defaultSelectedMenus = [menus[0].children[0].name];\n defaultMenu = menus[0].children[0];\n }\n else if (menus[0]) {\n defaultOpenMenus = [(_a = menus[0]) === null || _a === void 0 ? void 0 : _a.name];\n defaultSelectedMenus = [(_b = menus[0]) === null || _b === void 0 ? void 0 : _b.name];\n defaultMenu = menus[0];\n }\n return {\n defaultOpenMenus,\n defaultSelectedMenus,\n defaultMenu,\n };\n};\n\n/**\n * 转换为带单位的短数据\n * @param num 需要转换的数字(非数字 或是 - 将直接返回 -)\n * @param decimal 返回的小数位\n * @param addUnit 返回值是否添加单位:(万或亿)\n * @param retInt 当数据小于1万时,是否返回无小数位的整数\n */\nconst transformShortNum = (num, decimal = 0, addUnit = true, retInt = false) => {\n let formatValue = parseFloat(num);\n if (isNaN(formatValue) || (num !== 0 && !num)) {\n return '-';\n }\n let isNegativeNumber = false;\n let ret = '';\n if (formatValue < 0) {\n isNegativeNumber = true;\n formatValue = Math.abs(formatValue);\n }\n if (formatValue >= 100000000) {\n ret = (formatValue / 100000000).toFixed(decimal) + (addUnit ? '亿' : '');\n }\n else if (formatValue >= 10000) {\n ret = (formatValue / 10000).toFixed(decimal) + (addUnit ? '万' : '');\n }\n else {\n ret = retInt ? formatValue.toFixed(0) : formatValue.toString();\n ret = !retInt && !isNaN(decimal) ? formatValue.toFixed(decimal) : ret;\n }\n return isNegativeNumber ? `-${ret}` : ret;\n};\n\n/**\n * 特定类型数字的统一格式处理\n * @param num 需要转换的数字(非数字 或是 - 将直接返回 -)\n * @param decimal 返回的小数位\n * @param addUnit 返回值是否添加单位:(万或亿)\n * @param retInt 当数据小于1万时,是否返回无小数位的整数\n */\nconst formatData = (config) => {\n let { afterUnit } = config;\n const { type, value, isAbs, beforeUnit } = config;\n if (Number(value) === -2147483648) {\n return '无权限';\n }\n if (type === 'text') { // 文字类型\n return value || value === 0 ? value : '-';\n }\n if (isNaN(value) || (value !== 0 && !value)) {\n return '-';\n }\n let val;\n switch (type) {\n case 'yuan': // 接口数据,单位为元\n val = transformShortNum(value, 2);\n break;\n case 'fen': // 接口数据,单位为分\n val = transformShortNum(value / 100, 2);\n break;\n case 'decimalToPercentSave2Decimal': // 小数转百分比, 保留两位小数\n val = transformShortNum(value * 100, 2);\n afterUnit = typeof afterUnit === 'string' ? afterUnit : '%';\n break;\n case 'decimalToPercentSave0Decimal': // 小数转百分比, 不保留两位小数\n val = transformShortNum(value * 100, 0);\n afterUnit = typeof afterUnit === 'string' ? afterUnit : '%';\n break;\n case 'percentSave2Decimal': // 百分比, 保留两位小数\n val = transformShortNum(value, 2);\n afterUnit = typeof afterUnit === 'string' ? afterUnit : '%';\n break;\n case 'percentSave0Decimal': // 百分比, 不保留两位小数\n val = transformShortNum(value, 0);\n afterUnit = typeof afterUnit === 'string' ? afterUnit : '%';\n break;\n case 'int': // 数量, 小于1万时,舍弃小数点,仅保留整数\n val = transformShortNum(value, 2, true, true);\n break;\n case 'decimal': // 数量, 小于1万时,保留小数点\n val = transformShortNum(value, 2, true, false);\n break;\n case 'secToTimeHM': // 秒转为 xxhyym\n val = formatTime(value, '{HH}h{mm}m');\n break;\n case 'secToTimeChMS': // 秒转为 xx分yy秒\n val = formatTime(value, '{mm}分{ss}秒');\n break;\n case 'secToTimeMS': // 秒转为 xxmyys\n val = formatTime(value, '{mm}m{ss}s');\n break;\n case 'secToTime': // 秒转为 {DD}d{HH}h{mm}m{ss}s,天数和小时为零时不展示\n val = formatTime(value, '{DD}d{HH}h{mm}m{ss}s', false);\n val = val.replace('00d', '').replace('00h', '');\n break;\n default:\n val = transformShortNum(value);\n }\n val = val !== '-' && isAbs ? val.replace('-', '') : val;\n return val === '-' ? '-' : `${beforeUnit || ''}${val}${afterUnit || ''}`;\n};\n\nconst niceNumShow = (val, spiltPoint = false) => {\n if ((val !== 0 && !val) || val === '-') {\n return [{ type: 'num', text: '-' }];\n }\n const resultList = [];\n const list = val.toString().split('');\n let text = '';\n let type; // 1: 数字 2: . 3: 非数字\n list.forEach((character) => {\n let characterType = (/^[0-9\\\\.]*$/.test(character)) ? 'num' : 'character';\n characterType = ((character === '.' && spiltPoint) || (characterType === 'num' && type === 'suffixNum')) ? 'suffixNum' : characterType;\n if (type !== characterType && type) {\n resultList.push({ type, text });\n text = character;\n }\n else {\n text = `${text}${character}`;\n }\n type = characterType;\n });\n type = type || 'num';\n resultList.push({ type, text });\n return resultList;\n};\n\nconst isChinaMobile = (value) => {\n return /^((\\+86)|(86)|(086))?(13[0-9]|15[0-9]|166|17[0-9]|18[0-9]|14[0-9]|19[0-9])[0-9]{8}$/.test(String(value));\n};\n\nconst isURL = (value) => {\n return /^((?:(?:https?|ftp):|)\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))\\.?)(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test(String(value));\n};\n\nconst YR = {\n email: /\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*/,\n phone: /^1[3|4|5|6|7|8][0-9]{9}$/,\n fixedPhone: /(^0\\d{2,3}-\\d{7,8}$)|(^1[3|4|5|6|7|8][0-9]{9}$)/,\n qq: /[1-9][0-9]{4,}/,\n zipcode: /[1-9]\\d{5}(?!\\d)/,\n IDCard: /^\\d{17}[\\d|X|x]|\\d{15}$/,\n chinese: /^[\\u0391-\\uFFE5]+$/,\n chineseNumberLine: /^[\\u4E00-\\u9FA5A-Za-z0-9_]+$/,\n chineseNumberNoLine: /^[\\u4E00-\\u9FA5A-Za-z0-9]+$/,\n integerZ: /^[1-9]\\d*$/,\n integerF: /^-[1-9]\\d*$/,\n number: /^\\d+(\\.\\d+)?$/,\n numberNoMoreThan1: /^\\-?([0-9](\\d+)?(\\.\\d{1,1})?$)|(^0$)|(^\\d\\.\\d{1,1})$/,\n numberNoMoreThan2: /^\\-?([0-9](\\d+)?(\\.\\d{1,2})?$)|(^0$)|(^\\d\\.\\d{1,2})$/,\n numberNoMoreThan3: /^\\-?([0-9](\\d+)?(\\.\\d{1,3})?$)|(^0$)|(^\\d\\.\\d{1,3})$/,\n numberNoMoreThan4: /^\\-?([0-9](\\d+)?(\\.\\d{1,4})?$)|(^0$)|(^\\d\\.\\d{1,4})$/,\n greaterZero1: /^(0|[1-9]\\d*)(\\.\\d{1,1})?$/,\n greaterZero2: /^(0|[1-9]\\d*)(\\.\\d{1,2})?$/,\n greaterZero3: /^(0|[1-9]\\d*)(\\.\\d{1,3})?$/,\n greaterZero4: /^(0|[1-9]\\d*)(\\.\\d{1,4})?$/,\n zeroTo100: /^((\\d|[1-9]\\d)(\\.\\d{1,2})?$)|(^100|100.0|100.00$)$/,\n zeroTo1000: /^((\\d|[1-9]{1,2}\\d)(\\.\\d{1,2})?$)|(^1000|1000.0|1000.00$)$/, // 零到1000,最多保留两位数字\n};\n\nconst getQueryOfNextPageContext = (ctx) => {\n if (!ctx) {\n return {};\n }\n const { pathname = '', asPath = '', query } = ctx;\n const routes = pipe(split$2('/'), filter$1((item) => /\\[\\w+\\]/.test(item)), map$1((item) => replace$1(']', '', replace$1('[', '', item))))(pathname);\n const path = pipe((split$2('#')), slice$1(0, 1))(asPath) || [];\n const paths = path.length\n ? pipe(split$2('/'), filter$1((item) => item !== ''))(path[0])\n : [];\n const result = routes.map((key, index) => {\n return {\n [`${key}`]: paths[index],\n };\n });\n let newQuery = {};\n if (!routes.length) {\n newQuery.path = paths[0] || 'desktop';\n }\n else {\n newQuery = mergeAll$1(result) || {};\n }\n return Object.assign(Object.assign({}, query), newQuery);\n};\n\nconst getEnv = () => {\n return window.localStorage.getItem('env') || 'prod';\n};\nconst getMock = () => {\n return window.localStorage.getItem('isMock');\n};\n\nconst getHost = (projectId, yapiProjectid, isMock) => {\n const configs = window.configs ? window.configs : {};\n let env = isMock && getMock() ? 'mock' : getEnv();\n const basePath = configs[projectId]\n ? configs[projectId][env].API_BASE_URL +\n `${env === 'mock' ? '/' + yapiProjectid : ''}`\n : '';\n const loginPath = configs['AUTH'] ? configs['AUTH'][env].APPLICATION_URL : '';\n return {\n basePath,\n loginPath,\n };\n};\n\nconst parseParams = (params) => {\n return values$1(params).join('/');\n};\n\nconst reduceParams = (data) => {\n if (!data) {\n return {};\n }\n if (data instanceof FormData) {\n return data;\n }\n const result = filter$1(item => !isNil$1(item) && !isEmpty$1(item))(data) || {};\n return result;\n};\n\nconst parse$1 = (str) => {\n if(!str) {\n return {};\n }\n const result = pipe(\n replace$1('?', ''),\n split$2('&'),\n map$1((item) => split$2('=', decodeURI(item))),\n fromPairs$1,\n )(str);\n return result\n};\n\nconst stringify$2 = (query) => {\n if(isEmpty$1(query)){\n return ''\n }\n const keys = Object.keys(query);\n let result = '';\n keys.map((key) => {\n result += `&${key}=${query[key]}`;\n });\n const params = new URLSearchParams(result);\n return params.toString() || '';\n};\n\nvar querystring = /*#__PURE__*/Object.freeze({\n __proto__: null,\n parse: parse$1,\n stringify: stringify$2\n});\n\n/**\n * 获取地址对应参数\n * @param name\n * @param search\n * @returns\n */\nconst getQuery = (name, search) => {\n const reg = new RegExp(`(\\\\?|&)${name}=([^&]*)(&|$)`, 'i');\n let searchParams = window.location.href;\n const values = reg.exec((search || searchParams));\n if (values != null) {\n return decodeURIComponent(values[2]) || '';\n }\n return '';\n};\n/**\n * 获取地址所有参数\n * @param search\n * @returns\n */\nconst getQueries = (search) => {\n let str = search || window.location.search;\n str = str.replace('?', '');\n let result = parse$1(str);\n return (result || {});\n};\n/**\n * 获取地址对应参数\n * @param name\n * @param urlStr\n * @returns\n */\nconst getQueryName = (name, urlStr) => {\n let url = urlStr || decodeURI(window.location.href);\n url = url.split('?')[1];\n const querys = new Object();\n if (url.indexOf('?') === -1) {\n const strs = url.split('&');\n for (let i = 0; i < strs.length; i++) {\n const oneStr = strs[i];\n const index = oneStr.indexOf('=');\n if (index > 0) {\n querys[oneStr.substr(0, index)] = decodeURI(oneStr.substr(index + 1));\n }\n }\n }\n return querys[name] || '';\n};\n\nconst joinPath = (params) => {\n if (!params || isEmpty$1(params)) {\n return '';\n }\n const keys = Object.keys(params);\n let result = '';\n keys.map((key) => {\n if (params[key] && key !== 'search') {\n result += `/${params[key]}`;\n }\n if (key === 'search') {\n result += params[key];\n }\n });\n return result;\n};\n\nconst slicePath = (path, start = 0, end) => {\n const paths = split('/', path);\n if (!end) {\n end = paths.length - 1;\n }\n const newPaths = paths.slice(start, end);\n return '/' + newPaths.join('/');\n};\n\n/**\n * map 结构转 array\n * @param map\n * @param useAllSelect 全部默认选项\n * @param allSelectLabel 全部项默认lable\n * @param allSelectValue 全部项默认value\n * @returns OptionsItem[]\n */\nconst translateMapToArray = (map, useAllSelect = false, allSelectLabel = '全部', allSelectValue = null) => {\n // 全部项\n const allSelect = { label: allSelectLabel, value: allSelectValue };\n let array = useAllSelect ? [allSelect] : [];\n for (const [key, value] of map.entries()) {\n array.push({\n label: value,\n value: key,\n });\n }\n return array;\n};\n\nconst addQueries = (params) => {\n const arr = [];\n Object.keys(params).forEach((key) => {\n if (!(isEmpty$1(params[key]) || isNil$1(params[key]))) {\n arr.push(`${key}=${params[key]}`);\n }\n });\n return arr.join('&');\n};\n/**\n *\n * @param url 下载地址\n * @param params 参数集合\n */\nconst exportExcel = (url, params = {}) => {\n let token;\n if (typeof window !== 'undefined') {\n token = window.localStorage.getItem('token');\n const data = Object.assign(Object.assign({}, params), { token });\n if (!/^https.*/.test(url)) {\n // eslint-disable-next-line no-param-reassign\n url = url.replace('http', 'https');\n }\n const downloadUrl = `${url}?${addQueries(data)}`;\n console.log('YWFE下载地址=>', downloadUrl);\n const id = `alink_${new Date().getTime()}`;\n const aDom = document.createElement('a');\n aDom.setAttribute('href', downloadUrl);\n aDom.setAttribute('target', '_blank');\n aDom.setAttribute('id', id);\n if (!document.getElementById(id)) {\n document.body.appendChild(aDom);\n }\n aDom.click();\n setTimeout(() => {\n document.body.removeChild(aDom);\n }, 0);\n }\n};\n\n/**\n * 同步下载\n * @param data 带转换的arraybuffer数据\n * @param name 文件名\n */\nconst omadownload = (data, name, fileType) => {\n const uint8Msg = new Uint8Array(data);\n try {\n const uint8String = String.fromCharCode.apply(null, uint8Msg);\n if (uint8String.indexOf('success') > -1) {\n // message.error('导出失败');\n return JSON.parse(uint8String);\n }\n }\n catch (error) {\n console.warn(error);\n }\n const url = window.URL.createObjectURL(new Blob([data], { type: fileType || 'application/vnd.ms-excel' }));\n const link = document.createElement('a');\n link.style.display = 'none';\n link.href = url;\n link.setAttribute('download', decodeURIComponent(name));\n document.body.appendChild(link);\n link.click();\n link.remove();\n};\n\n/*\r\n * big.js v5.2.2\r\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n * Copyright (c) 2018 Michael Mclaughlin <M8ch88l@gmail.com>\r\n * https://github.com/MikeMcl/big.js/LICENCE\r\n */\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n // The default values below must be integers within the stated ranges.\r\n\r\n /*\r\n * The maximum number of decimal places (DP) of the results of operations involving division:\r\n * div and sqrt, and pow with negative exponents.\r\n */\r\nvar DP = 20, // 0 to MAX_DP\r\n\r\n /*\r\n * The rounding mode (RM) used when rounding to the above decimal places.\r\n *\r\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\r\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\r\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\r\n * 3 Away from zero. (ROUND_UP)\r\n */\r\n RM = 1, // 0, 1, 2 or 3\r\n\r\n // The maximum value of DP and Big.DP.\r\n MAX_DP = 1E6, // 0 to 1000000\r\n\r\n // The maximum magnitude of the exponent argument to the pow method.\r\n MAX_POWER = 1E6, // 1 to 1000000\r\n\r\n /*\r\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n * (JavaScript numbers: -7)\r\n * -1000000 is the minimum recommended exponent value of a Big.\r\n */\r\n NE = -7, // 0 to -1000000\r\n\r\n /*\r\n * The positive exponent (PE) at and above which toString returns exponential notation.\r\n * (JavaScript numbers: 21)\r\n * 1000000 is the maximum recommended exponent value of a Big.\r\n * (This limit is not enforced or checked.)\r\n */\r\n PE = 21, // 0 to 1000000\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n // Error messages.\r\n NAME = '[big.js] ',\r\n INVALID = NAME + 'Invalid ',\r\n INVALID_DP = INVALID + 'decimal places',\r\n INVALID_RM = INVALID + 'rounding mode',\r\n DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n // The shared prototype object.\r\n P = {},\r\n UNDEFINED = void 0,\r\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n/*\r\n * Create and return a Big constructor.\r\n *\r\n */\r\nfunction _Big_() {\r\n\r\n /*\r\n * The Big constructor and exported function.\r\n * Create and return a new instance of a Big number object.\r\n *\r\n * n {number|string|Big} A numeric value.\r\n */\r\n function Big(n) {\r\n var x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n // Duplicate.\r\n if (n instanceof Big) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = n.c.slice();\r\n } else {\r\n parse(x, n);\r\n }\r\n\r\n /*\r\n * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which\r\n * points to Object.\r\n */\r\n x.constructor = Big;\r\n }\r\n\r\n Big.prototype = P;\r\n Big.DP = DP;\r\n Big.RM = RM;\r\n Big.NE = NE;\r\n Big.PE = PE;\r\n Big.version = '5.2.2';\r\n\r\n return Big;\r\n}\r\n\r\n\r\n/*\r\n * Parse the number or string value passed to a Big constructor.\r\n *\r\n * x {Big} A Big number instance.\r\n * n {number|string} A numeric value.\r\n */\r\nfunction parse(x, n) {\r\n var e, i, nl;\r\n\r\n // Minus zero?\r\n if (n === 0 && 1 / n < 0) n = '-0';\r\n else if (!NUMERIC.test(n += '')) throw Error(INVALID + 'number');\r\n\r\n // Determine sign.\r\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n // Decimal point?\r\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = n.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +n.slice(i + 1);\r\n n = n.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = n.length;\r\n }\r\n\r\n nl = n.length;\r\n\r\n // Determine leading zeros.\r\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n if (i == nl) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n\r\n // Determine trailing zeros.\r\n for (; nl > 0 && n.charAt(--nl) == '0';);\r\n x.e = e - i - 1;\r\n x.c = [];\r\n\r\n // Convert string to array of digits without leading/trailing zeros.\r\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Round Big x to a maximum of dp decimal places using rounding mode rm.\r\n * Called by stringify, P.div, P.round and P.sqrt.\r\n *\r\n * x {Big} The Big to round.\r\n * dp {number} Integer, 0 to MAX_DP inclusive.\r\n * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP)\r\n * [more] {boolean} Whether the result of division was truncated.\r\n */\r\nfunction round$1(x, dp, rm, more) {\r\n var xc = x.c,\r\n i = x.e + dp + 1;\r\n\r\n if (i < xc.length) {\r\n if (rm === 1) {\r\n\r\n // xc[i] is the digit after the digit that may be rounded up.\r\n more = xc[i] >= 5;\r\n } else if (rm === 2) {\r\n more = xc[i] > 5 || xc[i] == 5 &&\r\n (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1);\r\n } else if (rm === 3) {\r\n more = more || !!xc[0];\r\n } else {\r\n more = false;\r\n if (rm !== 0) throw Error(INVALID_RM);\r\n }\r\n\r\n if (i < 1) {\r\n xc.length = 1;\r\n\r\n if (more) {\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n x.e = -dp;\r\n xc[0] = 1;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n } else {\r\n\r\n // Remove any digits after the required decimal places.\r\n xc.length = i--;\r\n\r\n // Round up?\r\n if (more) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up.\r\n for (; ++xc[i] > 9;) {\r\n xc[i] = 0;\r\n if (!i--) {\r\n ++x.e;\r\n xc.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; !xc[--i];) xc.pop();\r\n }\r\n } else if (rm < 0 || rm > 3 || rm !== ~~rm) {\r\n throw Error(INVALID_RM);\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Return a string representing the value of Big x in normal or exponential notation.\r\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n *\r\n * x {Big}\r\n * id? {number} Caller id.\r\n * 1 toExponential\r\n * 2 toFixed\r\n * 3 toPrecision\r\n * 4 valueOf\r\n * n? {number|undefined} Caller's argument.\r\n * k? {number|undefined}\r\n */\r\nfunction stringify$1(x, id, n, k) {\r\n var e, s,\r\n Big = x.constructor,\r\n z = !x.c[0];\r\n\r\n if (n !== UNDEFINED) {\r\n if (n !== ~~n || n < (id == 3) || n > MAX_DP) {\r\n throw Error(id == 3 ? INVALID + 'precision' : INVALID_DP);\r\n }\r\n\r\n x = new Big(x);\r\n\r\n // The index of the digit that may be rounded up.\r\n n = k - x.e;\r\n\r\n // Round?\r\n if (x.c.length > ++k) round$1(x, n, Big.RM);\r\n\r\n // toFixed: recalculate k as x.e may have changed if value rounded up.\r\n if (id == 2) k = x.e + n + 1;\r\n\r\n // Append zeros?\r\n for (; x.c.length < k;) x.c.push(0);\r\n }\r\n\r\n e = x.e;\r\n s = x.c.join('');\r\n n = s.length;\r\n\r\n // Exponential notation?\r\n if (id != 2 && (id == 1 || id == 3 && k <= e || e <= Big.NE || e >= Big.PE)) {\r\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n // Normal notation.\r\n } else if (e < 0) {\r\n for (; ++e;) s = '0' + s;\r\n s = '0.' + s;\r\n } else if (e > 0) {\r\n if (++e > n) for (e -= n; e--;) s += '0';\r\n else if (e < n) s = s.slice(0, e) + '.' + s.slice(e);\r\n } else if (n > 1) {\r\n s = s.charAt(0) + '.' + s.slice(1);\r\n }\r\n\r\n return x.s < 0 && (!z || id == 4) ? '-' + s : s;\r\n}\r\n\r\n\r\n// Prototype/instance methods\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the absolute value of this Big.\r\n */\r\nP.abs = function () {\r\n var x = new this.constructor(this);\r\n x.s = 1;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return 1 if the value of this Big is greater than the value of Big y,\r\n * -1 if the value of this Big is less than the value of Big y, or\r\n * 0 if they have the same value.\r\n*/\r\nP.cmp = function (y) {\r\n var isneg,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new x.constructor(y)).c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n isneg = i < 0;\r\n\r\n // Compare exponents.\r\n if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = -1; ++i < j;) {\r\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.div = function (y) {\r\n var x = this,\r\n Big = x.constructor,\r\n a = x.c, // dividend\r\n b = (y = new Big(y)).c, // divisor\r\n k = x.s == y.s ? 1 : -1,\r\n dp = Big.DP;\r\n\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP);\r\n\r\n // Divisor is zero?\r\n if (!b[0]) throw Error(DIV_BY_ZERO);\r\n\r\n // Dividend is 0? Return +-0.\r\n if (!a[0]) return new Big(k * 0);\r\n\r\n var bl, bt, n, cmp, ri,\r\n bz = b.slice(),\r\n ai = bl = b.length,\r\n al = a.length,\r\n r = a.slice(0, bl), // remainder\r\n rl = r.length,\r\n q = y, // quotient\r\n qc = q.c = [],\r\n qi = 0,\r\n d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result\r\n\r\n q.s = k;\r\n k = d < 0 ? 0 : d;\r\n\r\n // Create version of divisor with leading zero.\r\n bz.unshift(0);\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; rl++ < bl;) r.push(0);\r\n\r\n do {\r\n\r\n // n is how many times the divisor goes into current remainder.\r\n for (n = 0; n < 10; n++) {\r\n\r\n // Compare divisor and remainder.\r\n if (bl != (rl = r.length)) {\r\n cmp = bl > rl ? 1 : -1;\r\n } else {\r\n for (ri = -1, cmp = 0; ++ri < bl;) {\r\n if (b[ri] != r[ri]) {\r\n cmp = b[ri] > r[ri] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If divisor < remainder, subtract divisor from remainder.\r\n if (cmp < 0) {\r\n\r\n // Remainder can't be more than 1 digit longer than divisor.\r\n // Equalise lengths using divisor with extra leading zero?\r\n for (bt = rl == bl ? b : bz; rl;) {\r\n if (r[--rl] < bt[rl]) {\r\n ri = rl;\r\n for (; ri && !r[--ri];) r[ri] = 9;\r\n --r[ri];\r\n r[rl] += 10;\r\n }\r\n r[rl] -= bt[rl];\r\n }\r\n\r\n for (; !r[0];) r.shift();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Add the digit n to the result array.\r\n qc[qi++] = cmp ? n : ++n;\r\n\r\n // Update the remainder.\r\n if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n else r = [a[ai]];\r\n\r\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n if (!qc[0] && qi != 1) {\r\n\r\n // There can't be more than one zero.\r\n qc.shift();\r\n q.e--;\r\n }\r\n\r\n // Round?\r\n if (qi > d) round$1(q, dp, Big.RM, r[0] !== UNDEFINED);\r\n\r\n return q;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n */\r\nP.eq = function (y) {\r\n return !this.cmp(y);\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n * false.\r\n */\r\nP.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.gte = function (y) {\r\n return this.cmp(y) > -1;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n */\r\nP.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n */\r\nP.minus = P.sub = function (y) {\r\n var i, j, t, xlty,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xc = x.c.slice(),\r\n xe = x.e,\r\n yc = y.c,\r\n ye = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // y is non-zero? x is non-zero? Or both are zero.\r\n return yc[0] ? (y.s = -b, y) : new Big(xc[0] ? x : 0);\r\n }\r\n\r\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n if (a = xe - ye) {\r\n\r\n if (xlty = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n for (b = a; b--;) t.push(0);\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n if (xc[b] != yc[b]) {\r\n xlty = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xlty) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n /*\r\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n * needs to start at yc.length.\r\n */\r\n if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n // Subtract yc from xc.\r\n for (b = i; j > a;) {\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i];) xc[i] = 9;\r\n --xc[i];\r\n xc[j] += 10;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--b] === 0;) xc.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] === 0;) {\r\n xc.shift();\r\n --ye;\r\n }\r\n\r\n if (!xc[0]) {\r\n\r\n // n - n = +0\r\n y.s = 1;\r\n\r\n // Result must be zero.\r\n xc = [ye = 0];\r\n }\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n */\r\nP.mod = function (y) {\r\n var ygtx,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n if (!y.c[0]) throw Error(DIV_BY_ZERO);\r\n\r\n x.s = y.s = 1;\r\n ygtx = y.cmp(x) == 1;\r\n x.s = a;\r\n y.s = b;\r\n\r\n if (ygtx) return new Big(x);\r\n\r\n a = Big.DP;\r\n b = Big.RM;\r\n Big.DP = Big.RM = 0;\r\n x = x.div(y);\r\n Big.DP = a;\r\n Big.RM = b;\r\n\r\n return this.minus(x.times(y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n */\r\nP.plus = P.add = function (y) {\r\n var t,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e,\r\n xc = x.c,\r\n ye = y.e,\r\n yc = y.c;\r\n\r\n // Either zero? y is non-zero? x is non-zero? Or both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0);\r\n\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents.\r\n // Note: reverse faster than unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--;) t.push(0);\r\n t.reverse();\r\n }\r\n\r\n // Point xc to the longer array.\r\n if (xc.length - yc.length < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n }\r\n\r\n a = yc.length;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n for (b = 0; a; xc[a] %= 10) b = (xc[--a] = xc[a] + yc[a] + b) / 10 | 0;\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n if (b) {\r\n xc.unshift(b);\r\n ++ye;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (a = xc.length; xc[--a] === 0;) xc.pop();\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a Big whose value is the value of this Big raised to the power n.\r\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n * mode Big.RM.\r\n *\r\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n */\r\nP.pow = function (n) {\r\n var x = this,\r\n one = new x.constructor(1),\r\n y = one,\r\n isneg = n < 0;\r\n\r\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + 'exponent');\r\n if (isneg) n = -n;\r\n\r\n for (;;) {\r\n if (n & 1) y = y.times(x);\r\n n >>= 1;\r\n if (!n) break;\r\n x = x.times(x);\r\n }\r\n\r\n return isneg ? one.div(y) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded using rounding mode rm\r\n * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a\r\n * multiple of 10**-dp.\r\n * If dp is not specified, round to 0 decimal places.\r\n * If rm is not specified, use Big.RM.\r\n *\r\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP)\r\n */\r\nP.round = function (dp, rm) {\r\n var Big = this.constructor;\r\n if (dp === UNDEFINED) dp = 0;\r\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) throw Error(INVALID_DP);\r\n return round$1(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.sqrt = function () {\r\n var r, c, t,\r\n x = this,\r\n Big = x.constructor,\r\n s = x.s,\r\n e = x.e,\r\n half = new Big(0.5);\r\n\r\n // Zero?\r\n if (!x.c[0]) return new Big(x);\r\n\r\n // Negative?\r\n if (s < 0) throw Error(NAME + 'No square root');\r\n\r\n // Estimate.\r\n s = Math.sqrt(x + '');\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n if (s === 0 || s === 1 / 0) {\r\n c = x.c.join('');\r\n if (!(c.length + e & 1)) c += '0';\r\n s = Math.sqrt(c);\r\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n r = new Big((s == 1 / 0 ? '1e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n } else {\r\n r = new Big(s);\r\n }\r\n\r\n e = r.e + (Big.DP += 4);\r\n\r\n // Newton-Raphson iteration.\r\n do {\r\n t = r;\r\n r = half.times(t.plus(x.div(t)));\r\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n return round$1(r, Big.DP -= 4, Big.RM);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big times the value of Big y.\r\n */\r\nP.times = P.mul = function (y) {\r\n var c,\r\n x = this,\r\n Big = x.constructor,\r\n xc = x.c,\r\n yc = (y = new Big(y)).c,\r\n a = xc.length,\r\n b = yc.length,\r\n i = x.e,\r\n j = y.e;\r\n\r\n // Determine sign of result.\r\n y.s = x.s == y.s ? 1 : -1;\r\n\r\n // Return signed 0 if either 0.\r\n if (!xc[0] || !yc[0]) return new Big(y.s * 0);\r\n\r\n // Initialise exponent of result as x.e + y.e.\r\n y.e = i + j;\r\n\r\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n if (a < b) {\r\n c = xc;\r\n xc = yc;\r\n yc = c;\r\n j = a;\r\n a = b;\r\n b = j;\r\n }\r\n\r\n // Initialise coefficient array of result with zeros.\r\n for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n // Multiply.\r\n\r\n // i is initially xc.length.\r\n for (i = b; i--;) {\r\n b = 0;\r\n\r\n // a is yc.length.\r\n for (j = a + i; j > i;) {\r\n\r\n // Current sum of products at this digit position, plus carry.\r\n b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n c[j--] = b % 10;\r\n\r\n // carry\r\n b = b / 10 | 0;\r\n }\r\n\r\n c[j] = (c[j] + b) % 10;\r\n }\r\n\r\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n if (b) ++y.e;\r\n else c.shift();\r\n\r\n // Remove trailing zeros.\r\n for (i = c.length; !c[--i];) c.pop();\r\n y.c = c;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in exponential notation to dp fixed decimal\r\n * places and rounded using Big.RM.\r\n *\r\n * dp? {number} Integer, 0 to MAX_DP inclusive.\r\n */\r\nP.toExponential = function (dp) {\r\n return stringify$1(this, 1, dp, dp);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in normal notation to dp fixed decimal\r\n * places and rounded using Big.RM.\r\n *\r\n * dp? {number} Integer, 0 to MAX_DP inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n */\r\nP.toFixed = function (dp) {\r\n return stringify$1(this, 2, dp, this.e + dp);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big rounded to sd significant digits using\r\n * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * sd {number} Integer, 1 to MAX_DP inclusive.\r\n */\r\nP.toPrecision = function (sd) {\r\n return stringify$1(this, 3, sd, sd - 1);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Omit the sign for negative zero.\r\n */\r\nP.toString = function () {\r\n return stringify$1(this);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Include the sign for negative zero.\r\n */\r\nP.valueOf = P.toJSON = function () {\r\n return stringify$1(this, 4);\r\n};\r\n\r\n\r\n// Export\r\n\r\n\r\nvar Big = _Big_();\n\n/**\n * 求一个数保留小数,不四舍五入\n * @param num 数字\n * @param decimal 精度\n */\nconst formatDecimalNoRound = (num, decimal) => {\n num = num.toString();\n const index = num.indexOf('.');\n if (index !== -1) {\n num = num.substring(0, decimal + index + 1);\n }\n else {\n num = num.substring(0);\n }\n return Number(parseFloat(num).toFixed(decimal));\n};\n\n/**\n * 小数字转大数字\n * @param translateUnit\n */\nconst smallToBig = (translateUnit) => {\n return (num, params) => {\n if (isEmpty$1(num) || isNil$1(num))\n return num;\n if (isNaN(Number(num))) {\n return NaN;\n }\n const newNumber = Number(new Big(Number(num)).mul(translateUnit));\n if (isNil$1(params === null || params === void 0 ? void 0 : params.decimalNumber) && isNil$1(params === null || params === void 0 ? void 0 : params.fn)) {\n return newNumber;\n }\n if (!isNil$1(params === null || params === void 0 ? void 0 : params.decimalNumber) && isNil$1(params === null || params === void 0 ? void 0 : params.fn)) {\n return Number(newNumber.toFixed(params === null || params === void 0 ? void 0 : params.decimalNumber));\n }\n if (!isNil$1(params === null || params === void 0 ? void 0 : params.decimalNumber) && !isNil$1(params === null || params === void 0 ? void 0 : params.fn)) {\n if ((params === null || params === void 0 ? void 0 : params.fn) === 'toFixed') {\n return Number(newNumber.toFixed(params === null || params === void 0 ? void 0 : params.decimalNumber));\n }\n else if ((params === null || params === void 0 ? void 0 : params.fn) === 'floor') {\n return formatDecimalNoRound(newNumber, params === null || params === void 0 ? void 0 : params.decimalNumber);\n }\n }\n };\n};\n\n/**\n * 元转分\n * @param num\n * @param decimalNumber\n * @param fn\n */\nconst yuanTofen = (num, params) => {\n return smallToBig(100)(num, params);\n};\n\n/**\n * 大数字转小数字\n * @param translateUnit\n */\nconst bigToSmall = (translateUnit) => {\n return (num, params) => {\n const decimalNumber = (params === null || params === void 0 ? void 0 : params.decimalNumber) || 2;\n const fn = (params === null || params === void 0 ? void 0 : params.fn) || 'toFixed';\n if (isEmpty$1(num) || isNil$1(num))\n return num;\n if (isNaN(Number(num))) {\n return NaN;\n }\n const newNumber = new Big(Number(num)).div(translateUnit);\n if (fn === 'toFixed') {\n return Number(newNumber.toFixed(decimalNumber));\n }\n else if (fn === 'floor') {\n return formatDecimalNoRound(Number(newNumber), decimalNumber);\n }\n return num;\n };\n};\n\n/**\n * 分转元\n * @param num\n * @param decimalNumber 默认保留两位小数\n * @param fn\n */\nconst fenToyuan = (num, params) => {\n return bigToSmall(100)(num, params);\n};\n\n/**\n * 万转元\n * @param num\n * @param decimalNumber\n * @param fn\n */\nconst wanToyuan = (num, params) => {\n return smallToBig(10000)(num, params);\n};\n\n/**\n * 元转万\n * @param num\n * @param decimalNumber\n * @param fn\n */\nconst yuanTowan = (num, params) => {\n return bigToSmall(10000)(num, params);\n};\n\n/**\n * kg转g\n * @param num\n * @param decimalNumber\n * @param fn\n */\nconst kgTog = (num, params) => {\n return smallToBig(1000)(num, params);\n};\n\n/**\n * g转kg\n * @param num\n * @param decimalNumber\n * @param fn\n */\nconst gTokg = (num, pararms) => {\n return bigToSmall(1000)(num, pararms);\n};\n\n/**\n * 从头开始,最大截取多少个字符串\n * @param str\n * @param len 最大截取多少个字符串\n * @param isSpot 是否带 ...\n */\nconst maxSubstrWord = (str, len = 5, isSpot = true) => {\n if (typeof str === 'string') {\n return isSpot ? `${str.substr(0, len)}...` : str.substr(0, len);\n }\n else {\n return str;\n }\n};\n\n/**\n * 判断类型\n * @param params\n */\nconst getClass = (params) => {\n const str = Object.prototype.toString.call(params);\n const matchResult = /^\\[object (.*)\\]$/.exec(str);\n if (matchResult !== null) {\n return matchResult[1].toLowerCase();\n }\n return null;\n};\n\nconst trimParams = (object) => {\n if (typeof object === 'string') {\n return trim$1(object);\n }\n if (getClass(object) === 'array' || getClass(object) === 'object') {\n if (Array.isArray(object)) {\n object.forEach((newParams) => {\n trimParams(newParams);\n });\n }\n if (typeof object !== null) {\n Object.keys(object).map((key) => {\n const newValue = object[key];\n if (typeof newValue === 'string') {\n object[key] = trim$1(newValue);\n }\n if (getClass(newValue) === 'object' || getClass(newValue) === 'array') {\n trimParams(newValue);\n }\n });\n return object;\n }\n }\n return object;\n};\n\n/**\n * 获取字节长度\n * @param str // 需要获取字节长度的字符串\n * 中文+2 英文+1\n */\nconst getBiteLen = (str) => {\n if (typeof str !== 'string')\n return 0;\n let len = 0;\n for (let i = 0; i < str.length; i++) {\n if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {\n len += 2;\n }\n else {\n len += 1;\n }\n }\n return len;\n};\n\n/**\n * 下划线转换驼峰\n * @param str string\n * @returns string\n */\nfunction lineToHump(str) {\n if (typeof str !== 'string')\n return str;\n return str.replace(/\\_(\\w)/g, function (_all, letter) {\n return letter.toUpperCase();\n });\n}\n\n/**\n * 驼峰转换下划线\n * @param str string\n * @returns srting\n */\nfunction humpToLine(str) {\n if (typeof str !== 'string')\n return str;\n return str.replace(/([A-Z])/g, '_$1').toLowerCase();\n}\n\nconst sum = (params, api) => {\n let resultSum = new Big(0);\n // 内部递归函数\n const _sum = (params, api) => {\n if (getClass(params) === 'array' && Array.isArray(params)) {\n params.forEach((item) => {\n if (!isNaN(item)) {\n resultSum = resultSum.plus(Number(item));\n }\n if (getClass(item) === 'object' && typeof api !== 'undefined' && item[api] !== null) {\n resultSum = resultSum.plus(Number(item[api]));\n }\n if (getClass(item) === 'array' && Array.isArray(item)) {\n _sum(item, api);\n }\n });\n }\n };\n _sum(params, api);\n return Number(resultSum);\n};\n\n/**\n *start 到 end 之间的随机数\n * @param end\n * @param start\n * @returns number\n */\nconst round = (end, start = 0) => Math.round(Math.random() * (end - start) + start);\n\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}\n\nvar REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nconst uuidv4 = () => {\n return v4();\n};\n\n/**\n * 2021-07-20 zimu\n * https://github.com/emn178/js-md5/blob/master/src/md5.js\n */\nconst ERROR = 'input is invalid type';\nconst HEX_CHARS = '0123456789abcdef'.split('');\nconst EXTRA = [128, 32768, 8388608, -2147483648];\nlet blocks = [], buffer8;\nconst buffer = new ArrayBuffer(68);\nbuffer8 = new Uint8Array(buffer);\nblocks = new Uint32Array(buffer);\n//@ts-ignore\nconst createMethod = () => (message) => new Md5().update(message)['hex']();\nfunction Md5() {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n this.buffer8 = buffer8;\n this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n}\nMd5.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n let notString;\n const type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw ERROR;\n }\n else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n else if (!Array.isArray(message)) {\n if (!ArrayBuffer.isView(message)) {\n throw ERROR;\n }\n }\n }\n else {\n throw ERROR;\n }\n notString = true;\n }\n let code, index = 0, i, length = message.length, blocks = this.blocks;\n let buffer8 = this.buffer8;\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = blocks[16];\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n buffer8[i++] = message[index];\n }\n }\n else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n buffer8[i++] = code;\n }\n else if (code < 0x800) {\n buffer8[i++] = 0xc0 | (code >> 6);\n buffer8[i++] = 0x80 | (code & 0x3f);\n }\n else if (code < 0xd800 || code >= 0xe000) {\n buffer8[i++] = 0xe0 | (code >> 12);\n buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);\n buffer8[i++] = 0x80 | (code & 0x3f);\n }\n else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n buffer8[i++] = 0xf0 | (code >> 18);\n buffer8[i++] = 0x80 | ((code >> 12) & 0x3f);\n buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);\n buffer8[i++] = 0x80 | (code & 0x3f);\n }\n }\n }\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n }\n else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n};\nMd5.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n const blocks = this.blocks, i = this.lastByteIndex;\n blocks[i >> 2] |= EXTRA[i & 3];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = blocks[16];\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.bytes << 3;\n blocks[15] = this.hBytes << 3 | this.bytes >>> 29;\n this.hash();\n};\nMd5.prototype.hash = function () {\n let a, b, c, d, bc, da, blocks = this.blocks;\n if (this.first) {\n a = blocks[0] - 680876937;\n a = (a << 7 | a >>> 25) - 271733879 << 0;\n d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;\n d = (d << 12 | d >>> 20) + a << 0;\n c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375;\n c = (c << 17 | c >>> 15) + d << 0;\n b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209;\n b = (b << 22 | b >>> 10) + c << 0;\n }\n else {\n a = this.h0;\n b = this.h1;\n c = this.h2;\n d = this.h3;\n a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936;\n a = (a << 7 | a >>> 25) + b << 0;\n d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586;\n d = (d << 12 | d >>> 20) + a << 0;\n c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819;\n c = (c << 17 | c >>> 15) + d << 0;\n b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330;\n b = (b << 22 | b >>> 10) + c << 0;\n }\n a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897;\n a = (a << 7 | a >>> 25) + b << 0;\n d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426;\n d = (d << 12 | d >>> 20) + a << 0;\n c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341;\n c = (c << 17 | c >>> 15) + d << 0;\n b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983;\n b = (b << 22 | b >>> 10) + c << 0;\n a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416;\n a = (a << 7 | a >>> 25) + b << 0;\n d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417;\n d = (d << 12 | d >>> 20) + a << 0;\n c += (b ^ (d & (a ^ b))) + blocks[10] - 42063;\n c = (c << 17 | c >>> 15) + d << 0;\n b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162;\n b = (b << 22 | b >>> 10) + c << 0;\n a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682;\n a = (a << 7 | a >>> 25) + b << 0;\n d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101;\n d = (d << 12 | d >>> 20) + a << 0;\n c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290;\n c = (c << 17 | c >>> 15) + d << 0;\n b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329;\n b = (b << 22 | b >>> 10) + c << 0;\n a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510;\n a = (a << 5 | a >>> 27) + b << 0;\n d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632;\n d = (d << 9 | d >>> 23) + a << 0;\n c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713;\n c = (c << 14 | c >>> 18) + d << 0;\n b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302;\n b = (b << 20 | b >>> 12) + c << 0;\n a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691;\n a = (a << 5 | a >>> 27) + b << 0;\n d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083;\n d = (d << 9 | d >>> 23) + a << 0;\n c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335;\n c = (c << 14 | c >>> 18) + d << 0;\n b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848;\n b = (b << 20 | b >>> 12) + c << 0;\n a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438;\n a = (a << 5 | a >>> 27) + b << 0;\n d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690;\n d = (d << 9 | d >>> 23) + a << 0;\n c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961;\n c = (c << 14 | c >>> 18) + d << 0;\n b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501;\n b = (b << 20 | b >>> 12) + c << 0;\n a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467;\n a = (a << 5 | a >>> 27) + b << 0;\n d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784;\n d = (d << 9 | d >>> 23) + a << 0;\n c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473;\n c = (c << 14 | c >>> 18) + d << 0;\n b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734;\n b = (b << 20 | b >>> 12) + c << 0;\n bc = b ^ c;\n a += (bc ^ d) + blocks[5] - 378558;\n a = (a << 4 | a >>> 28) + b << 0;\n d += (bc ^ a) + blocks[8] - 2022574463;\n d = (d << 11 | d >>> 21) + a << 0;\n da = d ^ a;\n c += (da ^ b) + blocks[11] + 1839030562;\n c = (c << 16 | c >>> 16) + d << 0;\n b += (da ^ c) + blocks[14] - 35309556;\n b = (b << 23 | b >>> 9) + c << 0;\n bc = b ^ c;\n a += (bc ^ d) + blocks[1] - 1530992060;\n a = (a << 4 | a >>> 28) + b << 0;\n d += (bc ^ a) + blocks[4] + 1272893353;\n d = (d << 11 | d >>> 21) + a << 0;\n da = d ^ a;\n c += (da ^ b) + blocks[7] - 155497632;\n c = (c << 16 | c >>> 16) + d << 0;\n b += (da ^ c) + blocks[10] - 1094730640;\n b = (b << 23 | b >>> 9) + c << 0;\n bc = b ^ c;\n a += (bc ^ d) + blocks[13] + 681279174;\n a = (a << 4 | a >>> 28) + b << 0;\n d += (bc ^ a) + blocks[0] - 358537222;\n d = (d << 11 | d >>> 21) + a << 0;\n da = d ^ a;\n c += (da ^ b) + blocks[3] - 722521979;\n c = (c << 16 | c >>> 16) + d << 0;\n b += (da ^ c) + blocks[6] + 76029189;\n b = (b << 23 | b >>> 9) + c << 0;\n bc = b ^ c;\n a += (bc ^ d) + blocks[9] - 640364487;\n a = (a << 4 | a >>> 28) + b << 0;\n d += (bc ^ a) + blocks[12] - 421815835;\n d = (d << 11 | d >>> 21) + a << 0;\n da = d ^ a;\n c += (da ^ b) + blocks[15] + 530742520;\n c = (c << 16 | c >>> 16) + d << 0;\n b += (da ^ c) + blocks[2] - 995338651;\n b = (b << 23 | b >>> 9) + c << 0;\n a += (c ^ (b | ~d)) + blocks[0] - 198630844;\n a = (a << 6 | a >>> 26) + b << 0;\n d += (b ^ (a | ~c)) + blocks[7] + 1126891415;\n d = (d << 10 | d >>> 22) + a << 0;\n c += (a ^ (d | ~b)) + blocks[14] - 1416354905;\n c = (c << 15 | c >>> 17) + d << 0;\n b += (d ^ (c | ~a)) + blocks[5] - 57434055;\n b = (b << 21 | b >>> 11) + c << 0;\n a += (c ^ (b | ~d)) + blocks[12] + 1700485571;\n a = (a << 6 | a >>> 26) + b << 0;\n d += (b ^ (a | ~c)) + blocks[3] - 1894986606;\n d = (d << 10 | d >>> 22) + a << 0;\n c += (a ^ (d | ~b)) + blocks[10] - 1051523;\n c = (c << 15 | c >>> 17) + d << 0;\n b += (d ^ (c | ~a)) + blocks[1] - 2054922799;\n b = (b << 21 | b >>> 11) + c << 0;\n a += (c ^ (b | ~d)) + blocks[8] + 1873313359;\n a = (a << 6 | a >>> 26) + b << 0;\n d += (b ^ (a | ~c)) + blocks[15] - 30611744;\n d = (d << 10 | d >>> 22) + a << 0;\n c += (a ^ (d | ~b)) + blocks[6] - 1560198380;\n c = (c << 15 | c >>> 17) + d << 0;\n b += (d ^ (c | ~a)) + blocks[13] + 1309151649;\n b = (b << 21 | b >>> 11) + c << 0;\n a += (c ^ (b | ~d)) + blocks[4] - 145523070;\n a = (a << 6 | a >>> 26) + b << 0;\n d += (b ^ (a | ~c)) + blocks[11] - 1120210379;\n d = (d << 10 | d >>> 22) + a << 0;\n c += (a ^ (d | ~b)) + blocks[2] + 718787259;\n c = (c << 15 | c >>> 17) + d << 0;\n b += (d ^ (c | ~a)) + blocks[9] - 343485551;\n b = (b << 21 | b >>> 11) + c << 0;\n if (this.first) {\n this.h0 = a + 1732584193 << 0;\n this.h1 = b - 271733879 << 0;\n this.h2 = c - 1732584194 << 0;\n this.h3 = d + 271733878 << 0;\n this.first = false;\n }\n else {\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n }\n};\nMd5.prototype.hex = function () {\n this.finalize();\n let h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;\n return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];\n};\nvar md5 = createMethod();\n\nconst getMD5 = (md5Key) => {\n if (isEmpty$1(md5Key) || isNil$1(md5Key))\n return md5Key;\n if (is$1(String, md5Key))\n return md5(md5Key);\n return md5Key;\n};\n\n/**\n * 扩大倍数,数字变大\n * @param multiple\n * @param num\n * @param decimalNumber\n * @param fn\n */\nconst expandMultiple = (multiple, num, params) => {\n return smallToBig(multiple)(num, params);\n};\n\n/**\n * 缩小倍数,数字变小\n * @param multiple\n * @param num\n * @param decimalNumber\n * @param fn\n */\nconst reduceMultiple = (multiple, num, params) => {\n return bigToSmall(multiple)(num, params);\n};\n\n/**\n * 数值转化为 千分位 展示\n * @param num\n * @param separator 分隔符,默认 ','\n */\nconst numberToThousand = (num, separator = ',') => {\n if (isEmpty$1(num) || isNil$1(num))\n return num;\n if (isNaN(Number(num))) {\n return NaN;\n }\n return num.toString().replace(/\\d+/, (n) => n.replace(/(\\d)(?=(\\d{3})+$)/g, ($1) => `${$1}${separator}`));\n};\n\n// @ts-nocheck\n/**\n * @param {{ leading: any; trailing: any; }} value\n */\nfunction isObject (value) {\n const type = typeof value;\n return value != null && (type === 'object' || type === 'function')\n}\n\n\n/**\n * @param {{ apply: (arg0: any, arg1: any) => any; }} func\n * @param {number} wait\n * @param {{ leading: any; trailing: any; maxWait: any; }} options\n */\nfunction debounce (func, wait, options) {\n if (typeof window === 'undefined') {\n return;\n }\n let lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime;\n\n let lastInvokeTime = 0;\n let leading = false;\n let maxing = false;\n let trailing = true;\n\n // Bypass `requestAnimationFrame` by explicitly setting `wait=0`.\n const useRAF = (!wait && wait !== 0 && typeof requestAnimationFrame === 'function');\n\n if (typeof func !== 'function') {\n throw new TypeError('Expected a function')\n }\n wait = +wait || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n /**\n * @param {number} time\n */\n function invokeFunc (time) {\n const args = lastArgs;\n const thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result\n }\n\n /**\n * @param {FrameRequestCallback} pendingFunc\n * @param {number} wait\n */\n function startTimer (pendingFunc, wait) {\n if (useRAF) {\n cancelAnimationFrame(timerId);\n return requestAnimationFrame(pendingFunc)\n }\n return setTimeout(pendingFunc, wait)\n }\n\n /**\n * @param {number} id\n */\n function cancelTimer (id) {\n if (useRAF) {\n return cancelAnimationFrame(id)\n }\n clearTimeout(id);\n }\n\n /**\n * @param {number} time\n */\n function leadingEdge (time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = startTimer(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result\n }\n\n /**\n * @param {number} time\n */\n function remainingWait (time) {\n const timeSinceLastCall = time - lastCallTime;\n const timeSinceLastInvoke = time - lastInvokeTime;\n const timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting\n }\n\n /**\n * @param {number} time\n */\n function shouldInvoke (time) {\n const timeSinceLastCall = time - lastCallTime;\n const timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait))\n }\n\n function timerExpired () {\n const time = Date.now();\n if (shouldInvoke(time)) {\n return trailingEdge(time)\n }\n // Restart the timer.\n timerId = startTimer(timerExpired, remainingWait(time));\n }\n\n /**\n * @param {number} time\n */\n function trailingEdge (time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time)\n }\n lastArgs = lastThis = undefined;\n return result\n }\n\n function cancel () {\n if (timerId !== undefined) {\n cancelTimer(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush () {\n return timerId === undefined ? result : trailingEdge(Date.now())\n }\n\n function pending () {\n return timerId !== undefined\n }\n\n /**\n * @param {any[]} args\n */\n function debounced (...args) {\n const time = Date.now();\n const isInvoking = shouldInvoke(time);\n\n lastArgs = args;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime)\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = startTimer(timerExpired, wait);\n return invokeFunc(lastCallTime)\n }\n }\n if (timerId === undefined) {\n timerId = startTimer(timerExpired, wait);\n }\n return result\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n debounced.pending = pending;\n return debounced\n}\n\n/**\n * @param {any} func\n * @param {any} wait\n * @param {{ leading: any; trailing: any; }} options\n */\nfunction throttle (func, wait, options) {\n let leading = true;\n let trailing = true;\n\n if (typeof func !== 'function') {\n throw new TypeError('Expected a function')\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n leading,\n trailing,\n 'maxWait': wait\n })\n}\n\n/**\n * 获取图片地址\n * @param img 原始图片地址\n * @param width 图片宽度\n * @param width 图片高度\n * @param defaultImg 默认图片地址\n * @returns number\n */\nconst defGoodsImg = 'https://cdn.ywwl.com/bps/ywyun/dianhu/assets/def_goods_img.png';\nconst getImgUrl = (img, width = 200, height, defaultImg) => {\n const reg = new RegExp(/resize:(\\d+):(\\d+)/, 'g');\n let retImg = '';\n if (img) {\n retImg = img;\n if (reg.test(retImg)) { // 抖音\n retImg = retImg.replace(reg, `resize:${width}:${height || 0}`);\n }\n else { // 阿里云OSS\n retImg = retImg.indexOf('x-oss-process=image') > -1 || retImg.indexOf('?') > -1 ? retImg\n : `${retImg}?x-oss-process=image/resize,w_${width},limit_0/quality,q_60`;\n }\n }\n else {\n retImg = defaultImg || defGoodsImg;\n }\n return retImg;\n};\n\nvar lib$2 = {};\n\nvar ieee754 = {};\n\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\n\nieee754.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n};\n\nieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};\n\n(function (exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnsiStringType = exports.StringType = exports.BufferType = exports.Uint8ArrayType = exports.IgnoreType = exports.Float80_LE = exports.Float80_BE = exports.Float64_LE = exports.Float64_BE = exports.Float32_LE = exports.Float32_BE = exports.Float16_LE = exports.Float16_BE = exports.INT64_BE = exports.UINT64_BE = exports.INT64_LE = exports.UINT64_LE = exports.INT32_LE = exports.INT32_BE = exports.INT24_BE = exports.INT24_LE = exports.INT16_LE = exports.INT16_BE = exports.INT8 = exports.UINT32_BE = exports.UINT32_LE = exports.UINT24_BE = exports.UINT24_LE = exports.UINT16_BE = exports.UINT16_LE = exports.UINT8 = void 0;\nconst ieee754$1 = ieee754;\n// Primitive types\nfunction dv(array) {\n return new DataView(array.buffer, array.byteOffset);\n}\n/**\n * 8-bit unsigned integer\n */\nexports.UINT8 = {\n len: 1,\n get(array, offset) {\n return dv(array).getUint8(offset);\n },\n put(array, offset, value) {\n dv(array).setUint8(offset, value);\n return offset + 1;\n }\n};\n/**\n * 16-bit unsigned integer, Little Endian byte order\n */\nexports.UINT16_LE = {\n len: 2,\n get(array, offset) {\n return dv(array).getUint16(offset, true);\n },\n put(array, offset, value) {\n dv(array).setUint16(offset, value, true);\n return offset + 2;\n }\n};\n/**\n * 16-bit unsigned integer, Big Endian byte order\n */\nexports.UINT16_BE = {\n len: 2,\n get(array, offset) {\n return dv(array).getUint16(offset);\n },\n put(array, offset, value) {\n dv(array).setUint16(offset, value);\n return offset + 2;\n }\n};\n/**\n * 24-bit unsigned integer, Little Endian byte order\n */\nexports.UINT24_LE = {\n len: 3,\n get(array, offset) {\n const dataView = dv(array);\n return dataView.getUint8(offset) + (dataView.getUint16(offset + 1, true) << 8);\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint8(offset, value & 0xff);\n dataView.setUint16(offset + 1, value >> 8, true);\n return offset + 3;\n }\n};\n/**\n * 24-bit unsigned integer, Big Endian byte order\n */\nexports.UINT24_BE = {\n len: 3,\n get(array, offset) {\n const dataView = dv(array);\n return (dataView.getUint16(offset) << 8) + dataView.getUint8(offset + 2);\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint16(offset, value >> 8);\n dataView.setUint8(offset + 2, value & 0xff);\n return offset + 3;\n }\n};\n/**\n * 32-bit unsigned integer, Little Endian byte order\n */\nexports.UINT32_LE = {\n len: 4,\n get(array, offset) {\n return dv(array).getUint32(offset, true);\n },\n put(array, offset, value) {\n dv(array).setUint32(offset, value, true);\n return offset + 4;\n }\n};\n/**\n * 32-bit unsigned integer, Big Endian byte order\n */\nexports.UINT32_BE = {\n len: 4,\n get(array, offset) {\n return dv(array).getUint32(offset);\n },\n put(array, offset, value) {\n dv(array).setUint32(offset, value);\n return offset + 4;\n }\n};\n/**\n * 8-bit signed integer\n */\nexports.INT8 = {\n len: 1,\n get(array, offset) {\n return dv(array).getInt8(offset);\n },\n put(array, offset, value) {\n dv(array).setInt8(offset, value);\n return offset + 1;\n }\n};\n/**\n * 16-bit signed integer, Big Endian byte order\n */\nexports.INT16_BE = {\n len: 2,\n get(array, offset) {\n return dv(array).getInt16(offset);\n },\n put(array, offset, value) {\n dv(array).setInt16(offset, value);\n return offset + 2;\n }\n};\n/**\n * 16-bit signed integer, Little Endian byte order\n */\nexports.INT16_LE = {\n len: 2,\n get(array, offset) {\n return dv(array).getInt16(offset, true);\n },\n put(array, offset, value) {\n dv(array).setInt16(offset, value, true);\n return offset + 2;\n }\n};\n/**\n * 24-bit signed integer, Little Endian byte order\n */\nexports.INT24_LE = {\n len: 3,\n get(array, offset) {\n const unsigned = exports.UINT24_LE.get(array, offset);\n return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned;\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint8(offset, value & 0xff);\n dataView.setUint16(offset + 1, value >> 8, true);\n return offset + 3;\n }\n};\n/**\n * 24-bit signed integer, Big Endian byte order\n */\nexports.INT24_BE = {\n len: 3,\n get(array, offset) {\n const unsigned = exports.UINT24_BE.get(array, offset);\n return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned;\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint16(offset, value >> 8);\n dataView.setUint8(offset + 2, value & 0xff);\n return offset + 3;\n }\n};\n/**\n * 32-bit signed integer, Big Endian byte order\n */\nexports.INT32_BE = {\n len: 4,\n get(array, offset) {\n return dv(array).getInt32(offset);\n },\n put(array, offset, value) {\n dv(array).setInt32(offset, value);\n return offset + 4;\n }\n};\n/**\n * 32-bit signed integer, Big Endian byte order\n */\nexports.INT32_LE = {\n len: 4,\n get(array, offset) {\n return dv(array).getInt32(offset, true);\n },\n put(array, offset, value) {\n dv(array).setInt32(offset, value, true);\n return offset + 4;\n }\n};\n/**\n * 64-bit unsigned integer, Little Endian byte order\n */\nexports.UINT64_LE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigUint64(offset, true);\n },\n put(array, offset, value) {\n dv(array).setBigUint64(offset, value, true);\n return offset + 8;\n }\n};\n/**\n * 64-bit signed integer, Little Endian byte order\n */\nexports.INT64_LE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigInt64(offset, true);\n },\n put(array, offset, value) {\n dv(array).setBigInt64(offset, value, true);\n return offset + 8;\n }\n};\n/**\n * 64-bit unsigned integer, Big Endian byte order\n */\nexports.UINT64_BE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigUint64(offset);\n },\n put(array, offset, value) {\n dv(array).setBigUint64(offset, value);\n return offset + 8;\n }\n};\n/**\n * 64-bit signed integer, Big Endian byte order\n */\nexports.INT64_BE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigInt64(offset);\n },\n put(array, offset, value) {\n dv(array).setBigInt64(offset, value);\n return offset + 8;\n }\n};\n/**\n * IEEE 754 16-bit (half precision) float, big endian\n */\nexports.Float16_BE = {\n len: 2,\n get(dataView, offset) {\n return ieee754$1.read(dataView, offset, false, 10, this.len);\n },\n put(dataView, offset, value) {\n ieee754$1.write(dataView, value, offset, false, 10, this.len);\n return offset + this.len;\n }\n};\n/**\n * IEEE 754 16-bit (half precision) float, little endian\n */\nexports.Float16_LE = {\n len: 2,\n get(array, offset) {\n return ieee754$1.read(array, offset, true, 10, this.len);\n },\n put(array, offset, value) {\n ieee754$1.write(array, value, offset, true, 10, this.len);\n return offset + this.len;\n }\n};\n/**\n * IEEE 754 32-bit (single precision) float, big endian\n */\nexports.Float32_BE = {\n len: 4,\n get(array, offset) {\n return dv(array).getFloat32(offset);\n },\n put(array, offset, value) {\n dv(array).setFloat32(offset, value);\n return offset + 4;\n }\n};\n/**\n * IEEE 754 32-bit (single precision) float, little endian\n */\nexports.Float32_LE = {\n len: 4,\n get(array, offset) {\n return dv(array).getFloat32(offset, true);\n },\n put(array, offset, value) {\n dv(array).setFloat32(offset, value, true);\n return offset + 4;\n }\n};\n/**\n * IEEE 754 64-bit (double precision) float, big endian\n */\nexports.Float64_BE = {\n len: 8,\n get(array, offset) {\n return dv(array).getFloat64(offset);\n },\n put(array, offset, value) {\n dv(array).setFloat64(offset, value);\n return offset + 8;\n }\n};\n/**\n * IEEE 754 64-bit (double precision) float, little endian\n */\nexports.Float64_LE = {\n len: 8,\n get(array, offset) {\n return dv(array).getFloat64(offset, true);\n },\n put(array, offset, value) {\n dv(array).setFloat64(offset, value, true);\n return offset + 8;\n }\n};\n/**\n * IEEE 754 80-bit (extended precision) float, big endian\n */\nexports.Float80_BE = {\n len: 10,\n get(array, offset) {\n return ieee754$1.read(array, offset, false, 63, this.len);\n },\n put(array, offset, value) {\n ieee754$1.write(array, value, offset, false, 63, this.len);\n return offset + this.len;\n }\n};\n/**\n * IEEE 754 80-bit (extended precision) float, little endian\n */\nexports.Float80_LE = {\n len: 10,\n get(array, offset) {\n return ieee754$1.read(array, offset, true, 63, this.len);\n },\n put(array, offset, value) {\n ieee754$1.write(array, value, offset, true, 63, this.len);\n return offset + this.len;\n }\n};\n/**\n * Ignore a given number of bytes\n */\nclass IgnoreType {\n /**\n * @param len number of bytes to ignore\n */\n constructor(len) {\n this.len = len;\n }\n // ToDo: don't read, but skip data\n get(array, off) {\n }\n}\nexports.IgnoreType = IgnoreType;\nclass Uint8ArrayType {\n constructor(len) {\n this.len = len;\n }\n get(array, offset) {\n return array.subarray(offset, offset + this.len);\n }\n}\nexports.Uint8ArrayType = Uint8ArrayType;\nclass BufferType {\n constructor(len) {\n this.len = len;\n }\n get(uint8Array, off) {\n return Buffer.from(uint8Array.subarray(off, off + this.len));\n }\n}\nexports.BufferType = BufferType;\n/**\n * Consume a fixed number of bytes from the stream and return a string with a specified encoding.\n */\nclass StringType {\n constructor(len, encoding) {\n this.len = len;\n this.encoding = encoding;\n }\n get(uint8Array, offset) {\n return Buffer.from(uint8Array).toString(this.encoding, offset, offset + this.len);\n }\n}\nexports.StringType = StringType;\n/**\n * ANSI Latin 1 String\n * Using windows-1252 / ISO 8859-1 decoding\n */\nclass AnsiStringType {\n constructor(len) {\n this.len = len;\n }\n static decode(buffer, offset, until) {\n let str = '';\n for (let i = offset; i < until; ++i) {\n str += AnsiStringType.codePointToString(AnsiStringType.singleByteDecoder(buffer[i]));\n }\n return str;\n }\n static inRange(a, min, max) {\n return min <= a && a <= max;\n }\n static codePointToString(cp) {\n if (cp <= 0xFFFF) {\n return String.fromCharCode(cp);\n }\n else {\n cp -= 0x10000;\n return String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00);\n }\n }\n static singleByteDecoder(bite) {\n if (AnsiStringType.inRange(bite, 0x00, 0x7F)) {\n return bite;\n }\n const codePoint = AnsiStringType.windows1252[bite - 0x80];\n if (codePoint === null) {\n throw Error('invaliding encoding');\n }\n return codePoint;\n }\n get(buffer, offset = 0) {\n return AnsiStringType.decode(buffer, offset, offset + this.len);\n }\n}\nexports.AnsiStringType = AnsiStringType;\nAnsiStringType.windows1252 = [8364, 129, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352,\n 8249, 338, 141, 381, 143, 144, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732,\n 8482, 353, 8250, 339, 157, 382, 376, 160, 161, 162, 163, 164, 165, 166, 167, 168,\n 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,\n 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,\n 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,\n 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,\n 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,\n 248, 249, 250, 251, 252, 253, 254, 255];\n}(lib$2));\n\nvar lib$1 = {};\n\nvar FsPromise = {};\n\n/**\r\n * Module convert fs functions to promise based functions\r\n */\r\nObject.defineProperty(FsPromise, \"__esModule\", { value: true });\r\nFsPromise.readFile = FsPromise.writeFileSync = FsPromise.writeFile = FsPromise.read = FsPromise.open = FsPromise.close = FsPromise.stat = FsPromise.createReadStream = FsPromise.pathExists = void 0;\r\nconst fs$1 = require$$0__default[\"default\"];\r\nFsPromise.pathExists = fs$1.existsSync;\r\nFsPromise.createReadStream = fs$1.createReadStream;\r\nasync function stat(path) {\r\n return new Promise((resolve, reject) => {\r\n fs$1.stat(path, (err, stats) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve(stats);\r\n });\r\n });\r\n}\r\nFsPromise.stat = stat;\r\nasync function close(fd) {\r\n return new Promise((resolve, reject) => {\r\n fs$1.close(fd, err => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve();\r\n });\r\n });\r\n}\r\nFsPromise.close = close;\r\nasync function open(path, mode) {\r\n return new Promise((resolve, reject) => {\r\n fs$1.open(path, mode, (err, fd) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve(fd);\r\n });\r\n });\r\n}\r\nFsPromise.open = open;\r\nasync function read(fd, buffer, offset, length, position) {\r\n return new Promise((resolve, reject) => {\r\n fs$1.read(fd, buffer, offset, length, position, (err, bytesRead, _buffer) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve({ bytesRead, buffer: _buffer });\r\n });\r\n });\r\n}\r\nFsPromise.read = read;\r\nasync function writeFile(path, data) {\r\n return new Promise((resolve, reject) => {\r\n fs$1.writeFile(path, data, err => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve();\r\n });\r\n });\r\n}\r\nFsPromise.writeFile = writeFile;\r\nfunction writeFileSync(path, data) {\r\n fs$1.writeFileSync(path, data);\r\n}\r\nFsPromise.writeFileSync = writeFileSync;\r\nasync function readFile(path) {\r\n return new Promise((resolve, reject) => {\r\n fs$1.readFile(path, (err, buffer) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve(buffer);\r\n });\r\n });\r\n}\r\nFsPromise.readFile = readFile;\n\nvar core = {};\n\nvar ReadStreamTokenizer$1 = {};\n\nvar AbstractTokenizer$1 = {};\n\nvar lib = {};\n\nvar EndOfFileStream = {};\n\n(function (exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.EndOfStreamError = exports.defaultMessages = void 0;\r\nexports.defaultMessages = 'End-Of-Stream';\r\n/**\r\n * Thrown on read operation of the end of file or stream has been reached\r\n */\r\nclass EndOfStreamError extends Error {\r\n constructor() {\r\n super(exports.defaultMessages);\r\n }\r\n}\r\nexports.EndOfStreamError = EndOfStreamError;\n}(EndOfFileStream));\n\nvar StreamReader = {};\n\nvar Deferred$1 = {};\n\nObject.defineProperty(Deferred$1, \"__esModule\", { value: true });\r\nDeferred$1.Deferred = void 0;\r\nclass Deferred {\r\n constructor() {\r\n this.resolve = () => null;\r\n this.reject = () => null;\r\n this.promise = new Promise((resolve, reject) => {\r\n this.reject = reject;\r\n this.resolve = resolve;\r\n });\r\n }\r\n}\r\nDeferred$1.Deferred = Deferred;\n\n(function (exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.StreamReader = exports.EndOfStreamError = void 0;\r\nconst EndOfFileStream_1 = EndOfFileStream;\r\nconst Deferred_1 = Deferred$1;\r\nvar EndOfFileStream_2 = EndOfFileStream;\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return EndOfFileStream_2.EndOfStreamError; } });\r\nconst maxStreamReadSize = 1 * 1024 * 1024; // Maximum request length on read-stream operation\r\nclass StreamReader {\r\n constructor(s) {\r\n this.s = s;\r\n /**\r\n * Deferred used for postponed read request (as not data is yet available to read)\r\n */\r\n this.deferred = null;\r\n this.endOfStream = false;\r\n /**\r\n * Store peeked data\r\n * @type {Array}\r\n */\r\n this.peekQueue = [];\r\n if (!s.read || !s.once) {\r\n throw new Error('Expected an instance of stream.Readable');\r\n }\r\n this.s.once('end', () => this.reject(new EndOfFileStream_1.EndOfStreamError()));\r\n this.s.once('error', err => this.reject(err));\r\n this.s.once('close', () => this.reject(new Error('Stream closed')));\r\n }\r\n /**\r\n * Read ahead (peek) from stream. Subsequent read or peeks will return the same data\r\n * @param uint8Array - Uint8Array (or Buffer) to store data read from stream in\r\n * @param offset - Offset target\r\n * @param length - Number of bytes to read\r\n * @returns Number of bytes peeked\r\n */\r\n async peek(uint8Array, offset, length) {\r\n const bytesRead = await this.read(uint8Array, offset, length);\r\n this.peekQueue.push(uint8Array.subarray(offset, offset + bytesRead)); // Put read data back to peek buffer\r\n return bytesRead;\r\n }\r\n /**\r\n * Read chunk from stream\r\n * @param buffer - Target Uint8Array (or Buffer) to store data read from stream in\r\n * @param offset - Offset target\r\n * @param length - Number of bytes to read\r\n * @returns Number of bytes read\r\n */\r\n async read(buffer, offset, length) {\r\n if (length === 0) {\r\n return 0;\r\n }\r\n if (this.peekQueue.length === 0 && this.endOfStream) {\r\n throw new EndOfFileStream_1.EndOfStreamError();\r\n }\r\n let remaining = length;\r\n let bytesRead = 0;\r\n // consume peeked data first\r\n while (this.peekQueue.length > 0 && remaining > 0) {\r\n const peekData = this.peekQueue.pop(); // Front of queue\r\n if (!peekData)\r\n throw new Error('peekData should be defined');\r\n const lenCopy = Math.min(peekData.length, remaining);\r\n buffer.set(peekData.subarray(0, lenCopy), offset + bytesRead);\r\n bytesRead += lenCopy;\r\n remaining -= lenCopy;\r\n if (lenCopy < peekData.length) {\r\n // remainder back to queue\r\n this.peekQueue.push(peekData.subarray(lenCopy));\r\n }\r\n }\r\n // continue reading from stream if required\r\n while (remaining > 0 && !this.endOfStream) {\r\n const reqLen = Math.min(remaining, maxStreamReadSize);\r\n const chunkLen = await this.readFromStream(buffer, offset + bytesRead, reqLen);\r\n bytesRead += chunkLen;\r\n if (chunkLen < reqLen)\r\n break;\r\n remaining -= chunkLen;\r\n }\r\n return bytesRead;\r\n }\r\n /**\r\n * Read chunk from stream\r\n * @param buffer Target Uint8Array (or Buffer) to store data read from stream in\r\n * @param offset Offset target\r\n * @param length Number of bytes to read\r\n * @returns Number of bytes read\r\n */\r\n async readFromStream(buffer, offset, length) {\r\n const readBuffer = this.s.read(length);\r\n if (readBuffer) {\r\n buffer.set(readBuffer, offset);\r\n return readBuffer.length;\r\n }\r\n else {\r\n const request = {\r\n buffer,\r\n offset,\r\n length,\r\n deferred: new Deferred_1.Deferred()\r\n };\r\n this.deferred = request.deferred;\r\n this.s.once('readable', () => {\r\n this.readDeferred(request);\r\n });\r\n return request.deferred.promise;\r\n }\r\n }\r\n /**\r\n * Process deferred read request\r\n * @param request Deferred read request\r\n */\r\n readDeferred(request) {\r\n const readBuffer = this.s.read(request.length);\r\n if (readBuffer) {\r\n request.buffer.set(readBuffer, request.offset);\r\n request.deferred.resolve(readBuffer.length);\r\n this.deferred = null;\r\n }\r\n else {\r\n this.s.once('readable', () => {\r\n this.readDeferred(request);\r\n });\r\n }\r\n }\r\n reject(err) {\r\n this.endOfStream = true;\r\n if (this.deferred) {\r\n this.deferred.reject(err);\r\n this.deferred = null;\r\n }\r\n }\r\n}\r\nexports.StreamReader = StreamReader;\n}(StreamReader));\n\n(function (exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.StreamReader = exports.EndOfStreamError = void 0;\r\nvar EndOfFileStream_1 = EndOfFileStream;\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return EndOfFileStream_1.EndOfStreamError; } });\r\nvar StreamReader_1 = StreamReader;\r\nObject.defineProperty(exports, \"StreamReader\", { enumerable: true, get: function () { return StreamReader_1.StreamReader; } });\n}(lib));\n\nObject.defineProperty(AbstractTokenizer$1, \"__esModule\", { value: true });\r\nAbstractTokenizer$1.AbstractTokenizer = void 0;\r\nconst peek_readable_1$3 = lib;\r\n/**\r\n * Core tokenizer\r\n */\r\nclass AbstractTokenizer {\r\n constructor(fileInfo) {\r\n /**\r\n * Tokenizer-stream position\r\n */\r\n this.position = 0;\r\n this.numBuffer = new Uint8Array(8);\r\n this.fileInfo = fileInfo ? fileInfo : {};\r\n }\r\n /**\r\n * Read a token from the tokenizer-stream\r\n * @param token - The token to read\r\n * @param position - If provided, the desired position in the tokenizer-stream\r\n * @returns Promise with token data\r\n */\r\n async readToken(token, position = this.position) {\r\n const uint8Array = Buffer.alloc(token.len);\r\n const len = await this.readBuffer(uint8Array, { position });\r\n if (len < token.len)\r\n throw new peek_readable_1$3.EndOfStreamError();\r\n return token.get(uint8Array, 0);\r\n }\r\n /**\r\n * Peek a token from the tokenizer-stream.\r\n * @param token - Token to peek from the tokenizer-stream.\r\n * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position.\r\n * @returns Promise with token data\r\n */\r\n async peekToken(token, position = this.position) {\r\n const uint8Array = Buffer.alloc(token.len);\r\n const len = await this.peekBuffer(uint8Array, { position });\r\n if (len < token.len)\r\n throw new peek_readable_1$3.EndOfStreamError();\r\n return token.get(uint8Array, 0);\r\n }\r\n /**\r\n * Read a numeric token from the stream\r\n * @param token - Numeric token\r\n * @returns Promise with number\r\n */\r\n async readNumber(token) {\r\n const len = await this.readBuffer(this.numBuffer, { length: token.len });\r\n if (len < token.len)\r\n throw new peek_readable_1$3.EndOfStreamError();\r\n return token.get(this.numBuffer, 0);\r\n }\r\n /**\r\n * Read a numeric token from the stream\r\n * @param token - Numeric token\r\n * @returns Promise with number\r\n */\r\n async peekNumber(token) {\r\n const len = await this.peekBuffer(this.numBuffer, { length: token.len });\r\n if (len < token.len)\r\n throw new peek_readable_1$3.EndOfStreamError();\r\n return token.get(this.numBuffer, 0);\r\n }\r\n /**\r\n * Ignore number of bytes, advances the pointer in under tokenizer-stream.\r\n * @param length - Number of bytes to ignore\r\n * @return resolves the number of bytes ignored, equals length if this available, otherwise the number of bytes available\r\n */\r\n async ignore(length) {\r\n if (this.fileInfo.size !== undefined) {\r\n const bytesLeft = this.fileInfo.size - this.position;\r\n if (length > bytesLeft) {\r\n this.position += bytesLeft;\r\n return bytesLeft;\r\n }\r\n }\r\n this.position += length;\r\n return length;\r\n }\r\n async close() {\r\n // empty\r\n }\r\n normalizeOptions(uint8Array, options) {\r\n if (options && options.position !== undefined && options.position < this.position) {\r\n throw new Error('`options.position` must be equal or greater than `tokenizer.position`');\r\n }\r\n if (options) {\r\n return {\r\n mayBeLess: options.mayBeLess === true,\r\n offset: options.offset ? options.offset : 0,\r\n length: options.length ? options.length : (uint8Array.length - (options.offset ? options.offset : 0)),\r\n position: options.position ? options.position : this.position\r\n };\r\n }\r\n return {\r\n mayBeLess: false,\r\n offset: 0,\r\n length: uint8Array.length,\r\n position: this.position\r\n };\r\n }\r\n}\r\nAbstractTokenizer$1.AbstractTokenizer = AbstractTokenizer;\n\nObject.defineProperty(ReadStreamTokenizer$1, \"__esModule\", { value: true });\r\nReadStreamTokenizer$1.ReadStreamTokenizer = void 0;\r\nconst AbstractTokenizer_1$2 = AbstractTokenizer$1;\r\nconst peek_readable_1$2 = lib;\r\nconst maxBufferSize = 256000;\r\nclass ReadStreamTokenizer extends AbstractTokenizer_1$2.AbstractTokenizer {\r\n constructor(stream, fileInfo) {\r\n super(fileInfo);\r\n this.streamReader = new peek_readable_1$2.StreamReader(stream);\r\n }\r\n /**\r\n * Get file information, an HTTP-client may implement this doing a HEAD request\r\n * @return Promise with file information\r\n */\r\n async getFileInfo() {\r\n return this.fileInfo;\r\n }\r\n /**\r\n * Read buffer from tokenizer\r\n * @param uint8Array - Target Uint8Array to fill with data read from the tokenizer-stream\r\n * @param options - Read behaviour options\r\n * @returns Promise with number of bytes read\r\n */\r\n async readBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n const skipBytes = normOptions.position - this.position;\r\n if (skipBytes > 0) {\r\n await this.ignore(skipBytes);\r\n return this.readBuffer(uint8Array, options);\r\n }\r\n else if (skipBytes < 0) {\r\n throw new Error('`options.position` must be equal or greater than `tokenizer.position`');\r\n }\r\n if (normOptions.length === 0) {\r\n return 0;\r\n }\r\n const bytesRead = await this.streamReader.read(uint8Array, normOptions.offset, normOptions.length);\r\n this.position += bytesRead;\r\n if ((!options || !options.mayBeLess) && bytesRead < normOptions.length) {\r\n throw new peek_readable_1$2.EndOfStreamError();\r\n }\r\n return bytesRead;\r\n }\r\n /**\r\n * Peek (read ahead) buffer from tokenizer\r\n * @param uint8Array - Uint8Array (or Buffer) to write data to\r\n * @param options - Read behaviour options\r\n * @returns Promise with number of bytes peeked\r\n */\r\n async peekBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n let bytesRead = 0;\r\n if (normOptions.position) {\r\n const skipBytes = normOptions.position - this.position;\r\n if (skipBytes > 0) {\r\n const skipBuffer = new Uint8Array(normOptions.length + skipBytes);\r\n bytesRead = await this.peekBuffer(skipBuffer, { mayBeLess: normOptions.mayBeLess });\r\n uint8Array.set(skipBuffer.subarray(skipBytes), normOptions.offset);\r\n return bytesRead - skipBytes;\r\n }\r\n else if (skipBytes < 0) {\r\n throw new Error('Cannot peek from a negative offset in a stream');\r\n }\r\n }\r\n if (normOptions.length > 0) {\r\n try {\r\n bytesRead = await this.streamReader.peek(uint8Array, normOptions.offset, normOptions.length);\r\n }\r\n catch (err) {\r\n if (options && options.mayBeLess && err instanceof peek_readable_1$2.EndOfStreamError) {\r\n return 0;\r\n }\r\n throw err;\r\n }\r\n if ((!normOptions.mayBeLess) && bytesRead < normOptions.length) {\r\n throw new peek_readable_1$2.EndOfStreamError();\r\n }\r\n }\r\n return bytesRead;\r\n }\r\n async ignore(length) {\r\n // debug(`ignore ${this.position}...${this.position + length - 1}`);\r\n const bufSize = Math.min(maxBufferSize, length);\r\n const buf = new Uint8Array(bufSize);\r\n let totBytesRead = 0;\r\n while (totBytesRead < length) {\r\n const remaining = length - totBytesRead;\r\n const bytesRead = await this.readBuffer(buf, { length: Math.min(bufSize, remaining) });\r\n if (bytesRead < 0) {\r\n return bytesRead;\r\n }\r\n totBytesRead += bytesRead;\r\n }\r\n return totBytesRead;\r\n }\r\n}\r\nReadStreamTokenizer$1.ReadStreamTokenizer = ReadStreamTokenizer;\n\nvar BufferTokenizer$1 = {};\n\nObject.defineProperty(BufferTokenizer$1, \"__esModule\", { value: true });\r\nBufferTokenizer$1.BufferTokenizer = void 0;\r\nconst peek_readable_1$1 = lib;\r\nconst AbstractTokenizer_1$1 = AbstractTokenizer$1;\r\nclass BufferTokenizer extends AbstractTokenizer_1$1.AbstractTokenizer {\r\n /**\r\n * Construct BufferTokenizer\r\n * @param uint8Array - Uint8Array to tokenize\r\n * @param fileInfo - Pass additional file information to the tokenizer\r\n */\r\n constructor(uint8Array, fileInfo) {\r\n super(fileInfo);\r\n this.uint8Array = uint8Array;\r\n this.fileInfo.size = this.fileInfo.size ? this.fileInfo.size : uint8Array.length;\r\n }\r\n /**\r\n * Read buffer from tokenizer\r\n * @param uint8Array - Uint8Array to tokenize\r\n * @param options - Read behaviour options\r\n * @returns {Promise<number>}\r\n */\r\n async readBuffer(uint8Array, options) {\r\n if (options && options.position) {\r\n if (options.position < this.position) {\r\n throw new Error('`options.position` must be equal or greater than `tokenizer.position`');\r\n }\r\n this.position = options.position;\r\n }\r\n const bytesRead = await this.peekBuffer(uint8Array, options);\r\n this.position += bytesRead;\r\n return bytesRead;\r\n }\r\n /**\r\n * Peek (read ahead) buffer from tokenizer\r\n * @param uint8Array\r\n * @param options - Read behaviour options\r\n * @returns {Promise<number>}\r\n */\r\n async peekBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n const bytes2read = Math.min(this.uint8Array.length - normOptions.position, normOptions.length);\r\n if ((!normOptions.mayBeLess) && bytes2read < normOptions.length) {\r\n throw new peek_readable_1$1.EndOfStreamError();\r\n }\r\n else {\r\n uint8Array.set(this.uint8Array.subarray(normOptions.position, normOptions.position + bytes2read), normOptions.offset);\r\n return bytes2read;\r\n }\r\n }\r\n async close() {\r\n // empty\r\n }\r\n}\r\nBufferTokenizer$1.BufferTokenizer = BufferTokenizer;\n\n(function (exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fromBuffer = exports.fromStream = exports.EndOfStreamError = void 0;\r\nconst ReadStreamTokenizer_1 = ReadStreamTokenizer$1;\r\nconst BufferTokenizer_1 = BufferTokenizer$1;\r\nvar peek_readable_1 = lib;\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return peek_readable_1.EndOfStreamError; } });\r\n/**\r\n * Construct ReadStreamTokenizer from given Stream.\r\n * Will set fileSize, if provided given Stream has set the .path property/\r\n * @param stream - Read from Node.js Stream.Readable\r\n * @param fileInfo - Pass the file information, like size and MIME-type of the corresponding stream.\r\n * @returns ReadStreamTokenizer\r\n */\r\nfunction fromStream(stream, fileInfo) {\r\n fileInfo = fileInfo ? fileInfo : {};\r\n return new ReadStreamTokenizer_1.ReadStreamTokenizer(stream, fileInfo);\r\n}\r\nexports.fromStream = fromStream;\r\n/**\r\n * Construct ReadStreamTokenizer from given Buffer.\r\n * @param uint8Array - Uint8Array to tokenize\r\n * @param fileInfo - Pass additional file information to the tokenizer\r\n * @returns BufferTokenizer\r\n */\r\nfunction fromBuffer(uint8Array, fileInfo) {\r\n return new BufferTokenizer_1.BufferTokenizer(uint8Array, fileInfo);\r\n}\r\nexports.fromBuffer = fromBuffer;\n}(core));\n\nvar FileTokenizer$1 = {};\n\nObject.defineProperty(FileTokenizer$1, \"__esModule\", { value: true });\r\nFileTokenizer$1.fromFile = FileTokenizer$1.FileTokenizer = void 0;\r\nconst AbstractTokenizer_1 = AbstractTokenizer$1;\r\nconst peek_readable_1 = lib;\r\nconst fs = FsPromise;\r\nclass FileTokenizer extends AbstractTokenizer_1.AbstractTokenizer {\r\n constructor(fd, fileInfo) {\r\n super(fileInfo);\r\n this.fd = fd;\r\n }\r\n /**\r\n * Read buffer from file\r\n * @param uint8Array - Uint8Array to write result to\r\n * @param options - Read behaviour options\r\n * @returns Promise number of bytes read\r\n */\r\n async readBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n this.position = normOptions.position;\r\n const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position);\r\n this.position += res.bytesRead;\r\n if (res.bytesRead < normOptions.length && (!options || !options.mayBeLess)) {\r\n throw new peek_readable_1.EndOfStreamError();\r\n }\r\n return res.bytesRead;\r\n }\r\n /**\r\n * Peek buffer from file\r\n * @param uint8Array - Uint8Array (or Buffer) to write data to\r\n * @param options - Read behaviour options\r\n * @returns Promise number of bytes read\r\n */\r\n async peekBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position);\r\n if ((!normOptions.mayBeLess) && res.bytesRead < normOptions.length) {\r\n throw new peek_readable_1.EndOfStreamError();\r\n }\r\n return res.bytesRead;\r\n }\r\n async close() {\r\n return fs.close(this.fd);\r\n }\r\n}\r\nFileTokenizer$1.FileTokenizer = FileTokenizer;\r\nasync function fromFile(sourceFilePath) {\r\n const stat = await fs.stat(sourceFilePath);\r\n if (!stat.isFile) {\r\n throw new Error(`File not a file: ${sourceFilePath}`);\r\n }\r\n const fd = await fs.open(sourceFilePath, 'r');\r\n return new FileTokenizer(fd, { path: sourceFilePath, size: stat.size });\r\n}\r\nFileTokenizer$1.fromFile = fromFile;\n\n(function (exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fromStream = exports.fromBuffer = exports.EndOfStreamError = exports.fromFile = void 0;\r\nconst fs = FsPromise;\r\nconst core$1 = core;\r\nvar FileTokenizer_1 = FileTokenizer$1;\r\nObject.defineProperty(exports, \"fromFile\", { enumerable: true, get: function () { return FileTokenizer_1.fromFile; } });\r\nvar core_1 = core;\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return core_1.EndOfStreamError; } });\r\nObject.defineProperty(exports, \"fromBuffer\", { enumerable: true, get: function () { return core_1.fromBuffer; } });\r\n/**\r\n * Construct ReadStreamTokenizer from given Stream.\r\n * Will set fileSize, if provided given Stream has set the .path property.\r\n * @param stream - Node.js Stream.Readable\r\n * @param fileInfo - Pass additional file information to the tokenizer\r\n * @returns Tokenizer\r\n */\r\nasync function fromStream(stream, fileInfo) {\r\n fileInfo = fileInfo ? fileInfo : {};\r\n if (stream.path) {\r\n const stat = await fs.stat(stream.path);\r\n fileInfo.path = stream.path;\r\n fileInfo.size = stat.size;\r\n }\r\n return core$1.fromStream(stream, fileInfo);\r\n}\r\nexports.fromStream = fromStream;\n}(lib$1));\n\nfunction stringToBytes(string) {\n return Object.values(string).map(character => {\n return character.charCodeAt(0);\n });\n}\n/**\nChecks whether the TAR checksum is valid.\n\n@param {Buffer} buffer - The TAR header `[offset ... offset + 512]`.\n@param {number} offset - TAR header offset.\n@returns {boolean} `true` if the TAR checksum is valid, otherwise `false`.\n*/\nfunction tarHeaderChecksumMatches(buffer, offset = 0) {\n const readSum = Number.parseInt(buffer.toString('utf8', 148, 154).replace(/\\0.*$/, '').trim(), 8); // Read sum in header\n if (Number.isNaN(readSum)) {\n return false;\n }\n let sum = 8 * 0x20; // Initialize signed bit sum\n for (let i = offset; i < offset + 148; i++) {\n sum += buffer[i];\n }\n for (let i = offset + 156; i < offset + 512; i++) {\n sum += buffer[i];\n }\n return readSum === sum;\n}\n/**\nID3 UINT32 sync-safe tokenizer token.\n28 bits (representing up to 256MB) integer, the msb is 0 to avoid \"false syncsignals\".\n*/\nconst uint32SyncSafeToken = {\n get: (buffer, offset) => (buffer[offset + 3] & 0x7F) | ((buffer[offset + 2]) << 7) | ((buffer[offset + 1]) << 14) | ((buffer[offset]) << 21),\n len: 4,\n};\n\nconst minimumBytes = 4100; // A fair amount of file-types are detectable within this range.\n// 没有的情况下,均通过\nconst checkFileType = (file, callback) => {\n const reader = new FileReader();\n reader.readAsArrayBuffer(file);\n reader.onload = async (event) => {\n var _a, _b;\n try {\n const buffers = new Uint8Array((_a = event.target) === null || _a === void 0 ? void 0 : _a.result);\n const tokenizer = await lib$1.fromBuffer(buffers);\n const fileType = await fileTypeFromTokenizer(tokenizer);\n const suffix = file.name.indexOf('.') > -1 ? (file.name.split('.').pop() || '').toLocaleLowerCase() : '';\n let check = fileType ? suffix === fileType.ext : true;\n // 兼容处理\n if (suffix.indexOf('xls') > -1 && (((_b = fileType === null || fileType === void 0 ? void 0 : fileType.ext) === null || _b === void 0 ? void 0 : _b.indexOf('xls')) > -1 || (fileType === null || fileType === void 0 ? void 0 : fileType.ext) === 'cfb')) {\n check = true;\n }\n callback(check, fileType);\n }\n catch (error) {\n if (!(error instanceof lib$1.EndOfStreamError)) {\n throw error;\n }\n callback(true, undefined);\n }\n };\n};\nasync function fileTypeFromTokenizer(tokenizer) {\n try {\n return new FileTypeParser().parse(tokenizer);\n }\n catch (error) {\n if (!(error instanceof lib$1.EndOfStreamError)) {\n throw error;\n }\n }\n}\nfunction _check(buffer, headers, options) {\n options = Object.assign({ offset: 0 }, options);\n for (const [index, header] of headers.entries()) {\n // If a bitmask is set\n if (options.mask) {\n // If header doesn't equal `buf` with bits masked off\n if (header !== (options.mask[index] & buffer[index + options.offset])) {\n return false;\n }\n }\n else if (header !== buffer[index + options.offset]) {\n return false;\n }\n }\n return true;\n}\nclass FileTypeParser {\n constructor() {\n this.buffer = Buffer.alloc(minimumBytes);\n }\n check(header, options) {\n return _check(this.buffer, header, options);\n }\n checkString(header, options) {\n return this.check(stringToBytes(header), options);\n }\n async readTiffTag(bigEndian) {\n if (this.tokenizer) {\n const tagId = await this.tokenizer.readToken(bigEndian ? lib$2.UINT16_BE : lib$2.UINT16_LE);\n this.tokenizer.ignore(10);\n switch (tagId) {\n case 50341:\n return {\n ext: 'arw',\n mime: 'image/x-sony-arw',\n };\n case 50706:\n return {\n ext: 'dng',\n mime: 'image/x-adobe-dng',\n };\n }\n }\n }\n async readTiffIFD(bigEndian) {\n if (this.tokenizer) {\n const numberOfTags = await this.tokenizer.readToken(bigEndian ? lib$2.UINT16_BE : lib$2.UINT16_LE);\n for (let n = 0; n < numberOfTags; ++n) {\n const fileType = await this.readTiffTag(bigEndian);\n if (fileType) {\n return fileType;\n }\n }\n }\n }\n async readTiffHeader(bigEndian) {\n const version = (bigEndian ? lib$2.UINT16_BE : lib$2.UINT16_LE).get(this.buffer, 2);\n const ifdOffset = (bigEndian ? lib$2.UINT32_BE : lib$2.UINT32_LE).get(this.buffer, 4);\n if (version === 42) {\n // TIFF file header\n if (ifdOffset >= 6) {\n if (this.checkString('CR', { offset: 8 })) {\n return {\n ext: 'cr2',\n mime: 'image/x-canon-cr2',\n };\n }\n if (ifdOffset >= 8 && (this.check([0x1C, 0x00, 0xFE, 0x00], { offset: 8 }) || this.check([0x1F, 0x00, 0x0B, 0x00], { offset: 8 }))) {\n return {\n ext: 'nef',\n mime: 'image/x-nikon-nef',\n };\n }\n }\n if (this.tokenizer) {\n await this.tokenizer.ignore(ifdOffset);\n const fileType = await this.readTiffIFD(false);\n return fileType ? fileType : {\n ext: 'tif',\n mime: 'image/tiff',\n };\n }\n }\n if (version === 43) { // Big TIFF file header\n return {\n ext: 'tif',\n mime: 'image/tiff',\n };\n }\n }\n async parse(tokenizer) {\n this.buffer = Buffer.alloc(minimumBytes);\n // Keep reading until EOF if the file size is unknown.\n if (tokenizer.fileInfo.size === undefined) {\n tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER;\n }\n this.tokenizer = tokenizer;\n await tokenizer.peekBuffer(this.buffer, { length: 12, mayBeLess: true });\n // -- 2-byte signatures --\n if (this.check([0x42, 0x4D])) {\n return {\n ext: 'bmp',\n mime: 'image/bmp',\n };\n }\n if (this.check([0x0B, 0x77])) {\n return {\n ext: 'ac3',\n mime: 'audio/vnd.dolby.dd-raw',\n };\n }\n if (this.check([0x78, 0x01])) {\n return {\n ext: 'dmg',\n mime: 'application/x-apple-diskimage',\n };\n }\n if (this.check([0x4D, 0x5A])) {\n return {\n ext: 'exe',\n mime: 'application/x-msdownload',\n };\n }\n if (this.check([0x25, 0x21])) {\n await tokenizer.peekBuffer(this.buffer, { length: 24, mayBeLess: true });\n if (this.checkString('PS-Adobe-', { offset: 2 })\n && this.checkString(' EPSF-', { offset: 14 })) {\n return {\n ext: 'eps',\n mime: 'application/eps',\n };\n }\n return {\n ext: 'ps',\n mime: 'application/postscript',\n };\n }\n if (this.check([0x1F, 0xA0]) || this.check([0x1F, 0x9D])) {\n return {\n ext: 'Z',\n mime: 'application/x-compress',\n };\n }\n // -- 3-byte signatures --\n if (this.check([0x47, 0x49, 0x46])) {\n return {\n ext: 'gif',\n mime: 'image/gif',\n };\n }\n if (this.check([0xFF, 0xD8, 0xFF])) {\n return {\n ext: 'jpg',\n mime: 'image/jpeg',\n };\n }\n if (this.check([0x49, 0x49, 0xBC])) {\n return {\n ext: 'jxr',\n mime: 'image/vnd.ms-photo',\n };\n }\n if (this.check([0x1F, 0x8B, 0x8])) {\n return {\n ext: 'gz',\n mime: 'application/gzip',\n };\n }\n if (this.check([0x42, 0x5A, 0x68])) {\n return {\n ext: 'bz2',\n mime: 'application/x-bzip2',\n };\n }\n if (this.checkString('ID3')) {\n await tokenizer.ignore(6); // Skip ID3 header until the header size\n const id3HeaderLength = await tokenizer.readToken(uint32SyncSafeToken);\n if (tokenizer.position + id3HeaderLength > tokenizer.fileInfo.size) {\n // Guess file type based on ID3 header for backward compatibility\n return {\n ext: 'mp3',\n mime: 'audio/mpeg',\n };\n }\n await tokenizer.ignore(id3HeaderLength);\n return fileTypeFromTokenizer(tokenizer); // Skip ID3 header, recursion\n }\n // Musepack, SV7\n if (this.checkString('MP+')) {\n return {\n ext: 'mpc',\n mime: 'audio/x-musepack',\n };\n }\n if ((this.buffer[0] === 0x43 || this.buffer[0] === 0x46) && this.check([0x57, 0x53], { offset: 1 })) {\n return {\n ext: 'swf',\n mime: 'application/x-shockwave-flash',\n };\n }\n // -- 4-byte signatures --\n if (this.checkString('FLIF')) {\n return {\n ext: 'flif',\n mime: 'image/flif',\n };\n }\n if (this.checkString('8BPS')) {\n return {\n ext: 'psd',\n mime: 'image/vnd.adobe.photoshop',\n };\n }\n if (this.checkString('WEBP', { offset: 8 })) {\n return {\n ext: 'webp',\n mime: 'image/webp',\n };\n }\n // Musepack, SV8\n if (this.checkString('MPCK')) {\n return {\n ext: 'mpc',\n mime: 'audio/x-musepack',\n };\n }\n if (this.checkString('FORM')) {\n return {\n ext: 'aif',\n mime: 'audio/aiff',\n };\n }\n if (this.checkString('icns', { offset: 0 })) {\n return {\n ext: 'icns',\n mime: 'image/icns',\n };\n }\n // Zip-based file formats\n // Need to be before the `zip` check\n if (this.check([0x50, 0x4B, 0x3, 0x4])) { // Local file header signature\n try {\n while (tokenizer.position + 30 < tokenizer.fileInfo.size) {\n await tokenizer.readBuffer(this.buffer, { length: 30 });\n // https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers\n const zipHeader = {\n compressedSize: this.buffer.readUInt32LE(18),\n uncompressedSize: this.buffer.readUInt32LE(22),\n filenameLength: this.buffer.readUInt16LE(26),\n extraFieldLength: this.buffer.readUInt16LE(28),\n };\n zipHeader.filename = await tokenizer.readToken(new lib$2.StringType(zipHeader.filenameLength, 'utf-8'));\n await tokenizer.ignore(zipHeader.extraFieldLength);\n // Assumes signed `.xpi` from addons.mozilla.org\n if (zipHeader.filename === 'META-INF/mozilla.rsa') {\n return {\n ext: 'xpi',\n mime: 'application/x-xpinstall',\n };\n }\n if (zipHeader.filename.endsWith('.rels') || zipHeader.filename.endsWith('.xml')) {\n const type = zipHeader.filename.split('/')[0];\n switch (type) {\n case '_rels':\n break;\n case 'word':\n return {\n ext: 'docx',\n mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n };\n case 'ppt':\n return {\n ext: 'pptx',\n mime: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n };\n case 'xl':\n return {\n ext: 'xlsx',\n mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n };\n default:\n break;\n }\n }\n if (zipHeader.filename.startsWith('xl/')) {\n return {\n ext: 'xlsx',\n mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n };\n }\n if (zipHeader.filename.startsWith('3D/') && zipHeader.filename.endsWith('.model')) {\n return {\n ext: '3mf',\n mime: 'model/3mf',\n };\n }\n // The docx, xlsx and pptx file types extend the Office Open XML file format:\n // https://en.wikipedia.org/wiki/Office_Open_XML_file_formats\n // We look for:\n // - one entry named '[Content_Types].xml' or '_rels/.rels',\n // - one entry indicating specific type of file.\n // MS Office, OpenOffice and LibreOffice may put the parts in different order, so the check should not rely on it.\n if (zipHeader.filename === 'mimetype' && zipHeader.compressedSize === zipHeader.uncompressedSize) {\n const mimeType = await tokenizer.readToken(new lib$2.StringType(zipHeader.compressedSize, 'utf-8'));\n switch (mimeType) {\n case 'application/epub+zip':\n return {\n ext: 'epub',\n mime: 'application/epub+zip',\n };\n case 'application/vnd.oasis.opendocument.text':\n return {\n ext: 'odt',\n mime: 'application/vnd.oasis.opendocument.text',\n };\n case 'application/vnd.oasis.opendocument.spreadsheet':\n return {\n ext: 'ods',\n mime: 'application/vnd.oasis.opendocument.spreadsheet',\n };\n case 'application/vnd.oasis.opendocument.presentation':\n return {\n ext: 'odp',\n mime: 'application/vnd.oasis.opendocument.presentation',\n };\n default:\n }\n }\n // Try to find next header manually when current one is corrupted\n if (zipHeader.compressedSize === 0) {\n let nextHeaderIndex = -1;\n while (nextHeaderIndex < 0 && (tokenizer.position < tokenizer.fileInfo.size)) {\n await tokenizer.peekBuffer(this.buffer, { mayBeLess: true });\n nextHeaderIndex = this.buffer.indexOf('504B0304', 0, 'hex');\n // Move position to the next header if found, skip the whole buffer otherwise\n await tokenizer.ignore(nextHeaderIndex >= 0 ? nextHeaderIndex : this.buffer.length);\n }\n }\n else {\n await tokenizer.ignore(zipHeader.compressedSize);\n }\n }\n }\n catch (error) {\n if (!(error instanceof lib$1.EndOfStreamError)) {\n throw error;\n }\n }\n return {\n ext: 'zip',\n mime: 'application/zip',\n };\n }\n if (this.checkString('OggS')) {\n // This is an OGG container\n await tokenizer.ignore(28);\n const type = Buffer.alloc(8);\n await tokenizer.readBuffer(type);\n // Needs to be before `ogg` check\n if (_check(type, [0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])) {\n return {\n ext: 'opus',\n mime: 'audio/opus',\n };\n }\n // If ' theora' in header.\n if (_check(type, [0x80, 0x74, 0x68, 0x65, 0x6F, 0x72, 0x61])) {\n return {\n ext: 'ogv',\n mime: 'video/ogg',\n };\n }\n // If '\\x01video' in header.\n if (_check(type, [0x01, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x00])) {\n return {\n ext: 'ogm',\n mime: 'video/ogg',\n };\n }\n // If ' FLAC' in header https://xiph.org/flac/faq.html\n if (_check(type, [0x7F, 0x46, 0x4C, 0x41, 0x43])) {\n return {\n ext: 'oga',\n mime: 'audio/ogg',\n };\n }\n // 'Speex ' in header https://en.wikipedia.org/wiki/Speex\n if (_check(type, [0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20])) {\n return {\n ext: 'spx',\n mime: 'audio/ogg',\n };\n }\n // If '\\x01vorbis' in header\n if (_check(type, [0x01, 0x76, 0x6F, 0x72, 0x62, 0x69, 0x73])) {\n return {\n ext: 'ogg',\n mime: 'audio/ogg',\n };\n }\n // Default OGG container https://www.iana.org/assignments/media-types/application/ogg\n return {\n ext: 'ogx',\n mime: 'application/ogg',\n };\n }\n if (this.check([0x50, 0x4B])\n && (this.buffer[2] === 0x3 || this.buffer[2] === 0x5 || this.buffer[2] === 0x7)\n && (this.buffer[3] === 0x4 || this.buffer[3] === 0x6 || this.buffer[3] === 0x8)) {\n return {\n ext: 'zip',\n mime: 'application/zip',\n };\n }\n //\n // File Type Box (https://en.wikipedia.org/wiki/ISO_base_media_file_format)\n // It's not required to be first, but it's recommended to be. Almost all ISO base media files start with `ftyp` box.\n // `ftyp` box must contain a brand major identifier, which must consist of ISO 8859-1 printable characters.\n // Here we check for 8859-1 printable characters (for simplicity, it's a mask which also catches one non-printable character).\n if (this.checkString('ftyp', { offset: 4 })\n && (this.buffer[8] & 0x60) !== 0x00 // Brand major, first character ASCII?\n ) {\n // They all can have MIME `video/mp4` except `application/mp4` special-case which is hard to detect.\n // For some cases, we're specific, everything else falls to `video/mp4` with `mp4` extension.\n const brandMajor = this.buffer.toString('binary', 8, 12).replace('\\0', ' ').trim();\n switch (brandMajor) {\n case 'avif':\n case 'avis':\n return { ext: 'avif', mime: 'image/avif' };\n case 'mif1':\n return { ext: 'heic', mime: 'image/heif' };\n case 'msf1':\n return { ext: 'heic', mime: 'image/heif-sequence' };\n case 'heic':\n case 'heix':\n return { ext: 'heic', mime: 'image/heic' };\n case 'hevc':\n case 'hevx':\n return { ext: 'heic', mime: 'image/heic-sequence' };\n case 'qt':\n return { ext: 'mov', mime: 'video/quicktime' };\n case 'M4V':\n case 'M4VH':\n case 'M4VP':\n return { ext: 'm4v', mime: 'video/x-m4v' };\n case 'M4P':\n return { ext: 'm4p', mime: 'video/mp4' };\n case 'M4B':\n return { ext: 'm4b', mime: 'audio/mp4' };\n case 'M4A':\n return { ext: 'm4a', mime: 'audio/x-m4a' };\n case 'F4V':\n return { ext: 'f4v', mime: 'video/mp4' };\n case 'F4P':\n return { ext: 'f4p', mime: 'video/mp4' };\n case 'F4A':\n return { ext: 'f4a', mime: 'audio/mp4' };\n case 'F4B':\n return { ext: 'f4b', mime: 'audio/mp4' };\n case 'crx':\n return { ext: 'cr3', mime: 'image/x-canon-cr3' };\n default:\n if (brandMajor.startsWith('3g')) {\n if (brandMajor.startsWith('3g2')) {\n return { ext: '3g2', mime: 'video/3gpp2' };\n }\n return { ext: '3gp', mime: 'video/3gpp' };\n }\n return { ext: 'mp4', mime: 'video/mp4' };\n }\n }\n if (this.checkString('MThd')) {\n return {\n ext: 'mid',\n mime: 'audio/midi',\n };\n }\n if (this.checkString('wOFF')\n && (this.check([0x00, 0x01, 0x00, 0x00], { offset: 4 })\n || this.checkString('OTTO', { offset: 4 }))) {\n return {\n ext: 'woff',\n mime: 'font/woff',\n };\n }\n if (this.checkString('wOF2')\n && (this.check([0x00, 0x01, 0x00, 0x00], { offset: 4 })\n || this.checkString('OTTO', { offset: 4 }))) {\n return {\n ext: 'woff2',\n mime: 'font/woff2',\n };\n }\n if (this.check([0xD4, 0xC3, 0xB2, 0xA1]) || this.check([0xA1, 0xB2, 0xC3, 0xD4])) {\n return {\n ext: 'pcap',\n mime: 'application/vnd.tcpdump.pcap',\n };\n }\n // Sony DSD Stream File (DSF)\n if (this.checkString('DSD ')) {\n return {\n ext: 'dsf',\n mime: 'audio/x-dsf', // Non-standard\n };\n }\n if (this.checkString('LZIP')) {\n return {\n ext: 'lz',\n mime: 'application/x-lzip',\n };\n }\n if (this.checkString('fLaC')) {\n return {\n ext: 'flac',\n mime: 'audio/flac', // todo: audio/x-flac\n };\n }\n if (this.check([0x42, 0x50, 0x47, 0xFB])) {\n return {\n ext: 'bpg',\n mime: 'image/bpg',\n };\n }\n if (this.checkString('wvpk')) {\n return {\n ext: 'wv',\n mime: 'audio/wavpack',\n };\n }\n if (this.checkString('%PDF')) {\n await tokenizer.ignore(1350);\n const maxBufferSize = 10 * 1024 * 1024;\n const buffer = Buffer.alloc(Math.min(maxBufferSize, tokenizer.fileInfo.size));\n await tokenizer.readBuffer(buffer, { mayBeLess: true });\n // Check if this is an Adobe Illustrator file\n if (buffer.includes(Buffer.from('AIPrivateData'))) {\n return {\n ext: 'ai',\n mime: 'application/postscript',\n };\n }\n // Assume this is just a normal PDF\n return {\n ext: 'pdf',\n mime: 'application/pdf',\n };\n }\n if (this.check([0x00, 0x61, 0x73, 0x6D])) {\n return {\n ext: 'wasm',\n mime: 'application/wasm',\n };\n }\n // TIFF, little-endian type\n if (this.check([0x49, 0x49])) {\n const fileType = await this.readTiffHeader(false);\n if (fileType) {\n return fileType;\n }\n }\n // TIFF, big-endian type\n if (this.check([0x4D, 0x4D])) {\n const fileType = await this.readTiffHeader(true);\n if (fileType) {\n return fileType;\n }\n }\n if (this.checkString('MAC ')) {\n return {\n ext: 'ape',\n mime: 'audio/ape',\n };\n }\n // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska\n if (this.check([0x1A, 0x45, 0xDF, 0xA3])) { // Root element: EBML\n async function readField() {\n const msb = await tokenizer.peekNumber(lib$2.UINT8);\n let mask = 0x80;\n let ic = 0; // 0 = A, 1 = B, 2 = C, 3\n // = D\n while ((msb & mask) === 0) {\n ++ic;\n mask >>= 1;\n }\n const id = Buffer.alloc(ic + 1);\n await tokenizer.readBuffer(id);\n return id;\n }\n async function readElement() {\n const id = await readField();\n const lengthField = await readField();\n lengthField[0] ^= 0x80 >> (lengthField.length - 1);\n const nrLength = Math.min(6, lengthField.length); // JavaScript can max read 6 bytes integer\n return {\n id: id.readUIntBE(0, id.length),\n len: lengthField.readUIntBE(lengthField.length - nrLength, nrLength),\n };\n }\n async function readChildren(_level, children) {\n while (children > 0) {\n const element = await readElement();\n if (element.id === 17026) {\n const rawValue = await tokenizer.readToken(new lib$2.StringType(element.len, 'utf-8'));\n return rawValue.replace(/\\00.*$/g, ''); // Return DocType\n }\n await tokenizer.ignore(element.len); // ignore payload\n --children;\n }\n }\n const re = await readElement();\n const docType = await readChildren(1, re.len);\n switch (docType) {\n case 'webm':\n return {\n ext: 'webm',\n mime: 'video/webm',\n };\n case 'matroska':\n return {\n ext: 'mkv',\n mime: 'video/x-matroska',\n };\n default:\n return;\n }\n }\n // RIFF file format which might be AVI, WAV, QCP, etc\n if (this.check([0x52, 0x49, 0x46, 0x46])) {\n if (this.check([0x41, 0x56, 0x49], { offset: 8 })) {\n return {\n ext: 'avi',\n mime: 'video/vnd.avi',\n };\n }\n if (this.check([0x57, 0x41, 0x56, 0x45], { offset: 8 })) {\n return {\n ext: 'wav',\n mime: 'audio/vnd.wave',\n };\n }\n // QLCM, QCP file\n if (this.check([0x51, 0x4C, 0x43, 0x4D], { offset: 8 })) {\n return {\n ext: 'qcp',\n mime: 'audio/qcelp',\n };\n }\n }\n if (this.checkString('SQLi')) {\n return {\n ext: 'sqlite',\n mime: 'application/x-sqlite3',\n };\n }\n if (this.check([0x4E, 0x45, 0x53, 0x1A])) {\n return {\n ext: 'nes',\n mime: 'application/x-nintendo-nes-rom',\n };\n }\n if (this.checkString('Cr24')) {\n return {\n ext: 'crx',\n mime: 'application/x-google-chrome-extension',\n };\n }\n if (this.checkString('MSCF')\n || this.checkString('ISc(')) {\n return {\n ext: 'cab',\n mime: 'application/vnd.ms-cab-compressed',\n };\n }\n if (this.check([0xED, 0xAB, 0xEE, 0xDB])) {\n return {\n ext: 'rpm',\n mime: 'application/x-rpm',\n };\n }\n if (this.check([0xC5, 0xD0, 0xD3, 0xC6])) {\n return {\n ext: 'eps',\n mime: 'application/eps',\n };\n }\n if (this.check([0x28, 0xB5, 0x2F, 0xFD])) {\n return {\n ext: 'zst',\n mime: 'application/zstd',\n };\n }\n if (this.check([0x7F, 0x45, 0x4C, 0x46])) {\n return {\n ext: 'elf',\n mime: 'application/x-elf',\n };\n }\n // -- 5-byte signatures --\n if (this.check([0x4F, 0x54, 0x54, 0x4F, 0x00])) {\n return {\n ext: 'otf',\n mime: 'font/otf',\n };\n }\n if (this.checkString('#!AMR')) {\n return {\n ext: 'amr',\n mime: 'audio/amr',\n };\n }\n if (this.checkString('{\\\\rtf')) {\n return {\n ext: 'rtf',\n mime: 'application/rtf',\n };\n }\n if (this.check([0x46, 0x4C, 0x56, 0x01])) {\n return {\n ext: 'flv',\n mime: 'video/x-flv',\n };\n }\n if (this.checkString('IMPM')) {\n return {\n ext: 'it',\n mime: 'audio/x-it',\n };\n }\n if (this.checkString('-lh0-', { offset: 2 })\n || this.checkString('-lh1-', { offset: 2 })\n || this.checkString('-lh2-', { offset: 2 })\n || this.checkString('-lh3-', { offset: 2 })\n || this.checkString('-lh4-', { offset: 2 })\n || this.checkString('-lh5-', { offset: 2 })\n || this.checkString('-lh6-', { offset: 2 })\n || this.checkString('-lh7-', { offset: 2 })\n || this.checkString('-lzs-', { offset: 2 })\n || this.checkString('-lz4-', { offset: 2 })\n || this.checkString('-lz5-', { offset: 2 })\n || this.checkString('-lhd-', { offset: 2 })) {\n return {\n ext: 'lzh',\n mime: 'application/x-lzh-compressed',\n };\n }\n // MPEG program stream (PS or MPEG-PS)\n if (this.check([0x00, 0x00, 0x01, 0xBA])) {\n // MPEG-PS, MPEG-1 Part 1\n if (this.check([0x21], { offset: 4, mask: [0xF1] })) {\n return {\n ext: 'mpg',\n mime: 'video/MP1S',\n };\n }\n // MPEG-PS, MPEG-2 Part 1\n if (this.check([0x44], { offset: 4, mask: [0xC4] })) {\n return {\n ext: 'mpg',\n mime: 'video/MP2P',\n };\n }\n }\n if (this.checkString('ITSF')) {\n return {\n ext: 'chm',\n mime: 'application/vnd.ms-htmlhelp',\n };\n }\n // -- 6-byte signatures --\n if (this.check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) {\n return {\n ext: 'xz',\n mime: 'application/x-xz',\n };\n }\n if (this.checkString('<?xml ')) {\n return {\n ext: 'xml',\n mime: 'application/xml',\n };\n }\n if (this.check([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])) {\n return {\n ext: '7z',\n mime: 'application/x-7z-compressed',\n };\n }\n if (this.check([0x52, 0x61, 0x72, 0x21, 0x1A, 0x7])\n && (this.buffer[6] === 0x0 || this.buffer[6] === 0x1)) {\n return {\n ext: 'rar',\n mime: 'application/x-rar-compressed',\n };\n }\n if (this.checkString('solid ')) {\n return {\n ext: 'stl',\n mime: 'model/stl',\n };\n }\n // -- 7-byte signatures --\n if (this.checkString('BLENDER')) {\n return {\n ext: 'blend',\n mime: 'application/x-blender',\n };\n }\n if (this.checkString('!<arch>')) {\n await tokenizer.ignore(8);\n const string = await tokenizer.readToken(new lib$2.StringType(13, 'ascii'));\n if (string === 'debian-binary') {\n return {\n ext: 'deb',\n mime: 'application/x-deb',\n };\n }\n return {\n ext: 'ar',\n mime: 'application/x-unix-archive',\n };\n }\n // -- 8-byte signatures --\n if (this.check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) {\n // APNG format (https://wiki.mozilla.org/APNG_Specification)\n // 1. Find the first IDAT (image data) chunk (49 44 41 54)\n // 2. Check if there is an \"acTL\" chunk before the IDAT one (61 63 54 4C)\n // Offset calculated as follows:\n // - 8 bytes: PNG signature\n // - 4 (length) + 4 (chunk type) + 13 (chunk data) + 4 (CRC): IHDR chunk\n await tokenizer.ignore(8); // ignore PNG signature\n async function readChunkHeader() {\n return {\n length: await tokenizer.readToken(lib$2.INT32_BE),\n type: await tokenizer.readToken(new lib$2.StringType(4, 'binary')),\n };\n }\n do {\n const chunk = await readChunkHeader();\n if (chunk.length < 0) {\n return; // Invalid chunk length\n }\n switch (chunk.type) {\n case 'IDAT':\n return {\n ext: 'png',\n mime: 'image/png',\n };\n case 'acTL':\n return {\n ext: 'apng',\n mime: 'image/apng',\n };\n default:\n await tokenizer.ignore(chunk.length + 4); // Ignore chunk-data + CRC\n }\n } while (tokenizer.position + 8 < tokenizer.fileInfo.size);\n return {\n ext: 'png',\n mime: 'image/png',\n };\n }\n if (this.check([0x41, 0x52, 0x52, 0x4F, 0x57, 0x31, 0x00, 0x00])) {\n return {\n ext: 'arrow',\n mime: 'application/x-apache-arrow',\n };\n }\n if (this.check([0x67, 0x6C, 0x54, 0x46, 0x02, 0x00, 0x00, 0x00])) {\n return {\n ext: 'glb',\n mime: 'model/gltf-binary',\n };\n }\n // `mov` format variants\n if (this.check([0x66, 0x72, 0x65, 0x65], { offset: 4 }) // `free`\n || this.check([0x6D, 0x64, 0x61, 0x74], { offset: 4 }) // `mdat` MJPEG\n || this.check([0x6D, 0x6F, 0x6F, 0x76], { offset: 4 }) // `moov`\n || this.check([0x77, 0x69, 0x64, 0x65], { offset: 4 }) // `wide`\n ) {\n return {\n ext: 'mov',\n mime: 'video/quicktime',\n };\n }\n if (this.check([0xEF, 0xBB, 0xBF]) && this.checkString('<?xml', { offset: 3 })) { // UTF-8-BOM\n return {\n ext: 'xml',\n mime: 'application/xml',\n };\n }\n // -- 9-byte signatures --\n if (this.check([0x49, 0x49, 0x52, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x18])) {\n return {\n ext: 'orf',\n mime: 'image/x-olympus-orf',\n };\n }\n if (this.checkString('gimp xcf ')) {\n return {\n ext: 'xcf',\n mime: 'image/x-xcf',\n };\n }\n // -- 12-byte signatures --\n if (this.check([0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8])) {\n return {\n ext: 'rw2',\n mime: 'image/x-panasonic-rw2',\n };\n }\n // ASF_Header_Object first 80 bytes\n if (this.check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) {\n async function readHeader() {\n const guid = Buffer.alloc(16);\n await tokenizer.readBuffer(guid);\n return {\n id: guid,\n size: Number(await tokenizer.readToken(lib$2.UINT64_LE)),\n };\n }\n await tokenizer.ignore(30);\n // Search for header should be in first 1KB of file.\n while (tokenizer.position + 24 < tokenizer.fileInfo.size) {\n const header = await readHeader();\n let payload = header.size - 24;\n if (_check(header.id, [0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65])) {\n // Sync on Stream-Properties-Object (B7DC0791-A9B7-11CF-8EE6-00C00C205365)\n const typeId = Buffer.alloc(16);\n payload -= await tokenizer.readBuffer(typeId);\n if (_check(typeId, [0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) {\n // Found audio:\n return {\n ext: 'asf',\n mime: 'audio/x-ms-asf',\n };\n }\n if (_check(typeId, [0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) {\n // Found video:\n return {\n ext: 'asf',\n mime: 'video/x-ms-asf',\n };\n }\n break;\n }\n await tokenizer.ignore(payload);\n }\n // Default to ASF generic extension\n return {\n ext: 'asf',\n mime: 'application/vnd.ms-asf',\n };\n }\n if (this.check([0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A])) {\n return {\n ext: 'ktx',\n mime: 'image/ktx',\n };\n }\n if ((this.check([0x7E, 0x10, 0x04]) || this.check([0x7E, 0x18, 0x04])) && this.check([0x30, 0x4D, 0x49, 0x45], { offset: 4 })) {\n return {\n ext: 'mie',\n mime: 'application/x-mie',\n };\n }\n if (this.check([0x27, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], { offset: 2 })) {\n return {\n ext: 'shp',\n mime: 'application/x-esri-shape',\n };\n }\n if (this.check([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) {\n // JPEG-2000 family\n await tokenizer.ignore(20);\n const type = await tokenizer.readToken(new lib$2.StringType(4, 'ascii'));\n switch (type) {\n case 'jp2 ':\n return {\n ext: 'jp2',\n mime: 'image/jp2',\n };\n case 'jpx ':\n return {\n ext: 'jpx',\n mime: 'image/jpx',\n };\n case 'jpm ':\n return {\n ext: 'jpm',\n mime: 'image/jpm',\n };\n case 'mjp2':\n return {\n ext: 'mj2',\n mime: 'image/mj2',\n };\n default:\n return;\n }\n }\n if (this.check([0xFF, 0x0A])\n || this.check([0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x4C, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) {\n return {\n ext: 'jxl',\n mime: 'image/jxl',\n };\n }\n if (this.check([0xFE, 0xFF, 0, 60, 0, 63, 0, 120, 0, 109, 0, 108]) // UTF-16-BOM-LE\n || this.check([0xFF, 0xFE, 60, 0, 63, 0, 120, 0, 109, 0, 108, 0]) // UTF-16-BOM-LE\n ) {\n return {\n ext: 'xml',\n mime: 'application/xml',\n };\n }\n // -- Unsafe signatures --\n if (this.check([0x0, 0x0, 0x1, 0xBA])\n || this.check([0x0, 0x0, 0x1, 0xB3])) {\n return {\n ext: 'mpg',\n mime: 'video/mpeg',\n };\n }\n if (this.check([0x00, 0x01, 0x00, 0x00, 0x00])) {\n return {\n ext: 'ttf',\n mime: 'font/ttf',\n };\n }\n if (this.check([0x00, 0x00, 0x01, 0x00])) {\n return {\n ext: 'ico',\n mime: 'image/x-icon',\n };\n }\n if (this.check([0x00, 0x00, 0x02, 0x00])) {\n return {\n ext: 'cur',\n mime: 'image/x-icon',\n };\n }\n if (this.check([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])) {\n // Detected Microsoft Compound File Binary File (MS-CFB) Format.\n return {\n ext: 'cfb',\n mime: 'application/x-cfb',\n };\n }\n // Increase sample size from 12 to 256.\n await tokenizer.peekBuffer(this.buffer, { length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true });\n // -- 15-byte signatures --\n if (this.checkString('BEGIN:')) {\n if (this.checkString('VCARD', { offset: 6 })) {\n return {\n ext: 'vcf',\n mime: 'text/vcard',\n };\n }\n if (this.checkString('VCALENDAR', { offset: 6 })) {\n return {\n ext: 'ics',\n mime: 'text/calendar',\n };\n }\n }\n // `raf` is here just to keep all the raw image detectors together.\n if (this.checkString('FUJIFILMCCD-RAW')) {\n return {\n ext: 'raf',\n mime: 'image/x-fujifilm-raf',\n };\n }\n if (this.checkString('Extended Module:')) {\n return {\n ext: 'xm',\n mime: 'audio/x-xm',\n };\n }\n if (this.checkString('Creative Voice File')) {\n return {\n ext: 'voc',\n mime: 'audio/x-voc',\n };\n }\n if (this.check([0x04, 0x00, 0x00, 0x00]) && this.buffer.length >= 16) { // Rough & quick check Pickle/ASAR\n const jsonSize = this.buffer.readUInt32LE(12);\n if (jsonSize > 12 && this.buffer.length >= jsonSize + 16) {\n try {\n const header = this.buffer.slice(16, jsonSize + 16).toString();\n const json = JSON.parse(header);\n // Check if Pickle is ASAR\n if (json.files) { // Final check, assuring Pickle/ASAR format\n return {\n ext: 'asar',\n mime: 'application/x-asar',\n };\n }\n }\n catch (_a) { }\n }\n }\n if (this.check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) {\n return {\n ext: 'mxf',\n mime: 'application/mxf',\n };\n }\n if (this.checkString('SCRM', { offset: 44 })) {\n return {\n ext: 's3m',\n mime: 'audio/x-s3m',\n };\n }\n // Raw MPEG-2 transport stream (188-byte packets)\n if (this.check([0x47]) && this.check([0x47], { offset: 188 })) {\n return {\n ext: 'mts',\n mime: 'video/mp2t',\n };\n }\n // Blu-ray Disc Audio-Video (BDAV) MPEG-2 transport stream has 4-byte TP_extra_header before each 188-byte packet\n if (this.check([0x47], { offset: 4 }) && this.check([0x47], { offset: 196 })) {\n return {\n ext: 'mts',\n mime: 'video/mp2t',\n };\n }\n if (this.check([0x42, 0x4F, 0x4F, 0x4B, 0x4D, 0x4F, 0x42, 0x49], { offset: 60 })) {\n return {\n ext: 'mobi',\n mime: 'application/x-mobipocket-ebook',\n };\n }\n if (this.check([0x44, 0x49, 0x43, 0x4D], { offset: 128 })) {\n return {\n ext: 'dcm',\n mime: 'application/dicom',\n };\n }\n if (this.check([0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46])) {\n return {\n ext: 'lnk',\n mime: 'application/x.ms.shortcut', // Invented by us\n };\n }\n if (this.check([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00])) {\n return {\n ext: 'alias',\n mime: 'application/x.apple.alias', // Invented by us\n };\n }\n if (this.check([0x4C, 0x50], { offset: 34 })\n && (this.check([0x00, 0x00, 0x01], { offset: 8 })\n || this.check([0x01, 0x00, 0x02], { offset: 8 })\n || this.check([0x02, 0x00, 0x02], { offset: 8 }))) {\n return {\n ext: 'eot',\n mime: 'application/vnd.ms-fontobject',\n };\n }\n if (this.check([0x06, 0x06, 0xED, 0xF5, 0xD8, 0x1D, 0x46, 0xE5, 0xBD, 0x31, 0xEF, 0xE7, 0xFE, 0x74, 0xB7, 0x1D])) {\n return {\n ext: 'indd',\n mime: 'application/x-indesign',\n };\n }\n // Increase sample size from 256 to 512\n await tokenizer.peekBuffer(this.buffer, { length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true });\n // Requires a buffer size of 512 bytes\n if (tarHeaderChecksumMatches(this.buffer)) {\n return {\n ext: 'tar',\n mime: 'application/x-tar',\n };\n }\n if (this.check([0xFF, 0xFE, 0xFF, 0x0E, 0x53, 0x00, 0x6B, 0x00, 0x65, 0x00, 0x74, 0x00, 0x63, 0x00, 0x68, 0x00, 0x55, 0x00, 0x70, 0x00, 0x20, 0x00, 0x4D, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6C, 0x00])) {\n return {\n ext: 'skp',\n mime: 'application/vnd.sketchup.skp',\n };\n }\n if (this.checkString('-----BEGIN PGP MESSAGE-----')) {\n return {\n ext: 'pgp',\n mime: 'application/pgp-encrypted',\n };\n }\n // Check MPEG 1 or 2 Layer 3 header, or 'layer 0' for ADTS (MPEG sync-word 0xFFE)\n if (this.buffer.length >= 2 && this.check([0xFF, 0xE0], { offset: 0, mask: [0xFF, 0xE0] })) {\n if (this.check([0x10], { offset: 1, mask: [0x16] })) {\n // Check for (ADTS) MPEG-2\n if (this.check([0x08], { offset: 1, mask: [0x08] })) {\n return {\n ext: 'aac',\n mime: 'audio/aac',\n };\n }\n // Must be (ADTS) MPEG-4\n return {\n ext: 'aac',\n mime: 'audio/aac',\n };\n }\n // MPEG 1 or 2 Layer 3 header\n // Check for MPEG layer 3\n if (this.check([0x02], { offset: 1, mask: [0x06] })) {\n return {\n ext: 'mp3',\n mime: 'audio/mpeg',\n };\n }\n // Check for MPEG layer 2\n if (this.check([0x04], { offset: 1, mask: [0x06] })) {\n return {\n ext: 'mp2',\n mime: 'audio/mpeg',\n };\n }\n // Check for MPEG layer 1\n if (this.check([0x06], { offset: 1, mask: [0x06] })) {\n return {\n ext: 'mp1',\n mime: 'audio/mpeg',\n };\n }\n }\n }\n}\n\nexports.YC = YC;\nexports.YL = YL;\nexports.YR = YR;\nexports.YS = YS;\nexports.calTimeLen = calTimeLen;\nexports.checkFileType = checkFileType;\nexports.dateFormat = dateFormat;\nexports.debounce = debounce;\nexports.expandMultiple = expandMultiple;\nexports.exportExcel = exportExcel;\nexports.fenToyuan = fenToyuan;\nexports.fileTypeFromTokenizer = fileTypeFromTokenizer;\nexports.formatData = formatData;\nexports.formatTime = formatTime;\nexports.gTokg = gTokg;\nexports.getBiteLen = getBiteLen;\nexports.getDate = getDate;\nexports.getEnv = getEnv;\nexports.getHost = getHost;\nexports.getImgUrl = getImgUrl;\nexports.getMD5 = getMD5;\nexports.getMock = getMock;\nexports.getQueries = getQueries;\nexports.getQuery = getQuery;\nexports.getQueryName = getQueryName;\nexports.getQueryOfNextPageContext = getQueryOfNextPageContext;\nexports.getRoutes = getRoutes;\nexports.humpToLine = humpToLine;\nexports.isChinaMobile = isChinaMobile;\nexports.isDate = isDate;\nexports.isURL = isURL;\nexports.joinPath = joinPath;\nexports.kgTog = kgTog;\nexports.lineToHump = lineToHump;\nexports.loadScript = loadScript;\nexports.maxSubstrWord = maxSubstrWord;\nexports.niceNumShow = niceNumShow;\nexports.numberToThousand = numberToThousand;\nexports.omadownload = omadownload;\nexports.parseParams = parseParams;\nexports.pickAll = pickAll;\nexports.querystring = querystring;\nexports.reduceMultiple = reduceMultiple;\nexports.reduceParams = reduceParams;\nexports.remove = remove;\nexports.round = round;\nexports.slicePath = slicePath;\nexports.split = split;\nexports.strPad = strPad;\nexports.sum = sum;\nexports.throttle = throttle;\nexports.timeFlow = timeFlow;\nexports.toDate = toDate;\nexports.transformShortNum = transformShortNum;\nexports.translateMapToArray = translateMapToArray;\nexports.treeFind = treeFind;\nexports.treePaths = treePaths;\nexports.treeReduce = treeReduce;\nexports.trimAll = trimAll;\nexports.trimParams = trimParams;\nexports.unLoadScript = unLoadScript;\nexports.uuidv4 = uuidv4;\nexports.wanToyuan = wanToyuan;\nexports.yuanTofen = yuanTofen;\nexports.yuanTowan = yuanTowan;\n//# sourceMappingURL=ywfe-utils.esm.js.map\n","interface userInput {\n data?: object;\n}\nfunction JSON2String({ input }) {\n const { data = {} } = input;\n try {\n return \"```json\" + JSON.stringify(data) + \"json```\";\n } catch (error) {\n return \"```json\" + JSON.stringify({}) + \"json```\";\n }\n}\n\nexport default JSON2String","// Ctrl-S保存代码\nimport { querystring } from \"@ywfe/utils\";\ninterface RequestOptions {\n url: string;\n method?: string;\n params?: any;\n}\nasync function request({ input }: { input: RequestOptions }) {\n const method = input.method || \"GET\";\n const basePathMap = new Map([\n [\"prod\", \"https://gateway.ywwl.com\"],\n [\"test\", \"https://test-gateway.ywwl.com\"],\n [\"test2\", \"https://test2-gateway.ywwl.com\"],\n [\"dev\", \"https://dev-gateway.ywwl.com\"],\n ]);\n const getBasePath = () => {\n const env = \"{{env}}\";\n return basePathMap.get(env);\n };\n const isValidURL = (url) => {\n var pattern = new RegExp(\n \"^(https?:\\\\/\\\\/)?\" + // protocol\n \"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|\" + // domain name\n \"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + // OR ip (v4) address\n \"(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*\" + // port and path\n \"(\\\\?[;&a-z\\\\d%_.~+=-]*)?\" + // query string\n \"(\\\\#[-a-z\\\\d_]*)?$\",\n \"i\"\n ); // fragment locator\n return !!pattern.test(url);\n };\n const prefix = getBasePath();\n let requestUrl = isValidURL(input.url) ? input.url : `${prefix}${input.url}`;\n const fetchOption: { [key: string]: any } = {\n method: method,\n headers: {\n \"Content-type\": \"application/json\",\n \"x-token\": \"{{token}}\",\n },\n };\n if (method.toUpperCase() === \"POST\") {\n fetchOption.body = JSON.stringify(input.params);\n } else if (method.toUpperCase() === \"GET\") {\n requestUrl = `${requestUrl}?${querystring.stringify(input.params || {})}`;\n }\n const response = await fetch(requestUrl, fetchOption);\n if (!response.ok) {\n const message = `An error has occured: ${response.status}`;\n return { success: false, message };\n }\n const result = await response.json();\n return result;\n}\n\nexport default request"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","this","n","v","op","TypeError","call","pop","length","push","SuppressedError","global$1","global","self","window","lookup","revLookup","Arr","Uint8Array","Array","inited","init","code","i","charCodeAt","encodeChunk","uint8","start","end","tmp","num","output","join","fromByteArray","len","extraBytes","parts","maxChunkLength","len2","read","buffer","offset","isLE","mLen","nBytes","m","eLen","eMax","eBias","nBits","d","s","NaN","Infinity","Math","pow","write","c","rt","abs","isNaN","floor","log","LN2","toString","isArray","arr","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","__proto__","prototype","arg","encodingOrOffset","Error","allocUnsafe","from","ArrayBuffer","array","byteOffset","byteLength","undefined","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","slice","fromString","obj","internalIsBuffer","checked","copy","val","type","data","fromObject","assertSize","size","b","_isBuffer","isView","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","dir","arrayIndexOf","indexOf","lastIndexOf","indexSize","arrLength","valLength","String","buf","readUInt16BE","foundIndex","found","j","hexWrite","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","min","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","poolSize","_augment","alloc","fill","allocUnsafeSlow","isBuffer","isFastBuffer","readFloatLE","isSlowBuffer","compare","a","x","concat","list","pos","swap16","swap32","swap64","arguments","equals","inspect","match","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","ret","out","toHex","bytes","checkOffset","ext","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","subarray","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","set","INVALID_BASE64_RE","leadSurrogate","b64","l","placeHolders","L","toByteArray","trim","replace","stringtrim","base64clean","src","dst","constructor","_interopDefaultLegacy","default","Object","defineProperty","exports","require$$0__default","require$$1","_isPlaceholder","_curry1","fn","f1","_curry2","f2","_b","_a","_concat","set1","set2","idx","len1","_arity","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","_curryN","received","combined","argsIdx","left","combinedIdx","curryN$1","_curry3","f3","_c","_isArray","_dispatchable","methodNames","xf","args","_isTransformer","transducer","_xfBase","_map","functor","_isString","_isArrayLike$1","nodeType","hasOwnProperty","XWrap","acc","bind","thisObj","bind$1","_iterableReduce","iter","_methodReduce","methodName","symIterator","_reduce","_xwrap","_arrayReduce","reduce","XMap","input","_xmap$1","_has","prop","toString$2","_isArguments","_isArguments$1","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","item","keys","nIdx","ks","checkArgsLength","keys$1","map","key","map$1","_isInteger","isInteger","nth$1","charAt","paths$1","pathsArray","paths","p","path$1","pathAr","prop$1","reduce$1","ap$1","applyF","applyX","ap","values$1","props","vals","isNil$1","_isFunction","liftN","arity","lifted","liftN$1","lift$1","curry$1","_makeFlat","recursive","flatt","jlen","ilen","type$1","complement$1","_pipe","_checkForMethod","methodname","slice$1","fromIndex","toIndex","tail$1","pipe","reverse$1","split","reverse","compose","_identity","identity$1","_arrayFromIterator","_includesWith","pred","_objectIs$1","is","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_equals","aItem","typeA","valueOf","name","message","source","ignoreCase","multiline","sticky","unicode","entries","values","keysA","extendedStackA","extendedStackB","equals$1","_includes","inf","_indexOf","_quote","pad","_toISOString$1","Date","toISOString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","_isObject","XFilter","filter$1","filterable","_filter","reject$1","_toString","seen","recur","xs","mapPairs","k","sort","test","repr","toString$1","concat$1","hasOrAdd","shouldAdd","prevSize","_items","_nativeSet","add","has","bIdx","_Set$1","_Set","Set","empty","empty$1","XFind","find$1","flatten$1","fromPairs$1","pairs","hasPath$1","_path","uniq$1","appliedItem","uniqBy$1","_objectAssign$1","assign","nextKey","invoker","method","invoker$1","is$1","Ctor","isEmpty$1","mergeAll$1","omit","names","index","omit$1","propEq$1","replace$1","regex","replacement","split$2","ws","trim$1","beginRx","RegExp","endRx","union$1","trimAll","separator","YS","sessionStorage","setItem","get","getItem","remove","removeItem","clear","YL","localStorage","YC","exdays","setTime","getTime","expires","toUTCString","document","cookie","escape","ca","substring","once","node","options","addEventListener","listener","event","removeEventListener","allowLists","isDate","date","getDate","dateStr","dateFormat","format","time","o","YYYY","getFullYear","YY","MM","getMonth","M","DD","D","HH","getHours","H","hh","h","mm","getMinutes","ss","getSeconds","w","getDay","strPad","sourceStr","charStr","retStr","oneDay$1","oneHour$1","oneMinute$1","formatTime","allowEmpty","timelen","parseFloat","days","hours","minutes","seconds","oneDay","oneHour","oneMinute","treeReduce","childKey","Tree","reducerFn","hasChildren","find","findFn","setPathToDefaultMenu","menus","defaultOpenMenus","defaultSelectedMenus","defaultMenu","openMenus","children","defaultPath","setFistChildToDefaultMenu","transformShortNum","decimal","addUnit","retInt","formatValue","isNegativeNumber","getEnv","getMock","parse$1","decodeURI","querystring","freeze","parse","stringify","query","URLSearchParams","MAX_DP","MAX_POWER","NAME","INVALID","INVALID_DP","INVALID_RM","DIV_BY_ZERO","UNDEFINED","NUMERIC","round$1","dp","rm","more","xc","unshift","stringify$1","id","Big","z","RM","NE","PE","cmp","isneg","yc","div","DP","bl","bt","ri","bz","ai","al","r","rl","q","qc","qi","shift","gt","gte","lt","lte","minus","xlty","plus","xe","ye","mod","ygtx","times","one","round","sqrt","half","toExponential","toPrecision","sd","_Big_","nl","search","version","formatDecimalNoRound","smallToBig","translateUnit","params","newNumber","decimalNumber","bigToSmall","getClass","matchResult","exec","trimParams","object","forEach","newParams","newValue","getRandomValues","rnds8","rng","crypto","msCrypto","REGEX","byteToHex","uuid","validate","v4","rnds","random","ERROR","HEX_CHARS","EXTRA","buffer8","blocks","Uint32Array","Md5","h0","h1","h2","h3","hBytes","finalized","hashed","first","update","notString","lastByteIndex","hash","finalize","bc","da","hex","md5","isObject","debounce","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","useRAF","requestAnimationFrame","invokeFunc","startTimer","pendingFunc","cancelAnimationFrame","setTimeout","shouldInvoke","timeSinceLastCall","timerExpired","now","trailingEdge","timeSinceLastInvoke","timeWaiting","remainingWait","debounced","isInvoking","leadingEdge","cancel","clearTimeout","cancelTimer","flush","pending","lib$2","ieee754","AnsiStringType","StringType","BufferType","Uint8ArrayType","IgnoreType","Float80_LE","Float80_BE","Float64_LE","Float64_BE","Float32_LE","Float32_BE","Float16_LE","Float16_BE","INT64_BE","UINT64_BE","INT64_LE","UINT64_LE","INT32_LE","INT32_BE","INT24_BE","INT24_LE","INT16_LE","INT16_BE","INT8","UINT32_BE","UINT32_LE","UINT24_BE","UINT24_LE","UINT16_BE","UINT16_LE","UINT8","ieee754$1","dv","DataView","getUint8","put","setUint8","getUint16","setUint16","dataView","getUint32","setUint32","getInt8","setInt8","getInt16","setInt16","unsigned","getInt32","setInt32","getBigUint64","setBigUint64","getBigInt64","setBigInt64","getFloat32","setFloat32","getFloat64","setFloat64","off","uint8Array","decode","until","codePointToString","singleByteDecoder","inRange","cp","bite","windows1252","lib$1","FsPromise","readFile","writeFileSync","writeFile","open","close","stat","createReadStream","pathExists","fs$1","existsSync","async","path","err","stats","fd","mode","position","bytesRead","_buffer","core","ReadStreamTokenizer$1","AbstractTokenizer$1","lib","EndOfFileStream","EndOfStreamError","defaultMessages","super","StreamReader","Deferred$1","Deferred","promise","EndOfFileStream_1","Deferred_1","EndOfFileStream_2","enumerable","deferred","endOfStream","peekQueue","peek","peekData","lenCopy","reqLen","chunkLen","readFromStream","readBuffer","request","readDeferred","StreamReader_1","AbstractTokenizer","peek_readable_1$3","fileInfo","numBuffer","readToken","token","peekToken","peekBuffer","readNumber","peekNumber","ignore","bytesLeft","normalizeOptions","mayBeLess","ReadStreamTokenizer","AbstractTokenizer_1$2","peek_readable_1$2","stream","streamReader","getFileInfo","normOptions","skipBytes","skipBuffer","bufSize","totBytesRead","BufferTokenizer$1","BufferTokenizer","peek_readable_1$1","AbstractTokenizer_1$1","bytes2read","fromBuffer","fromStream","ReadStreamTokenizer_1","BufferTokenizer_1","peek_readable_1","FileTokenizer$1","fromFile","FileTokenizer","AbstractTokenizer_1","fs","sourceFilePath","isFile","core$1","FileTokenizer_1","core_1","uint32SyncSafeToken","fileTypeFromTokenizer","tokenizer","FileTypeParser","error","_check","headers","header","mask","check","checkString","character","readTiffTag","bigEndian","tagId","mime","readTiffIFD","numberOfTags","fileType","readTiffHeader","ifdOffset","MAX_SAFE_INTEGER","id3HeaderLength","zipHeader","compressedSize","uncompressedSize","filenameLength","extraFieldLength","filename","endsWith","startsWith","nextHeaderIndex","brandMajor","maxBufferSize","readField","msb","ic","readElement","lengthField","nrLength","readChildren","_level","element","re","readChunkHeader","chunk","readHeader","guid","payload","typeId","jsonSize","JSON","files","readSum","sum","tarHeaderChecksumMatches","YR","email","phone","fixedPhone","qq","zipcode","IDCard","chinese","chineseNumberLine","chineseNumberNoLine","integerZ","integerF","number","numberNoMoreThan1","numberNoMoreThan2","numberNoMoreThan3","numberNoMoreThan4","greaterZero1","greaterZero2","greaterZero3","greaterZero4","zeroTo100","zeroTo1000","calTimeLen","startTime","endTime","unit","fixed","unitTime","interval","checkFileType","file","callback","reader","FileReader","readAsArrayBuffer","onload","buffers","suffix","toLocaleLowerCase","expandMultiple","multiple","exportExcel","url","downloadUrl","addQueries","console","aDom","createElement","setAttribute","getElementById","appendChild","click","removeChild","fenToyuan","formatData","config","afterUnit","isAbs","beforeUnit","gTokg","pararms","getBiteLen","getHost","projectId","yapiProjectid","isMock","configs","env","basePath","API_BASE_URL","loginPath","APPLICATION_URL","getImgUrl","img","width","height","defaultImg","reg","retImg","getMD5","md5Key","getQueries","location","getQuery","searchParams","href","decodeURIComponent","getQueryName","urlStr","querys","strs","oneStr","getQueryOfNextPageContext","ctx","pathname","asPath","routes","newQuery","getRoutes","permissionList","routerConfig","defaultConfig","permissions","resetData","currentItem","param","resourceId","meta","title","icon","component","hidden","origion_url","primaryDefaultMenu","secondaryDefaultMenu","resourceParentId","btns","urls","childMenus","child","humpToLine","isChinaMobile","isURL","joinPath","kgTog","lineToHump","_all","letter","toUpperCase","loadScript","umd","progectId","attrs","scriptNode","readyState","onreadystatechange","onSuccess","onError","listen","attrName","js","maxSubstrWord","isSpot","niceNumShow","spiltPoint","text","resultList","characterType","numberToThousand","$1","omadownload","uint8Msg","uint8String","warn","URL","createObjectURL","Blob","link","style","display","parseParams","pickAll","reduceMultiple","reduceParams","FormData","predicate","indexes","lastIndex","previous","splice","basePullAt","slicePath","api","resultSum","_sum","throttle","timeFlow","startDate","flowTime","toDate","translateMapToArray","useAllSelect","allSelectLabel","allSelectValue","treeFind","treePaths","preNode","_preNode","unLoadScript","uuidv4","wanToyuan","yuanTofen","yuanTowan","basePathMap","Map","isValidURL","prefix","getBasePath","requestUrl","fetchOption","fetch","response","ok","json","success","status"],"mappings":"+OAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OACtE,GACA,CAEO,SAASO,EAAYjB,EAASkB,GACjC,IAAsGC,EAAGC,EAAGC,EAAGC,EAA3GC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAW,EAAPJ,EAAE,GAAQ,MAAMA,EAAE,GAAI,OAAOA,EAAE,EAAK,EAAEK,KAAM,GAAIC,IAAK,IAChG,OAAOL,EAAI,CAAEZ,KAAMkB,EAAK,GAAIC,MAASD,EAAK,GAAIE,OAAUF,EAAK,IAAwB,mBAAXG,SAA0BT,EAAES,OAAOC,UAAY,WAAa,OAAOC,IAAO,GAAGX,EACvJ,SAASM,EAAKM,GAAK,OAAO,SAAUC,GAAK,OACzC,SAAcC,GACV,GAAIjB,EAAG,MAAM,IAAIkB,UAAU,mCAC3B,KAAOf,IAAMA,EAAI,EAAGc,EAAG,KAAOb,EAAI,IAAKA,OACnC,GAAIJ,EAAI,EA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