Last active
November 20, 2024 16:20
-
-
Save a7madgamal/0bccd902a2f9fe6ad8513493ffb8abf7 to your computer and use it in GitHub Desktop.
Tasker Gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var __create = Object.create; | |
var __defProp = Object.defineProperty; | |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
var __getOwnPropNames = Object.getOwnPropertyNames; | |
var __getProtoOf = Object.getPrototypeOf; | |
var __hasOwnProp = Object.prototype.hasOwnProperty; | |
var __esm = (fn, res) => | |
function __init() { | |
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])((fn = 0))), res; | |
}; | |
var __commonJS = (cb, mod) => | |
function __require() { | |
return ( | |
mod || | |
(0, cb[__getOwnPropNames(cb)[0]])((mod = {exports: {}}).exports, mod), | |
mod.exports | |
); | |
}; | |
var __export = (target, all3) => { | |
for (var name in all3) | |
__defProp(target, name, {get: all3[name], enumerable: true}); | |
}; | |
var __copyProps = (to, from, except, desc) => { | |
if ((from && typeof from === "object") || typeof from === "function") { | |
for (let key of __getOwnPropNames(from)) | |
if (!__hasOwnProp.call(to, key) && key !== except) | |
__defProp(to, key, { | |
get: () => from[key], | |
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable, | |
}); | |
} | |
return to; | |
}; | |
var __toESM = (mod, isNodeMode, target) => ( | |
(target = mod != null ? __create(__getProtoOf(mod)) : {}), | |
__copyProps( | |
// If the importer is in node compatibility mode or this is not an ESM | |
// file that has been converted to a CommonJS file using a Babel- | |
// compatible transform (i.e. "__esModule" has not been set), then set | |
// "default" to the CommonJS "module.exports" for node compatibility. | |
isNodeMode || !mod || !mod.__esModule | |
? __defProp(target, "default", {value: mod, enumerable: true}) | |
: target, | |
mod | |
) | |
); | |
var __toCommonJS = (mod) => | |
__copyProps(__defProp({}, "__esModule", {value: true}), mod); | |
// node_modules/runtypes/lib/reflect.js | |
var require_reflect = __commonJS({ | |
"node_modules/runtypes/lib/reflect.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
}, | |
}); | |
// node_modules/runtypes/lib/result.js | |
var require_result = __commonJS({ | |
"node_modules/runtypes/lib/result.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Failcode = void 0; | |
exports2.Failcode = { | |
/** The type of the received primitive value is incompatible with expected one. */ | |
TYPE_INCORRECT: "TYPE_INCORRECT", | |
/** The received primitive value is incorrect. */ | |
VALUE_INCORRECT: "VALUE_INCORRECT", | |
/** The key of the property is incorrect. */ | |
KEY_INCORRECT: "KEY_INCORRECT", | |
/** One or more elements or properties of the received object are incorrect. */ | |
CONTENT_INCORRECT: "CONTENT_INCORRECT", | |
/** One or more arguments passed to the function is incorrect. */ | |
ARGUMENT_INCORRECT: "ARGUMENT_INCORRECT", | |
/** The value returned by the function is incorrect. */ | |
RETURN_INCORRECT: "RETURN_INCORRECT", | |
/** The received value does not fulfill the constraint. */ | |
CONSTRAINT_FAILED: "CONSTRAINT_FAILED", | |
/** The property must be present but missing. */ | |
PROPERTY_MISSING: "PROPERTY_MISSING", | |
/** The property must not be present but present. */ | |
PROPERTY_PRESENT: "PROPERTY_PRESENT", | |
/** The value must not be present but present. */ | |
NOTHING_EXPECTED: "NOTHING_EXPECTED", | |
}; | |
}, | |
}); | |
// node_modules/runtypes/lib/errors.js | |
var require_errors = __commonJS({ | |
"node_modules/runtypes/lib/errors.js"(exports2) { | |
"use strict"; | |
var __extends2 = | |
(exports2 && exports2.__extends) || | |
/* @__PURE__ */ (function () { | |
var extendStatics2 = function (d, b) { | |
extendStatics2 = | |
Object.setPrototypeOf || | |
({__proto__: []} instanceof Array && | |
function (d2, b2) { | |
d2.__proto__ = b2; | |
}) || | |
function (d2, b2) { | |
for (var p in b2) | |
if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; | |
}; | |
return extendStatics2(d, b); | |
}; | |
return function (d, b) { | |
if (typeof b !== "function" && b !== null) | |
throw new TypeError( | |
"Class extends value " + | |
String(b) + | |
" is not a constructor or null" | |
); | |
extendStatics2(d, b); | |
function __() { | |
this.constructor = d; | |
} | |
d.prototype = | |
b === null | |
? Object.create(b) | |
: ((__.prototype = b.prototype), new __()); | |
}; | |
})(); | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.ValidationError = void 0; | |
var ValidationError = | |
/** @class */ | |
(function (_super) { | |
__extends2(ValidationError2, _super); | |
function ValidationError2(failure) { | |
var _this = _super.call(this, failure.message) || this; | |
_this.name = "ValidationError"; | |
_this.code = failure.code; | |
if (failure.details !== void 0) _this.details = failure.details; | |
Object.setPrototypeOf(_this, ValidationError2.prototype); | |
return _this; | |
} | |
return ValidationError2; | |
})(Error); | |
exports2.ValidationError = ValidationError; | |
}, | |
}); | |
// node_modules/runtypes/lib/show.js | |
var require_show = __commonJS({ | |
"node_modules/runtypes/lib/show.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
var showStringified = function (circular) { | |
return function (refl) { | |
switch (refl.tag) { | |
case "literal": | |
return '"'.concat(String(refl.value), '"'); | |
case "string": | |
return "string"; | |
case "brand": | |
return refl.brand; | |
case "constraint": | |
return refl.name || showStringified(circular)(refl.underlying); | |
case "union": | |
return refl.alternatives.map(showStringified(circular)).join(" | "); | |
case "intersect": | |
return refl.intersectees.map(showStringified(circular)).join(" & "); | |
default: | |
break; | |
} | |
return "`${".concat(show(false, circular)(refl), "}`"); | |
}; | |
}; | |
var showEmbedded = function (circular) { | |
return function (refl) { | |
switch (refl.tag) { | |
case "literal": | |
return String(refl.value); | |
case "brand": | |
return "${".concat(refl.brand, "}"); | |
case "constraint": | |
return refl.name | |
? "${".concat(refl.name, "}") | |
: showEmbedded(circular)(refl.underlying); | |
case "union": | |
if (refl.alternatives.length === 1) { | |
var inner = refl.alternatives[0]; | |
return showEmbedded(circular)(inner.reflect); | |
} | |
break; | |
case "intersect": | |
if (refl.intersectees.length === 1) { | |
var inner = refl.intersectees[0]; | |
return showEmbedded(circular)(inner.reflect); | |
} | |
break; | |
default: | |
break; | |
} | |
return "${".concat(show(false, circular)(refl), "}"); | |
}; | |
}; | |
var show = function (needsParens, circular) { | |
return function (refl) { | |
var parenthesize = function (s) { | |
return needsParens ? "(".concat(s, ")") : s; | |
}; | |
if (circular.has(refl)) | |
return parenthesize("CIRCULAR ".concat(refl.tag)); | |
else circular.add(refl); | |
try { | |
switch (refl.tag) { | |
// Primitive types | |
case "unknown": | |
case "never": | |
case "void": | |
case "boolean": | |
case "number": | |
case "bigint": | |
case "string": | |
case "symbol": | |
case "function": | |
return refl.tag; | |
case "literal": { | |
var value = refl.value; | |
return typeof value === "string" | |
? '"'.concat(value, '"') | |
: String(value); | |
} | |
// Complex types | |
case "template": { | |
if (refl.strings.length === 0) return '""'; | |
else if (refl.strings.length === 1) | |
return '"'.concat(refl.strings[0], '"'); | |
else if (refl.strings.length === 2) { | |
if ( | |
refl.strings.every(function (string) { | |
return string === ""; | |
}) | |
) { | |
var runtype = refl.runtypes[0]; | |
return showStringified(circular)(runtype.reflect); | |
} | |
} | |
var backtick_1 = false; | |
var inner = refl.strings.reduce(function (inner2, string, i) { | |
var prefix = inner2 + string; | |
var runtype2 = refl.runtypes[i]; | |
if (runtype2) { | |
var suffix = showEmbedded(circular)(runtype2.reflect); | |
if (!backtick_1 && suffix.startsWith("$")) backtick_1 = true; | |
return prefix + suffix; | |
} else return prefix; | |
}, ""); | |
return backtick_1 | |
? "`".concat(inner, "`") | |
: '"'.concat(inner, '"'); | |
} | |
case "array": | |
return "" | |
.concat(readonlyTag(refl)) | |
.concat(show(true, circular)(refl.element), "[]"); | |
case "dictionary": | |
return "{ [_: " | |
.concat(refl.key, "]: ") | |
.concat(show(false, circular)(refl.value), " }"); | |
case "record": { | |
var keys = Object.keys(refl.fields); | |
return keys.length | |
? "{ ".concat( | |
keys | |
.map(function (k) { | |
return "" | |
.concat(readonlyTag(refl)) | |
.concat(k) | |
.concat(partialTag(refl, k), ": ") | |
.concat( | |
refl.fields[k].tag === "optional" | |
? show(false, circular)(refl.fields[k].underlying) | |
: show(false, circular)(refl.fields[k]), | |
";" | |
); | |
}) | |
.join(" "), | |
" }" | |
) | |
: "{}"; | |
} | |
case "tuple": | |
return "[".concat( | |
refl.components.map(show(false, circular)).join(", "), | |
"]" | |
); | |
case "union": | |
return parenthesize( | |
"".concat( | |
refl.alternatives.map(show(true, circular)).join(" | ") | |
) | |
); | |
case "intersect": | |
return parenthesize( | |
"".concat( | |
refl.intersectees.map(show(true, circular)).join(" & ") | |
) | |
); | |
case "optional": | |
return ( | |
show(needsParens, circular)(refl.underlying) + " | undefined" | |
); | |
case "constraint": | |
return refl.name || show(needsParens, circular)(refl.underlying); | |
case "instanceof": | |
return refl.ctor.name; | |
case "brand": | |
return show(needsParens, circular)(refl.entity); | |
} | |
} finally { | |
circular.delete(refl); | |
} | |
throw Error("impossible"); | |
}; | |
}; | |
exports2.default = show(false, /* @__PURE__ */ new Set()); | |
function partialTag(_a, key) { | |
var isPartial = _a.isPartial, | |
fields = _a.fields; | |
return isPartial || (key !== void 0 && fields[key].tag === "optional") | |
? "?" | |
: ""; | |
} | |
function readonlyTag(_a) { | |
var isReadonly = _a.isReadonly; | |
return isReadonly ? "readonly " : ""; | |
} | |
}, | |
}); | |
// node_modules/runtypes/lib/util.js | |
var require_util = __commonJS({ | |
"node_modules/runtypes/lib/util.js"(exports2) { | |
"use strict"; | |
var __assign2 = | |
(exports2 && exports2.__assign) || | |
function () { | |
__assign2 = | |
Object.assign || | |
function (t) { | |
for (var s, i = 1, n = arguments.length; i < n; i++) { | |
s = arguments[i]; | |
for (var p in s) | |
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | |
} | |
return t; | |
}; | |
return __assign2.apply(this, arguments); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.FAILURE = | |
exports2.SUCCESS = | |
exports2.enumerableKeysOf = | |
exports2.typeOf = | |
exports2.hasKey = | |
void 0; | |
var result_1 = require_result(); | |
var show_1 = require_show(); | |
function hasKey(key, object) { | |
return typeof object === "object" && object !== null && key in object; | |
} | |
exports2.hasKey = hasKey; | |
var typeOf = function (value) { | |
var _a, _b, _c; | |
return typeof value === "object" | |
? value === null | |
? "null" | |
: Array.isArray(value) | |
? "array" | |
: ((_a = value.constructor) === null || _a === void 0 | |
? void 0 | |
: _a.name) === "Object" | |
? "object" | |
: (_c = | |
(_b = value.constructor) === null || _b === void 0 | |
? void 0 | |
: _b.name) !== null && _c !== void 0 | |
? _c | |
: typeof value | |
: typeof value; | |
}; | |
exports2.typeOf = typeOf; | |
var enumerableKeysOf = function (object) { | |
return typeof object === "object" && object !== null | |
? // Objects with a null prototype may not have `propertyIsEnumerable` | |
Reflect.ownKeys(object).filter(function (key) { | |
var _a, _b; | |
return (_b = | |
(_a = object.propertyIsEnumerable) === null || _a === void 0 | |
? void 0 | |
: _a.call(object, key)) !== null && _b !== void 0 | |
? _b | |
: true; | |
}) | |
: []; | |
}; | |
exports2.enumerableKeysOf = enumerableKeysOf; | |
function SUCCESS(value) { | |
return {success: true, value}; | |
} | |
exports2.SUCCESS = SUCCESS; | |
exports2.FAILURE = Object.assign( | |
function (code, message, details) { | |
return __assign2( | |
{success: false, code, message}, | |
details ? {details} : {} | |
); | |
}, | |
{ | |
TYPE_INCORRECT: function (self2, value) { | |
var message = "Expected " | |
.concat( | |
self2.tag === "template" | |
? "string ".concat((0, show_1.default)(self2)) | |
: (0, show_1.default)(self2), | |
", but was " | |
) | |
.concat((0, exports2.typeOf)(value)); | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.TYPE_INCORRECT, | |
message | |
); | |
}, | |
VALUE_INCORRECT: function (name, expected, received) { | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.VALUE_INCORRECT, | |
"Expected " | |
.concat(name, " ") | |
.concat(String(expected), ", but was ") | |
.concat(String(received)) | |
); | |
}, | |
KEY_INCORRECT: function (self2, expected, value) { | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.KEY_INCORRECT, | |
"Expected " | |
.concat((0, show_1.default)(self2), " key to be ") | |
.concat((0, show_1.default)(expected), ", but was ") | |
.concat((0, exports2.typeOf)(value)) | |
); | |
}, | |
CONTENT_INCORRECT: function (self2, details) { | |
var message = "Expected ".concat( | |
(0, show_1.default)(self2), | |
", but was incompatible" | |
); | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.CONTENT_INCORRECT, | |
message, | |
details | |
); | |
}, | |
ARGUMENT_INCORRECT: function (message) { | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.ARGUMENT_INCORRECT, | |
message | |
); | |
}, | |
RETURN_INCORRECT: function (message) { | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.RETURN_INCORRECT, | |
message | |
); | |
}, | |
CONSTRAINT_FAILED: function (self2, message) { | |
var info = message ? ": ".concat(message) : ""; | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.CONSTRAINT_FAILED, | |
"Failed constraint check for " | |
.concat((0, show_1.default)(self2)) | |
.concat(info) | |
); | |
}, | |
PROPERTY_MISSING: function (self2) { | |
var message = "Expected ".concat( | |
(0, show_1.default)(self2), | |
", but was missing" | |
); | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.PROPERTY_MISSING, | |
message | |
); | |
}, | |
PROPERTY_PRESENT: function (value) { | |
var message = "Expected nothing, but was ".concat( | |
(0, exports2.typeOf)(value) | |
); | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.PROPERTY_PRESENT, | |
message | |
); | |
}, | |
NOTHING_EXPECTED: function (value) { | |
var message = "Expected nothing, but was ".concat( | |
(0, exports2.typeOf)(value) | |
); | |
return (0, exports2.FAILURE)( | |
result_1.Failcode.NOTHING_EXPECTED, | |
message | |
); | |
}, | |
} | |
); | |
}, | |
}); | |
// node_modules/runtypes/lib/contract.js | |
var require_contract = __commonJS({ | |
"node_modules/runtypes/lib/contract.js"(exports2) { | |
"use strict"; | |
var __read2 = | |
(exports2 && exports2.__read) || | |
function (o, n) { | |
var m = typeof Symbol === "function" && o[Symbol.iterator]; | |
if (!m) return o; | |
var i = m.call(o), | |
r, | |
ar = [], | |
e; | |
try { | |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) | |
ar.push(r.value); | |
} catch (error) { | |
e = {error}; | |
} finally { | |
try { | |
if (r && !r.done && (m = i["return"])) m.call(i); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
return ar; | |
}; | |
var __spreadArray2 = | |
(exports2 && exports2.__spreadArray) || | |
function (to, from, pack) { | |
if (pack || arguments.length === 2) | |
for (var i = 0, l = from.length, ar; i < l; i++) { | |
if (ar || !(i in from)) { | |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | |
ar[i] = from[i]; | |
} | |
} | |
return to.concat(ar || Array.prototype.slice.call(from)); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Contract = void 0; | |
var errors_1 = require_errors(); | |
var util_1 = require_util(); | |
function Contract() { | |
var runtypes = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
runtypes[_i] = arguments[_i]; | |
} | |
var lastIndex = runtypes.length - 1; | |
var argRuntypes = runtypes.slice(0, lastIndex); | |
var returnRuntype = runtypes[lastIndex]; | |
return { | |
enforce: function (f) { | |
return function () { | |
var args = []; | |
for (var _i2 = 0; _i2 < arguments.length; _i2++) { | |
args[_i2] = arguments[_i2]; | |
} | |
if (args.length < argRuntypes.length) { | |
var message = "Expected " | |
.concat(argRuntypes.length, " arguments but only received ") | |
.concat(args.length); | |
var failure = util_1.FAILURE.ARGUMENT_INCORRECT(message); | |
throw new errors_1.ValidationError(failure); | |
} | |
for (var i = 0; i < argRuntypes.length; i++) | |
argRuntypes[i].check(args[i]); | |
return returnRuntype.check( | |
f.apply(void 0, __spreadArray2([], __read2(args), false)) | |
); | |
}; | |
}, | |
}; | |
} | |
exports2.Contract = Contract; | |
}, | |
}); | |
// node_modules/runtypes/lib/asynccontract.js | |
var require_asynccontract = __commonJS({ | |
"node_modules/runtypes/lib/asynccontract.js"(exports2) { | |
"use strict"; | |
var __read2 = | |
(exports2 && exports2.__read) || | |
function (o, n) { | |
var m = typeof Symbol === "function" && o[Symbol.iterator]; | |
if (!m) return o; | |
var i = m.call(o), | |
r, | |
ar = [], | |
e; | |
try { | |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) | |
ar.push(r.value); | |
} catch (error) { | |
e = {error}; | |
} finally { | |
try { | |
if (r && !r.done && (m = i["return"])) m.call(i); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
return ar; | |
}; | |
var __spreadArray2 = | |
(exports2 && exports2.__spreadArray) || | |
function (to, from, pack) { | |
if (pack || arguments.length === 2) | |
for (var i = 0, l = from.length, ar; i < l; i++) { | |
if (ar || !(i in from)) { | |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | |
ar[i] = from[i]; | |
} | |
} | |
return to.concat(ar || Array.prototype.slice.call(from)); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.AsyncContract = void 0; | |
var errors_1 = require_errors(); | |
var util_1 = require_util(); | |
function AsyncContract() { | |
var runtypes = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
runtypes[_i] = arguments[_i]; | |
} | |
var lastIndex = runtypes.length - 1; | |
var argRuntypes = runtypes.slice(0, lastIndex); | |
var returnRuntype = runtypes[lastIndex]; | |
return { | |
enforce: function (f) { | |
return function () { | |
var args = []; | |
for (var _i2 = 0; _i2 < arguments.length; _i2++) { | |
args[_i2] = arguments[_i2]; | |
} | |
if (args.length < argRuntypes.length) { | |
var message = "Expected " | |
.concat(argRuntypes.length, " arguments but only received ") | |
.concat(args.length); | |
var failure = util_1.FAILURE.ARGUMENT_INCORRECT(message); | |
throw new errors_1.ValidationError(failure); | |
} | |
for (var i = 0; i < argRuntypes.length; i++) | |
argRuntypes[i].check(args[i]); | |
var returnedPromise = f.apply( | |
void 0, | |
__spreadArray2([], __read2(args), false) | |
); | |
if (!(returnedPromise instanceof Promise)) { | |
var message = | |
"Expected function to return a promise, but instead got ".concat( | |
returnedPromise | |
); | |
var failure = util_1.FAILURE.RETURN_INCORRECT(message); | |
throw new errors_1.ValidationError(failure); | |
} | |
return returnedPromise.then(returnRuntype.check); | |
}; | |
}, | |
}; | |
} | |
exports2.AsyncContract = AsyncContract; | |
}, | |
}); | |
// node_modules/runtypes/lib/match.js | |
var require_match = __commonJS({ | |
"node_modules/runtypes/lib/match.js"(exports2) { | |
"use strict"; | |
var __values2 = | |
(exports2 && exports2.__values) || | |
function (o) { | |
var s = typeof Symbol === "function" && Symbol.iterator, | |
m = s && o[s], | |
i = 0; | |
if (m) return m.call(o); | |
if (o && typeof o.length === "number") | |
return { | |
next: function () { | |
if (o && i >= o.length) o = void 0; | |
return {value: o && o[i++], done: !o}; | |
}, | |
}; | |
throw new TypeError( | |
s ? "Object is not iterable." : "Symbol.iterator is not defined." | |
); | |
}; | |
var __read2 = | |
(exports2 && exports2.__read) || | |
function (o, n) { | |
var m = typeof Symbol === "function" && o[Symbol.iterator]; | |
if (!m) return o; | |
var i = m.call(o), | |
r, | |
ar = [], | |
e; | |
try { | |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) | |
ar.push(r.value); | |
} catch (error) { | |
e = {error}; | |
} finally { | |
try { | |
if (r && !r.done && (m = i["return"])) m.call(i); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
return ar; | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.when = exports2.match = void 0; | |
function match() { | |
var cases = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
cases[_i] = arguments[_i]; | |
} | |
return function (x) { | |
var e_1, _a; | |
try { | |
for ( | |
var cases_1 = __values2(cases), cases_1_1 = cases_1.next(); | |
!cases_1_1.done; | |
cases_1_1 = cases_1.next() | |
) { | |
var _b = __read2(cases_1_1.value, 2), | |
T = _b[0], | |
f = _b[1]; | |
if (T.guard(x)) return f(x); | |
} | |
} catch (e_1_1) { | |
e_1 = {error: e_1_1}; | |
} finally { | |
try { | |
if (cases_1_1 && !cases_1_1.done && (_a = cases_1.return)) | |
_a.call(cases_1); | |
} finally { | |
if (e_1) throw e_1.error; | |
} | |
} | |
throw new Error("No alternatives were matched"); | |
}; | |
} | |
exports2.match = match; | |
function when(runtype, transformer) { | |
return [runtype, transformer]; | |
} | |
exports2.when = when; | |
}, | |
}); | |
// node_modules/runtypes/lib/runtype.js | |
var require_runtype = __commonJS({ | |
"node_modules/runtypes/lib/runtype.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.innerValidate = exports2.create = exports2.isRuntype = void 0; | |
var index_1 = require_lib(); | |
var show_1 = require_show(); | |
var errors_1 = require_errors(); | |
var util_1 = require_util(); | |
var RuntypeSymbol = Symbol(); | |
var isRuntype = function (x) { | |
return (0, util_1.hasKey)(RuntypeSymbol, x); | |
}; | |
exports2.isRuntype = isRuntype; | |
function create(validate, A) { | |
A[RuntypeSymbol] = true; | |
A.check = check; | |
A.assert = check; | |
A._innerValidate = function (value, visited) { | |
if (visited.has(value, A)) return (0, util_1.SUCCESS)(value); | |
return validate(value, visited); | |
}; | |
A.validate = function (value) { | |
return A._innerValidate(value, VisitedState()); | |
}; | |
A.guard = guard; | |
A.Or = Or; | |
A.And = And; | |
A.optional = optional; | |
A.nullable = nullable; | |
A.withConstraint = withConstraint; | |
A.withGuard = withGuard; | |
A.withBrand = withBrand; | |
A.reflect = A; | |
A.toString = function () { | |
return "Runtype<".concat((0, show_1.default)(A), ">"); | |
}; | |
return A; | |
function check(x) { | |
var result = A.validate(x); | |
if (result.success) return result.value; | |
else throw new errors_1.ValidationError(result); | |
} | |
function guard(x) { | |
return A.validate(x).success; | |
} | |
function Or(B) { | |
return (0, index_1.Union)(A, B); | |
} | |
function And(B) { | |
return (0, index_1.Intersect)(A, B); | |
} | |
function optional() { | |
return (0, index_1.Optional)(A); | |
} | |
function nullable() { | |
return (0, index_1.Union)(A, index_1.Null); | |
} | |
function withConstraint(constraint, options) { | |
return (0, index_1.Constraint)(A, constraint, options); | |
} | |
function withGuard(guard2, options) { | |
return (0, index_1.Constraint)(A, guard2, options); | |
} | |
function withBrand(B) { | |
return (0, index_1.Brand)(B, A); | |
} | |
} | |
exports2.create = create; | |
function innerValidate(targetType, value, visited) { | |
return targetType._innerValidate(value, visited); | |
} | |
exports2.innerValidate = innerValidate; | |
function VisitedState() { | |
var members = /* @__PURE__ */ new WeakMap(); | |
var add = function (candidate, type) { | |
if (candidate === null || !(typeof candidate === "object")) return; | |
var typeSet = members.get(candidate); | |
members.set( | |
candidate, | |
typeSet | |
? typeSet.set(type, true) | |
: /* @__PURE__ */ new WeakMap().set(type, true) | |
); | |
}; | |
var has = function (candidate, type) { | |
var typeSet = members.get(candidate); | |
var value = (typeSet && typeSet.get(type)) || false; | |
add(candidate, type); | |
return value; | |
}; | |
return {has}; | |
} | |
}, | |
}); | |
// node_modules/runtypes/lib/types/unknown.js | |
var require_unknown = __commonJS({ | |
"node_modules/runtypes/lib/types/unknown.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Unknown = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var self2 = {tag: "unknown"}; | |
exports2.Unknown = (0, runtype_1.create)(function (value) { | |
return (0, util_1.SUCCESS)(value); | |
}, self2); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/never.js | |
var require_never = __commonJS({ | |
"node_modules/runtypes/lib/types/never.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Never = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var self2 = {tag: "never"}; | |
exports2.Never = (0, runtype_1.create)( | |
util_1.FAILURE.NOTHING_EXPECTED, | |
self2 | |
); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/void.js | |
var require_void = __commonJS({ | |
"node_modules/runtypes/lib/types/void.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Void = void 0; | |
var unknown_1 = require_unknown(); | |
exports2.Void = unknown_1.Unknown; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/union.js | |
var require_union = __commonJS({ | |
"node_modules/runtypes/lib/types/union.js"(exports2) { | |
"use strict"; | |
var __values2 = | |
(exports2 && exports2.__values) || | |
function (o) { | |
var s = typeof Symbol === "function" && Symbol.iterator, | |
m = s && o[s], | |
i = 0; | |
if (m) return m.call(o); | |
if (o && typeof o.length === "number") | |
return { | |
next: function () { | |
if (o && i >= o.length) o = void 0; | |
return {value: o && o[i++], done: !o}; | |
}, | |
}; | |
throw new TypeError( | |
s ? "Object is not iterable." : "Symbol.iterator is not defined." | |
); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Union = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
function Union2() { | |
var alternatives = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
alternatives[_i] = arguments[_i]; | |
} | |
var match = function () { | |
var cases = []; | |
for (var _i2 = 0; _i2 < arguments.length; _i2++) { | |
cases[_i2] = arguments[_i2]; | |
} | |
return function (x) { | |
for (var i = 0; i < alternatives.length; i++) { | |
if (alternatives[i].guard(x)) { | |
return cases[i](x); | |
} | |
} | |
}; | |
}; | |
var self2 = {tag: "union", alternatives, match}; | |
return (0, runtype_1.create)(function (value, visited) { | |
var e_1, _a, e_2, _b, e_3, _c, e_4, _d; | |
if (typeof value !== "object" || value === null) { | |
try { | |
for ( | |
var alternatives_1 = __values2(alternatives), | |
alternatives_1_1 = alternatives_1.next(); | |
!alternatives_1_1.done; | |
alternatives_1_1 = alternatives_1.next() | |
) { | |
var alternative = alternatives_1_1.value; | |
if ( | |
(0, runtype_1.innerValidate)(alternative, value, visited) | |
.success | |
) | |
return (0, util_1.SUCCESS)(value); | |
} | |
} catch (e_1_1) { | |
e_1 = {error: e_1_1}; | |
} finally { | |
try { | |
if ( | |
alternatives_1_1 && | |
!alternatives_1_1.done && | |
(_a = alternatives_1.return) | |
) | |
_a.call(alternatives_1); | |
} finally { | |
if (e_1) throw e_1.error; | |
} | |
} | |
return util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
} | |
var commonLiteralFields = {}; | |
try { | |
for ( | |
var alternatives_2 = __values2(alternatives), | |
alternatives_2_1 = alternatives_2.next(); | |
!alternatives_2_1.done; | |
alternatives_2_1 = alternatives_2.next() | |
) { | |
var alternative = alternatives_2_1.value; | |
if (alternative.reflect.tag === "record") { | |
var _loop_1 = function (fieldName2) { | |
var field2 = alternative.reflect.fields[fieldName2]; | |
if (field2.tag === "literal") { | |
if (commonLiteralFields[fieldName2]) { | |
if ( | |
commonLiteralFields[fieldName2].every(function (value2) { | |
return value2 !== field2.value; | |
}) | |
) { | |
commonLiteralFields[fieldName2].push(field2.value); | |
} | |
} else { | |
commonLiteralFields[fieldName2] = [field2.value]; | |
} | |
} | |
}; | |
for (var fieldName in alternative.reflect.fields) { | |
_loop_1(fieldName); | |
} | |
} | |
} | |
} catch (e_2_1) { | |
e_2 = {error: e_2_1}; | |
} finally { | |
try { | |
if ( | |
alternatives_2_1 && | |
!alternatives_2_1.done && | |
(_b = alternatives_2.return) | |
) | |
_b.call(alternatives_2); | |
} finally { | |
if (e_2) throw e_2.error; | |
} | |
} | |
for (var fieldName in commonLiteralFields) { | |
if (commonLiteralFields[fieldName].length === alternatives.length) { | |
try { | |
for ( | |
var alternatives_3 = ((e_3 = void 0), __values2(alternatives)), | |
alternatives_3_1 = alternatives_3.next(); | |
!alternatives_3_1.done; | |
alternatives_3_1 = alternatives_3.next() | |
) { | |
var alternative = alternatives_3_1.value; | |
if (alternative.reflect.tag === "record") { | |
var field = alternative.reflect.fields[fieldName]; | |
if ( | |
field.tag === "literal" && | |
(0, util_1.hasKey)(fieldName, value) && | |
value[fieldName] === field.value | |
) { | |
return (0, runtype_1.innerValidate)( | |
alternative, | |
value, | |
visited | |
); | |
} | |
} | |
} | |
} catch (e_3_1) { | |
e_3 = {error: e_3_1}; | |
} finally { | |
try { | |
if ( | |
alternatives_3_1 && | |
!alternatives_3_1.done && | |
(_c = alternatives_3.return) | |
) | |
_c.call(alternatives_3); | |
} finally { | |
if (e_3) throw e_3.error; | |
} | |
} | |
} | |
} | |
try { | |
for ( | |
var alternatives_4 = __values2(alternatives), | |
alternatives_4_1 = alternatives_4.next(); | |
!alternatives_4_1.done; | |
alternatives_4_1 = alternatives_4.next() | |
) { | |
var targetType = alternatives_4_1.value; | |
if ( | |
(0, runtype_1.innerValidate)(targetType, value, visited).success | |
) | |
return (0, util_1.SUCCESS)(value); | |
} | |
} catch (e_4_1) { | |
e_4 = {error: e_4_1}; | |
} finally { | |
try { | |
if ( | |
alternatives_4_1 && | |
!alternatives_4_1.done && | |
(_d = alternatives_4.return) | |
) | |
_d.call(alternatives_4); | |
} finally { | |
if (e_4) throw e_4.error; | |
} | |
} | |
return util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, self2); | |
} | |
exports2.Union = Union2; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/literal.js | |
var require_literal = __commonJS({ | |
"node_modules/runtypes/lib/types/literal.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Nullish = | |
exports2.Null = | |
exports2.Undefined = | |
exports2.Literal = | |
exports2.literal = | |
void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var union_1 = require_union(); | |
function literal(value) { | |
return Array.isArray(value) | |
? String(value.map(String)) | |
: typeof value === "bigint" | |
? String(value) + "n" | |
: String(value); | |
} | |
exports2.literal = literal; | |
function Literal2(valueBase) { | |
var self2 = {tag: "literal", value: valueBase}; | |
return (0, runtype_1.create)(function (value) { | |
return value === valueBase | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.VALUE_INCORRECT( | |
"literal", | |
"`".concat(literal(valueBase), "`"), | |
"`".concat(literal(value), "`") | |
); | |
}, self2); | |
} | |
exports2.Literal = Literal2; | |
exports2.Undefined = Literal2(void 0); | |
exports2.Null = Literal2(null); | |
exports2.Nullish = (0, union_1.Union)(exports2.Null, exports2.Undefined); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/template.js | |
var require_template = __commonJS({ | |
"node_modules/runtypes/lib/types/template.js"(exports2) { | |
"use strict"; | |
var __read2 = | |
(exports2 && exports2.__read) || | |
function (o, n) { | |
var m = typeof Symbol === "function" && o[Symbol.iterator]; | |
if (!m) return o; | |
var i = m.call(o), | |
r, | |
ar = [], | |
e; | |
try { | |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) | |
ar.push(r.value); | |
} catch (error) { | |
e = {error}; | |
} finally { | |
try { | |
if (r && !r.done && (m = i["return"])) m.call(i); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
return ar; | |
}; | |
var __spreadArray2 = | |
(exports2 && exports2.__spreadArray) || | |
function (to, from, pack) { | |
if (pack || arguments.length === 2) | |
for (var i = 0, l = from.length, ar; i < l; i++) { | |
if (ar || !(i in from)) { | |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | |
ar[i] = from[i]; | |
} | |
} | |
return to.concat(ar || Array.prototype.slice.call(from)); | |
}; | |
var __values2 = | |
(exports2 && exports2.__values) || | |
function (o) { | |
var s = typeof Symbol === "function" && Symbol.iterator, | |
m = s && o[s], | |
i = 0; | |
if (m) return m.call(o); | |
if (o && typeof o.length === "number") | |
return { | |
next: function () { | |
if (o && i >= o.length) o = void 0; | |
return {value: o && o[i++], done: !o}; | |
}, | |
}; | |
throw new TypeError( | |
s ? "Object is not iterable." : "Symbol.iterator is not defined." | |
); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Template = void 0; | |
var runtype_1 = require_runtype(); | |
var show_1 = require_show(); | |
var util_1 = require_util(); | |
var literal_1 = require_literal(); | |
var escapeRegExp = function (string) { | |
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); | |
}; | |
var parseArgs = function (args) { | |
if (0 < args.length && Array.isArray(args[0])) { | |
var _a = __read2(args), | |
strings = _a[0], | |
runtypes = _a.slice(1); | |
return [Array.from(strings), runtypes]; | |
} else { | |
var convenient = args; | |
var strings = convenient.reduce( | |
function (strings2, arg) { | |
if (!(0, runtype_1.isRuntype)(arg)) | |
strings2.push(strings2.pop() + String(arg)); | |
else strings2.push(""); | |
return strings2; | |
}, | |
[""] | |
); | |
var runtypes = convenient.filter(runtype_1.isRuntype); | |
return [strings, runtypes]; | |
} | |
}; | |
var flattenInnerRuntypes = function (strings, runtypes) { | |
for (var i = 0; i < runtypes.length; ) { | |
switch (runtypes[i].reflect.tag) { | |
case "literal": { | |
var literal_2 = runtypes[i]; | |
runtypes.splice(i, 1); | |
var string = String(literal_2.value); | |
strings.splice(i, 2, strings[i] + string + strings[i + 1]); | |
break; | |
} | |
case "template": { | |
var template = runtypes[i]; | |
runtypes.splice.apply( | |
runtypes, | |
__spreadArray2([i, 1], __read2(template.runtypes), false) | |
); | |
var innerStrings = template.strings; | |
if (innerStrings.length === 1) { | |
strings.splice( | |
i, | |
2, | |
strings[i] + innerStrings[0] + strings[i + 1] | |
); | |
} else { | |
var first = innerStrings[0]; | |
var rest = innerStrings.slice(1, -1); | |
var last = innerStrings[innerStrings.length - 1]; | |
strings.splice.apply( | |
strings, | |
__spreadArray2( | |
__spreadArray2( | |
[i, 2, strings[i] + first], | |
__read2(rest), | |
false | |
), | |
[last + strings[i + 1]], | |
false | |
) | |
); | |
} | |
break; | |
} | |
case "union": { | |
var union = runtypes[i]; | |
if (union.alternatives.length === 1) { | |
try { | |
var literal_3 = getInnerLiteral(union); | |
runtypes.splice(i, 1); | |
var string = String(literal_3.value); | |
strings.splice(i, 2, strings[i] + string + strings[i + 1]); | |
break; | |
} catch (_) { | |
i++; | |
break; | |
} | |
} else { | |
i++; | |
break; | |
} | |
} | |
case "intersect": { | |
var intersect = runtypes[i]; | |
if (intersect.intersectees.length === 1) { | |
try { | |
var literal_4 = getInnerLiteral(intersect); | |
runtypes.splice(i, 1); | |
var string = String(literal_4.value); | |
strings.splice(i, 2, strings[i] + string + strings[i + 1]); | |
break; | |
} catch (_) { | |
i++; | |
break; | |
} | |
} else { | |
i++; | |
break; | |
} | |
} | |
default: | |
i++; | |
break; | |
} | |
} | |
}; | |
var normalizeArgs = function (args) { | |
var _a = __read2(parseArgs(args), 2), | |
strings = _a[0], | |
runtypes = _a[1]; | |
flattenInnerRuntypes(strings, runtypes); | |
return [strings, runtypes]; | |
}; | |
var getInnerLiteral = function (runtype) { | |
switch (runtype.reflect.tag) { | |
case "literal": | |
return runtype; | |
case "brand": | |
return getInnerLiteral(runtype.reflect.entity); | |
case "union": | |
if (runtype.reflect.alternatives.length === 1) | |
return getInnerLiteral(runtype.reflect.alternatives[0]); | |
break; | |
case "intersect": | |
if (runtype.reflect.intersectees.length === 1) | |
return getInnerLiteral(runtype.reflect.intersectees[0]); | |
break; | |
default: | |
break; | |
} | |
throw void 0; | |
}; | |
var identity = function (s) { | |
return s; | |
}; | |
var revivers = { | |
string: [ | |
function (s) { | |
return globalThis.String(s); | |
}, | |
".*", | |
], | |
number: [ | |
function (s) { | |
return globalThis.Number(s); | |
}, | |
"[+-]?(?:\\d*\\.\\d+|\\d+\\.\\d*|\\d+)(?:[Ee][+-]?\\d+)?", | |
"0[Bb][01]+", | |
"0[Oo][0-7]+", | |
"0[Xx][0-9A-Fa-f]+", | |
// Note: `"NaN"` isn't here, as TS doesn't allow `"NaN"` to be a `` `${number}` `` | |
], | |
bigint: [ | |
function (s) { | |
return globalThis.BigInt(s); | |
}, | |
"-?[1-9]d*", | |
], | |
boolean: [ | |
function (s) { | |
return s === "false" ? false : true; | |
}, | |
"true", | |
"false", | |
], | |
null: [ | |
function () { | |
return null; | |
}, | |
"null", | |
], | |
undefined: [ | |
function () { | |
return void 0; | |
}, | |
"undefined", | |
], | |
}; | |
var getReviversFor = function (reflect) { | |
switch (reflect.tag) { | |
case "literal": { | |
var _a = __read2( | |
revivers[(0, util_1.typeOf)(reflect.value)] || [identity], | |
1 | |
), | |
reviver_1 = _a[0]; | |
return reviver_1; | |
} | |
case "brand": | |
return getReviversFor(reflect.entity); | |
case "constraint": | |
return getReviversFor(reflect.underlying); | |
case "union": | |
return reflect.alternatives.map(getReviversFor); | |
case "intersect": | |
return reflect.intersectees.map(getReviversFor); | |
default: | |
var _b = __read2(revivers[reflect.tag] || [identity], 1), | |
reviver = _b[0]; | |
return reviver; | |
} | |
}; | |
var reviveValidate = function (reflect, visited) { | |
return function (value) { | |
var e_1, _a, e_2, _b; | |
var revivers2 = getReviversFor(reflect); | |
if (Array.isArray(revivers2)) { | |
switch (reflect.tag) { | |
case "union": | |
try { | |
for ( | |
var _c = __values2(reflect.alternatives), _d = _c.next(); | |
!_d.done; | |
_d = _c.next() | |
) { | |
var alternative = _d.value; | |
var validated = reviveValidate( | |
alternative.reflect, | |
visited | |
)(value); | |
if (validated.success) return validated; | |
} | |
} catch (e_1_1) { | |
e_1 = {error: e_1_1}; | |
} finally { | |
try { | |
if (_d && !_d.done && (_a = _c.return)) _a.call(_c); | |
} finally { | |
if (e_1) throw e_1.error; | |
} | |
} | |
return util_1.FAILURE.TYPE_INCORRECT(reflect, value); | |
case "intersect": | |
try { | |
for ( | |
var _e = __values2(reflect.intersectees), _f = _e.next(); | |
!_f.done; | |
_f = _e.next() | |
) { | |
var intersectee = _f.value; | |
var validated = reviveValidate( | |
intersectee.reflect, | |
visited | |
)(value); | |
if (!validated.success) return validated; | |
} | |
} catch (e_2_1) { | |
e_2 = {error: e_2_1}; | |
} finally { | |
try { | |
if (_f && !_f.done && (_b = _e.return)) _b.call(_e); | |
} finally { | |
if (e_2) throw e_2.error; | |
} | |
} | |
return (0, util_1.SUCCESS)(value); | |
default: | |
throw Error("impossible"); | |
} | |
} else { | |
var reviver = revivers2; | |
var validated = (0, runtype_1.innerValidate)( | |
reflect, | |
reviver(value), | |
visited | |
); | |
if ( | |
!validated.success && | |
validated.code === "VALUE_INCORRECT" && | |
reflect.tag === "literal" | |
) | |
return util_1.FAILURE.VALUE_INCORRECT( | |
"literal", | |
'"'.concat((0, literal_1.literal)(reflect.value), '"'), | |
'"'.concat(value, '"') | |
); | |
return validated; | |
} | |
}; | |
}; | |
var getRegExpPatternFor = function (reflect) { | |
switch (reflect.tag) { | |
case "literal": | |
return escapeRegExp(String(reflect.value)); | |
case "brand": | |
return getRegExpPatternFor(reflect.entity); | |
case "constraint": | |
return getRegExpPatternFor(reflect.underlying); | |
case "union": | |
return reflect.alternatives.map(getRegExpPatternFor).join("|"); | |
case "template": { | |
return reflect.strings | |
.map(escapeRegExp) | |
.reduce(function (pattern, string, i) { | |
var prefix = pattern + string; | |
var runtype = reflect.runtypes[i]; | |
if (runtype) | |
return ( | |
prefix + | |
"(?:".concat(getRegExpPatternFor(runtype.reflect), ")") | |
); | |
else return prefix; | |
}, ""); | |
} | |
default: | |
var _a = __read2(revivers[reflect.tag] || [void 0, ".*"]), | |
patterns = _a.slice(1); | |
return patterns.join("|"); | |
} | |
}; | |
var createRegExpForTemplate = function (reflect) { | |
var pattern = reflect.strings | |
.map(escapeRegExp) | |
.reduce(function (pattern2, string, i) { | |
var prefix = pattern2 + string; | |
var runtype = reflect.runtypes[i]; | |
if (runtype) | |
return ( | |
prefix + "(".concat(getRegExpPatternFor(runtype.reflect), ")") | |
); | |
else return prefix; | |
}, ""); | |
return new RegExp("^".concat(pattern, "$"), "su"); | |
}; | |
function Template() { | |
var args = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
args[_i] = arguments[_i]; | |
} | |
var _a = __read2(normalizeArgs(args), 2), | |
strings = _a[0], | |
runtypes = _a[1]; | |
var self2 = {tag: "template", strings, runtypes}; | |
var regexp = createRegExpForTemplate(self2); | |
var test = function (value, visited) { | |
var matches = value.match(regexp); | |
if (matches) { | |
var values = matches.slice(1); | |
for (var i = 0; i < runtypes.length; i++) { | |
var runtype = runtypes[i]; | |
var value_1 = values[i]; | |
var validated = reviveValidate(runtype.reflect, visited)(value_1); | |
if (!validated.success) return validated; | |
} | |
return (0, util_1.SUCCESS)(value); | |
} else { | |
return util_1.FAILURE.VALUE_INCORRECT( | |
"string", | |
"".concat((0, show_1.default)(self2)), | |
'"'.concat((0, literal_1.literal)(value), '"') | |
); | |
} | |
}; | |
return (0, runtype_1.create)(function (value, visited) { | |
if (typeof value !== "string") | |
return util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
else { | |
var validated = test(value, visited); | |
if (!validated.success) { | |
var result = util_1.FAILURE.VALUE_INCORRECT( | |
"string", | |
"".concat((0, show_1.default)(self2)), | |
'"'.concat(value, '"') | |
); | |
if (result.message !== validated.message) | |
result.message += " (inner: ".concat(validated.message, ")"); | |
return result; | |
} else return (0, util_1.SUCCESS)(value); | |
} | |
}, self2); | |
} | |
exports2.Template = Template; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/boolean.js | |
var require_boolean = __commonJS({ | |
"node_modules/runtypes/lib/types/boolean.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Boolean = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var self2 = {tag: "boolean"}; | |
exports2.Boolean = (0, runtype_1.create)(function (value) { | |
return typeof value === "boolean" | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, self2); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/number.js | |
var require_number = __commonJS({ | |
"node_modules/runtypes/lib/types/number.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Number = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var self2 = {tag: "number"}; | |
exports2.Number = (0, runtype_1.create)(function (value) { | |
return typeof value === "number" | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, self2); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/bigint.js | |
var require_bigint = __commonJS({ | |
"node_modules/runtypes/lib/types/bigint.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.BigInt = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var self2 = {tag: "bigint"}; | |
exports2.BigInt = (0, runtype_1.create)(function (value) { | |
return typeof value === "bigint" | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, self2); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/string.js | |
var require_string = __commonJS({ | |
"node_modules/runtypes/lib/types/string.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.String = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var self2 = {tag: "string"}; | |
exports2.String = (0, runtype_1.create)(function (value) { | |
return typeof value === "string" | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, self2); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/symbol.js | |
var require_symbol = __commonJS({ | |
"node_modules/runtypes/lib/types/symbol.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Symbol = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var f = function (key) { | |
var self3 = {tag: "symbol", key}; | |
return (0, runtype_1.create)(function (value) { | |
if (typeof value !== "symbol") | |
return util_1.FAILURE.TYPE_INCORRECT(self3, value); | |
else { | |
var keyForValue = globalThis.Symbol.keyFor(value); | |
if (keyForValue !== key) | |
return util_1.FAILURE.VALUE_INCORRECT( | |
"symbol key", | |
quoteIfPresent(key), | |
quoteIfPresent(keyForValue) | |
); | |
else return (0, util_1.SUCCESS)(value); | |
} | |
}, self3); | |
}; | |
var self2 = {tag: "symbol"}; | |
exports2.Symbol = (0, runtype_1.create)(function (value) { | |
return typeof value === "symbol" | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, Object.assign(f, self2)); | |
var quoteIfPresent = function (key) { | |
return key === void 0 ? "undefined" : '"'.concat(key, '"'); | |
}; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/array.js | |
var require_array = __commonJS({ | |
"node_modules/runtypes/lib/types/array.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Array = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
function InternalArr(element, isReadonly) { | |
var self2 = {tag: "array", isReadonly, element}; | |
return withExtraModifierFuncs( | |
(0, runtype_1.create)(function (xs, visited) { | |
if (!Array.isArray(xs)) | |
return util_1.FAILURE.TYPE_INCORRECT(self2, xs); | |
var keys = (0, util_1.enumerableKeysOf)(xs); | |
var results = keys.map(function (key) { | |
return (0, runtype_1.innerValidate)(element, xs[key], visited); | |
}); | |
var details = keys.reduce(function (details2, key) { | |
var result = results[key]; | |
if (!result.success) | |
details2[key] = result.details || result.message; | |
return details2; | |
}, []); | |
if ((0, util_1.enumerableKeysOf)(details).length !== 0) | |
return util_1.FAILURE.CONTENT_INCORRECT(self2, details); | |
else return (0, util_1.SUCCESS)(xs); | |
}, self2) | |
); | |
} | |
function Arr(element) { | |
return InternalArr(element, false); | |
} | |
exports2.Array = Arr; | |
function withExtraModifierFuncs(A) { | |
A.asReadonly = asReadonly; | |
return A; | |
function asReadonly() { | |
return InternalArr(A.element, true); | |
} | |
} | |
}, | |
}); | |
// node_modules/runtypes/lib/types/tuple.js | |
var require_tuple = __commonJS({ | |
"node_modules/runtypes/lib/types/tuple.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Tuple = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
function Tuple() { | |
var components = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
components[_i] = arguments[_i]; | |
} | |
var self2 = {tag: "tuple", components}; | |
return (0, runtype_1.create)(function (xs, visited) { | |
if (!Array.isArray(xs)) return util_1.FAILURE.TYPE_INCORRECT(self2, xs); | |
if (xs.length !== components.length) | |
return util_1.FAILURE.CONSTRAINT_FAILED( | |
self2, | |
"Expected length " | |
.concat(components.length, ", but was ") | |
.concat(xs.length) | |
); | |
var keys = (0, util_1.enumerableKeysOf)(xs); | |
var results = keys.map(function (key) { | |
return (0, | |
runtype_1.innerValidate)(components[key], xs[key], visited); | |
}); | |
var details = keys.reduce(function (details2, key) { | |
var result = results[key]; | |
if (!result.success) details2[key] = result.details || result.message; | |
return details2; | |
}, []); | |
if ((0, util_1.enumerableKeysOf)(details).length !== 0) | |
return util_1.FAILURE.CONTENT_INCORRECT(self2, details); | |
else return (0, util_1.SUCCESS)(xs); | |
}, self2); | |
} | |
exports2.Tuple = Tuple; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/record.js | |
var require_record = __commonJS({ | |
"node_modules/runtypes/lib/types/record.js"(exports2) { | |
"use strict"; | |
var __read2 = | |
(exports2 && exports2.__read) || | |
function (o, n) { | |
var m = typeof Symbol === "function" && o[Symbol.iterator]; | |
if (!m) return o; | |
var i = m.call(o), | |
r, | |
ar = [], | |
e; | |
try { | |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) | |
ar.push(r.value); | |
} catch (error) { | |
e = {error}; | |
} finally { | |
try { | |
if (r && !r.done && (m = i["return"])) m.call(i); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
return ar; | |
}; | |
var __spreadArray2 = | |
(exports2 && exports2.__spreadArray) || | |
function (to, from, pack) { | |
if (pack || arguments.length === 2) | |
for (var i = 0, l = from.length, ar; i < l; i++) { | |
if (ar || !(i in from)) { | |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | |
ar[i] = from[i]; | |
} | |
} | |
return to.concat(ar || Array.prototype.slice.call(from)); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Partial = exports2.Record = exports2.InternalRecord = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
function InternalRecord(fields, isPartial, isReadonly) { | |
var self2 = {tag: "record", isPartial, isReadonly, fields}; | |
return withExtraModifierFuncs( | |
(0, runtype_1.create)(function (x, visited) { | |
if (x === null || x === void 0) { | |
return util_1.FAILURE.TYPE_INCORRECT(self2, x); | |
} | |
var keysOfFields = (0, util_1.enumerableKeysOf)(fields); | |
if (keysOfFields.length !== 0 && typeof x !== "object") | |
return util_1.FAILURE.TYPE_INCORRECT(self2, x); | |
var keys = __spreadArray2( | |
[], | |
__read2( | |
new Set( | |
__spreadArray2( | |
__spreadArray2([], __read2(keysOfFields), false), | |
__read2((0, util_1.enumerableKeysOf)(x)), | |
false | |
) | |
) | |
), | |
false | |
); | |
var results = keys.reduce(function (results2, key) { | |
var fieldsHasKey = (0, util_1.hasKey)(key, fields); | |
var xHasKey = (0, util_1.hasKey)(key, x); | |
if (fieldsHasKey) { | |
var runtype = fields[key]; | |
var isOptional = isPartial || runtype.reflect.tag === "optional"; | |
if (xHasKey) { | |
var value = x[key]; | |
if (isOptional && value === void 0) | |
results2[key] = (0, util_1.SUCCESS)(value); | |
else | |
results2[key] = (0, runtype_1.innerValidate)( | |
runtype, | |
value, | |
visited | |
); | |
} else { | |
if (!isOptional) | |
results2[key] = util_1.FAILURE.PROPERTY_MISSING( | |
runtype.reflect | |
); | |
else results2[key] = (0, util_1.SUCCESS)(void 0); | |
} | |
} else if (xHasKey) { | |
var value = x[key]; | |
results2[key] = (0, util_1.SUCCESS)(value); | |
} else { | |
throw new Error("impossible"); | |
} | |
return results2; | |
}, {}); | |
var details = keys.reduce(function (details2, key) { | |
var result = results[key]; | |
if (!result.success) | |
details2[key] = result.details || result.message; | |
return details2; | |
}, {}); | |
if ((0, util_1.enumerableKeysOf)(details).length !== 0) | |
return util_1.FAILURE.CONTENT_INCORRECT(self2, details); | |
else return (0, util_1.SUCCESS)(x); | |
}, self2) | |
); | |
} | |
exports2.InternalRecord = InternalRecord; | |
function Record2(fields) { | |
return InternalRecord(fields, false, false); | |
} | |
exports2.Record = Record2; | |
function Partial2(fields) { | |
return InternalRecord(fields, true, false); | |
} | |
exports2.Partial = Partial2; | |
function withExtraModifierFuncs(A) { | |
A.asPartial = asPartial; | |
A.asReadonly = asReadonly; | |
A.pick = pick; | |
A.omit = omit; | |
A.extend = extend2; | |
return A; | |
function asPartial() { | |
return InternalRecord(A.fields, true, A.isReadonly); | |
} | |
function asReadonly() { | |
return InternalRecord(A.fields, A.isPartial, true); | |
} | |
function pick() { | |
var keys = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
keys[_i] = arguments[_i]; | |
} | |
var result = {}; | |
keys.forEach(function (key) { | |
result[key] = A.fields[key]; | |
}); | |
return InternalRecord(result, A.isPartial, A.isReadonly); | |
} | |
function omit() { | |
var keys = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
keys[_i] = arguments[_i]; | |
} | |
var result = {}; | |
var existingKeys = (0, util_1.enumerableKeysOf)(A.fields); | |
existingKeys.forEach(function (key) { | |
if (!keys.includes(key)) result[key] = A.fields[key]; | |
}); | |
return InternalRecord(result, A.isPartial, A.isReadonly); | |
} | |
function extend2(fields) { | |
return InternalRecord( | |
Object.assign({}, A.fields, fields), | |
A.isPartial, | |
A.isReadonly | |
); | |
} | |
} | |
}, | |
}); | |
// node_modules/runtypes/lib/types/constraint.js | |
var require_constraint = __commonJS({ | |
"node_modules/runtypes/lib/types/constraint.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Guard = exports2.Constraint = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var unknown_1 = require_unknown(); | |
function Constraint(underlying, constraint, options) { | |
var name = options && options.name; | |
var args = options && options.args; | |
var self2 = { | |
tag: "constraint", | |
underlying, | |
constraint, | |
name, | |
args, | |
}; | |
return (0, runtype_1.create)(function (value) { | |
var result = underlying.validate(value); | |
if (!result.success) return result; | |
var message = constraint(result.value); | |
if (typeof message === "string") | |
return util_1.FAILURE.CONSTRAINT_FAILED(self2, message); | |
else if (!message) return util_1.FAILURE.CONSTRAINT_FAILED(self2); | |
return (0, util_1.SUCCESS)(result.value); | |
}, self2); | |
} | |
exports2.Constraint = Constraint; | |
var Guard = function (guard, options) { | |
return unknown_1.Unknown.withGuard(guard, options); | |
}; | |
exports2.Guard = Guard; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/dictionary.js | |
var require_dictionary = __commonJS({ | |
"node_modules/runtypes/lib/types/dictionary.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Dictionary = void 0; | |
var runtype_1 = require_runtype(); | |
var string_1 = require_string(); | |
var constraint_1 = require_constraint(); | |
var show_1 = require_show(); | |
var util_1 = require_util(); | |
var NumberKey = (0, constraint_1.Constraint)( | |
string_1.String, | |
function (s) { | |
return !isNaN(+s); | |
}, | |
{name: "number"} | |
); | |
function Dictionary(value, key) { | |
var keyRuntype = | |
key === void 0 | |
? string_1.String | |
: key === "string" | |
? string_1.String | |
: key === "number" | |
? NumberKey | |
: key; | |
var keyString = (0, show_1.default)(keyRuntype); | |
var self2 = {tag: "dictionary", key: keyString, value}; | |
return (0, runtype_1.create)(function (x, visited) { | |
if (x === null || x === void 0 || typeof x !== "object") | |
return util_1.FAILURE.TYPE_INCORRECT(self2, x); | |
if (Object.getPrototypeOf(x) !== Object.prototype) { | |
if (!Array.isArray(x) || keyString === "string") | |
return util_1.FAILURE.TYPE_INCORRECT(self2, x); | |
} | |
var numberString = /^(?:NaN|-?\d+(?:\.\d+)?)$/; | |
var keys = (0, util_1.enumerableKeysOf)(x); | |
var results = keys.reduce(function (results2, key2) { | |
var isNumberLikeKey = | |
typeof key2 === "string" && numberString.test(key2); | |
var keyInterop = isNumberLikeKey ? globalThis.Number(key2) : key2; | |
if ( | |
isNumberLikeKey | |
? !keyRuntype.guard(keyInterop) && !keyRuntype.guard(key2) | |
: !keyRuntype.guard(keyInterop) | |
) { | |
results2[key2] = util_1.FAILURE.KEY_INCORRECT( | |
self2, | |
keyRuntype.reflect, | |
keyInterop | |
); | |
} else results2[key2] = (0, runtype_1.innerValidate)(value, x[key2], visited); | |
return results2; | |
}, {}); | |
var details = keys.reduce(function (details2, key2) { | |
var result = results[key2]; | |
if (!result.success) | |
details2[key2] = result.details || result.message; | |
return details2; | |
}, {}); | |
if ((0, util_1.enumerableKeysOf)(details).length !== 0) | |
return util_1.FAILURE.CONTENT_INCORRECT(self2, details); | |
else return (0, util_1.SUCCESS)(x); | |
}, self2); | |
} | |
exports2.Dictionary = Dictionary; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/intersect.js | |
var require_intersect = __commonJS({ | |
"node_modules/runtypes/lib/types/intersect.js"(exports2) { | |
"use strict"; | |
var __values2 = | |
(exports2 && exports2.__values) || | |
function (o) { | |
var s = typeof Symbol === "function" && Symbol.iterator, | |
m = s && o[s], | |
i = 0; | |
if (m) return m.call(o); | |
if (o && typeof o.length === "number") | |
return { | |
next: function () { | |
if (o && i >= o.length) o = void 0; | |
return {value: o && o[i++], done: !o}; | |
}, | |
}; | |
throw new TypeError( | |
s ? "Object is not iterable." : "Symbol.iterator is not defined." | |
); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Intersect = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
function Intersect() { | |
var intersectees = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
intersectees[_i] = arguments[_i]; | |
} | |
var self2 = {tag: "intersect", intersectees}; | |
return (0, runtype_1.create)(function (value, visited) { | |
var e_1, _a; | |
try { | |
for ( | |
var intersectees_1 = __values2(intersectees), | |
intersectees_1_1 = intersectees_1.next(); | |
!intersectees_1_1.done; | |
intersectees_1_1 = intersectees_1.next() | |
) { | |
var targetType = intersectees_1_1.value; | |
var result = (0, runtype_1.innerValidate)( | |
targetType, | |
value, | |
visited | |
); | |
if (!result.success) return result; | |
} | |
} catch (e_1_1) { | |
e_1 = {error: e_1_1}; | |
} finally { | |
try { | |
if ( | |
intersectees_1_1 && | |
!intersectees_1_1.done && | |
(_a = intersectees_1.return) | |
) | |
_a.call(intersectees_1); | |
} finally { | |
if (e_1) throw e_1.error; | |
} | |
} | |
return (0, util_1.SUCCESS)(value); | |
}, self2); | |
} | |
exports2.Intersect = Intersect; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/optional.js | |
var require_optional = __commonJS({ | |
"node_modules/runtypes/lib/types/optional.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Optional = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
function Optional(runtype) { | |
var self2 = {tag: "optional", underlying: runtype}; | |
return (0, runtype_1.create)(function (value) { | |
return value === void 0 | |
? (0, util_1.SUCCESS)(value) | |
: runtype.validate(value); | |
}, self2); | |
} | |
exports2.Optional = Optional; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/function.js | |
var require_function = __commonJS({ | |
"node_modules/runtypes/lib/types/function.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Function = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
var self2 = {tag: "function"}; | |
exports2.Function = (0, runtype_1.create)(function (value) { | |
return typeof value === "function" | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, self2); | |
}, | |
}); | |
// node_modules/runtypes/lib/types/instanceof.js | |
var require_instanceof = __commonJS({ | |
"node_modules/runtypes/lib/types/instanceof.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.InstanceOf = void 0; | |
var runtype_1 = require_runtype(); | |
var util_1 = require_util(); | |
function InstanceOf(ctor) { | |
var self2 = {tag: "instanceof", ctor}; | |
return (0, runtype_1.create)(function (value) { | |
return value instanceof ctor | |
? (0, util_1.SUCCESS)(value) | |
: util_1.FAILURE.TYPE_INCORRECT(self2, value); | |
}, self2); | |
} | |
exports2.InstanceOf = InstanceOf; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/lazy.js | |
var require_lazy = __commonJS({ | |
"node_modules/runtypes/lib/types/lazy.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Lazy = void 0; | |
var runtype_1 = require_runtype(); | |
function Lazy(delayed) { | |
var data = { | |
get tag() { | |
return getWrapped()["tag"]; | |
}, | |
}; | |
var cached; | |
function getWrapped() { | |
if (!cached) { | |
cached = delayed(); | |
for (var k in cached) if (k !== "tag") data[k] = cached[k]; | |
} | |
return cached; | |
} | |
return (0, runtype_1.create)(function (x) { | |
return getWrapped().validate(x); | |
}, data); | |
} | |
exports2.Lazy = Lazy; | |
}, | |
}); | |
// node_modules/runtypes/lib/types/brand.js | |
var require_brand = __commonJS({ | |
"node_modules/runtypes/lib/types/brand.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.Brand = void 0; | |
var runtype_1 = require_runtype(); | |
function Brand(brand, entity) { | |
var self2 = {tag: "brand", brand, entity}; | |
return (0, runtype_1.create)(function (value) { | |
return entity.validate(value); | |
}, self2); | |
} | |
exports2.Brand = Brand; | |
}, | |
}); | |
// node_modules/runtypes/lib/decorator.js | |
var require_decorator = __commonJS({ | |
"node_modules/runtypes/lib/decorator.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.checked = exports2.check = void 0; | |
var errors_1 = require_errors(); | |
var util_1 = require_util(); | |
var prototypes = /* @__PURE__ */ new WeakMap(); | |
function check(target, propertyKey, parameterIndex) { | |
var prototype3 = prototypes.get(target) || /* @__PURE__ */ new Map(); | |
prototypes.set(target, prototype3); | |
var validParameterIndices = prototype3.get(propertyKey) || []; | |
prototype3.set(propertyKey, validParameterIndices); | |
validParameterIndices.push(parameterIndex); | |
} | |
exports2.check = check; | |
function getValidParameterIndices(target, propertyKey, runtypeCount) { | |
var prototype3 = prototypes.get(target); | |
var validParameterIndices = prototype3 && prototype3.get(propertyKey); | |
if (validParameterIndices) { | |
return validParameterIndices; | |
} | |
var indices = []; | |
for (var i = 0; i < runtypeCount; i++) { | |
indices.push(i); | |
} | |
return indices; | |
} | |
function checked() { | |
var runtypes = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
runtypes[_i] = arguments[_i]; | |
} | |
if (runtypes.length === 0) { | |
throw new Error( | |
"No runtype provided to `@checked`. Please remove the decorator." | |
); | |
} | |
return function (target, propertyKey, descriptor) { | |
var method = descriptor.value; | |
var methodId = | |
(target.name || target.constructor.name + ".prototype") + | |
(typeof propertyKey === "string" | |
? '["'.concat(propertyKey, '"]') | |
: "[".concat(String(propertyKey), "]")); | |
var validParameterIndices = getValidParameterIndices( | |
target, | |
propertyKey, | |
runtypes.length | |
); | |
if (validParameterIndices.length !== runtypes.length) { | |
throw new Error( | |
"Number of `@checked` runtypes and @check parameters not matched." | |
); | |
} | |
if (validParameterIndices.length > method.length) { | |
throw new Error( | |
"Number of `@checked` runtypes exceeds actual parameter length." | |
); | |
} | |
descriptor.value = function () { | |
var args = []; | |
for (var _i2 = 0; _i2 < arguments.length; _i2++) { | |
args[_i2] = arguments[_i2]; | |
} | |
runtypes.forEach(function (type, typeIndex) { | |
var parameterIndex = validParameterIndices[typeIndex]; | |
var result = type.validate(args[parameterIndex]); | |
if (!result.success) { | |
var message = "" | |
.concat(methodId, ", argument #") | |
.concat(parameterIndex, ": ") | |
.concat(result.message); | |
var failure = util_1.FAILURE.ARGUMENT_INCORRECT(message); | |
throw new errors_1.ValidationError(failure); | |
} | |
}); | |
return method.apply(this, args); | |
}; | |
}; | |
} | |
exports2.checked = checked; | |
}, | |
}); | |
// node_modules/runtypes/lib/index.js | |
var require_lib = __commonJS({ | |
"node_modules/runtypes/lib/index.js"(exports2) { | |
"use strict"; | |
var __createBinding2 = | |
(exports2 && exports2.__createBinding) || | |
(Object.create | |
? function (o, m, k, k2) { | |
if (k2 === void 0) k2 = k; | |
Object.defineProperty(o, k2, { | |
enumerable: true, | |
get: function () { | |
return m[k]; | |
}, | |
}); | |
} | |
: function (o, m, k, k2) { | |
if (k2 === void 0) k2 = k; | |
o[k2] = m[k]; | |
}); | |
var __exportStar2 = | |
(exports2 && exports2.__exportStar) || | |
function (m, exports3) { | |
for (var p in m) | |
if ( | |
p !== "default" && | |
!Object.prototype.hasOwnProperty.call(exports3, p) | |
) | |
__createBinding2(exports3, m, p); | |
}; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.InstanceOf = | |
exports2.Nullish = | |
exports2.Null = | |
exports2.Undefined = | |
exports2.Literal = | |
void 0; | |
__exportStar2(require_reflect(), exports2); | |
__exportStar2(require_result(), exports2); | |
__exportStar2(require_contract(), exports2); | |
__exportStar2(require_asynccontract(), exports2); | |
__exportStar2(require_match(), exports2); | |
__exportStar2(require_errors(), exports2); | |
__exportStar2(require_unknown(), exports2); | |
__exportStar2(require_never(), exports2); | |
__exportStar2(require_void(), exports2); | |
var literal_1 = require_literal(); | |
Object.defineProperty(exports2, "Literal", { | |
enumerable: true, | |
get: function () { | |
return literal_1.Literal; | |
}, | |
}); | |
Object.defineProperty(exports2, "Undefined", { | |
enumerable: true, | |
get: function () { | |
return literal_1.Undefined; | |
}, | |
}); | |
Object.defineProperty(exports2, "Null", { | |
enumerable: true, | |
get: function () { | |
return literal_1.Null; | |
}, | |
}); | |
Object.defineProperty(exports2, "Nullish", { | |
enumerable: true, | |
get: function () { | |
return literal_1.Nullish; | |
}, | |
}); | |
__exportStar2(require_template(), exports2); | |
__exportStar2(require_boolean(), exports2); | |
__exportStar2(require_number(), exports2); | |
__exportStar2(require_bigint(), exports2); | |
__exportStar2(require_string(), exports2); | |
__exportStar2(require_symbol(), exports2); | |
__exportStar2(require_array(), exports2); | |
__exportStar2(require_tuple(), exports2); | |
__exportStar2(require_record(), exports2); | |
__exportStar2(require_dictionary(), exports2); | |
__exportStar2(require_union(), exports2); | |
__exportStar2(require_intersect(), exports2); | |
__exportStar2(require_optional(), exports2); | |
__exportStar2(require_function(), exports2); | |
var instanceof_1 = require_instanceof(); | |
Object.defineProperty(exports2, "InstanceOf", { | |
enumerable: true, | |
get: function () { | |
return instanceof_1.InstanceOf; | |
}, | |
}); | |
__exportStar2(require_lazy(), exports2); | |
__exportStar2(require_constraint(), exports2); | |
__exportStar2(require_brand(), exports2); | |
__exportStar2(require_decorator(), exports2); | |
}, | |
}); | |
// node_modules/delayed-stream/lib/delayed_stream.js | |
var require_delayed_stream = __commonJS({ | |
"node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) { | |
var Stream = require("stream").Stream; | |
var util2 = require("util"); | |
module2.exports = DelayedStream; | |
function DelayedStream() { | |
this.source = null; | |
this.dataSize = 0; | |
this.maxDataSize = 1024 * 1024; | |
this.pauseStream = true; | |
this._maxDataSizeExceeded = false; | |
this._released = false; | |
this._bufferedEvents = []; | |
} | |
util2.inherits(DelayedStream, Stream); | |
DelayedStream.create = function (source, options) { | |
var delayedStream = new this(); | |
options = options || {}; | |
for (var option in options) { | |
delayedStream[option] = options[option]; | |
} | |
delayedStream.source = source; | |
var realEmit = source.emit; | |
source.emit = function () { | |
delayedStream._handleEmit(arguments); | |
return realEmit.apply(source, arguments); | |
}; | |
source.on("error", function () {}); | |
if (delayedStream.pauseStream) { | |
source.pause(); | |
} | |
return delayedStream; | |
}; | |
Object.defineProperty(DelayedStream.prototype, "readable", { | |
configurable: true, | |
enumerable: true, | |
get: function () { | |
return this.source.readable; | |
}, | |
}); | |
DelayedStream.prototype.setEncoding = function () { | |
return this.source.setEncoding.apply(this.source, arguments); | |
}; | |
DelayedStream.prototype.resume = function () { | |
if (!this._released) { | |
this.release(); | |
} | |
this.source.resume(); | |
}; | |
DelayedStream.prototype.pause = function () { | |
this.source.pause(); | |
}; | |
DelayedStream.prototype.release = function () { | |
this._released = true; | |
this._bufferedEvents.forEach( | |
function (args) { | |
this.emit.apply(this, args); | |
}.bind(this) | |
); | |
this._bufferedEvents = []; | |
}; | |
DelayedStream.prototype.pipe = function () { | |
var r = Stream.prototype.pipe.apply(this, arguments); | |
this.resume(); | |
return r; | |
}; | |
DelayedStream.prototype._handleEmit = function (args) { | |
if (this._released) { | |
this.emit.apply(this, args); | |
return; | |
} | |
if (args[0] === "data") { | |
this.dataSize += args[1].length; | |
this._checkIfMaxDataSizeExceeded(); | |
} | |
this._bufferedEvents.push(args); | |
}; | |
DelayedStream.prototype._checkIfMaxDataSizeExceeded = function () { | |
if (this._maxDataSizeExceeded) { | |
return; | |
} | |
if (this.dataSize <= this.maxDataSize) { | |
return; | |
} | |
this._maxDataSizeExceeded = true; | |
var message = | |
"DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded."; | |
this.emit("error", new Error(message)); | |
}; | |
}, | |
}); | |
// node_modules/combined-stream/lib/combined_stream.js | |
var require_combined_stream = __commonJS({ | |
"node_modules/combined-stream/lib/combined_stream.js"(exports2, module2) { | |
var util2 = require("util"); | |
var Stream = require("stream").Stream; | |
var DelayedStream = require_delayed_stream(); | |
module2.exports = CombinedStream; | |
function CombinedStream() { | |
this.writable = false; | |
this.readable = true; | |
this.dataSize = 0; | |
this.maxDataSize = 2 * 1024 * 1024; | |
this.pauseStreams = true; | |
this._released = false; | |
this._streams = []; | |
this._currentStream = null; | |
this._insideLoop = false; | |
this._pendingNext = false; | |
} | |
util2.inherits(CombinedStream, Stream); | |
CombinedStream.create = function (options) { | |
var combinedStream = new this(); | |
options = options || {}; | |
for (var option in options) { | |
combinedStream[option] = options[option]; | |
} | |
return combinedStream; | |
}; | |
CombinedStream.isStreamLike = function (stream4) { | |
return ( | |
typeof stream4 !== "function" && | |
typeof stream4 !== "string" && | |
typeof stream4 !== "boolean" && | |
typeof stream4 !== "number" && | |
!Buffer.isBuffer(stream4) | |
); | |
}; | |
CombinedStream.prototype.append = function (stream4) { | |
var isStreamLike = CombinedStream.isStreamLike(stream4); | |
if (isStreamLike) { | |
if (!(stream4 instanceof DelayedStream)) { | |
var newStream = DelayedStream.create(stream4, { | |
maxDataSize: Infinity, | |
pauseStream: this.pauseStreams, | |
}); | |
stream4.on("data", this._checkDataSize.bind(this)); | |
stream4 = newStream; | |
} | |
this._handleErrors(stream4); | |
if (this.pauseStreams) { | |
stream4.pause(); | |
} | |
} | |
this._streams.push(stream4); | |
return this; | |
}; | |
CombinedStream.prototype.pipe = function (dest, options) { | |
Stream.prototype.pipe.call(this, dest, options); | |
this.resume(); | |
return dest; | |
}; | |
CombinedStream.prototype._getNext = function () { | |
this._currentStream = null; | |
if (this._insideLoop) { | |
this._pendingNext = true; | |
return; | |
} | |
this._insideLoop = true; | |
try { | |
do { | |
this._pendingNext = false; | |
this._realGetNext(); | |
} while (this._pendingNext); | |
} finally { | |
this._insideLoop = false; | |
} | |
}; | |
CombinedStream.prototype._realGetNext = function () { | |
var stream4 = this._streams.shift(); | |
if (typeof stream4 == "undefined") { | |
this.end(); | |
return; | |
} | |
if (typeof stream4 !== "function") { | |
this._pipeNext(stream4); | |
return; | |
} | |
var getStream = stream4; | |
getStream( | |
function (stream5) { | |
var isStreamLike = CombinedStream.isStreamLike(stream5); | |
if (isStreamLike) { | |
stream5.on("data", this._checkDataSize.bind(this)); | |
this._handleErrors(stream5); | |
} | |
this._pipeNext(stream5); | |
}.bind(this) | |
); | |
}; | |
CombinedStream.prototype._pipeNext = function (stream4) { | |
this._currentStream = stream4; | |
var isStreamLike = CombinedStream.isStreamLike(stream4); | |
if (isStreamLike) { | |
stream4.on("end", this._getNext.bind(this)); | |
stream4.pipe(this, {end: false}); | |
return; | |
} | |
var value = stream4; | |
this.write(value); | |
this._getNext(); | |
}; | |
CombinedStream.prototype._handleErrors = function (stream4) { | |
var self2 = this; | |
stream4.on("error", function (err) { | |
self2._emitError(err); | |
}); | |
}; | |
CombinedStream.prototype.write = function (data) { | |
this.emit("data", data); | |
}; | |
CombinedStream.prototype.pause = function () { | |
if (!this.pauseStreams) { | |
return; | |
} | |
if ( | |
this.pauseStreams && | |
this._currentStream && | |
typeof this._currentStream.pause == "function" | |
) | |
this._currentStream.pause(); | |
this.emit("pause"); | |
}; | |
CombinedStream.prototype.resume = function () { | |
if (!this._released) { | |
this._released = true; | |
this.writable = true; | |
this._getNext(); | |
} | |
if ( | |
this.pauseStreams && | |
this._currentStream && | |
typeof this._currentStream.resume == "function" | |
) | |
this._currentStream.resume(); | |
this.emit("resume"); | |
}; | |
CombinedStream.prototype.end = function () { | |
this._reset(); | |
this.emit("end"); | |
}; | |
CombinedStream.prototype.destroy = function () { | |
this._reset(); | |
this.emit("close"); | |
}; | |
CombinedStream.prototype._reset = function () { | |
this.writable = false; | |
this._streams = []; | |
this._currentStream = null; | |
}; | |
CombinedStream.prototype._checkDataSize = function () { | |
this._updateDataSize(); | |
if (this.dataSize <= this.maxDataSize) { | |
return; | |
} | |
var message = | |
"DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded."; | |
this._emitError(new Error(message)); | |
}; | |
CombinedStream.prototype._updateDataSize = function () { | |
this.dataSize = 0; | |
var self2 = this; | |
this._streams.forEach(function (stream4) { | |
if (!stream4.dataSize) { | |
return; | |
} | |
self2.dataSize += stream4.dataSize; | |
}); | |
if (this._currentStream && this._currentStream.dataSize) { | |
this.dataSize += this._currentStream.dataSize; | |
} | |
}; | |
CombinedStream.prototype._emitError = function (err) { | |
this._reset(); | |
this.emit("error", err); | |
}; | |
}, | |
}); | |
// node_modules/mime-db/db.json | |
var require_db = __commonJS({ | |
"node_modules/mime-db/db.json"(exports2, module2) { | |
module2.exports = { | |
"application/1d-interleaved-parityfec": { | |
source: "iana", | |
}, | |
"application/3gpdash-qoe-report+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/3gpp-ims+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/a2l": { | |
source: "iana", | |
}, | |
"application/activemessage": { | |
source: "iana", | |
}, | |
"application/activity+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-costmap+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-costmapfilter+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-directory+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-endpointcost+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-endpointcostparams+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-endpointprop+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-endpointpropparams+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-error+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-networkmap+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-networkmapfilter+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-updatestreamcontrol+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/alto-updatestreamparams+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/aml": { | |
source: "iana", | |
}, | |
"application/andrew-inset": { | |
source: "iana", | |
extensions: ["ez"], | |
}, | |
"application/applefile": { | |
source: "iana", | |
}, | |
"application/applixware": { | |
source: "apache", | |
extensions: ["aw"], | |
}, | |
"application/atf": { | |
source: "iana", | |
}, | |
"application/atfx": { | |
source: "iana", | |
}, | |
"application/atom+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["atom"], | |
}, | |
"application/atomcat+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["atomcat"], | |
}, | |
"application/atomdeleted+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["atomdeleted"], | |
}, | |
"application/atomicmail": { | |
source: "iana", | |
}, | |
"application/atomsvc+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["atomsvc"], | |
}, | |
"application/atsc-dwd+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["dwd"], | |
}, | |
"application/atsc-dynamic-event-message": { | |
source: "iana", | |
}, | |
"application/atsc-held+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["held"], | |
}, | |
"application/atsc-rdt+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/atsc-rsat+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rsat"], | |
}, | |
"application/atxml": { | |
source: "iana", | |
}, | |
"application/auth-policy+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/bacnet-xdd+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/batch-smtp": { | |
source: "iana", | |
}, | |
"application/bdoc": { | |
compressible: false, | |
extensions: ["bdoc"], | |
}, | |
"application/beep+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/calendar+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/calendar+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xcs"], | |
}, | |
"application/call-completion": { | |
source: "iana", | |
}, | |
"application/cals-1840": { | |
source: "iana", | |
}, | |
"application/captive+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/cbor": { | |
source: "iana", | |
}, | |
"application/cbor-seq": { | |
source: "iana", | |
}, | |
"application/cccex": { | |
source: "iana", | |
}, | |
"application/ccmp+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/ccxml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ccxml"], | |
}, | |
"application/cdfx+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["cdfx"], | |
}, | |
"application/cdmi-capability": { | |
source: "iana", | |
extensions: ["cdmia"], | |
}, | |
"application/cdmi-container": { | |
source: "iana", | |
extensions: ["cdmic"], | |
}, | |
"application/cdmi-domain": { | |
source: "iana", | |
extensions: ["cdmid"], | |
}, | |
"application/cdmi-object": { | |
source: "iana", | |
extensions: ["cdmio"], | |
}, | |
"application/cdmi-queue": { | |
source: "iana", | |
extensions: ["cdmiq"], | |
}, | |
"application/cdni": { | |
source: "iana", | |
}, | |
"application/cea": { | |
source: "iana", | |
}, | |
"application/cea-2018+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/cellml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/cfw": { | |
source: "iana", | |
}, | |
"application/clue+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/clue_info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/cms": { | |
source: "iana", | |
}, | |
"application/cnrp+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/coap-group+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/coap-payload": { | |
source: "iana", | |
}, | |
"application/commonground": { | |
source: "iana", | |
}, | |
"application/conference-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/cose": { | |
source: "iana", | |
}, | |
"application/cose-key": { | |
source: "iana", | |
}, | |
"application/cose-key-set": { | |
source: "iana", | |
}, | |
"application/cpl+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/csrattrs": { | |
source: "iana", | |
}, | |
"application/csta+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/cstadata+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/csvm+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/cu-seeme": { | |
source: "apache", | |
extensions: ["cu"], | |
}, | |
"application/cwt": { | |
source: "iana", | |
}, | |
"application/cybercash": { | |
source: "iana", | |
}, | |
"application/dart": { | |
compressible: true, | |
}, | |
"application/dash+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mpd"], | |
}, | |
"application/dashdelta": { | |
source: "iana", | |
}, | |
"application/davmount+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["davmount"], | |
}, | |
"application/dca-rft": { | |
source: "iana", | |
}, | |
"application/dcd": { | |
source: "iana", | |
}, | |
"application/dec-dx": { | |
source: "iana", | |
}, | |
"application/dialog-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/dicom": { | |
source: "iana", | |
}, | |
"application/dicom+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/dicom+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/dii": { | |
source: "iana", | |
}, | |
"application/dit": { | |
source: "iana", | |
}, | |
"application/dns": { | |
source: "iana", | |
}, | |
"application/dns+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/dns-message": { | |
source: "iana", | |
}, | |
"application/docbook+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["dbk"], | |
}, | |
"application/dots+cbor": { | |
source: "iana", | |
}, | |
"application/dskpp+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/dssc+der": { | |
source: "iana", | |
extensions: ["dssc"], | |
}, | |
"application/dssc+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xdssc"], | |
}, | |
"application/dvcs": { | |
source: "iana", | |
}, | |
"application/ecmascript": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ecma", "es"], | |
}, | |
"application/edi-consent": { | |
source: "iana", | |
}, | |
"application/edi-x12": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/edifact": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/efi": { | |
source: "iana", | |
}, | |
"application/emergencycalldata.cap+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/emergencycalldata.comment+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/emergencycalldata.control+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/emergencycalldata.deviceinfo+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/emergencycalldata.ecall.msd": { | |
source: "iana", | |
}, | |
"application/emergencycalldata.providerinfo+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/emergencycalldata.serviceinfo+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/emergencycalldata.subscriberinfo+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/emergencycalldata.veds+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/emma+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["emma"], | |
}, | |
"application/emotionml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["emotionml"], | |
}, | |
"application/encaprtp": { | |
source: "iana", | |
}, | |
"application/epp+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/epub+zip": { | |
source: "iana", | |
compressible: false, | |
extensions: ["epub"], | |
}, | |
"application/eshop": { | |
source: "iana", | |
}, | |
"application/exi": { | |
source: "iana", | |
extensions: ["exi"], | |
}, | |
"application/expect-ct-report+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/fastinfoset": { | |
source: "iana", | |
}, | |
"application/fastsoap": { | |
source: "iana", | |
}, | |
"application/fdt+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["fdt"], | |
}, | |
"application/fhir+json": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/fhir+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/fido.trusted-apps+json": { | |
compressible: true, | |
}, | |
"application/fits": { | |
source: "iana", | |
}, | |
"application/flexfec": { | |
source: "iana", | |
}, | |
"application/font-sfnt": { | |
source: "iana", | |
}, | |
"application/font-tdpfr": { | |
source: "iana", | |
extensions: ["pfr"], | |
}, | |
"application/font-woff": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/framework-attributes+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/geo+json": { | |
source: "iana", | |
compressible: true, | |
extensions: ["geojson"], | |
}, | |
"application/geo+json-seq": { | |
source: "iana", | |
}, | |
"application/geopackage+sqlite3": { | |
source: "iana", | |
}, | |
"application/geoxacml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/gltf-buffer": { | |
source: "iana", | |
}, | |
"application/gml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["gml"], | |
}, | |
"application/gpx+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["gpx"], | |
}, | |
"application/gxf": { | |
source: "apache", | |
extensions: ["gxf"], | |
}, | |
"application/gzip": { | |
source: "iana", | |
compressible: false, | |
extensions: ["gz"], | |
}, | |
"application/h224": { | |
source: "iana", | |
}, | |
"application/held+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/hjson": { | |
extensions: ["hjson"], | |
}, | |
"application/http": { | |
source: "iana", | |
}, | |
"application/hyperstudio": { | |
source: "iana", | |
extensions: ["stk"], | |
}, | |
"application/ibe-key-request+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/ibe-pkg-reply+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/ibe-pp-data": { | |
source: "iana", | |
}, | |
"application/iges": { | |
source: "iana", | |
}, | |
"application/im-iscomposing+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/index": { | |
source: "iana", | |
}, | |
"application/index.cmd": { | |
source: "iana", | |
}, | |
"application/index.obj": { | |
source: "iana", | |
}, | |
"application/index.response": { | |
source: "iana", | |
}, | |
"application/index.vnd": { | |
source: "iana", | |
}, | |
"application/inkml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ink", "inkml"], | |
}, | |
"application/iotp": { | |
source: "iana", | |
}, | |
"application/ipfix": { | |
source: "iana", | |
extensions: ["ipfix"], | |
}, | |
"application/ipp": { | |
source: "iana", | |
}, | |
"application/isup": { | |
source: "iana", | |
}, | |
"application/its+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["its"], | |
}, | |
"application/java-archive": { | |
source: "apache", | |
compressible: false, | |
extensions: ["jar", "war", "ear"], | |
}, | |
"application/java-serialized-object": { | |
source: "apache", | |
compressible: false, | |
extensions: ["ser"], | |
}, | |
"application/java-vm": { | |
source: "apache", | |
compressible: false, | |
extensions: ["class"], | |
}, | |
"application/javascript": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["js", "mjs"], | |
}, | |
"application/jf2feed+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/jose": { | |
source: "iana", | |
}, | |
"application/jose+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/jrd+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/json": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["json", "map"], | |
}, | |
"application/json-patch+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/json-seq": { | |
source: "iana", | |
}, | |
"application/json5": { | |
extensions: ["json5"], | |
}, | |
"application/jsonml+json": { | |
source: "apache", | |
compressible: true, | |
extensions: ["jsonml"], | |
}, | |
"application/jwk+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/jwk-set+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/jwt": { | |
source: "iana", | |
}, | |
"application/kpml-request+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/kpml-response+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/ld+json": { | |
source: "iana", | |
compressible: true, | |
extensions: ["jsonld"], | |
}, | |
"application/lgr+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["lgr"], | |
}, | |
"application/link-format": { | |
source: "iana", | |
}, | |
"application/load-control+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/lost+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["lostxml"], | |
}, | |
"application/lostsync+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/lpf+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/lxf": { | |
source: "iana", | |
}, | |
"application/mac-binhex40": { | |
source: "iana", | |
extensions: ["hqx"], | |
}, | |
"application/mac-compactpro": { | |
source: "apache", | |
extensions: ["cpt"], | |
}, | |
"application/macwriteii": { | |
source: "iana", | |
}, | |
"application/mads+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mads"], | |
}, | |
"application/manifest+json": { | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["webmanifest"], | |
}, | |
"application/marc": { | |
source: "iana", | |
extensions: ["mrc"], | |
}, | |
"application/marcxml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mrcx"], | |
}, | |
"application/mathematica": { | |
source: "iana", | |
extensions: ["ma", "nb", "mb"], | |
}, | |
"application/mathml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mathml"], | |
}, | |
"application/mathml-content+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mathml-presentation+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-associated-procedure-description+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-deregister+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-envelope+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-msk+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-msk-response+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-protection-description+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-reception-report+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-register+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-register-response+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-schedule+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbms-user-service-description+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mbox": { | |
source: "iana", | |
extensions: ["mbox"], | |
}, | |
"application/media-policy-dataset+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/media_control+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/mediaservercontrol+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mscml"], | |
}, | |
"application/merge-patch+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/metalink+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["metalink"], | |
}, | |
"application/metalink4+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["meta4"], | |
}, | |
"application/mets+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mets"], | |
}, | |
"application/mf4": { | |
source: "iana", | |
}, | |
"application/mikey": { | |
source: "iana", | |
}, | |
"application/mipc": { | |
source: "iana", | |
}, | |
"application/mmt-aei+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["maei"], | |
}, | |
"application/mmt-usd+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["musd"], | |
}, | |
"application/mods+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mods"], | |
}, | |
"application/moss-keys": { | |
source: "iana", | |
}, | |
"application/moss-signature": { | |
source: "iana", | |
}, | |
"application/mosskey-data": { | |
source: "iana", | |
}, | |
"application/mosskey-request": { | |
source: "iana", | |
}, | |
"application/mp21": { | |
source: "iana", | |
extensions: ["m21", "mp21"], | |
}, | |
"application/mp4": { | |
source: "iana", | |
extensions: ["mp4s", "m4p"], | |
}, | |
"application/mpeg4-generic": { | |
source: "iana", | |
}, | |
"application/mpeg4-iod": { | |
source: "iana", | |
}, | |
"application/mpeg4-iod-xmt": { | |
source: "iana", | |
}, | |
"application/mrb-consumer+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xdf"], | |
}, | |
"application/mrb-publish+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xdf"], | |
}, | |
"application/msc-ivr+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/msc-mixer+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/msword": { | |
source: "iana", | |
compressible: false, | |
extensions: ["doc", "dot"], | |
}, | |
"application/mud+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/multipart-core": { | |
source: "iana", | |
}, | |
"application/mxf": { | |
source: "iana", | |
extensions: ["mxf"], | |
}, | |
"application/n-quads": { | |
source: "iana", | |
extensions: ["nq"], | |
}, | |
"application/n-triples": { | |
source: "iana", | |
extensions: ["nt"], | |
}, | |
"application/nasdata": { | |
source: "iana", | |
}, | |
"application/news-checkgroups": { | |
source: "iana", | |
charset: "US-ASCII", | |
}, | |
"application/news-groupinfo": { | |
source: "iana", | |
charset: "US-ASCII", | |
}, | |
"application/news-transmission": { | |
source: "iana", | |
}, | |
"application/nlsml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/node": { | |
source: "iana", | |
extensions: ["cjs"], | |
}, | |
"application/nss": { | |
source: "iana", | |
}, | |
"application/ocsp-request": { | |
source: "iana", | |
}, | |
"application/ocsp-response": { | |
source: "iana", | |
}, | |
"application/octet-stream": { | |
source: "iana", | |
compressible: false, | |
extensions: [ | |
"bin", | |
"dms", | |
"lrf", | |
"mar", | |
"so", | |
"dist", | |
"distz", | |
"pkg", | |
"bpk", | |
"dump", | |
"elc", | |
"deploy", | |
"exe", | |
"dll", | |
"deb", | |
"dmg", | |
"iso", | |
"img", | |
"msi", | |
"msp", | |
"msm", | |
"buffer", | |
], | |
}, | |
"application/oda": { | |
source: "iana", | |
extensions: ["oda"], | |
}, | |
"application/odm+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/odx": { | |
source: "iana", | |
}, | |
"application/oebps-package+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["opf"], | |
}, | |
"application/ogg": { | |
source: "iana", | |
compressible: false, | |
extensions: ["ogx"], | |
}, | |
"application/omdoc+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["omdoc"], | |
}, | |
"application/onenote": { | |
source: "apache", | |
extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"], | |
}, | |
"application/opc-nodeset+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/oscore": { | |
source: "iana", | |
}, | |
"application/oxps": { | |
source: "iana", | |
extensions: ["oxps"], | |
}, | |
"application/p2p-overlay+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["relo"], | |
}, | |
"application/parityfec": { | |
source: "iana", | |
}, | |
"application/passport": { | |
source: "iana", | |
}, | |
"application/patch-ops-error+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xer"], | |
}, | |
"application/pdf": { | |
source: "iana", | |
compressible: false, | |
extensions: ["pdf"], | |
}, | |
"application/pdx": { | |
source: "iana", | |
}, | |
"application/pem-certificate-chain": { | |
source: "iana", | |
}, | |
"application/pgp-encrypted": { | |
source: "iana", | |
compressible: false, | |
extensions: ["pgp"], | |
}, | |
"application/pgp-keys": { | |
source: "iana", | |
}, | |
"application/pgp-signature": { | |
source: "iana", | |
extensions: ["asc", "sig"], | |
}, | |
"application/pics-rules": { | |
source: "apache", | |
extensions: ["prf"], | |
}, | |
"application/pidf+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/pidf-diff+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/pkcs10": { | |
source: "iana", | |
extensions: ["p10"], | |
}, | |
"application/pkcs12": { | |
source: "iana", | |
}, | |
"application/pkcs7-mime": { | |
source: "iana", | |
extensions: ["p7m", "p7c"], | |
}, | |
"application/pkcs7-signature": { | |
source: "iana", | |
extensions: ["p7s"], | |
}, | |
"application/pkcs8": { | |
source: "iana", | |
extensions: ["p8"], | |
}, | |
"application/pkcs8-encrypted": { | |
source: "iana", | |
}, | |
"application/pkix-attr-cert": { | |
source: "iana", | |
extensions: ["ac"], | |
}, | |
"application/pkix-cert": { | |
source: "iana", | |
extensions: ["cer"], | |
}, | |
"application/pkix-crl": { | |
source: "iana", | |
extensions: ["crl"], | |
}, | |
"application/pkix-pkipath": { | |
source: "iana", | |
extensions: ["pkipath"], | |
}, | |
"application/pkixcmp": { | |
source: "iana", | |
extensions: ["pki"], | |
}, | |
"application/pls+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["pls"], | |
}, | |
"application/poc-settings+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/postscript": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ai", "eps", "ps"], | |
}, | |
"application/ppsp-tracker+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/problem+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/problem+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/provenance+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["provx"], | |
}, | |
"application/prs.alvestrand.titrax-sheet": { | |
source: "iana", | |
}, | |
"application/prs.cww": { | |
source: "iana", | |
extensions: ["cww"], | |
}, | |
"application/prs.hpub+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/prs.nprend": { | |
source: "iana", | |
}, | |
"application/prs.plucker": { | |
source: "iana", | |
}, | |
"application/prs.rdf-xml-crypt": { | |
source: "iana", | |
}, | |
"application/prs.xsf+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/pskc+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["pskcxml"], | |
}, | |
"application/pvd+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/qsig": { | |
source: "iana", | |
}, | |
"application/raml+yaml": { | |
compressible: true, | |
extensions: ["raml"], | |
}, | |
"application/raptorfec": { | |
source: "iana", | |
}, | |
"application/rdap+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/rdf+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rdf", "owl"], | |
}, | |
"application/reginfo+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rif"], | |
}, | |
"application/relax-ng-compact-syntax": { | |
source: "iana", | |
extensions: ["rnc"], | |
}, | |
"application/remote-printing": { | |
source: "iana", | |
}, | |
"application/reputon+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/resource-lists+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rl"], | |
}, | |
"application/resource-lists-diff+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rld"], | |
}, | |
"application/rfc+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/riscos": { | |
source: "iana", | |
}, | |
"application/rlmi+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/rls-services+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rs"], | |
}, | |
"application/route-apd+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rapd"], | |
}, | |
"application/route-s-tsid+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["sls"], | |
}, | |
"application/route-usd+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rusd"], | |
}, | |
"application/rpki-ghostbusters": { | |
source: "iana", | |
extensions: ["gbr"], | |
}, | |
"application/rpki-manifest": { | |
source: "iana", | |
extensions: ["mft"], | |
}, | |
"application/rpki-publication": { | |
source: "iana", | |
}, | |
"application/rpki-roa": { | |
source: "iana", | |
extensions: ["roa"], | |
}, | |
"application/rpki-updown": { | |
source: "iana", | |
}, | |
"application/rsd+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["rsd"], | |
}, | |
"application/rss+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["rss"], | |
}, | |
"application/rtf": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rtf"], | |
}, | |
"application/rtploopback": { | |
source: "iana", | |
}, | |
"application/rtx": { | |
source: "iana", | |
}, | |
"application/samlassertion+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/samlmetadata+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/sarif+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/sbe": { | |
source: "iana", | |
}, | |
"application/sbml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["sbml"], | |
}, | |
"application/scaip+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/scim+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/scvp-cv-request": { | |
source: "iana", | |
extensions: ["scq"], | |
}, | |
"application/scvp-cv-response": { | |
source: "iana", | |
extensions: ["scs"], | |
}, | |
"application/scvp-vp-request": { | |
source: "iana", | |
extensions: ["spq"], | |
}, | |
"application/scvp-vp-response": { | |
source: "iana", | |
extensions: ["spp"], | |
}, | |
"application/sdp": { | |
source: "iana", | |
extensions: ["sdp"], | |
}, | |
"application/secevent+jwt": { | |
source: "iana", | |
}, | |
"application/senml+cbor": { | |
source: "iana", | |
}, | |
"application/senml+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/senml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["senmlx"], | |
}, | |
"application/senml-etch+cbor": { | |
source: "iana", | |
}, | |
"application/senml-etch+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/senml-exi": { | |
source: "iana", | |
}, | |
"application/sensml+cbor": { | |
source: "iana", | |
}, | |
"application/sensml+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/sensml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["sensmlx"], | |
}, | |
"application/sensml-exi": { | |
source: "iana", | |
}, | |
"application/sep+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/sep-exi": { | |
source: "iana", | |
}, | |
"application/session-info": { | |
source: "iana", | |
}, | |
"application/set-payment": { | |
source: "iana", | |
}, | |
"application/set-payment-initiation": { | |
source: "iana", | |
extensions: ["setpay"], | |
}, | |
"application/set-registration": { | |
source: "iana", | |
}, | |
"application/set-registration-initiation": { | |
source: "iana", | |
extensions: ["setreg"], | |
}, | |
"application/sgml": { | |
source: "iana", | |
}, | |
"application/sgml-open-catalog": { | |
source: "iana", | |
}, | |
"application/shf+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["shf"], | |
}, | |
"application/sieve": { | |
source: "iana", | |
extensions: ["siv", "sieve"], | |
}, | |
"application/simple-filter+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/simple-message-summary": { | |
source: "iana", | |
}, | |
"application/simplesymbolcontainer": { | |
source: "iana", | |
}, | |
"application/sipc": { | |
source: "iana", | |
}, | |
"application/slate": { | |
source: "iana", | |
}, | |
"application/smil": { | |
source: "iana", | |
}, | |
"application/smil+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["smi", "smil"], | |
}, | |
"application/smpte336m": { | |
source: "iana", | |
}, | |
"application/soap+fastinfoset": { | |
source: "iana", | |
}, | |
"application/soap+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/sparql-query": { | |
source: "iana", | |
extensions: ["rq"], | |
}, | |
"application/sparql-results+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["srx"], | |
}, | |
"application/spirits-event+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/sql": { | |
source: "iana", | |
}, | |
"application/srgs": { | |
source: "iana", | |
extensions: ["gram"], | |
}, | |
"application/srgs+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["grxml"], | |
}, | |
"application/sru+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["sru"], | |
}, | |
"application/ssdl+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["ssdl"], | |
}, | |
"application/ssml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ssml"], | |
}, | |
"application/stix+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/swid+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["swidtag"], | |
}, | |
"application/tamp-apex-update": { | |
source: "iana", | |
}, | |
"application/tamp-apex-update-confirm": { | |
source: "iana", | |
}, | |
"application/tamp-community-update": { | |
source: "iana", | |
}, | |
"application/tamp-community-update-confirm": { | |
source: "iana", | |
}, | |
"application/tamp-error": { | |
source: "iana", | |
}, | |
"application/tamp-sequence-adjust": { | |
source: "iana", | |
}, | |
"application/tamp-sequence-adjust-confirm": { | |
source: "iana", | |
}, | |
"application/tamp-status-query": { | |
source: "iana", | |
}, | |
"application/tamp-status-response": { | |
source: "iana", | |
}, | |
"application/tamp-update": { | |
source: "iana", | |
}, | |
"application/tamp-update-confirm": { | |
source: "iana", | |
}, | |
"application/tar": { | |
compressible: true, | |
}, | |
"application/taxii+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/td+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/tei+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["tei", "teicorpus"], | |
}, | |
"application/tetra_isi": { | |
source: "iana", | |
}, | |
"application/thraud+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["tfi"], | |
}, | |
"application/timestamp-query": { | |
source: "iana", | |
}, | |
"application/timestamp-reply": { | |
source: "iana", | |
}, | |
"application/timestamped-data": { | |
source: "iana", | |
extensions: ["tsd"], | |
}, | |
"application/tlsrpt+gzip": { | |
source: "iana", | |
}, | |
"application/tlsrpt+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/tnauthlist": { | |
source: "iana", | |
}, | |
"application/toml": { | |
compressible: true, | |
extensions: ["toml"], | |
}, | |
"application/trickle-ice-sdpfrag": { | |
source: "iana", | |
}, | |
"application/trig": { | |
source: "iana", | |
}, | |
"application/ttml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ttml"], | |
}, | |
"application/tve-trigger": { | |
source: "iana", | |
}, | |
"application/tzif": { | |
source: "iana", | |
}, | |
"application/tzif-leap": { | |
source: "iana", | |
}, | |
"application/ubjson": { | |
compressible: false, | |
extensions: ["ubj"], | |
}, | |
"application/ulpfec": { | |
source: "iana", | |
}, | |
"application/urc-grpsheet+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/urc-ressheet+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rsheet"], | |
}, | |
"application/urc-targetdesc+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["td"], | |
}, | |
"application/urc-uisocketdesc+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vcard+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vcard+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vemmi": { | |
source: "iana", | |
}, | |
"application/vividence.scriptfile": { | |
source: "apache", | |
}, | |
"application/vnd.1000minds.decision-model+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["1km"], | |
}, | |
"application/vnd.3gpp-prose+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp-prose-pc3ch+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp-v2x-local-service-information": { | |
source: "iana", | |
}, | |
"application/vnd.3gpp.access-transfer-events+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.bsf+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.gmop+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mc-signalling-ear": { | |
source: "iana", | |
}, | |
"application/vnd.3gpp.mcdata-affiliation-command+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcdata-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcdata-payload": { | |
source: "iana", | |
}, | |
"application/vnd.3gpp.mcdata-service-config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcdata-signalling": { | |
source: "iana", | |
}, | |
"application/vnd.3gpp.mcdata-ue-config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcdata-user-profile+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-affiliation-command+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-floor-request+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-location-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-mbms-usage-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-service-config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-signed+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-ue-config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-ue-init-config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcptt-user-profile+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-affiliation-command+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-affiliation-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-location-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-service-config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-transmission-request+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-ue-config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mcvideo-user-profile+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.mid-call+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.pic-bw-large": { | |
source: "iana", | |
extensions: ["plb"], | |
}, | |
"application/vnd.3gpp.pic-bw-small": { | |
source: "iana", | |
extensions: ["psb"], | |
}, | |
"application/vnd.3gpp.pic-bw-var": { | |
source: "iana", | |
extensions: ["pvb"], | |
}, | |
"application/vnd.3gpp.sms": { | |
source: "iana", | |
}, | |
"application/vnd.3gpp.sms+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.srvcc-ext+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.srvcc-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.state-and-event-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp.ussd+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp2.bcmcsinfo+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.3gpp2.sms": { | |
source: "iana", | |
}, | |
"application/vnd.3gpp2.tcap": { | |
source: "iana", | |
extensions: ["tcap"], | |
}, | |
"application/vnd.3lightssoftware.imagescal": { | |
source: "iana", | |
}, | |
"application/vnd.3m.post-it-notes": { | |
source: "iana", | |
extensions: ["pwn"], | |
}, | |
"application/vnd.accpac.simply.aso": { | |
source: "iana", | |
extensions: ["aso"], | |
}, | |
"application/vnd.accpac.simply.imp": { | |
source: "iana", | |
extensions: ["imp"], | |
}, | |
"application/vnd.acucobol": { | |
source: "iana", | |
extensions: ["acu"], | |
}, | |
"application/vnd.acucorp": { | |
source: "iana", | |
extensions: ["atc", "acutc"], | |
}, | |
"application/vnd.adobe.air-application-installer-package+zip": { | |
source: "apache", | |
compressible: false, | |
extensions: ["air"], | |
}, | |
"application/vnd.adobe.flash.movie": { | |
source: "iana", | |
}, | |
"application/vnd.adobe.formscentral.fcdt": { | |
source: "iana", | |
extensions: ["fcdt"], | |
}, | |
"application/vnd.adobe.fxp": { | |
source: "iana", | |
extensions: ["fxp", "fxpl"], | |
}, | |
"application/vnd.adobe.partial-upload": { | |
source: "iana", | |
}, | |
"application/vnd.adobe.xdp+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xdp"], | |
}, | |
"application/vnd.adobe.xfdf": { | |
source: "iana", | |
extensions: ["xfdf"], | |
}, | |
"application/vnd.aether.imp": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.afplinedata": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.afplinedata-pagedef": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.foca-charset": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.foca-codedfont": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.foca-codepage": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.modca": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.modca-formdef": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.modca-mediummap": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.modca-objectcontainer": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.modca-overlay": { | |
source: "iana", | |
}, | |
"application/vnd.afpc.modca-pagesegment": { | |
source: "iana", | |
}, | |
"application/vnd.ah-barcode": { | |
source: "iana", | |
}, | |
"application/vnd.ahead.space": { | |
source: "iana", | |
extensions: ["ahead"], | |
}, | |
"application/vnd.airzip.filesecure.azf": { | |
source: "iana", | |
extensions: ["azf"], | |
}, | |
"application/vnd.airzip.filesecure.azs": { | |
source: "iana", | |
extensions: ["azs"], | |
}, | |
"application/vnd.amadeus+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.amazon.ebook": { | |
source: "apache", | |
extensions: ["azw"], | |
}, | |
"application/vnd.amazon.mobi8-ebook": { | |
source: "iana", | |
}, | |
"application/vnd.americandynamics.acc": { | |
source: "iana", | |
extensions: ["acc"], | |
}, | |
"application/vnd.amiga.ami": { | |
source: "iana", | |
extensions: ["ami"], | |
}, | |
"application/vnd.amundsen.maze+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.android.ota": { | |
source: "iana", | |
}, | |
"application/vnd.android.package-archive": { | |
source: "apache", | |
compressible: false, | |
extensions: ["apk"], | |
}, | |
"application/vnd.anki": { | |
source: "iana", | |
}, | |
"application/vnd.anser-web-certificate-issue-initiation": { | |
source: "iana", | |
extensions: ["cii"], | |
}, | |
"application/vnd.anser-web-funds-transfer-initiation": { | |
source: "apache", | |
extensions: ["fti"], | |
}, | |
"application/vnd.antix.game-component": { | |
source: "iana", | |
extensions: ["atx"], | |
}, | |
"application/vnd.apache.thrift.binary": { | |
source: "iana", | |
}, | |
"application/vnd.apache.thrift.compact": { | |
source: "iana", | |
}, | |
"application/vnd.apache.thrift.json": { | |
source: "iana", | |
}, | |
"application/vnd.api+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.aplextor.warrp+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.apothekende.reservation+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.apple.installer+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mpkg"], | |
}, | |
"application/vnd.apple.keynote": { | |
source: "iana", | |
extensions: ["key"], | |
}, | |
"application/vnd.apple.mpegurl": { | |
source: "iana", | |
extensions: ["m3u8"], | |
}, | |
"application/vnd.apple.numbers": { | |
source: "iana", | |
extensions: ["numbers"], | |
}, | |
"application/vnd.apple.pages": { | |
source: "iana", | |
extensions: ["pages"], | |
}, | |
"application/vnd.apple.pkpass": { | |
compressible: false, | |
extensions: ["pkpass"], | |
}, | |
"application/vnd.arastra.swi": { | |
source: "iana", | |
}, | |
"application/vnd.aristanetworks.swi": { | |
source: "iana", | |
extensions: ["swi"], | |
}, | |
"application/vnd.artisan+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.artsquare": { | |
source: "iana", | |
}, | |
"application/vnd.astraea-software.iota": { | |
source: "iana", | |
extensions: ["iota"], | |
}, | |
"application/vnd.audiograph": { | |
source: "iana", | |
extensions: ["aep"], | |
}, | |
"application/vnd.autopackage": { | |
source: "iana", | |
}, | |
"application/vnd.avalon+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.avistar+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.balsamiq.bmml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["bmml"], | |
}, | |
"application/vnd.balsamiq.bmpr": { | |
source: "iana", | |
}, | |
"application/vnd.banana-accounting": { | |
source: "iana", | |
}, | |
"application/vnd.bbf.usp.error": { | |
source: "iana", | |
}, | |
"application/vnd.bbf.usp.msg": { | |
source: "iana", | |
}, | |
"application/vnd.bbf.usp.msg+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.bekitzur-stech+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.bint.med-content": { | |
source: "iana", | |
}, | |
"application/vnd.biopax.rdf+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.blink-idb-value-wrapper": { | |
source: "iana", | |
}, | |
"application/vnd.blueice.multipass": { | |
source: "iana", | |
extensions: ["mpm"], | |
}, | |
"application/vnd.bluetooth.ep.oob": { | |
source: "iana", | |
}, | |
"application/vnd.bluetooth.le.oob": { | |
source: "iana", | |
}, | |
"application/vnd.bmi": { | |
source: "iana", | |
extensions: ["bmi"], | |
}, | |
"application/vnd.bpf": { | |
source: "iana", | |
}, | |
"application/vnd.bpf3": { | |
source: "iana", | |
}, | |
"application/vnd.businessobjects": { | |
source: "iana", | |
extensions: ["rep"], | |
}, | |
"application/vnd.byu.uapi+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.cab-jscript": { | |
source: "iana", | |
}, | |
"application/vnd.canon-cpdl": { | |
source: "iana", | |
}, | |
"application/vnd.canon-lips": { | |
source: "iana", | |
}, | |
"application/vnd.capasystems-pg+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.cendio.thinlinc.clientconf": { | |
source: "iana", | |
}, | |
"application/vnd.century-systems.tcp_stream": { | |
source: "iana", | |
}, | |
"application/vnd.chemdraw+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["cdxml"], | |
}, | |
"application/vnd.chess-pgn": { | |
source: "iana", | |
}, | |
"application/vnd.chipnuts.karaoke-mmd": { | |
source: "iana", | |
extensions: ["mmd"], | |
}, | |
"application/vnd.ciedi": { | |
source: "iana", | |
}, | |
"application/vnd.cinderella": { | |
source: "iana", | |
extensions: ["cdy"], | |
}, | |
"application/vnd.cirpack.isdn-ext": { | |
source: "iana", | |
}, | |
"application/vnd.citationstyles.style+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["csl"], | |
}, | |
"application/vnd.claymore": { | |
source: "iana", | |
extensions: ["cla"], | |
}, | |
"application/vnd.cloanto.rp9": { | |
source: "iana", | |
extensions: ["rp9"], | |
}, | |
"application/vnd.clonk.c4group": { | |
source: "iana", | |
extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"], | |
}, | |
"application/vnd.cluetrust.cartomobile-config": { | |
source: "iana", | |
extensions: ["c11amc"], | |
}, | |
"application/vnd.cluetrust.cartomobile-config-pkg": { | |
source: "iana", | |
extensions: ["c11amz"], | |
}, | |
"application/vnd.coffeescript": { | |
source: "iana", | |
}, | |
"application/vnd.collabio.xodocuments.document": { | |
source: "iana", | |
}, | |
"application/vnd.collabio.xodocuments.document-template": { | |
source: "iana", | |
}, | |
"application/vnd.collabio.xodocuments.presentation": { | |
source: "iana", | |
}, | |
"application/vnd.collabio.xodocuments.presentation-template": { | |
source: "iana", | |
}, | |
"application/vnd.collabio.xodocuments.spreadsheet": { | |
source: "iana", | |
}, | |
"application/vnd.collabio.xodocuments.spreadsheet-template": { | |
source: "iana", | |
}, | |
"application/vnd.collection+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.collection.doc+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.collection.next+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.comicbook+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.comicbook-rar": { | |
source: "iana", | |
}, | |
"application/vnd.commerce-battelle": { | |
source: "iana", | |
}, | |
"application/vnd.commonspace": { | |
source: "iana", | |
extensions: ["csp"], | |
}, | |
"application/vnd.contact.cmsg": { | |
source: "iana", | |
extensions: ["cdbcmsg"], | |
}, | |
"application/vnd.coreos.ignition+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.cosmocaller": { | |
source: "iana", | |
extensions: ["cmc"], | |
}, | |
"application/vnd.crick.clicker": { | |
source: "iana", | |
extensions: ["clkx"], | |
}, | |
"application/vnd.crick.clicker.keyboard": { | |
source: "iana", | |
extensions: ["clkk"], | |
}, | |
"application/vnd.crick.clicker.palette": { | |
source: "iana", | |
extensions: ["clkp"], | |
}, | |
"application/vnd.crick.clicker.template": { | |
source: "iana", | |
extensions: ["clkt"], | |
}, | |
"application/vnd.crick.clicker.wordbank": { | |
source: "iana", | |
extensions: ["clkw"], | |
}, | |
"application/vnd.criticaltools.wbs+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["wbs"], | |
}, | |
"application/vnd.cryptii.pipe+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.crypto-shade-file": { | |
source: "iana", | |
}, | |
"application/vnd.ctc-posml": { | |
source: "iana", | |
extensions: ["pml"], | |
}, | |
"application/vnd.ctct.ws+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.cups-pdf": { | |
source: "iana", | |
}, | |
"application/vnd.cups-postscript": { | |
source: "iana", | |
}, | |
"application/vnd.cups-ppd": { | |
source: "iana", | |
extensions: ["ppd"], | |
}, | |
"application/vnd.cups-raster": { | |
source: "iana", | |
}, | |
"application/vnd.cups-raw": { | |
source: "iana", | |
}, | |
"application/vnd.curl": { | |
source: "iana", | |
}, | |
"application/vnd.curl.car": { | |
source: "apache", | |
extensions: ["car"], | |
}, | |
"application/vnd.curl.pcurl": { | |
source: "apache", | |
extensions: ["pcurl"], | |
}, | |
"application/vnd.cyan.dean.root+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.cybank": { | |
source: "iana", | |
}, | |
"application/vnd.d2l.coursepackage1p0+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.d3m-dataset": { | |
source: "iana", | |
}, | |
"application/vnd.d3m-problem": { | |
source: "iana", | |
}, | |
"application/vnd.dart": { | |
source: "iana", | |
compressible: true, | |
extensions: ["dart"], | |
}, | |
"application/vnd.data-vision.rdz": { | |
source: "iana", | |
extensions: ["rdz"], | |
}, | |
"application/vnd.datapackage+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dataresource+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dbf": { | |
source: "iana", | |
extensions: ["dbf"], | |
}, | |
"application/vnd.debian.binary-package": { | |
source: "iana", | |
}, | |
"application/vnd.dece.data": { | |
source: "iana", | |
extensions: ["uvf", "uvvf", "uvd", "uvvd"], | |
}, | |
"application/vnd.dece.ttml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["uvt", "uvvt"], | |
}, | |
"application/vnd.dece.unspecified": { | |
source: "iana", | |
extensions: ["uvx", "uvvx"], | |
}, | |
"application/vnd.dece.zip": { | |
source: "iana", | |
extensions: ["uvz", "uvvz"], | |
}, | |
"application/vnd.denovo.fcselayout-link": { | |
source: "iana", | |
extensions: ["fe_launch"], | |
}, | |
"application/vnd.desmume.movie": { | |
source: "iana", | |
}, | |
"application/vnd.dir-bi.plate-dl-nosuffix": { | |
source: "iana", | |
}, | |
"application/vnd.dm.delegation+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dna": { | |
source: "iana", | |
extensions: ["dna"], | |
}, | |
"application/vnd.document+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dolby.mlp": { | |
source: "apache", | |
extensions: ["mlp"], | |
}, | |
"application/vnd.dolby.mobile.1": { | |
source: "iana", | |
}, | |
"application/vnd.dolby.mobile.2": { | |
source: "iana", | |
}, | |
"application/vnd.doremir.scorecloud-binary-document": { | |
source: "iana", | |
}, | |
"application/vnd.dpgraph": { | |
source: "iana", | |
extensions: ["dpg"], | |
}, | |
"application/vnd.dreamfactory": { | |
source: "iana", | |
extensions: ["dfac"], | |
}, | |
"application/vnd.drive+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ds-keypoint": { | |
source: "apache", | |
extensions: ["kpxx"], | |
}, | |
"application/vnd.dtg.local": { | |
source: "iana", | |
}, | |
"application/vnd.dtg.local.flash": { | |
source: "iana", | |
}, | |
"application/vnd.dtg.local.html": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.ait": { | |
source: "iana", | |
extensions: ["ait"], | |
}, | |
"application/vnd.dvb.dvbisl+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.dvbj": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.esgcontainer": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.ipdcdftnotifaccess": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.ipdcesgaccess": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.ipdcesgaccess2": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.ipdcesgpdd": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.ipdcroaming": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.iptv.alfec-base": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.iptv.alfec-enhancement": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.notif-aggregate-root+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.notif-container+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.notif-generic+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.notif-ia-msglist+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.notif-ia-registration-request+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.notif-ia-registration-response+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.notif-init+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.dvb.pfr": { | |
source: "iana", | |
}, | |
"application/vnd.dvb.service": { | |
source: "iana", | |
extensions: ["svc"], | |
}, | |
"application/vnd.dxr": { | |
source: "iana", | |
}, | |
"application/vnd.dynageo": { | |
source: "iana", | |
extensions: ["geo"], | |
}, | |
"application/vnd.dzr": { | |
source: "iana", | |
}, | |
"application/vnd.easykaraoke.cdgdownload": { | |
source: "iana", | |
}, | |
"application/vnd.ecdis-update": { | |
source: "iana", | |
}, | |
"application/vnd.ecip.rlp": { | |
source: "iana", | |
}, | |
"application/vnd.ecowin.chart": { | |
source: "iana", | |
extensions: ["mag"], | |
}, | |
"application/vnd.ecowin.filerequest": { | |
source: "iana", | |
}, | |
"application/vnd.ecowin.fileupdate": { | |
source: "iana", | |
}, | |
"application/vnd.ecowin.series": { | |
source: "iana", | |
}, | |
"application/vnd.ecowin.seriesrequest": { | |
source: "iana", | |
}, | |
"application/vnd.ecowin.seriesupdate": { | |
source: "iana", | |
}, | |
"application/vnd.efi.img": { | |
source: "iana", | |
}, | |
"application/vnd.efi.iso": { | |
source: "iana", | |
}, | |
"application/vnd.emclient.accessrequest+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.enliven": { | |
source: "iana", | |
extensions: ["nml"], | |
}, | |
"application/vnd.enphase.envoy": { | |
source: "iana", | |
}, | |
"application/vnd.eprints.data+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.epson.esf": { | |
source: "iana", | |
extensions: ["esf"], | |
}, | |
"application/vnd.epson.msf": { | |
source: "iana", | |
extensions: ["msf"], | |
}, | |
"application/vnd.epson.quickanime": { | |
source: "iana", | |
extensions: ["qam"], | |
}, | |
"application/vnd.epson.salt": { | |
source: "iana", | |
extensions: ["slt"], | |
}, | |
"application/vnd.epson.ssf": { | |
source: "iana", | |
extensions: ["ssf"], | |
}, | |
"application/vnd.ericsson.quickcall": { | |
source: "iana", | |
}, | |
"application/vnd.espass-espass+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.eszigno3+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["es3", "et3"], | |
}, | |
"application/vnd.etsi.aoc+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.asic-e+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.etsi.asic-s+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.etsi.cug+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvcommand+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvdiscovery+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvprofile+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvsad-bc+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvsad-cod+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvsad-npvr+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvservice+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvsync+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.iptvueprofile+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.mcid+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.mheg5": { | |
source: "iana", | |
}, | |
"application/vnd.etsi.overload-control-policy-dataset+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.pstn+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.sci+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.simservs+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.timestamp-token": { | |
source: "iana", | |
}, | |
"application/vnd.etsi.tsl+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.etsi.tsl.der": { | |
source: "iana", | |
}, | |
"application/vnd.eudora.data": { | |
source: "iana", | |
}, | |
"application/vnd.evolv.ecig.profile": { | |
source: "iana", | |
}, | |
"application/vnd.evolv.ecig.settings": { | |
source: "iana", | |
}, | |
"application/vnd.evolv.ecig.theme": { | |
source: "iana", | |
}, | |
"application/vnd.exstream-empower+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.exstream-package": { | |
source: "iana", | |
}, | |
"application/vnd.ezpix-album": { | |
source: "iana", | |
extensions: ["ez2"], | |
}, | |
"application/vnd.ezpix-package": { | |
source: "iana", | |
extensions: ["ez3"], | |
}, | |
"application/vnd.f-secure.mobile": { | |
source: "iana", | |
}, | |
"application/vnd.fastcopy-disk-image": { | |
source: "iana", | |
}, | |
"application/vnd.fdf": { | |
source: "iana", | |
extensions: ["fdf"], | |
}, | |
"application/vnd.fdsn.mseed": { | |
source: "iana", | |
extensions: ["mseed"], | |
}, | |
"application/vnd.fdsn.seed": { | |
source: "iana", | |
extensions: ["seed", "dataless"], | |
}, | |
"application/vnd.ffsns": { | |
source: "iana", | |
}, | |
"application/vnd.ficlab.flb+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.filmit.zfc": { | |
source: "iana", | |
}, | |
"application/vnd.fints": { | |
source: "iana", | |
}, | |
"application/vnd.firemonkeys.cloudcell": { | |
source: "iana", | |
}, | |
"application/vnd.flographit": { | |
source: "iana", | |
extensions: ["gph"], | |
}, | |
"application/vnd.fluxtime.clip": { | |
source: "iana", | |
extensions: ["ftc"], | |
}, | |
"application/vnd.font-fontforge-sfd": { | |
source: "iana", | |
}, | |
"application/vnd.framemaker": { | |
source: "iana", | |
extensions: ["fm", "frame", "maker", "book"], | |
}, | |
"application/vnd.frogans.fnc": { | |
source: "iana", | |
extensions: ["fnc"], | |
}, | |
"application/vnd.frogans.ltf": { | |
source: "iana", | |
extensions: ["ltf"], | |
}, | |
"application/vnd.fsc.weblaunch": { | |
source: "iana", | |
extensions: ["fsc"], | |
}, | |
"application/vnd.fujitsu.oasys": { | |
source: "iana", | |
extensions: ["oas"], | |
}, | |
"application/vnd.fujitsu.oasys2": { | |
source: "iana", | |
extensions: ["oa2"], | |
}, | |
"application/vnd.fujitsu.oasys3": { | |
source: "iana", | |
extensions: ["oa3"], | |
}, | |
"application/vnd.fujitsu.oasysgp": { | |
source: "iana", | |
extensions: ["fg5"], | |
}, | |
"application/vnd.fujitsu.oasysprs": { | |
source: "iana", | |
extensions: ["bh2"], | |
}, | |
"application/vnd.fujixerox.art-ex": { | |
source: "iana", | |
}, | |
"application/vnd.fujixerox.art4": { | |
source: "iana", | |
}, | |
"application/vnd.fujixerox.ddd": { | |
source: "iana", | |
extensions: ["ddd"], | |
}, | |
"application/vnd.fujixerox.docuworks": { | |
source: "iana", | |
extensions: ["xdw"], | |
}, | |
"application/vnd.fujixerox.docuworks.binder": { | |
source: "iana", | |
extensions: ["xbd"], | |
}, | |
"application/vnd.fujixerox.docuworks.container": { | |
source: "iana", | |
}, | |
"application/vnd.fujixerox.hbpl": { | |
source: "iana", | |
}, | |
"application/vnd.fut-misnet": { | |
source: "iana", | |
}, | |
"application/vnd.futoin+cbor": { | |
source: "iana", | |
}, | |
"application/vnd.futoin+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.fuzzysheet": { | |
source: "iana", | |
extensions: ["fzs"], | |
}, | |
"application/vnd.genomatix.tuxedo": { | |
source: "iana", | |
extensions: ["txd"], | |
}, | |
"application/vnd.gentics.grd+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.geo+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.geocube+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.geogebra.file": { | |
source: "iana", | |
extensions: ["ggb"], | |
}, | |
"application/vnd.geogebra.tool": { | |
source: "iana", | |
extensions: ["ggt"], | |
}, | |
"application/vnd.geometry-explorer": { | |
source: "iana", | |
extensions: ["gex", "gre"], | |
}, | |
"application/vnd.geonext": { | |
source: "iana", | |
extensions: ["gxt"], | |
}, | |
"application/vnd.geoplan": { | |
source: "iana", | |
extensions: ["g2w"], | |
}, | |
"application/vnd.geospace": { | |
source: "iana", | |
extensions: ["g3w"], | |
}, | |
"application/vnd.gerber": { | |
source: "iana", | |
}, | |
"application/vnd.globalplatform.card-content-mgt": { | |
source: "iana", | |
}, | |
"application/vnd.globalplatform.card-content-mgt-response": { | |
source: "iana", | |
}, | |
"application/vnd.gmx": { | |
source: "iana", | |
extensions: ["gmx"], | |
}, | |
"application/vnd.google-apps.document": { | |
compressible: false, | |
extensions: ["gdoc"], | |
}, | |
"application/vnd.google-apps.presentation": { | |
compressible: false, | |
extensions: ["gslides"], | |
}, | |
"application/vnd.google-apps.spreadsheet": { | |
compressible: false, | |
extensions: ["gsheet"], | |
}, | |
"application/vnd.google-earth.kml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["kml"], | |
}, | |
"application/vnd.google-earth.kmz": { | |
source: "iana", | |
compressible: false, | |
extensions: ["kmz"], | |
}, | |
"application/vnd.gov.sk.e-form+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.gov.sk.e-form+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.gov.sk.xmldatacontainer+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.grafeq": { | |
source: "iana", | |
extensions: ["gqf", "gqs"], | |
}, | |
"application/vnd.gridmp": { | |
source: "iana", | |
}, | |
"application/vnd.groove-account": { | |
source: "iana", | |
extensions: ["gac"], | |
}, | |
"application/vnd.groove-help": { | |
source: "iana", | |
extensions: ["ghf"], | |
}, | |
"application/vnd.groove-identity-message": { | |
source: "iana", | |
extensions: ["gim"], | |
}, | |
"application/vnd.groove-injector": { | |
source: "iana", | |
extensions: ["grv"], | |
}, | |
"application/vnd.groove-tool-message": { | |
source: "iana", | |
extensions: ["gtm"], | |
}, | |
"application/vnd.groove-tool-template": { | |
source: "iana", | |
extensions: ["tpl"], | |
}, | |
"application/vnd.groove-vcard": { | |
source: "iana", | |
extensions: ["vcg"], | |
}, | |
"application/vnd.hal+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.hal+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["hal"], | |
}, | |
"application/vnd.handheld-entertainment+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["zmm"], | |
}, | |
"application/vnd.hbci": { | |
source: "iana", | |
extensions: ["hbci"], | |
}, | |
"application/vnd.hc+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.hcl-bireports": { | |
source: "iana", | |
}, | |
"application/vnd.hdt": { | |
source: "iana", | |
}, | |
"application/vnd.heroku+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.hhe.lesson-player": { | |
source: "iana", | |
extensions: ["les"], | |
}, | |
"application/vnd.hp-hpgl": { | |
source: "iana", | |
extensions: ["hpgl"], | |
}, | |
"application/vnd.hp-hpid": { | |
source: "iana", | |
extensions: ["hpid"], | |
}, | |
"application/vnd.hp-hps": { | |
source: "iana", | |
extensions: ["hps"], | |
}, | |
"application/vnd.hp-jlyt": { | |
source: "iana", | |
extensions: ["jlt"], | |
}, | |
"application/vnd.hp-pcl": { | |
source: "iana", | |
extensions: ["pcl"], | |
}, | |
"application/vnd.hp-pclxl": { | |
source: "iana", | |
extensions: ["pclxl"], | |
}, | |
"application/vnd.httphone": { | |
source: "iana", | |
}, | |
"application/vnd.hydrostatix.sof-data": { | |
source: "iana", | |
extensions: ["sfd-hdstx"], | |
}, | |
"application/vnd.hyper+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.hyper-item+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.hyperdrive+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.hzn-3d-crossword": { | |
source: "iana", | |
}, | |
"application/vnd.ibm.afplinedata": { | |
source: "iana", | |
}, | |
"application/vnd.ibm.electronic-media": { | |
source: "iana", | |
}, | |
"application/vnd.ibm.minipay": { | |
source: "iana", | |
extensions: ["mpy"], | |
}, | |
"application/vnd.ibm.modcap": { | |
source: "iana", | |
extensions: ["afp", "listafp", "list3820"], | |
}, | |
"application/vnd.ibm.rights-management": { | |
source: "iana", | |
extensions: ["irm"], | |
}, | |
"application/vnd.ibm.secure-container": { | |
source: "iana", | |
extensions: ["sc"], | |
}, | |
"application/vnd.iccprofile": { | |
source: "iana", | |
extensions: ["icc", "icm"], | |
}, | |
"application/vnd.ieee.1905": { | |
source: "iana", | |
}, | |
"application/vnd.igloader": { | |
source: "iana", | |
extensions: ["igl"], | |
}, | |
"application/vnd.imagemeter.folder+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.imagemeter.image+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.immervision-ivp": { | |
source: "iana", | |
extensions: ["ivp"], | |
}, | |
"application/vnd.immervision-ivu": { | |
source: "iana", | |
extensions: ["ivu"], | |
}, | |
"application/vnd.ims.imsccv1p1": { | |
source: "iana", | |
}, | |
"application/vnd.ims.imsccv1p2": { | |
source: "iana", | |
}, | |
"application/vnd.ims.imsccv1p3": { | |
source: "iana", | |
}, | |
"application/vnd.ims.lis.v2.result+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ims.lti.v2.toolconsumerprofile+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ims.lti.v2.toolproxy+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ims.lti.v2.toolproxy.id+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ims.lti.v2.toolsettings+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ims.lti.v2.toolsettings.simple+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.informedcontrol.rms+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.informix-visionary": { | |
source: "iana", | |
}, | |
"application/vnd.infotech.project": { | |
source: "iana", | |
}, | |
"application/vnd.infotech.project+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.innopath.wamp.notification": { | |
source: "iana", | |
}, | |
"application/vnd.insors.igm": { | |
source: "iana", | |
extensions: ["igm"], | |
}, | |
"application/vnd.intercon.formnet": { | |
source: "iana", | |
extensions: ["xpw", "xpx"], | |
}, | |
"application/vnd.intergeo": { | |
source: "iana", | |
extensions: ["i2g"], | |
}, | |
"application/vnd.intertrust.digibox": { | |
source: "iana", | |
}, | |
"application/vnd.intertrust.nncp": { | |
source: "iana", | |
}, | |
"application/vnd.intu.qbo": { | |
source: "iana", | |
extensions: ["qbo"], | |
}, | |
"application/vnd.intu.qfx": { | |
source: "iana", | |
extensions: ["qfx"], | |
}, | |
"application/vnd.iptc.g2.catalogitem+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.iptc.g2.conceptitem+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.iptc.g2.knowledgeitem+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.iptc.g2.newsitem+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.iptc.g2.newsmessage+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.iptc.g2.packageitem+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.iptc.g2.planningitem+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ipunplugged.rcprofile": { | |
source: "iana", | |
extensions: ["rcprofile"], | |
}, | |
"application/vnd.irepository.package+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["irp"], | |
}, | |
"application/vnd.is-xpr": { | |
source: "iana", | |
extensions: ["xpr"], | |
}, | |
"application/vnd.isac.fcs": { | |
source: "iana", | |
extensions: ["fcs"], | |
}, | |
"application/vnd.iso11783-10+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.jam": { | |
source: "iana", | |
extensions: ["jam"], | |
}, | |
"application/vnd.japannet-directory-service": { | |
source: "iana", | |
}, | |
"application/vnd.japannet-jpnstore-wakeup": { | |
source: "iana", | |
}, | |
"application/vnd.japannet-payment-wakeup": { | |
source: "iana", | |
}, | |
"application/vnd.japannet-registration": { | |
source: "iana", | |
}, | |
"application/vnd.japannet-registration-wakeup": { | |
source: "iana", | |
}, | |
"application/vnd.japannet-setstore-wakeup": { | |
source: "iana", | |
}, | |
"application/vnd.japannet-verification": { | |
source: "iana", | |
}, | |
"application/vnd.japannet-verification-wakeup": { | |
source: "iana", | |
}, | |
"application/vnd.jcp.javame.midlet-rms": { | |
source: "iana", | |
extensions: ["rms"], | |
}, | |
"application/vnd.jisp": { | |
source: "iana", | |
extensions: ["jisp"], | |
}, | |
"application/vnd.joost.joda-archive": { | |
source: "iana", | |
extensions: ["joda"], | |
}, | |
"application/vnd.jsk.isdn-ngn": { | |
source: "iana", | |
}, | |
"application/vnd.kahootz": { | |
source: "iana", | |
extensions: ["ktz", "ktr"], | |
}, | |
"application/vnd.kde.karbon": { | |
source: "iana", | |
extensions: ["karbon"], | |
}, | |
"application/vnd.kde.kchart": { | |
source: "iana", | |
extensions: ["chrt"], | |
}, | |
"application/vnd.kde.kformula": { | |
source: "iana", | |
extensions: ["kfo"], | |
}, | |
"application/vnd.kde.kivio": { | |
source: "iana", | |
extensions: ["flw"], | |
}, | |
"application/vnd.kde.kontour": { | |
source: "iana", | |
extensions: ["kon"], | |
}, | |
"application/vnd.kde.kpresenter": { | |
source: "iana", | |
extensions: ["kpr", "kpt"], | |
}, | |
"application/vnd.kde.kspread": { | |
source: "iana", | |
extensions: ["ksp"], | |
}, | |
"application/vnd.kde.kword": { | |
source: "iana", | |
extensions: ["kwd", "kwt"], | |
}, | |
"application/vnd.kenameaapp": { | |
source: "iana", | |
extensions: ["htke"], | |
}, | |
"application/vnd.kidspiration": { | |
source: "iana", | |
extensions: ["kia"], | |
}, | |
"application/vnd.kinar": { | |
source: "iana", | |
extensions: ["kne", "knp"], | |
}, | |
"application/vnd.koan": { | |
source: "iana", | |
extensions: ["skp", "skd", "skt", "skm"], | |
}, | |
"application/vnd.kodak-descriptor": { | |
source: "iana", | |
extensions: ["sse"], | |
}, | |
"application/vnd.las": { | |
source: "iana", | |
}, | |
"application/vnd.las.las+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.las.las+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["lasxml"], | |
}, | |
"application/vnd.laszip": { | |
source: "iana", | |
}, | |
"application/vnd.leap+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.liberty-request+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.llamagraphics.life-balance.desktop": { | |
source: "iana", | |
extensions: ["lbd"], | |
}, | |
"application/vnd.llamagraphics.life-balance.exchange+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["lbe"], | |
}, | |
"application/vnd.logipipe.circuit+zip": { | |
source: "iana", | |
compressible: false, | |
}, | |
"application/vnd.loom": { | |
source: "iana", | |
}, | |
"application/vnd.lotus-1-2-3": { | |
source: "iana", | |
extensions: ["123"], | |
}, | |
"application/vnd.lotus-approach": { | |
source: "iana", | |
extensions: ["apr"], | |
}, | |
"application/vnd.lotus-freelance": { | |
source: "iana", | |
extensions: ["pre"], | |
}, | |
"application/vnd.lotus-notes": { | |
source: "iana", | |
extensions: ["nsf"], | |
}, | |
"application/vnd.lotus-organizer": { | |
source: "iana", | |
extensions: ["org"], | |
}, | |
"application/vnd.lotus-screencam": { | |
source: "iana", | |
extensions: ["scm"], | |
}, | |
"application/vnd.lotus-wordpro": { | |
source: "iana", | |
extensions: ["lwp"], | |
}, | |
"application/vnd.macports.portpkg": { | |
source: "iana", | |
extensions: ["portpkg"], | |
}, | |
"application/vnd.mapbox-vector-tile": { | |
source: "iana", | |
}, | |
"application/vnd.marlin.drm.actiontoken+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.marlin.drm.conftoken+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.marlin.drm.license+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.marlin.drm.mdcf": { | |
source: "iana", | |
}, | |
"application/vnd.mason+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.maxmind.maxmind-db": { | |
source: "iana", | |
}, | |
"application/vnd.mcd": { | |
source: "iana", | |
extensions: ["mcd"], | |
}, | |
"application/vnd.medcalcdata": { | |
source: "iana", | |
extensions: ["mc1"], | |
}, | |
"application/vnd.mediastation.cdkey": { | |
source: "iana", | |
extensions: ["cdkey"], | |
}, | |
"application/vnd.meridian-slingshot": { | |
source: "iana", | |
}, | |
"application/vnd.mfer": { | |
source: "iana", | |
extensions: ["mwf"], | |
}, | |
"application/vnd.mfmp": { | |
source: "iana", | |
extensions: ["mfm"], | |
}, | |
"application/vnd.micro+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.micrografx.flo": { | |
source: "iana", | |
extensions: ["flo"], | |
}, | |
"application/vnd.micrografx.igx": { | |
source: "iana", | |
extensions: ["igx"], | |
}, | |
"application/vnd.microsoft.portable-executable": { | |
source: "iana", | |
}, | |
"application/vnd.microsoft.windows.thumbnail-cache": { | |
source: "iana", | |
}, | |
"application/vnd.miele+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.mif": { | |
source: "iana", | |
extensions: ["mif"], | |
}, | |
"application/vnd.minisoft-hp3000-save": { | |
source: "iana", | |
}, | |
"application/vnd.mitsubishi.misty-guard.trustweb": { | |
source: "iana", | |
}, | |
"application/vnd.mobius.daf": { | |
source: "iana", | |
extensions: ["daf"], | |
}, | |
"application/vnd.mobius.dis": { | |
source: "iana", | |
extensions: ["dis"], | |
}, | |
"application/vnd.mobius.mbk": { | |
source: "iana", | |
extensions: ["mbk"], | |
}, | |
"application/vnd.mobius.mqy": { | |
source: "iana", | |
extensions: ["mqy"], | |
}, | |
"application/vnd.mobius.msl": { | |
source: "iana", | |
extensions: ["msl"], | |
}, | |
"application/vnd.mobius.plc": { | |
source: "iana", | |
extensions: ["plc"], | |
}, | |
"application/vnd.mobius.txf": { | |
source: "iana", | |
extensions: ["txf"], | |
}, | |
"application/vnd.mophun.application": { | |
source: "iana", | |
extensions: ["mpn"], | |
}, | |
"application/vnd.mophun.certificate": { | |
source: "iana", | |
extensions: ["mpc"], | |
}, | |
"application/vnd.motorola.flexsuite": { | |
source: "iana", | |
}, | |
"application/vnd.motorola.flexsuite.adsi": { | |
source: "iana", | |
}, | |
"application/vnd.motorola.flexsuite.fis": { | |
source: "iana", | |
}, | |
"application/vnd.motorola.flexsuite.gotap": { | |
source: "iana", | |
}, | |
"application/vnd.motorola.flexsuite.kmr": { | |
source: "iana", | |
}, | |
"application/vnd.motorola.flexsuite.ttc": { | |
source: "iana", | |
}, | |
"application/vnd.motorola.flexsuite.wem": { | |
source: "iana", | |
}, | |
"application/vnd.motorola.iprm": { | |
source: "iana", | |
}, | |
"application/vnd.mozilla.xul+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xul"], | |
}, | |
"application/vnd.ms-3mfdocument": { | |
source: "iana", | |
}, | |
"application/vnd.ms-artgalry": { | |
source: "iana", | |
extensions: ["cil"], | |
}, | |
"application/vnd.ms-asf": { | |
source: "iana", | |
}, | |
"application/vnd.ms-cab-compressed": { | |
source: "iana", | |
extensions: ["cab"], | |
}, | |
"application/vnd.ms-color.iccprofile": { | |
source: "apache", | |
}, | |
"application/vnd.ms-excel": { | |
source: "iana", | |
compressible: false, | |
extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], | |
}, | |
"application/vnd.ms-excel.addin.macroenabled.12": { | |
source: "iana", | |
extensions: ["xlam"], | |
}, | |
"application/vnd.ms-excel.sheet.binary.macroenabled.12": { | |
source: "iana", | |
extensions: ["xlsb"], | |
}, | |
"application/vnd.ms-excel.sheet.macroenabled.12": { | |
source: "iana", | |
extensions: ["xlsm"], | |
}, | |
"application/vnd.ms-excel.template.macroenabled.12": { | |
source: "iana", | |
extensions: ["xltm"], | |
}, | |
"application/vnd.ms-fontobject": { | |
source: "iana", | |
compressible: true, | |
extensions: ["eot"], | |
}, | |
"application/vnd.ms-htmlhelp": { | |
source: "iana", | |
extensions: ["chm"], | |
}, | |
"application/vnd.ms-ims": { | |
source: "iana", | |
extensions: ["ims"], | |
}, | |
"application/vnd.ms-lrm": { | |
source: "iana", | |
extensions: ["lrm"], | |
}, | |
"application/vnd.ms-office.activex+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ms-officetheme": { | |
source: "iana", | |
extensions: ["thmx"], | |
}, | |
"application/vnd.ms-opentype": { | |
source: "apache", | |
compressible: true, | |
}, | |
"application/vnd.ms-outlook": { | |
compressible: false, | |
extensions: ["msg"], | |
}, | |
"application/vnd.ms-package.obfuscated-opentype": { | |
source: "apache", | |
}, | |
"application/vnd.ms-pki.seccat": { | |
source: "apache", | |
extensions: ["cat"], | |
}, | |
"application/vnd.ms-pki.stl": { | |
source: "apache", | |
extensions: ["stl"], | |
}, | |
"application/vnd.ms-playready.initiator+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ms-powerpoint": { | |
source: "iana", | |
compressible: false, | |
extensions: ["ppt", "pps", "pot"], | |
}, | |
"application/vnd.ms-powerpoint.addin.macroenabled.12": { | |
source: "iana", | |
extensions: ["ppam"], | |
}, | |
"application/vnd.ms-powerpoint.presentation.macroenabled.12": { | |
source: "iana", | |
extensions: ["pptm"], | |
}, | |
"application/vnd.ms-powerpoint.slide.macroenabled.12": { | |
source: "iana", | |
extensions: ["sldm"], | |
}, | |
"application/vnd.ms-powerpoint.slideshow.macroenabled.12": { | |
source: "iana", | |
extensions: ["ppsm"], | |
}, | |
"application/vnd.ms-powerpoint.template.macroenabled.12": { | |
source: "iana", | |
extensions: ["potm"], | |
}, | |
"application/vnd.ms-printdevicecapabilities+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ms-printing.printticket+xml": { | |
source: "apache", | |
compressible: true, | |
}, | |
"application/vnd.ms-printschematicket+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.ms-project": { | |
source: "iana", | |
extensions: ["mpp", "mpt"], | |
}, | |
"application/vnd.ms-tnef": { | |
source: "iana", | |
}, | |
"application/vnd.ms-windows.devicepairing": { | |
source: "iana", | |
}, | |
"application/vnd.ms-windows.nwprinting.oob": { | |
source: "iana", | |
}, | |
"application/vnd.ms-windows.printerpairing": { | |
source: "iana", | |
}, | |
"application/vnd.ms-windows.wsd.oob": { | |
source: "iana", | |
}, | |
"application/vnd.ms-wmdrm.lic-chlg-req": { | |
source: "iana", | |
}, | |
"application/vnd.ms-wmdrm.lic-resp": { | |
source: "iana", | |
}, | |
"application/vnd.ms-wmdrm.meter-chlg-req": { | |
source: "iana", | |
}, | |
"application/vnd.ms-wmdrm.meter-resp": { | |
source: "iana", | |
}, | |
"application/vnd.ms-word.document.macroenabled.12": { | |
source: "iana", | |
extensions: ["docm"], | |
}, | |
"application/vnd.ms-word.template.macroenabled.12": { | |
source: "iana", | |
extensions: ["dotm"], | |
}, | |
"application/vnd.ms-works": { | |
source: "iana", | |
extensions: ["wps", "wks", "wcm", "wdb"], | |
}, | |
"application/vnd.ms-wpl": { | |
source: "iana", | |
extensions: ["wpl"], | |
}, | |
"application/vnd.ms-xpsdocument": { | |
source: "iana", | |
compressible: false, | |
extensions: ["xps"], | |
}, | |
"application/vnd.msa-disk-image": { | |
source: "iana", | |
}, | |
"application/vnd.mseq": { | |
source: "iana", | |
extensions: ["mseq"], | |
}, | |
"application/vnd.msign": { | |
source: "iana", | |
}, | |
"application/vnd.multiad.creator": { | |
source: "iana", | |
}, | |
"application/vnd.multiad.creator.cif": { | |
source: "iana", | |
}, | |
"application/vnd.music-niff": { | |
source: "iana", | |
}, | |
"application/vnd.musician": { | |
source: "iana", | |
extensions: ["mus"], | |
}, | |
"application/vnd.muvee.style": { | |
source: "iana", | |
extensions: ["msty"], | |
}, | |
"application/vnd.mynfc": { | |
source: "iana", | |
extensions: ["taglet"], | |
}, | |
"application/vnd.ncd.control": { | |
source: "iana", | |
}, | |
"application/vnd.ncd.reference": { | |
source: "iana", | |
}, | |
"application/vnd.nearst.inv+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.nervana": { | |
source: "iana", | |
}, | |
"application/vnd.netfpx": { | |
source: "iana", | |
}, | |
"application/vnd.neurolanguage.nlu": { | |
source: "iana", | |
extensions: ["nlu"], | |
}, | |
"application/vnd.nimn": { | |
source: "iana", | |
}, | |
"application/vnd.nintendo.nitro.rom": { | |
source: "iana", | |
}, | |
"application/vnd.nintendo.snes.rom": { | |
source: "iana", | |
}, | |
"application/vnd.nitf": { | |
source: "iana", | |
extensions: ["ntf", "nitf"], | |
}, | |
"application/vnd.noblenet-directory": { | |
source: "iana", | |
extensions: ["nnd"], | |
}, | |
"application/vnd.noblenet-sealer": { | |
source: "iana", | |
extensions: ["nns"], | |
}, | |
"application/vnd.noblenet-web": { | |
source: "iana", | |
extensions: ["nnw"], | |
}, | |
"application/vnd.nokia.catalogs": { | |
source: "iana", | |
}, | |
"application/vnd.nokia.conml+wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.nokia.conml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.nokia.iptv.config+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.nokia.isds-radio-presets": { | |
source: "iana", | |
}, | |
"application/vnd.nokia.landmark+wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.nokia.landmark+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.nokia.landmarkcollection+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.nokia.n-gage.ac+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ac"], | |
}, | |
"application/vnd.nokia.n-gage.data": { | |
source: "iana", | |
extensions: ["ngdat"], | |
}, | |
"application/vnd.nokia.n-gage.symbian.install": { | |
source: "iana", | |
extensions: ["n-gage"], | |
}, | |
"application/vnd.nokia.ncd": { | |
source: "iana", | |
}, | |
"application/vnd.nokia.pcd+wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.nokia.pcd+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.nokia.radio-preset": { | |
source: "iana", | |
extensions: ["rpst"], | |
}, | |
"application/vnd.nokia.radio-presets": { | |
source: "iana", | |
extensions: ["rpss"], | |
}, | |
"application/vnd.novadigm.edm": { | |
source: "iana", | |
extensions: ["edm"], | |
}, | |
"application/vnd.novadigm.edx": { | |
source: "iana", | |
extensions: ["edx"], | |
}, | |
"application/vnd.novadigm.ext": { | |
source: "iana", | |
extensions: ["ext"], | |
}, | |
"application/vnd.ntt-local.content-share": { | |
source: "iana", | |
}, | |
"application/vnd.ntt-local.file-transfer": { | |
source: "iana", | |
}, | |
"application/vnd.ntt-local.ogw_remote-access": { | |
source: "iana", | |
}, | |
"application/vnd.ntt-local.sip-ta_remote": { | |
source: "iana", | |
}, | |
"application/vnd.ntt-local.sip-ta_tcp_stream": { | |
source: "iana", | |
}, | |
"application/vnd.oasis.opendocument.chart": { | |
source: "iana", | |
extensions: ["odc"], | |
}, | |
"application/vnd.oasis.opendocument.chart-template": { | |
source: "iana", | |
extensions: ["otc"], | |
}, | |
"application/vnd.oasis.opendocument.database": { | |
source: "iana", | |
extensions: ["odb"], | |
}, | |
"application/vnd.oasis.opendocument.formula": { | |
source: "iana", | |
extensions: ["odf"], | |
}, | |
"application/vnd.oasis.opendocument.formula-template": { | |
source: "iana", | |
extensions: ["odft"], | |
}, | |
"application/vnd.oasis.opendocument.graphics": { | |
source: "iana", | |
compressible: false, | |
extensions: ["odg"], | |
}, | |
"application/vnd.oasis.opendocument.graphics-template": { | |
source: "iana", | |
extensions: ["otg"], | |
}, | |
"application/vnd.oasis.opendocument.image": { | |
source: "iana", | |
extensions: ["odi"], | |
}, | |
"application/vnd.oasis.opendocument.image-template": { | |
source: "iana", | |
extensions: ["oti"], | |
}, | |
"application/vnd.oasis.opendocument.presentation": { | |
source: "iana", | |
compressible: false, | |
extensions: ["odp"], | |
}, | |
"application/vnd.oasis.opendocument.presentation-template": { | |
source: "iana", | |
extensions: ["otp"], | |
}, | |
"application/vnd.oasis.opendocument.spreadsheet": { | |
source: "iana", | |
compressible: false, | |
extensions: ["ods"], | |
}, | |
"application/vnd.oasis.opendocument.spreadsheet-template": { | |
source: "iana", | |
extensions: ["ots"], | |
}, | |
"application/vnd.oasis.opendocument.text": { | |
source: "iana", | |
compressible: false, | |
extensions: ["odt"], | |
}, | |
"application/vnd.oasis.opendocument.text-master": { | |
source: "iana", | |
extensions: ["odm"], | |
}, | |
"application/vnd.oasis.opendocument.text-template": { | |
source: "iana", | |
extensions: ["ott"], | |
}, | |
"application/vnd.oasis.opendocument.text-web": { | |
source: "iana", | |
extensions: ["oth"], | |
}, | |
"application/vnd.obn": { | |
source: "iana", | |
}, | |
"application/vnd.ocf+cbor": { | |
source: "iana", | |
}, | |
"application/vnd.oci.image.manifest.v1+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oftn.l10n+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.contentaccessdownload+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.contentaccessstreaming+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.cspg-hexbinary": { | |
source: "iana", | |
}, | |
"application/vnd.oipf.dae.svg+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.dae.xhtml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.mippvcontrolmessage+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.pae.gem": { | |
source: "iana", | |
}, | |
"application/vnd.oipf.spdiscovery+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.spdlist+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.ueprofile+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oipf.userprofile+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.olpc-sugar": { | |
source: "iana", | |
extensions: ["xo"], | |
}, | |
"application/vnd.oma-scws-config": { | |
source: "iana", | |
}, | |
"application/vnd.oma-scws-http-request": { | |
source: "iana", | |
}, | |
"application/vnd.oma-scws-http-response": { | |
source: "iana", | |
}, | |
"application/vnd.oma.bcast.associated-procedure-parameter+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.bcast.drm-trigger+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.bcast.imd+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.bcast.ltkm": { | |
source: "iana", | |
}, | |
"application/vnd.oma.bcast.notification+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.bcast.provisioningtrigger": { | |
source: "iana", | |
}, | |
"application/vnd.oma.bcast.sgboot": { | |
source: "iana", | |
}, | |
"application/vnd.oma.bcast.sgdd+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.bcast.sgdu": { | |
source: "iana", | |
}, | |
"application/vnd.oma.bcast.simple-symbol-container": { | |
source: "iana", | |
}, | |
"application/vnd.oma.bcast.smartcard-trigger+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.bcast.sprov+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.bcast.stkm": { | |
source: "iana", | |
}, | |
"application/vnd.oma.cab-address-book+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.cab-feature-handler+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.cab-pcc+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.cab-subs-invite+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.cab-user-prefs+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.dcd": { | |
source: "iana", | |
}, | |
"application/vnd.oma.dcdc": { | |
source: "iana", | |
}, | |
"application/vnd.oma.dd2+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["dd2"], | |
}, | |
"application/vnd.oma.drm.risd+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.group-usage-list+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.lwm2m+cbor": { | |
source: "iana", | |
}, | |
"application/vnd.oma.lwm2m+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.lwm2m+tlv": { | |
source: "iana", | |
}, | |
"application/vnd.oma.pal+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.poc.detailed-progress-report+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.poc.final-report+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.poc.groups+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.poc.invocation-descriptor+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.poc.optimized-progress-report+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.push": { | |
source: "iana", | |
}, | |
"application/vnd.oma.scidm.messages+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oma.xcap-directory+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.omads-email+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/vnd.omads-file+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/vnd.omads-folder+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/vnd.omaloc-supl-init": { | |
source: "iana", | |
}, | |
"application/vnd.onepager": { | |
source: "iana", | |
}, | |
"application/vnd.onepagertamp": { | |
source: "iana", | |
}, | |
"application/vnd.onepagertamx": { | |
source: "iana", | |
}, | |
"application/vnd.onepagertat": { | |
source: "iana", | |
}, | |
"application/vnd.onepagertatp": { | |
source: "iana", | |
}, | |
"application/vnd.onepagertatx": { | |
source: "iana", | |
}, | |
"application/vnd.openblox.game+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["obgx"], | |
}, | |
"application/vnd.openblox.game-binary": { | |
source: "iana", | |
}, | |
"application/vnd.openeye.oeb": { | |
source: "iana", | |
}, | |
"application/vnd.openofficeorg.extension": { | |
source: "apache", | |
extensions: ["oxt"], | |
}, | |
"application/vnd.openstreetmap.data+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["osm"], | |
}, | |
"application/vnd.openxmlformats-officedocument.custom-properties+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.drawing+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.extended-properties+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.comments+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.presentation": | |
{ | |
source: "iana", | |
compressible: false, | |
extensions: ["pptx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.slide": { | |
source: "iana", | |
extensions: ["sldx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.slide+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": | |
{ | |
source: "iana", | |
extensions: ["ppsx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.template": { | |
source: "iana", | |
extensions: ["potx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { | |
source: "iana", | |
compressible: false, | |
extensions: ["xlsx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": { | |
source: "iana", | |
extensions: ["xltx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.theme+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.themeoverride+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.vmldrawing": { | |
source: "iana", | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": | |
{ | |
source: "iana", | |
compressible: false, | |
extensions: ["docx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": | |
{ | |
source: "iana", | |
extensions: ["dotx"], | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-package.core-properties+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": | |
{ | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.openxmlformats-package.relationships+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oracle.resource+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.orange.indata": { | |
source: "iana", | |
}, | |
"application/vnd.osa.netdeploy": { | |
source: "iana", | |
}, | |
"application/vnd.osgeo.mapguide.package": { | |
source: "iana", | |
extensions: ["mgp"], | |
}, | |
"application/vnd.osgi.bundle": { | |
source: "iana", | |
}, | |
"application/vnd.osgi.dp": { | |
source: "iana", | |
extensions: ["dp"], | |
}, | |
"application/vnd.osgi.subsystem": { | |
source: "iana", | |
extensions: ["esa"], | |
}, | |
"application/vnd.otps.ct-kip+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.oxli.countgraph": { | |
source: "iana", | |
}, | |
"application/vnd.pagerduty+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.palm": { | |
source: "iana", | |
extensions: ["pdb", "pqa", "oprc"], | |
}, | |
"application/vnd.panoply": { | |
source: "iana", | |
}, | |
"application/vnd.paos.xml": { | |
source: "iana", | |
}, | |
"application/vnd.patentdive": { | |
source: "iana", | |
}, | |
"application/vnd.patientecommsdoc": { | |
source: "iana", | |
}, | |
"application/vnd.pawaafile": { | |
source: "iana", | |
extensions: ["paw"], | |
}, | |
"application/vnd.pcos": { | |
source: "iana", | |
}, | |
"application/vnd.pg.format": { | |
source: "iana", | |
extensions: ["str"], | |
}, | |
"application/vnd.pg.osasli": { | |
source: "iana", | |
extensions: ["ei6"], | |
}, | |
"application/vnd.piaccess.application-licence": { | |
source: "iana", | |
}, | |
"application/vnd.picsel": { | |
source: "iana", | |
extensions: ["efif"], | |
}, | |
"application/vnd.pmi.widget": { | |
source: "iana", | |
extensions: ["wg"], | |
}, | |
"application/vnd.poc.group-advertisement+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.pocketlearn": { | |
source: "iana", | |
extensions: ["plf"], | |
}, | |
"application/vnd.powerbuilder6": { | |
source: "iana", | |
extensions: ["pbd"], | |
}, | |
"application/vnd.powerbuilder6-s": { | |
source: "iana", | |
}, | |
"application/vnd.powerbuilder7": { | |
source: "iana", | |
}, | |
"application/vnd.powerbuilder7-s": { | |
source: "iana", | |
}, | |
"application/vnd.powerbuilder75": { | |
source: "iana", | |
}, | |
"application/vnd.powerbuilder75-s": { | |
source: "iana", | |
}, | |
"application/vnd.preminet": { | |
source: "iana", | |
}, | |
"application/vnd.previewsystems.box": { | |
source: "iana", | |
extensions: ["box"], | |
}, | |
"application/vnd.proteus.magazine": { | |
source: "iana", | |
extensions: ["mgz"], | |
}, | |
"application/vnd.psfs": { | |
source: "iana", | |
}, | |
"application/vnd.publishare-delta-tree": { | |
source: "iana", | |
extensions: ["qps"], | |
}, | |
"application/vnd.pvi.ptid1": { | |
source: "iana", | |
extensions: ["ptid"], | |
}, | |
"application/vnd.pwg-multiplexed": { | |
source: "iana", | |
}, | |
"application/vnd.pwg-xhtml-print+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.qualcomm.brew-app-res": { | |
source: "iana", | |
}, | |
"application/vnd.quarantainenet": { | |
source: "iana", | |
}, | |
"application/vnd.quark.quarkxpress": { | |
source: "iana", | |
extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], | |
}, | |
"application/vnd.quobject-quoxdocument": { | |
source: "iana", | |
}, | |
"application/vnd.radisys.moml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-audit+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-audit-conf+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-audit-conn+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-audit-dialog+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-audit-stream+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-conf+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-dialog+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-dialog-base+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-dialog-fax-detect+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-dialog-group+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-dialog-speech+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.radisys.msml-dialog-transform+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.rainstor.data": { | |
source: "iana", | |
}, | |
"application/vnd.rapid": { | |
source: "iana", | |
}, | |
"application/vnd.rar": { | |
source: "iana", | |
extensions: ["rar"], | |
}, | |
"application/vnd.realvnc.bed": { | |
source: "iana", | |
extensions: ["bed"], | |
}, | |
"application/vnd.recordare.musicxml": { | |
source: "iana", | |
extensions: ["mxl"], | |
}, | |
"application/vnd.recordare.musicxml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["musicxml"], | |
}, | |
"application/vnd.renlearn.rlprint": { | |
source: "iana", | |
}, | |
"application/vnd.restful+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.rig.cryptonote": { | |
source: "iana", | |
extensions: ["cryptonote"], | |
}, | |
"application/vnd.rim.cod": { | |
source: "apache", | |
extensions: ["cod"], | |
}, | |
"application/vnd.rn-realmedia": { | |
source: "apache", | |
extensions: ["rm"], | |
}, | |
"application/vnd.rn-realmedia-vbr": { | |
source: "apache", | |
extensions: ["rmvb"], | |
}, | |
"application/vnd.route66.link66+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["link66"], | |
}, | |
"application/vnd.rs-274x": { | |
source: "iana", | |
}, | |
"application/vnd.ruckus.download": { | |
source: "iana", | |
}, | |
"application/vnd.s3sms": { | |
source: "iana", | |
}, | |
"application/vnd.sailingtracker.track": { | |
source: "iana", | |
extensions: ["st"], | |
}, | |
"application/vnd.sar": { | |
source: "iana", | |
}, | |
"application/vnd.sbm.cid": { | |
source: "iana", | |
}, | |
"application/vnd.sbm.mid2": { | |
source: "iana", | |
}, | |
"application/vnd.scribus": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.3df": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.csf": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.doc": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.eml": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.mht": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.net": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.ppt": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.tiff": { | |
source: "iana", | |
}, | |
"application/vnd.sealed.xls": { | |
source: "iana", | |
}, | |
"application/vnd.sealedmedia.softseal.html": { | |
source: "iana", | |
}, | |
"application/vnd.sealedmedia.softseal.pdf": { | |
source: "iana", | |
}, | |
"application/vnd.seemail": { | |
source: "iana", | |
extensions: ["see"], | |
}, | |
"application/vnd.sema": { | |
source: "iana", | |
extensions: ["sema"], | |
}, | |
"application/vnd.semd": { | |
source: "iana", | |
extensions: ["semd"], | |
}, | |
"application/vnd.semf": { | |
source: "iana", | |
extensions: ["semf"], | |
}, | |
"application/vnd.shade-save-file": { | |
source: "iana", | |
}, | |
"application/vnd.shana.informed.formdata": { | |
source: "iana", | |
extensions: ["ifm"], | |
}, | |
"application/vnd.shana.informed.formtemplate": { | |
source: "iana", | |
extensions: ["itp"], | |
}, | |
"application/vnd.shana.informed.interchange": { | |
source: "iana", | |
extensions: ["iif"], | |
}, | |
"application/vnd.shana.informed.package": { | |
source: "iana", | |
extensions: ["ipk"], | |
}, | |
"application/vnd.shootproof+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.shopkick+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.shp": { | |
source: "iana", | |
}, | |
"application/vnd.shx": { | |
source: "iana", | |
}, | |
"application/vnd.sigrok.session": { | |
source: "iana", | |
}, | |
"application/vnd.simtech-mindmapper": { | |
source: "iana", | |
extensions: ["twd", "twds"], | |
}, | |
"application/vnd.siren+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.smaf": { | |
source: "iana", | |
extensions: ["mmf"], | |
}, | |
"application/vnd.smart.notebook": { | |
source: "iana", | |
}, | |
"application/vnd.smart.teacher": { | |
source: "iana", | |
extensions: ["teacher"], | |
}, | |
"application/vnd.snesdev-page-table": { | |
source: "iana", | |
}, | |
"application/vnd.software602.filler.form+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["fo"], | |
}, | |
"application/vnd.software602.filler.form-xml-zip": { | |
source: "iana", | |
}, | |
"application/vnd.solent.sdkm+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["sdkm", "sdkd"], | |
}, | |
"application/vnd.spotfire.dxp": { | |
source: "iana", | |
extensions: ["dxp"], | |
}, | |
"application/vnd.spotfire.sfs": { | |
source: "iana", | |
extensions: ["sfs"], | |
}, | |
"application/vnd.sqlite3": { | |
source: "iana", | |
}, | |
"application/vnd.sss-cod": { | |
source: "iana", | |
}, | |
"application/vnd.sss-dtf": { | |
source: "iana", | |
}, | |
"application/vnd.sss-ntf": { | |
source: "iana", | |
}, | |
"application/vnd.stardivision.calc": { | |
source: "apache", | |
extensions: ["sdc"], | |
}, | |
"application/vnd.stardivision.draw": { | |
source: "apache", | |
extensions: ["sda"], | |
}, | |
"application/vnd.stardivision.impress": { | |
source: "apache", | |
extensions: ["sdd"], | |
}, | |
"application/vnd.stardivision.math": { | |
source: "apache", | |
extensions: ["smf"], | |
}, | |
"application/vnd.stardivision.writer": { | |
source: "apache", | |
extensions: ["sdw", "vor"], | |
}, | |
"application/vnd.stardivision.writer-global": { | |
source: "apache", | |
extensions: ["sgl"], | |
}, | |
"application/vnd.stepmania.package": { | |
source: "iana", | |
extensions: ["smzip"], | |
}, | |
"application/vnd.stepmania.stepchart": { | |
source: "iana", | |
extensions: ["sm"], | |
}, | |
"application/vnd.street-stream": { | |
source: "iana", | |
}, | |
"application/vnd.sun.wadl+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["wadl"], | |
}, | |
"application/vnd.sun.xml.calc": { | |
source: "apache", | |
extensions: ["sxc"], | |
}, | |
"application/vnd.sun.xml.calc.template": { | |
source: "apache", | |
extensions: ["stc"], | |
}, | |
"application/vnd.sun.xml.draw": { | |
source: "apache", | |
extensions: ["sxd"], | |
}, | |
"application/vnd.sun.xml.draw.template": { | |
source: "apache", | |
extensions: ["std"], | |
}, | |
"application/vnd.sun.xml.impress": { | |
source: "apache", | |
extensions: ["sxi"], | |
}, | |
"application/vnd.sun.xml.impress.template": { | |
source: "apache", | |
extensions: ["sti"], | |
}, | |
"application/vnd.sun.xml.math": { | |
source: "apache", | |
extensions: ["sxm"], | |
}, | |
"application/vnd.sun.xml.writer": { | |
source: "apache", | |
extensions: ["sxw"], | |
}, | |
"application/vnd.sun.xml.writer.global": { | |
source: "apache", | |
extensions: ["sxg"], | |
}, | |
"application/vnd.sun.xml.writer.template": { | |
source: "apache", | |
extensions: ["stw"], | |
}, | |
"application/vnd.sus-calendar": { | |
source: "iana", | |
extensions: ["sus", "susp"], | |
}, | |
"application/vnd.svd": { | |
source: "iana", | |
extensions: ["svd"], | |
}, | |
"application/vnd.swiftview-ics": { | |
source: "iana", | |
}, | |
"application/vnd.sycle+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.symbian.install": { | |
source: "apache", | |
extensions: ["sis", "sisx"], | |
}, | |
"application/vnd.syncml+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["xsm"], | |
}, | |
"application/vnd.syncml.dm+wbxml": { | |
source: "iana", | |
charset: "UTF-8", | |
extensions: ["bdm"], | |
}, | |
"application/vnd.syncml.dm+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["xdm"], | |
}, | |
"application/vnd.syncml.dm.notification": { | |
source: "iana", | |
}, | |
"application/vnd.syncml.dmddf+wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.syncml.dmddf+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["ddf"], | |
}, | |
"application/vnd.syncml.dmtnds+wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.syncml.dmtnds+xml": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
}, | |
"application/vnd.syncml.ds.notification": { | |
source: "iana", | |
}, | |
"application/vnd.tableschema+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.tao.intent-module-archive": { | |
source: "iana", | |
extensions: ["tao"], | |
}, | |
"application/vnd.tcpdump.pcap": { | |
source: "iana", | |
extensions: ["pcap", "cap", "dmp"], | |
}, | |
"application/vnd.think-cell.ppttc+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.tmd.mediaflex.api+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.tml": { | |
source: "iana", | |
}, | |
"application/vnd.tmobile-livetv": { | |
source: "iana", | |
extensions: ["tmo"], | |
}, | |
"application/vnd.tri.onesource": { | |
source: "iana", | |
}, | |
"application/vnd.trid.tpt": { | |
source: "iana", | |
extensions: ["tpt"], | |
}, | |
"application/vnd.triscape.mxs": { | |
source: "iana", | |
extensions: ["mxs"], | |
}, | |
"application/vnd.trueapp": { | |
source: "iana", | |
extensions: ["tra"], | |
}, | |
"application/vnd.truedoc": { | |
source: "iana", | |
}, | |
"application/vnd.ubisoft.webplayer": { | |
source: "iana", | |
}, | |
"application/vnd.ufdl": { | |
source: "iana", | |
extensions: ["ufd", "ufdl"], | |
}, | |
"application/vnd.uiq.theme": { | |
source: "iana", | |
extensions: ["utz"], | |
}, | |
"application/vnd.umajin": { | |
source: "iana", | |
extensions: ["umj"], | |
}, | |
"application/vnd.unity": { | |
source: "iana", | |
extensions: ["unityweb"], | |
}, | |
"application/vnd.uoml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["uoml"], | |
}, | |
"application/vnd.uplanet.alert": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.alert-wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.bearer-choice": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.bearer-choice-wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.cacheop": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.cacheop-wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.channel": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.channel-wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.list": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.list-wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.listcmd": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.listcmd-wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.uplanet.signal": { | |
source: "iana", | |
}, | |
"application/vnd.uri-map": { | |
source: "iana", | |
}, | |
"application/vnd.valve.source.material": { | |
source: "iana", | |
}, | |
"application/vnd.vcx": { | |
source: "iana", | |
extensions: ["vcx"], | |
}, | |
"application/vnd.vd-study": { | |
source: "iana", | |
}, | |
"application/vnd.vectorworks": { | |
source: "iana", | |
}, | |
"application/vnd.vel+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.verimatrix.vcas": { | |
source: "iana", | |
}, | |
"application/vnd.veryant.thin": { | |
source: "iana", | |
}, | |
"application/vnd.ves.encrypted": { | |
source: "iana", | |
}, | |
"application/vnd.vidsoft.vidconference": { | |
source: "iana", | |
}, | |
"application/vnd.visio": { | |
source: "iana", | |
extensions: ["vsd", "vst", "vss", "vsw"], | |
}, | |
"application/vnd.visionary": { | |
source: "iana", | |
extensions: ["vis"], | |
}, | |
"application/vnd.vividence.scriptfile": { | |
source: "iana", | |
}, | |
"application/vnd.vsf": { | |
source: "iana", | |
extensions: ["vsf"], | |
}, | |
"application/vnd.wap.sic": { | |
source: "iana", | |
}, | |
"application/vnd.wap.slc": { | |
source: "iana", | |
}, | |
"application/vnd.wap.wbxml": { | |
source: "iana", | |
charset: "UTF-8", | |
extensions: ["wbxml"], | |
}, | |
"application/vnd.wap.wmlc": { | |
source: "iana", | |
extensions: ["wmlc"], | |
}, | |
"application/vnd.wap.wmlscriptc": { | |
source: "iana", | |
extensions: ["wmlsc"], | |
}, | |
"application/vnd.webturbo": { | |
source: "iana", | |
extensions: ["wtb"], | |
}, | |
"application/vnd.wfa.p2p": { | |
source: "iana", | |
}, | |
"application/vnd.wfa.wsc": { | |
source: "iana", | |
}, | |
"application/vnd.windows.devicepairing": { | |
source: "iana", | |
}, | |
"application/vnd.wmc": { | |
source: "iana", | |
}, | |
"application/vnd.wmf.bootstrap": { | |
source: "iana", | |
}, | |
"application/vnd.wolfram.mathematica": { | |
source: "iana", | |
}, | |
"application/vnd.wolfram.mathematica.package": { | |
source: "iana", | |
}, | |
"application/vnd.wolfram.player": { | |
source: "iana", | |
extensions: ["nbp"], | |
}, | |
"application/vnd.wordperfect": { | |
source: "iana", | |
extensions: ["wpd"], | |
}, | |
"application/vnd.wqd": { | |
source: "iana", | |
extensions: ["wqd"], | |
}, | |
"application/vnd.wrq-hp3000-labelled": { | |
source: "iana", | |
}, | |
"application/vnd.wt.stf": { | |
source: "iana", | |
extensions: ["stf"], | |
}, | |
"application/vnd.wv.csp+wbxml": { | |
source: "iana", | |
}, | |
"application/vnd.wv.csp+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.wv.ssp+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.xacml+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.xara": { | |
source: "iana", | |
extensions: ["xar"], | |
}, | |
"application/vnd.xfdl": { | |
source: "iana", | |
extensions: ["xfdl"], | |
}, | |
"application/vnd.xfdl.webform": { | |
source: "iana", | |
}, | |
"application/vnd.xmi+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vnd.xmpie.cpkg": { | |
source: "iana", | |
}, | |
"application/vnd.xmpie.dpkg": { | |
source: "iana", | |
}, | |
"application/vnd.xmpie.plan": { | |
source: "iana", | |
}, | |
"application/vnd.xmpie.ppkg": { | |
source: "iana", | |
}, | |
"application/vnd.xmpie.xlim": { | |
source: "iana", | |
}, | |
"application/vnd.yamaha.hv-dic": { | |
source: "iana", | |
extensions: ["hvd"], | |
}, | |
"application/vnd.yamaha.hv-script": { | |
source: "iana", | |
extensions: ["hvs"], | |
}, | |
"application/vnd.yamaha.hv-voice": { | |
source: "iana", | |
extensions: ["hvp"], | |
}, | |
"application/vnd.yamaha.openscoreformat": { | |
source: "iana", | |
extensions: ["osf"], | |
}, | |
"application/vnd.yamaha.openscoreformat.osfpvg+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["osfpvg"], | |
}, | |
"application/vnd.yamaha.remote-setup": { | |
source: "iana", | |
}, | |
"application/vnd.yamaha.smaf-audio": { | |
source: "iana", | |
extensions: ["saf"], | |
}, | |
"application/vnd.yamaha.smaf-phrase": { | |
source: "iana", | |
extensions: ["spf"], | |
}, | |
"application/vnd.yamaha.through-ngn": { | |
source: "iana", | |
}, | |
"application/vnd.yamaha.tunnel-udpencap": { | |
source: "iana", | |
}, | |
"application/vnd.yaoweme": { | |
source: "iana", | |
}, | |
"application/vnd.yellowriver-custom-menu": { | |
source: "iana", | |
extensions: ["cmp"], | |
}, | |
"application/vnd.youtube.yt": { | |
source: "iana", | |
}, | |
"application/vnd.zul": { | |
source: "iana", | |
extensions: ["zir", "zirz"], | |
}, | |
"application/vnd.zzazz.deck+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["zaz"], | |
}, | |
"application/voicexml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["vxml"], | |
}, | |
"application/voucher-cms+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/vq-rtcpxr": { | |
source: "iana", | |
}, | |
"application/wasm": { | |
compressible: true, | |
extensions: ["wasm"], | |
}, | |
"application/watcherinfo+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/webpush-options+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/whoispp-query": { | |
source: "iana", | |
}, | |
"application/whoispp-response": { | |
source: "iana", | |
}, | |
"application/widget": { | |
source: "iana", | |
extensions: ["wgt"], | |
}, | |
"application/winhlp": { | |
source: "apache", | |
extensions: ["hlp"], | |
}, | |
"application/wita": { | |
source: "iana", | |
}, | |
"application/wordperfect5.1": { | |
source: "iana", | |
}, | |
"application/wsdl+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["wsdl"], | |
}, | |
"application/wspolicy+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["wspolicy"], | |
}, | |
"application/x-7z-compressed": { | |
source: "apache", | |
compressible: false, | |
extensions: ["7z"], | |
}, | |
"application/x-abiword": { | |
source: "apache", | |
extensions: ["abw"], | |
}, | |
"application/x-ace-compressed": { | |
source: "apache", | |
extensions: ["ace"], | |
}, | |
"application/x-amf": { | |
source: "apache", | |
}, | |
"application/x-apple-diskimage": { | |
source: "apache", | |
extensions: ["dmg"], | |
}, | |
"application/x-arj": { | |
compressible: false, | |
extensions: ["arj"], | |
}, | |
"application/x-authorware-bin": { | |
source: "apache", | |
extensions: ["aab", "x32", "u32", "vox"], | |
}, | |
"application/x-authorware-map": { | |
source: "apache", | |
extensions: ["aam"], | |
}, | |
"application/x-authorware-seg": { | |
source: "apache", | |
extensions: ["aas"], | |
}, | |
"application/x-bcpio": { | |
source: "apache", | |
extensions: ["bcpio"], | |
}, | |
"application/x-bdoc": { | |
compressible: false, | |
extensions: ["bdoc"], | |
}, | |
"application/x-bittorrent": { | |
source: "apache", | |
extensions: ["torrent"], | |
}, | |
"application/x-blorb": { | |
source: "apache", | |
extensions: ["blb", "blorb"], | |
}, | |
"application/x-bzip": { | |
source: "apache", | |
compressible: false, | |
extensions: ["bz"], | |
}, | |
"application/x-bzip2": { | |
source: "apache", | |
compressible: false, | |
extensions: ["bz2", "boz"], | |
}, | |
"application/x-cbr": { | |
source: "apache", | |
extensions: ["cbr", "cba", "cbt", "cbz", "cb7"], | |
}, | |
"application/x-cdlink": { | |
source: "apache", | |
extensions: ["vcd"], | |
}, | |
"application/x-cfs-compressed": { | |
source: "apache", | |
extensions: ["cfs"], | |
}, | |
"application/x-chat": { | |
source: "apache", | |
extensions: ["chat"], | |
}, | |
"application/x-chess-pgn": { | |
source: "apache", | |
extensions: ["pgn"], | |
}, | |
"application/x-chrome-extension": { | |
extensions: ["crx"], | |
}, | |
"application/x-cocoa": { | |
source: "nginx", | |
extensions: ["cco"], | |
}, | |
"application/x-compress": { | |
source: "apache", | |
}, | |
"application/x-conference": { | |
source: "apache", | |
extensions: ["nsc"], | |
}, | |
"application/x-cpio": { | |
source: "apache", | |
extensions: ["cpio"], | |
}, | |
"application/x-csh": { | |
source: "apache", | |
extensions: ["csh"], | |
}, | |
"application/x-deb": { | |
compressible: false, | |
}, | |
"application/x-debian-package": { | |
source: "apache", | |
extensions: ["deb", "udeb"], | |
}, | |
"application/x-dgc-compressed": { | |
source: "apache", | |
extensions: ["dgc"], | |
}, | |
"application/x-director": { | |
source: "apache", | |
extensions: [ | |
"dir", | |
"dcr", | |
"dxr", | |
"cst", | |
"cct", | |
"cxt", | |
"w3d", | |
"fgd", | |
"swa", | |
], | |
}, | |
"application/x-doom": { | |
source: "apache", | |
extensions: ["wad"], | |
}, | |
"application/x-dtbncx+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["ncx"], | |
}, | |
"application/x-dtbook+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["dtb"], | |
}, | |
"application/x-dtbresource+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["res"], | |
}, | |
"application/x-dvi": { | |
source: "apache", | |
compressible: false, | |
extensions: ["dvi"], | |
}, | |
"application/x-envoy": { | |
source: "apache", | |
extensions: ["evy"], | |
}, | |
"application/x-eva": { | |
source: "apache", | |
extensions: ["eva"], | |
}, | |
"application/x-font-bdf": { | |
source: "apache", | |
extensions: ["bdf"], | |
}, | |
"application/x-font-dos": { | |
source: "apache", | |
}, | |
"application/x-font-framemaker": { | |
source: "apache", | |
}, | |
"application/x-font-ghostscript": { | |
source: "apache", | |
extensions: ["gsf"], | |
}, | |
"application/x-font-libgrx": { | |
source: "apache", | |
}, | |
"application/x-font-linux-psf": { | |
source: "apache", | |
extensions: ["psf"], | |
}, | |
"application/x-font-pcf": { | |
source: "apache", | |
extensions: ["pcf"], | |
}, | |
"application/x-font-snf": { | |
source: "apache", | |
extensions: ["snf"], | |
}, | |
"application/x-font-speedo": { | |
source: "apache", | |
}, | |
"application/x-font-sunos-news": { | |
source: "apache", | |
}, | |
"application/x-font-type1": { | |
source: "apache", | |
extensions: ["pfa", "pfb", "pfm", "afm"], | |
}, | |
"application/x-font-vfont": { | |
source: "apache", | |
}, | |
"application/x-freearc": { | |
source: "apache", | |
extensions: ["arc"], | |
}, | |
"application/x-futuresplash": { | |
source: "apache", | |
extensions: ["spl"], | |
}, | |
"application/x-gca-compressed": { | |
source: "apache", | |
extensions: ["gca"], | |
}, | |
"application/x-glulx": { | |
source: "apache", | |
extensions: ["ulx"], | |
}, | |
"application/x-gnumeric": { | |
source: "apache", | |
extensions: ["gnumeric"], | |
}, | |
"application/x-gramps-xml": { | |
source: "apache", | |
extensions: ["gramps"], | |
}, | |
"application/x-gtar": { | |
source: "apache", | |
extensions: ["gtar"], | |
}, | |
"application/x-gzip": { | |
source: "apache", | |
}, | |
"application/x-hdf": { | |
source: "apache", | |
extensions: ["hdf"], | |
}, | |
"application/x-httpd-php": { | |
compressible: true, | |
extensions: ["php"], | |
}, | |
"application/x-install-instructions": { | |
source: "apache", | |
extensions: ["install"], | |
}, | |
"application/x-iso9660-image": { | |
source: "apache", | |
extensions: ["iso"], | |
}, | |
"application/x-java-archive-diff": { | |
source: "nginx", | |
extensions: ["jardiff"], | |
}, | |
"application/x-java-jnlp-file": { | |
source: "apache", | |
compressible: false, | |
extensions: ["jnlp"], | |
}, | |
"application/x-javascript": { | |
compressible: true, | |
}, | |
"application/x-keepass2": { | |
extensions: ["kdbx"], | |
}, | |
"application/x-latex": { | |
source: "apache", | |
compressible: false, | |
extensions: ["latex"], | |
}, | |
"application/x-lua-bytecode": { | |
extensions: ["luac"], | |
}, | |
"application/x-lzh-compressed": { | |
source: "apache", | |
extensions: ["lzh", "lha"], | |
}, | |
"application/x-makeself": { | |
source: "nginx", | |
extensions: ["run"], | |
}, | |
"application/x-mie": { | |
source: "apache", | |
extensions: ["mie"], | |
}, | |
"application/x-mobipocket-ebook": { | |
source: "apache", | |
extensions: ["prc", "mobi"], | |
}, | |
"application/x-mpegurl": { | |
compressible: false, | |
}, | |
"application/x-ms-application": { | |
source: "apache", | |
extensions: ["application"], | |
}, | |
"application/x-ms-shortcut": { | |
source: "apache", | |
extensions: ["lnk"], | |
}, | |
"application/x-ms-wmd": { | |
source: "apache", | |
extensions: ["wmd"], | |
}, | |
"application/x-ms-wmz": { | |
source: "apache", | |
extensions: ["wmz"], | |
}, | |
"application/x-ms-xbap": { | |
source: "apache", | |
extensions: ["xbap"], | |
}, | |
"application/x-msaccess": { | |
source: "apache", | |
extensions: ["mdb"], | |
}, | |
"application/x-msbinder": { | |
source: "apache", | |
extensions: ["obd"], | |
}, | |
"application/x-mscardfile": { | |
source: "apache", | |
extensions: ["crd"], | |
}, | |
"application/x-msclip": { | |
source: "apache", | |
extensions: ["clp"], | |
}, | |
"application/x-msdos-program": { | |
extensions: ["exe"], | |
}, | |
"application/x-msdownload": { | |
source: "apache", | |
extensions: ["exe", "dll", "com", "bat", "msi"], | |
}, | |
"application/x-msmediaview": { | |
source: "apache", | |
extensions: ["mvb", "m13", "m14"], | |
}, | |
"application/x-msmetafile": { | |
source: "apache", | |
extensions: ["wmf", "wmz", "emf", "emz"], | |
}, | |
"application/x-msmoney": { | |
source: "apache", | |
extensions: ["mny"], | |
}, | |
"application/x-mspublisher": { | |
source: "apache", | |
extensions: ["pub"], | |
}, | |
"application/x-msschedule": { | |
source: "apache", | |
extensions: ["scd"], | |
}, | |
"application/x-msterminal": { | |
source: "apache", | |
extensions: ["trm"], | |
}, | |
"application/x-mswrite": { | |
source: "apache", | |
extensions: ["wri"], | |
}, | |
"application/x-netcdf": { | |
source: "apache", | |
extensions: ["nc", "cdf"], | |
}, | |
"application/x-ns-proxy-autoconfig": { | |
compressible: true, | |
extensions: ["pac"], | |
}, | |
"application/x-nzb": { | |
source: "apache", | |
extensions: ["nzb"], | |
}, | |
"application/x-perl": { | |
source: "nginx", | |
extensions: ["pl", "pm"], | |
}, | |
"application/x-pilot": { | |
source: "nginx", | |
extensions: ["prc", "pdb"], | |
}, | |
"application/x-pkcs12": { | |
source: "apache", | |
compressible: false, | |
extensions: ["p12", "pfx"], | |
}, | |
"application/x-pkcs7-certificates": { | |
source: "apache", | |
extensions: ["p7b", "spc"], | |
}, | |
"application/x-pkcs7-certreqresp": { | |
source: "apache", | |
extensions: ["p7r"], | |
}, | |
"application/x-pki-message": { | |
source: "iana", | |
}, | |
"application/x-rar-compressed": { | |
source: "apache", | |
compressible: false, | |
extensions: ["rar"], | |
}, | |
"application/x-redhat-package-manager": { | |
source: "nginx", | |
extensions: ["rpm"], | |
}, | |
"application/x-research-info-systems": { | |
source: "apache", | |
extensions: ["ris"], | |
}, | |
"application/x-sea": { | |
source: "nginx", | |
extensions: ["sea"], | |
}, | |
"application/x-sh": { | |
source: "apache", | |
compressible: true, | |
extensions: ["sh"], | |
}, | |
"application/x-shar": { | |
source: "apache", | |
extensions: ["shar"], | |
}, | |
"application/x-shockwave-flash": { | |
source: "apache", | |
compressible: false, | |
extensions: ["swf"], | |
}, | |
"application/x-silverlight-app": { | |
source: "apache", | |
extensions: ["xap"], | |
}, | |
"application/x-sql": { | |
source: "apache", | |
extensions: ["sql"], | |
}, | |
"application/x-stuffit": { | |
source: "apache", | |
compressible: false, | |
extensions: ["sit"], | |
}, | |
"application/x-stuffitx": { | |
source: "apache", | |
extensions: ["sitx"], | |
}, | |
"application/x-subrip": { | |
source: "apache", | |
extensions: ["srt"], | |
}, | |
"application/x-sv4cpio": { | |
source: "apache", | |
extensions: ["sv4cpio"], | |
}, | |
"application/x-sv4crc": { | |
source: "apache", | |
extensions: ["sv4crc"], | |
}, | |
"application/x-t3vm-image": { | |
source: "apache", | |
extensions: ["t3"], | |
}, | |
"application/x-tads": { | |
source: "apache", | |
extensions: ["gam"], | |
}, | |
"application/x-tar": { | |
source: "apache", | |
compressible: true, | |
extensions: ["tar"], | |
}, | |
"application/x-tcl": { | |
source: "apache", | |
extensions: ["tcl", "tk"], | |
}, | |
"application/x-tex": { | |
source: "apache", | |
extensions: ["tex"], | |
}, | |
"application/x-tex-tfm": { | |
source: "apache", | |
extensions: ["tfm"], | |
}, | |
"application/x-texinfo": { | |
source: "apache", | |
extensions: ["texinfo", "texi"], | |
}, | |
"application/x-tgif": { | |
source: "apache", | |
extensions: ["obj"], | |
}, | |
"application/x-ustar": { | |
source: "apache", | |
extensions: ["ustar"], | |
}, | |
"application/x-virtualbox-hdd": { | |
compressible: true, | |
extensions: ["hdd"], | |
}, | |
"application/x-virtualbox-ova": { | |
compressible: true, | |
extensions: ["ova"], | |
}, | |
"application/x-virtualbox-ovf": { | |
compressible: true, | |
extensions: ["ovf"], | |
}, | |
"application/x-virtualbox-vbox": { | |
compressible: true, | |
extensions: ["vbox"], | |
}, | |
"application/x-virtualbox-vbox-extpack": { | |
compressible: false, | |
extensions: ["vbox-extpack"], | |
}, | |
"application/x-virtualbox-vdi": { | |
compressible: true, | |
extensions: ["vdi"], | |
}, | |
"application/x-virtualbox-vhd": { | |
compressible: true, | |
extensions: ["vhd"], | |
}, | |
"application/x-virtualbox-vmdk": { | |
compressible: true, | |
extensions: ["vmdk"], | |
}, | |
"application/x-wais-source": { | |
source: "apache", | |
extensions: ["src"], | |
}, | |
"application/x-web-app-manifest+json": { | |
compressible: true, | |
extensions: ["webapp"], | |
}, | |
"application/x-www-form-urlencoded": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/x-x509-ca-cert": { | |
source: "iana", | |
extensions: ["der", "crt", "pem"], | |
}, | |
"application/x-x509-ca-ra-cert": { | |
source: "iana", | |
}, | |
"application/x-x509-next-ca-cert": { | |
source: "iana", | |
}, | |
"application/x-xfig": { | |
source: "apache", | |
extensions: ["fig"], | |
}, | |
"application/x-xliff+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["xlf"], | |
}, | |
"application/x-xpinstall": { | |
source: "apache", | |
compressible: false, | |
extensions: ["xpi"], | |
}, | |
"application/x-xz": { | |
source: "apache", | |
extensions: ["xz"], | |
}, | |
"application/x-zmachine": { | |
source: "apache", | |
extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], | |
}, | |
"application/x400-bp": { | |
source: "iana", | |
}, | |
"application/xacml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/xaml+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["xaml"], | |
}, | |
"application/xcap-att+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xav"], | |
}, | |
"application/xcap-caps+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xca"], | |
}, | |
"application/xcap-diff+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xdf"], | |
}, | |
"application/xcap-el+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xel"], | |
}, | |
"application/xcap-error+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xer"], | |
}, | |
"application/xcap-ns+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xns"], | |
}, | |
"application/xcon-conference-info+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/xcon-conference-info-diff+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/xenc+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xenc"], | |
}, | |
"application/xhtml+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xhtml", "xht"], | |
}, | |
"application/xhtml-voice+xml": { | |
source: "apache", | |
compressible: true, | |
}, | |
"application/xliff+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xlf"], | |
}, | |
"application/xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xml", "xsl", "xsd", "rng"], | |
}, | |
"application/xml-dtd": { | |
source: "iana", | |
compressible: true, | |
extensions: ["dtd"], | |
}, | |
"application/xml-external-parsed-entity": { | |
source: "iana", | |
}, | |
"application/xml-patch+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/xmpp+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/xop+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xop"], | |
}, | |
"application/xproc+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["xpl"], | |
}, | |
"application/xslt+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xsl", "xslt"], | |
}, | |
"application/xspf+xml": { | |
source: "apache", | |
compressible: true, | |
extensions: ["xspf"], | |
}, | |
"application/xv+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["mxml", "xhvml", "xvml", "xvm"], | |
}, | |
"application/yang": { | |
source: "iana", | |
extensions: ["yang"], | |
}, | |
"application/yang-data+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/yang-data+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/yang-patch+json": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/yang-patch+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"application/yin+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["yin"], | |
}, | |
"application/zip": { | |
source: "iana", | |
compressible: false, | |
extensions: ["zip"], | |
}, | |
"application/zlib": { | |
source: "iana", | |
}, | |
"application/zstd": { | |
source: "iana", | |
}, | |
"audio/1d-interleaved-parityfec": { | |
source: "iana", | |
}, | |
"audio/32kadpcm": { | |
source: "iana", | |
}, | |
"audio/3gpp": { | |
source: "iana", | |
compressible: false, | |
extensions: ["3gpp"], | |
}, | |
"audio/3gpp2": { | |
source: "iana", | |
}, | |
"audio/aac": { | |
source: "iana", | |
}, | |
"audio/ac3": { | |
source: "iana", | |
}, | |
"audio/adpcm": { | |
source: "apache", | |
extensions: ["adp"], | |
}, | |
"audio/amr": { | |
source: "iana", | |
}, | |
"audio/amr-wb": { | |
source: "iana", | |
}, | |
"audio/amr-wb+": { | |
source: "iana", | |
}, | |
"audio/aptx": { | |
source: "iana", | |
}, | |
"audio/asc": { | |
source: "iana", | |
}, | |
"audio/atrac-advanced-lossless": { | |
source: "iana", | |
}, | |
"audio/atrac-x": { | |
source: "iana", | |
}, | |
"audio/atrac3": { | |
source: "iana", | |
}, | |
"audio/basic": { | |
source: "iana", | |
compressible: false, | |
extensions: ["au", "snd"], | |
}, | |
"audio/bv16": { | |
source: "iana", | |
}, | |
"audio/bv32": { | |
source: "iana", | |
}, | |
"audio/clearmode": { | |
source: "iana", | |
}, | |
"audio/cn": { | |
source: "iana", | |
}, | |
"audio/dat12": { | |
source: "iana", | |
}, | |
"audio/dls": { | |
source: "iana", | |
}, | |
"audio/dsr-es201108": { | |
source: "iana", | |
}, | |
"audio/dsr-es202050": { | |
source: "iana", | |
}, | |
"audio/dsr-es202211": { | |
source: "iana", | |
}, | |
"audio/dsr-es202212": { | |
source: "iana", | |
}, | |
"audio/dv": { | |
source: "iana", | |
}, | |
"audio/dvi4": { | |
source: "iana", | |
}, | |
"audio/eac3": { | |
source: "iana", | |
}, | |
"audio/encaprtp": { | |
source: "iana", | |
}, | |
"audio/evrc": { | |
source: "iana", | |
}, | |
"audio/evrc-qcp": { | |
source: "iana", | |
}, | |
"audio/evrc0": { | |
source: "iana", | |
}, | |
"audio/evrc1": { | |
source: "iana", | |
}, | |
"audio/evrcb": { | |
source: "iana", | |
}, | |
"audio/evrcb0": { | |
source: "iana", | |
}, | |
"audio/evrcb1": { | |
source: "iana", | |
}, | |
"audio/evrcnw": { | |
source: "iana", | |
}, | |
"audio/evrcnw0": { | |
source: "iana", | |
}, | |
"audio/evrcnw1": { | |
source: "iana", | |
}, | |
"audio/evrcwb": { | |
source: "iana", | |
}, | |
"audio/evrcwb0": { | |
source: "iana", | |
}, | |
"audio/evrcwb1": { | |
source: "iana", | |
}, | |
"audio/evs": { | |
source: "iana", | |
}, | |
"audio/flexfec": { | |
source: "iana", | |
}, | |
"audio/fwdred": { | |
source: "iana", | |
}, | |
"audio/g711-0": { | |
source: "iana", | |
}, | |
"audio/g719": { | |
source: "iana", | |
}, | |
"audio/g722": { | |
source: "iana", | |
}, | |
"audio/g7221": { | |
source: "iana", | |
}, | |
"audio/g723": { | |
source: "iana", | |
}, | |
"audio/g726-16": { | |
source: "iana", | |
}, | |
"audio/g726-24": { | |
source: "iana", | |
}, | |
"audio/g726-32": { | |
source: "iana", | |
}, | |
"audio/g726-40": { | |
source: "iana", | |
}, | |
"audio/g728": { | |
source: "iana", | |
}, | |
"audio/g729": { | |
source: "iana", | |
}, | |
"audio/g7291": { | |
source: "iana", | |
}, | |
"audio/g729d": { | |
source: "iana", | |
}, | |
"audio/g729e": { | |
source: "iana", | |
}, | |
"audio/gsm": { | |
source: "iana", | |
}, | |
"audio/gsm-efr": { | |
source: "iana", | |
}, | |
"audio/gsm-hr-08": { | |
source: "iana", | |
}, | |
"audio/ilbc": { | |
source: "iana", | |
}, | |
"audio/ip-mr_v2.5": { | |
source: "iana", | |
}, | |
"audio/isac": { | |
source: "apache", | |
}, | |
"audio/l16": { | |
source: "iana", | |
}, | |
"audio/l20": { | |
source: "iana", | |
}, | |
"audio/l24": { | |
source: "iana", | |
compressible: false, | |
}, | |
"audio/l8": { | |
source: "iana", | |
}, | |
"audio/lpc": { | |
source: "iana", | |
}, | |
"audio/melp": { | |
source: "iana", | |
}, | |
"audio/melp1200": { | |
source: "iana", | |
}, | |
"audio/melp2400": { | |
source: "iana", | |
}, | |
"audio/melp600": { | |
source: "iana", | |
}, | |
"audio/mhas": { | |
source: "iana", | |
}, | |
"audio/midi": { | |
source: "apache", | |
extensions: ["mid", "midi", "kar", "rmi"], | |
}, | |
"audio/mobile-xmf": { | |
source: "iana", | |
extensions: ["mxmf"], | |
}, | |
"audio/mp3": { | |
compressible: false, | |
extensions: ["mp3"], | |
}, | |
"audio/mp4": { | |
source: "iana", | |
compressible: false, | |
extensions: ["m4a", "mp4a"], | |
}, | |
"audio/mp4a-latm": { | |
source: "iana", | |
}, | |
"audio/mpa": { | |
source: "iana", | |
}, | |
"audio/mpa-robust": { | |
source: "iana", | |
}, | |
"audio/mpeg": { | |
source: "iana", | |
compressible: false, | |
extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], | |
}, | |
"audio/mpeg4-generic": { | |
source: "iana", | |
}, | |
"audio/musepack": { | |
source: "apache", | |
}, | |
"audio/ogg": { | |
source: "iana", | |
compressible: false, | |
extensions: ["oga", "ogg", "spx"], | |
}, | |
"audio/opus": { | |
source: "iana", | |
}, | |
"audio/parityfec": { | |
source: "iana", | |
}, | |
"audio/pcma": { | |
source: "iana", | |
}, | |
"audio/pcma-wb": { | |
source: "iana", | |
}, | |
"audio/pcmu": { | |
source: "iana", | |
}, | |
"audio/pcmu-wb": { | |
source: "iana", | |
}, | |
"audio/prs.sid": { | |
source: "iana", | |
}, | |
"audio/qcelp": { | |
source: "iana", | |
}, | |
"audio/raptorfec": { | |
source: "iana", | |
}, | |
"audio/red": { | |
source: "iana", | |
}, | |
"audio/rtp-enc-aescm128": { | |
source: "iana", | |
}, | |
"audio/rtp-midi": { | |
source: "iana", | |
}, | |
"audio/rtploopback": { | |
source: "iana", | |
}, | |
"audio/rtx": { | |
source: "iana", | |
}, | |
"audio/s3m": { | |
source: "apache", | |
extensions: ["s3m"], | |
}, | |
"audio/silk": { | |
source: "apache", | |
extensions: ["sil"], | |
}, | |
"audio/smv": { | |
source: "iana", | |
}, | |
"audio/smv-qcp": { | |
source: "iana", | |
}, | |
"audio/smv0": { | |
source: "iana", | |
}, | |
"audio/sofa": { | |
source: "iana", | |
}, | |
"audio/sp-midi": { | |
source: "iana", | |
}, | |
"audio/speex": { | |
source: "iana", | |
}, | |
"audio/t140c": { | |
source: "iana", | |
}, | |
"audio/t38": { | |
source: "iana", | |
}, | |
"audio/telephone-event": { | |
source: "iana", | |
}, | |
"audio/tetra_acelp": { | |
source: "iana", | |
}, | |
"audio/tetra_acelp_bb": { | |
source: "iana", | |
}, | |
"audio/tone": { | |
source: "iana", | |
}, | |
"audio/tsvcis": { | |
source: "iana", | |
}, | |
"audio/uemclip": { | |
source: "iana", | |
}, | |
"audio/ulpfec": { | |
source: "iana", | |
}, | |
"audio/usac": { | |
source: "iana", | |
}, | |
"audio/vdvi": { | |
source: "iana", | |
}, | |
"audio/vmr-wb": { | |
source: "iana", | |
}, | |
"audio/vnd.3gpp.iufp": { | |
source: "iana", | |
}, | |
"audio/vnd.4sb": { | |
source: "iana", | |
}, | |
"audio/vnd.audiokoz": { | |
source: "iana", | |
}, | |
"audio/vnd.celp": { | |
source: "iana", | |
}, | |
"audio/vnd.cisco.nse": { | |
source: "iana", | |
}, | |
"audio/vnd.cmles.radio-events": { | |
source: "iana", | |
}, | |
"audio/vnd.cns.anp1": { | |
source: "iana", | |
}, | |
"audio/vnd.cns.inf1": { | |
source: "iana", | |
}, | |
"audio/vnd.dece.audio": { | |
source: "iana", | |
extensions: ["uva", "uvva"], | |
}, | |
"audio/vnd.digital-winds": { | |
source: "iana", | |
extensions: ["eol"], | |
}, | |
"audio/vnd.dlna.adts": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.heaac.1": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.heaac.2": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.mlp": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.mps": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.pl2": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.pl2x": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.pl2z": { | |
source: "iana", | |
}, | |
"audio/vnd.dolby.pulse.1": { | |
source: "iana", | |
}, | |
"audio/vnd.dra": { | |
source: "iana", | |
extensions: ["dra"], | |
}, | |
"audio/vnd.dts": { | |
source: "iana", | |
extensions: ["dts"], | |
}, | |
"audio/vnd.dts.hd": { | |
source: "iana", | |
extensions: ["dtshd"], | |
}, | |
"audio/vnd.dts.uhd": { | |
source: "iana", | |
}, | |
"audio/vnd.dvb.file": { | |
source: "iana", | |
}, | |
"audio/vnd.everad.plj": { | |
source: "iana", | |
}, | |
"audio/vnd.hns.audio": { | |
source: "iana", | |
}, | |
"audio/vnd.lucent.voice": { | |
source: "iana", | |
extensions: ["lvp"], | |
}, | |
"audio/vnd.ms-playready.media.pya": { | |
source: "iana", | |
extensions: ["pya"], | |
}, | |
"audio/vnd.nokia.mobile-xmf": { | |
source: "iana", | |
}, | |
"audio/vnd.nortel.vbk": { | |
source: "iana", | |
}, | |
"audio/vnd.nuera.ecelp4800": { | |
source: "iana", | |
extensions: ["ecelp4800"], | |
}, | |
"audio/vnd.nuera.ecelp7470": { | |
source: "iana", | |
extensions: ["ecelp7470"], | |
}, | |
"audio/vnd.nuera.ecelp9600": { | |
source: "iana", | |
extensions: ["ecelp9600"], | |
}, | |
"audio/vnd.octel.sbc": { | |
source: "iana", | |
}, | |
"audio/vnd.presonus.multitrack": { | |
source: "iana", | |
}, | |
"audio/vnd.qcelp": { | |
source: "iana", | |
}, | |
"audio/vnd.rhetorex.32kadpcm": { | |
source: "iana", | |
}, | |
"audio/vnd.rip": { | |
source: "iana", | |
extensions: ["rip"], | |
}, | |
"audio/vnd.rn-realaudio": { | |
compressible: false, | |
}, | |
"audio/vnd.sealedmedia.softseal.mpeg": { | |
source: "iana", | |
}, | |
"audio/vnd.vmx.cvsd": { | |
source: "iana", | |
}, | |
"audio/vnd.wave": { | |
compressible: false, | |
}, | |
"audio/vorbis": { | |
source: "iana", | |
compressible: false, | |
}, | |
"audio/vorbis-config": { | |
source: "iana", | |
}, | |
"audio/wav": { | |
compressible: false, | |
extensions: ["wav"], | |
}, | |
"audio/wave": { | |
compressible: false, | |
extensions: ["wav"], | |
}, | |
"audio/webm": { | |
source: "apache", | |
compressible: false, | |
extensions: ["weba"], | |
}, | |
"audio/x-aac": { | |
source: "apache", | |
compressible: false, | |
extensions: ["aac"], | |
}, | |
"audio/x-aiff": { | |
source: "apache", | |
extensions: ["aif", "aiff", "aifc"], | |
}, | |
"audio/x-caf": { | |
source: "apache", | |
compressible: false, | |
extensions: ["caf"], | |
}, | |
"audio/x-flac": { | |
source: "apache", | |
extensions: ["flac"], | |
}, | |
"audio/x-m4a": { | |
source: "nginx", | |
extensions: ["m4a"], | |
}, | |
"audio/x-matroska": { | |
source: "apache", | |
extensions: ["mka"], | |
}, | |
"audio/x-mpegurl": { | |
source: "apache", | |
extensions: ["m3u"], | |
}, | |
"audio/x-ms-wax": { | |
source: "apache", | |
extensions: ["wax"], | |
}, | |
"audio/x-ms-wma": { | |
source: "apache", | |
extensions: ["wma"], | |
}, | |
"audio/x-pn-realaudio": { | |
source: "apache", | |
extensions: ["ram", "ra"], | |
}, | |
"audio/x-pn-realaudio-plugin": { | |
source: "apache", | |
extensions: ["rmp"], | |
}, | |
"audio/x-realaudio": { | |
source: "nginx", | |
extensions: ["ra"], | |
}, | |
"audio/x-tta": { | |
source: "apache", | |
}, | |
"audio/x-wav": { | |
source: "apache", | |
extensions: ["wav"], | |
}, | |
"audio/xm": { | |
source: "apache", | |
extensions: ["xm"], | |
}, | |
"chemical/x-cdx": { | |
source: "apache", | |
extensions: ["cdx"], | |
}, | |
"chemical/x-cif": { | |
source: "apache", | |
extensions: ["cif"], | |
}, | |
"chemical/x-cmdf": { | |
source: "apache", | |
extensions: ["cmdf"], | |
}, | |
"chemical/x-cml": { | |
source: "apache", | |
extensions: ["cml"], | |
}, | |
"chemical/x-csml": { | |
source: "apache", | |
extensions: ["csml"], | |
}, | |
"chemical/x-pdb": { | |
source: "apache", | |
}, | |
"chemical/x-xyz": { | |
source: "apache", | |
extensions: ["xyz"], | |
}, | |
"font/collection": { | |
source: "iana", | |
extensions: ["ttc"], | |
}, | |
"font/otf": { | |
source: "iana", | |
compressible: true, | |
extensions: ["otf"], | |
}, | |
"font/sfnt": { | |
source: "iana", | |
}, | |
"font/ttf": { | |
source: "iana", | |
compressible: true, | |
extensions: ["ttf"], | |
}, | |
"font/woff": { | |
source: "iana", | |
extensions: ["woff"], | |
}, | |
"font/woff2": { | |
source: "iana", | |
extensions: ["woff2"], | |
}, | |
"image/aces": { | |
source: "iana", | |
extensions: ["exr"], | |
}, | |
"image/apng": { | |
compressible: false, | |
extensions: ["apng"], | |
}, | |
"image/avci": { | |
source: "iana", | |
}, | |
"image/avcs": { | |
source: "iana", | |
}, | |
"image/avif": { | |
compressible: false, | |
extensions: ["avif"], | |
}, | |
"image/bmp": { | |
source: "iana", | |
compressible: true, | |
extensions: ["bmp"], | |
}, | |
"image/cgm": { | |
source: "iana", | |
extensions: ["cgm"], | |
}, | |
"image/dicom-rle": { | |
source: "iana", | |
extensions: ["drle"], | |
}, | |
"image/emf": { | |
source: "iana", | |
extensions: ["emf"], | |
}, | |
"image/fits": { | |
source: "iana", | |
extensions: ["fits"], | |
}, | |
"image/g3fax": { | |
source: "iana", | |
extensions: ["g3"], | |
}, | |
"image/gif": { | |
source: "iana", | |
compressible: false, | |
extensions: ["gif"], | |
}, | |
"image/heic": { | |
source: "iana", | |
extensions: ["heic"], | |
}, | |
"image/heic-sequence": { | |
source: "iana", | |
extensions: ["heics"], | |
}, | |
"image/heif": { | |
source: "iana", | |
extensions: ["heif"], | |
}, | |
"image/heif-sequence": { | |
source: "iana", | |
extensions: ["heifs"], | |
}, | |
"image/hej2k": { | |
source: "iana", | |
extensions: ["hej2"], | |
}, | |
"image/hsj2": { | |
source: "iana", | |
extensions: ["hsj2"], | |
}, | |
"image/ief": { | |
source: "iana", | |
extensions: ["ief"], | |
}, | |
"image/jls": { | |
source: "iana", | |
extensions: ["jls"], | |
}, | |
"image/jp2": { | |
source: "iana", | |
compressible: false, | |
extensions: ["jp2", "jpg2"], | |
}, | |
"image/jpeg": { | |
source: "iana", | |
compressible: false, | |
extensions: ["jpeg", "jpg", "jpe"], | |
}, | |
"image/jph": { | |
source: "iana", | |
extensions: ["jph"], | |
}, | |
"image/jphc": { | |
source: "iana", | |
extensions: ["jhc"], | |
}, | |
"image/jpm": { | |
source: "iana", | |
compressible: false, | |
extensions: ["jpm"], | |
}, | |
"image/jpx": { | |
source: "iana", | |
compressible: false, | |
extensions: ["jpx", "jpf"], | |
}, | |
"image/jxr": { | |
source: "iana", | |
extensions: ["jxr"], | |
}, | |
"image/jxra": { | |
source: "iana", | |
extensions: ["jxra"], | |
}, | |
"image/jxrs": { | |
source: "iana", | |
extensions: ["jxrs"], | |
}, | |
"image/jxs": { | |
source: "iana", | |
extensions: ["jxs"], | |
}, | |
"image/jxsc": { | |
source: "iana", | |
extensions: ["jxsc"], | |
}, | |
"image/jxsi": { | |
source: "iana", | |
extensions: ["jxsi"], | |
}, | |
"image/jxss": { | |
source: "iana", | |
extensions: ["jxss"], | |
}, | |
"image/ktx": { | |
source: "iana", | |
extensions: ["ktx"], | |
}, | |
"image/ktx2": { | |
source: "iana", | |
extensions: ["ktx2"], | |
}, | |
"image/naplps": { | |
source: "iana", | |
}, | |
"image/pjpeg": { | |
compressible: false, | |
}, | |
"image/png": { | |
source: "iana", | |
compressible: false, | |
extensions: ["png"], | |
}, | |
"image/prs.btif": { | |
source: "iana", | |
extensions: ["btif"], | |
}, | |
"image/prs.pti": { | |
source: "iana", | |
extensions: ["pti"], | |
}, | |
"image/pwg-raster": { | |
source: "iana", | |
}, | |
"image/sgi": { | |
source: "apache", | |
extensions: ["sgi"], | |
}, | |
"image/svg+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["svg", "svgz"], | |
}, | |
"image/t38": { | |
source: "iana", | |
extensions: ["t38"], | |
}, | |
"image/tiff": { | |
source: "iana", | |
compressible: false, | |
extensions: ["tif", "tiff"], | |
}, | |
"image/tiff-fx": { | |
source: "iana", | |
extensions: ["tfx"], | |
}, | |
"image/vnd.adobe.photoshop": { | |
source: "iana", | |
compressible: true, | |
extensions: ["psd"], | |
}, | |
"image/vnd.airzip.accelerator.azv": { | |
source: "iana", | |
extensions: ["azv"], | |
}, | |
"image/vnd.cns.inf2": { | |
source: "iana", | |
}, | |
"image/vnd.dece.graphic": { | |
source: "iana", | |
extensions: ["uvi", "uvvi", "uvg", "uvvg"], | |
}, | |
"image/vnd.djvu": { | |
source: "iana", | |
extensions: ["djvu", "djv"], | |
}, | |
"image/vnd.dvb.subtitle": { | |
source: "iana", | |
extensions: ["sub"], | |
}, | |
"image/vnd.dwg": { | |
source: "iana", | |
extensions: ["dwg"], | |
}, | |
"image/vnd.dxf": { | |
source: "iana", | |
extensions: ["dxf"], | |
}, | |
"image/vnd.fastbidsheet": { | |
source: "iana", | |
extensions: ["fbs"], | |
}, | |
"image/vnd.fpx": { | |
source: "iana", | |
extensions: ["fpx"], | |
}, | |
"image/vnd.fst": { | |
source: "iana", | |
extensions: ["fst"], | |
}, | |
"image/vnd.fujixerox.edmics-mmr": { | |
source: "iana", | |
extensions: ["mmr"], | |
}, | |
"image/vnd.fujixerox.edmics-rlc": { | |
source: "iana", | |
extensions: ["rlc"], | |
}, | |
"image/vnd.globalgraphics.pgb": { | |
source: "iana", | |
}, | |
"image/vnd.microsoft.icon": { | |
source: "iana", | |
extensions: ["ico"], | |
}, | |
"image/vnd.mix": { | |
source: "iana", | |
}, | |
"image/vnd.mozilla.apng": { | |
source: "iana", | |
}, | |
"image/vnd.ms-dds": { | |
extensions: ["dds"], | |
}, | |
"image/vnd.ms-modi": { | |
source: "iana", | |
extensions: ["mdi"], | |
}, | |
"image/vnd.ms-photo": { | |
source: "apache", | |
extensions: ["wdp"], | |
}, | |
"image/vnd.net-fpx": { | |
source: "iana", | |
extensions: ["npx"], | |
}, | |
"image/vnd.pco.b16": { | |
source: "iana", | |
extensions: ["b16"], | |
}, | |
"image/vnd.radiance": { | |
source: "iana", | |
}, | |
"image/vnd.sealed.png": { | |
source: "iana", | |
}, | |
"image/vnd.sealedmedia.softseal.gif": { | |
source: "iana", | |
}, | |
"image/vnd.sealedmedia.softseal.jpg": { | |
source: "iana", | |
}, | |
"image/vnd.svf": { | |
source: "iana", | |
}, | |
"image/vnd.tencent.tap": { | |
source: "iana", | |
extensions: ["tap"], | |
}, | |
"image/vnd.valve.source.texture": { | |
source: "iana", | |
extensions: ["vtf"], | |
}, | |
"image/vnd.wap.wbmp": { | |
source: "iana", | |
extensions: ["wbmp"], | |
}, | |
"image/vnd.xiff": { | |
source: "iana", | |
extensions: ["xif"], | |
}, | |
"image/vnd.zbrush.pcx": { | |
source: "iana", | |
extensions: ["pcx"], | |
}, | |
"image/webp": { | |
source: "apache", | |
extensions: ["webp"], | |
}, | |
"image/wmf": { | |
source: "iana", | |
extensions: ["wmf"], | |
}, | |
"image/x-3ds": { | |
source: "apache", | |
extensions: ["3ds"], | |
}, | |
"image/x-cmu-raster": { | |
source: "apache", | |
extensions: ["ras"], | |
}, | |
"image/x-cmx": { | |
source: "apache", | |
extensions: ["cmx"], | |
}, | |
"image/x-freehand": { | |
source: "apache", | |
extensions: ["fh", "fhc", "fh4", "fh5", "fh7"], | |
}, | |
"image/x-icon": { | |
source: "apache", | |
compressible: true, | |
extensions: ["ico"], | |
}, | |
"image/x-jng": { | |
source: "nginx", | |
extensions: ["jng"], | |
}, | |
"image/x-mrsid-image": { | |
source: "apache", | |
extensions: ["sid"], | |
}, | |
"image/x-ms-bmp": { | |
source: "nginx", | |
compressible: true, | |
extensions: ["bmp"], | |
}, | |
"image/x-pcx": { | |
source: "apache", | |
extensions: ["pcx"], | |
}, | |
"image/x-pict": { | |
source: "apache", | |
extensions: ["pic", "pct"], | |
}, | |
"image/x-portable-anymap": { | |
source: "apache", | |
extensions: ["pnm"], | |
}, | |
"image/x-portable-bitmap": { | |
source: "apache", | |
extensions: ["pbm"], | |
}, | |
"image/x-portable-graymap": { | |
source: "apache", | |
extensions: ["pgm"], | |
}, | |
"image/x-portable-pixmap": { | |
source: "apache", | |
extensions: ["ppm"], | |
}, | |
"image/x-rgb": { | |
source: "apache", | |
extensions: ["rgb"], | |
}, | |
"image/x-tga": { | |
source: "apache", | |
extensions: ["tga"], | |
}, | |
"image/x-xbitmap": { | |
source: "apache", | |
extensions: ["xbm"], | |
}, | |
"image/x-xcf": { | |
compressible: false, | |
}, | |
"image/x-xpixmap": { | |
source: "apache", | |
extensions: ["xpm"], | |
}, | |
"image/x-xwindowdump": { | |
source: "apache", | |
extensions: ["xwd"], | |
}, | |
"message/cpim": { | |
source: "iana", | |
}, | |
"message/delivery-status": { | |
source: "iana", | |
}, | |
"message/disposition-notification": { | |
source: "iana", | |
extensions: ["disposition-notification"], | |
}, | |
"message/external-body": { | |
source: "iana", | |
}, | |
"message/feedback-report": { | |
source: "iana", | |
}, | |
"message/global": { | |
source: "iana", | |
extensions: ["u8msg"], | |
}, | |
"message/global-delivery-status": { | |
source: "iana", | |
extensions: ["u8dsn"], | |
}, | |
"message/global-disposition-notification": { | |
source: "iana", | |
extensions: ["u8mdn"], | |
}, | |
"message/global-headers": { | |
source: "iana", | |
extensions: ["u8hdr"], | |
}, | |
"message/http": { | |
source: "iana", | |
compressible: false, | |
}, | |
"message/imdn+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"message/news": { | |
source: "iana", | |
}, | |
"message/partial": { | |
source: "iana", | |
compressible: false, | |
}, | |
"message/rfc822": { | |
source: "iana", | |
compressible: true, | |
extensions: ["eml", "mime"], | |
}, | |
"message/s-http": { | |
source: "iana", | |
}, | |
"message/sip": { | |
source: "iana", | |
}, | |
"message/sipfrag": { | |
source: "iana", | |
}, | |
"message/tracking-status": { | |
source: "iana", | |
}, | |
"message/vnd.si.simp": { | |
source: "iana", | |
}, | |
"message/vnd.wfa.wsc": { | |
source: "iana", | |
extensions: ["wsc"], | |
}, | |
"model/3mf": { | |
source: "iana", | |
extensions: ["3mf"], | |
}, | |
"model/e57": { | |
source: "iana", | |
}, | |
"model/gltf+json": { | |
source: "iana", | |
compressible: true, | |
extensions: ["gltf"], | |
}, | |
"model/gltf-binary": { | |
source: "iana", | |
compressible: true, | |
extensions: ["glb"], | |
}, | |
"model/iges": { | |
source: "iana", | |
compressible: false, | |
extensions: ["igs", "iges"], | |
}, | |
"model/mesh": { | |
source: "iana", | |
compressible: false, | |
extensions: ["msh", "mesh", "silo"], | |
}, | |
"model/mtl": { | |
source: "iana", | |
extensions: ["mtl"], | |
}, | |
"model/obj": { | |
source: "iana", | |
extensions: ["obj"], | |
}, | |
"model/stl": { | |
source: "iana", | |
extensions: ["stl"], | |
}, | |
"model/vnd.collada+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["dae"], | |
}, | |
"model/vnd.dwf": { | |
source: "iana", | |
extensions: ["dwf"], | |
}, | |
"model/vnd.flatland.3dml": { | |
source: "iana", | |
}, | |
"model/vnd.gdl": { | |
source: "iana", | |
extensions: ["gdl"], | |
}, | |
"model/vnd.gs-gdl": { | |
source: "apache", | |
}, | |
"model/vnd.gs.gdl": { | |
source: "iana", | |
}, | |
"model/vnd.gtw": { | |
source: "iana", | |
extensions: ["gtw"], | |
}, | |
"model/vnd.moml+xml": { | |
source: "iana", | |
compressible: true, | |
}, | |
"model/vnd.mts": { | |
source: "iana", | |
extensions: ["mts"], | |
}, | |
"model/vnd.opengex": { | |
source: "iana", | |
extensions: ["ogex"], | |
}, | |
"model/vnd.parasolid.transmit.binary": { | |
source: "iana", | |
extensions: ["x_b"], | |
}, | |
"model/vnd.parasolid.transmit.text": { | |
source: "iana", | |
extensions: ["x_t"], | |
}, | |
"model/vnd.rosette.annotated-data-model": { | |
source: "iana", | |
}, | |
"model/vnd.usdz+zip": { | |
source: "iana", | |
compressible: false, | |
extensions: ["usdz"], | |
}, | |
"model/vnd.valve.source.compiled-map": { | |
source: "iana", | |
extensions: ["bsp"], | |
}, | |
"model/vnd.vtu": { | |
source: "iana", | |
extensions: ["vtu"], | |
}, | |
"model/vrml": { | |
source: "iana", | |
compressible: false, | |
extensions: ["wrl", "vrml"], | |
}, | |
"model/x3d+binary": { | |
source: "apache", | |
compressible: false, | |
extensions: ["x3db", "x3dbz"], | |
}, | |
"model/x3d+fastinfoset": { | |
source: "iana", | |
extensions: ["x3db"], | |
}, | |
"model/x3d+vrml": { | |
source: "apache", | |
compressible: false, | |
extensions: ["x3dv", "x3dvz"], | |
}, | |
"model/x3d+xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["x3d", "x3dz"], | |
}, | |
"model/x3d-vrml": { | |
source: "iana", | |
extensions: ["x3dv"], | |
}, | |
"multipart/alternative": { | |
source: "iana", | |
compressible: false, | |
}, | |
"multipart/appledouble": { | |
source: "iana", | |
}, | |
"multipart/byteranges": { | |
source: "iana", | |
}, | |
"multipart/digest": { | |
source: "iana", | |
}, | |
"multipart/encrypted": { | |
source: "iana", | |
compressible: false, | |
}, | |
"multipart/form-data": { | |
source: "iana", | |
compressible: false, | |
}, | |
"multipart/header-set": { | |
source: "iana", | |
}, | |
"multipart/mixed": { | |
source: "iana", | |
}, | |
"multipart/multilingual": { | |
source: "iana", | |
}, | |
"multipart/parallel": { | |
source: "iana", | |
}, | |
"multipart/related": { | |
source: "iana", | |
compressible: false, | |
}, | |
"multipart/report": { | |
source: "iana", | |
}, | |
"multipart/signed": { | |
source: "iana", | |
compressible: false, | |
}, | |
"multipart/vnd.bint.med-plus": { | |
source: "iana", | |
}, | |
"multipart/voice-message": { | |
source: "iana", | |
}, | |
"multipart/x-mixed-replace": { | |
source: "iana", | |
}, | |
"text/1d-interleaved-parityfec": { | |
source: "iana", | |
}, | |
"text/cache-manifest": { | |
source: "iana", | |
compressible: true, | |
extensions: ["appcache", "manifest"], | |
}, | |
"text/calendar": { | |
source: "iana", | |
extensions: ["ics", "ifb"], | |
}, | |
"text/calender": { | |
compressible: true, | |
}, | |
"text/cmd": { | |
compressible: true, | |
}, | |
"text/coffeescript": { | |
extensions: ["coffee", "litcoffee"], | |
}, | |
"text/css": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["css"], | |
}, | |
"text/csv": { | |
source: "iana", | |
compressible: true, | |
extensions: ["csv"], | |
}, | |
"text/csv-schema": { | |
source: "iana", | |
}, | |
"text/directory": { | |
source: "iana", | |
}, | |
"text/dns": { | |
source: "iana", | |
}, | |
"text/ecmascript": { | |
source: "iana", | |
}, | |
"text/encaprtp": { | |
source: "iana", | |
}, | |
"text/enriched": { | |
source: "iana", | |
}, | |
"text/flexfec": { | |
source: "iana", | |
}, | |
"text/fwdred": { | |
source: "iana", | |
}, | |
"text/gff3": { | |
source: "iana", | |
}, | |
"text/grammar-ref-list": { | |
source: "iana", | |
}, | |
"text/html": { | |
source: "iana", | |
compressible: true, | |
extensions: ["html", "htm", "shtml"], | |
}, | |
"text/jade": { | |
extensions: ["jade"], | |
}, | |
"text/javascript": { | |
source: "iana", | |
compressible: true, | |
}, | |
"text/jcr-cnd": { | |
source: "iana", | |
}, | |
"text/jsx": { | |
compressible: true, | |
extensions: ["jsx"], | |
}, | |
"text/less": { | |
compressible: true, | |
extensions: ["less"], | |
}, | |
"text/markdown": { | |
source: "iana", | |
compressible: true, | |
extensions: ["markdown", "md"], | |
}, | |
"text/mathml": { | |
source: "nginx", | |
extensions: ["mml"], | |
}, | |
"text/mdx": { | |
compressible: true, | |
extensions: ["mdx"], | |
}, | |
"text/mizar": { | |
source: "iana", | |
}, | |
"text/n3": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["n3"], | |
}, | |
"text/parameters": { | |
source: "iana", | |
charset: "UTF-8", | |
}, | |
"text/parityfec": { | |
source: "iana", | |
}, | |
"text/plain": { | |
source: "iana", | |
compressible: true, | |
extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"], | |
}, | |
"text/provenance-notation": { | |
source: "iana", | |
charset: "UTF-8", | |
}, | |
"text/prs.fallenstein.rst": { | |
source: "iana", | |
}, | |
"text/prs.lines.tag": { | |
source: "iana", | |
extensions: ["dsc"], | |
}, | |
"text/prs.prop.logic": { | |
source: "iana", | |
}, | |
"text/raptorfec": { | |
source: "iana", | |
}, | |
"text/red": { | |
source: "iana", | |
}, | |
"text/rfc822-headers": { | |
source: "iana", | |
}, | |
"text/richtext": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rtx"], | |
}, | |
"text/rtf": { | |
source: "iana", | |
compressible: true, | |
extensions: ["rtf"], | |
}, | |
"text/rtp-enc-aescm128": { | |
source: "iana", | |
}, | |
"text/rtploopback": { | |
source: "iana", | |
}, | |
"text/rtx": { | |
source: "iana", | |
}, | |
"text/sgml": { | |
source: "iana", | |
extensions: ["sgml", "sgm"], | |
}, | |
"text/shaclc": { | |
source: "iana", | |
}, | |
"text/shex": { | |
extensions: ["shex"], | |
}, | |
"text/slim": { | |
extensions: ["slim", "slm"], | |
}, | |
"text/spdx": { | |
source: "iana", | |
extensions: ["spdx"], | |
}, | |
"text/strings": { | |
source: "iana", | |
}, | |
"text/stylus": { | |
extensions: ["stylus", "styl"], | |
}, | |
"text/t140": { | |
source: "iana", | |
}, | |
"text/tab-separated-values": { | |
source: "iana", | |
compressible: true, | |
extensions: ["tsv"], | |
}, | |
"text/troff": { | |
source: "iana", | |
extensions: ["t", "tr", "roff", "man", "me", "ms"], | |
}, | |
"text/turtle": { | |
source: "iana", | |
charset: "UTF-8", | |
extensions: ["ttl"], | |
}, | |
"text/ulpfec": { | |
source: "iana", | |
}, | |
"text/uri-list": { | |
source: "iana", | |
compressible: true, | |
extensions: ["uri", "uris", "urls"], | |
}, | |
"text/vcard": { | |
source: "iana", | |
compressible: true, | |
extensions: ["vcard"], | |
}, | |
"text/vnd.a": { | |
source: "iana", | |
}, | |
"text/vnd.abc": { | |
source: "iana", | |
}, | |
"text/vnd.ascii-art": { | |
source: "iana", | |
}, | |
"text/vnd.curl": { | |
source: "iana", | |
extensions: ["curl"], | |
}, | |
"text/vnd.curl.dcurl": { | |
source: "apache", | |
extensions: ["dcurl"], | |
}, | |
"text/vnd.curl.mcurl": { | |
source: "apache", | |
extensions: ["mcurl"], | |
}, | |
"text/vnd.curl.scurl": { | |
source: "apache", | |
extensions: ["scurl"], | |
}, | |
"text/vnd.debian.copyright": { | |
source: "iana", | |
charset: "UTF-8", | |
}, | |
"text/vnd.dmclientscript": { | |
source: "iana", | |
}, | |
"text/vnd.dvb.subtitle": { | |
source: "iana", | |
extensions: ["sub"], | |
}, | |
"text/vnd.esmertec.theme-descriptor": { | |
source: "iana", | |
charset: "UTF-8", | |
}, | |
"text/vnd.ficlab.flt": { | |
source: "iana", | |
}, | |
"text/vnd.fly": { | |
source: "iana", | |
extensions: ["fly"], | |
}, | |
"text/vnd.fmi.flexstor": { | |
source: "iana", | |
extensions: ["flx"], | |
}, | |
"text/vnd.gml": { | |
source: "iana", | |
}, | |
"text/vnd.graphviz": { | |
source: "iana", | |
extensions: ["gv"], | |
}, | |
"text/vnd.hans": { | |
source: "iana", | |
}, | |
"text/vnd.hgl": { | |
source: "iana", | |
}, | |
"text/vnd.in3d.3dml": { | |
source: "iana", | |
extensions: ["3dml"], | |
}, | |
"text/vnd.in3d.spot": { | |
source: "iana", | |
extensions: ["spot"], | |
}, | |
"text/vnd.iptc.newsml": { | |
source: "iana", | |
}, | |
"text/vnd.iptc.nitf": { | |
source: "iana", | |
}, | |
"text/vnd.latex-z": { | |
source: "iana", | |
}, | |
"text/vnd.motorola.reflex": { | |
source: "iana", | |
}, | |
"text/vnd.ms-mediapackage": { | |
source: "iana", | |
}, | |
"text/vnd.net2phone.commcenter.command": { | |
source: "iana", | |
}, | |
"text/vnd.radisys.msml-basic-layout": { | |
source: "iana", | |
}, | |
"text/vnd.senx.warpscript": { | |
source: "iana", | |
}, | |
"text/vnd.si.uricatalogue": { | |
source: "iana", | |
}, | |
"text/vnd.sosi": { | |
source: "iana", | |
}, | |
"text/vnd.sun.j2me.app-descriptor": { | |
source: "iana", | |
charset: "UTF-8", | |
extensions: ["jad"], | |
}, | |
"text/vnd.trolltech.linguist": { | |
source: "iana", | |
charset: "UTF-8", | |
}, | |
"text/vnd.wap.si": { | |
source: "iana", | |
}, | |
"text/vnd.wap.sl": { | |
source: "iana", | |
}, | |
"text/vnd.wap.wml": { | |
source: "iana", | |
extensions: ["wml"], | |
}, | |
"text/vnd.wap.wmlscript": { | |
source: "iana", | |
extensions: ["wmls"], | |
}, | |
"text/vtt": { | |
source: "iana", | |
charset: "UTF-8", | |
compressible: true, | |
extensions: ["vtt"], | |
}, | |
"text/x-asm": { | |
source: "apache", | |
extensions: ["s", "asm"], | |
}, | |
"text/x-c": { | |
source: "apache", | |
extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], | |
}, | |
"text/x-component": { | |
source: "nginx", | |
extensions: ["htc"], | |
}, | |
"text/x-fortran": { | |
source: "apache", | |
extensions: ["f", "for", "f77", "f90"], | |
}, | |
"text/x-gwt-rpc": { | |
compressible: true, | |
}, | |
"text/x-handlebars-template": { | |
extensions: ["hbs"], | |
}, | |
"text/x-java-source": { | |
source: "apache", | |
extensions: ["java"], | |
}, | |
"text/x-jquery-tmpl": { | |
compressible: true, | |
}, | |
"text/x-lua": { | |
extensions: ["lua"], | |
}, | |
"text/x-markdown": { | |
compressible: true, | |
extensions: ["mkd"], | |
}, | |
"text/x-nfo": { | |
source: "apache", | |
extensions: ["nfo"], | |
}, | |
"text/x-opml": { | |
source: "apache", | |
extensions: ["opml"], | |
}, | |
"text/x-org": { | |
compressible: true, | |
extensions: ["org"], | |
}, | |
"text/x-pascal": { | |
source: "apache", | |
extensions: ["p", "pas"], | |
}, | |
"text/x-processing": { | |
compressible: true, | |
extensions: ["pde"], | |
}, | |
"text/x-sass": { | |
extensions: ["sass"], | |
}, | |
"text/x-scss": { | |
extensions: ["scss"], | |
}, | |
"text/x-setext": { | |
source: "apache", | |
extensions: ["etx"], | |
}, | |
"text/x-sfv": { | |
source: "apache", | |
extensions: ["sfv"], | |
}, | |
"text/x-suse-ymp": { | |
compressible: true, | |
extensions: ["ymp"], | |
}, | |
"text/x-uuencode": { | |
source: "apache", | |
extensions: ["uu"], | |
}, | |
"text/x-vcalendar": { | |
source: "apache", | |
extensions: ["vcs"], | |
}, | |
"text/x-vcard": { | |
source: "apache", | |
extensions: ["vcf"], | |
}, | |
"text/xml": { | |
source: "iana", | |
compressible: true, | |
extensions: ["xml"], | |
}, | |
"text/xml-external-parsed-entity": { | |
source: "iana", | |
}, | |
"text/yaml": { | |
extensions: ["yaml", "yml"], | |
}, | |
"video/1d-interleaved-parityfec": { | |
source: "iana", | |
}, | |
"video/3gpp": { | |
source: "iana", | |
extensions: ["3gp", "3gpp"], | |
}, | |
"video/3gpp-tt": { | |
source: "iana", | |
}, | |
"video/3gpp2": { | |
source: "iana", | |
extensions: ["3g2"], | |
}, | |
"video/bmpeg": { | |
source: "iana", | |
}, | |
"video/bt656": { | |
source: "iana", | |
}, | |
"video/celb": { | |
source: "iana", | |
}, | |
"video/dv": { | |
source: "iana", | |
}, | |
"video/encaprtp": { | |
source: "iana", | |
}, | |
"video/flexfec": { | |
source: "iana", | |
}, | |
"video/h261": { | |
source: "iana", | |
extensions: ["h261"], | |
}, | |
"video/h263": { | |
source: "iana", | |
extensions: ["h263"], | |
}, | |
"video/h263-1998": { | |
source: "iana", | |
}, | |
"video/h263-2000": { | |
source: "iana", | |
}, | |
"video/h264": { | |
source: "iana", | |
extensions: ["h264"], | |
}, | |
"video/h264-rcdo": { | |
source: "iana", | |
}, | |
"video/h264-svc": { | |
source: "iana", | |
}, | |
"video/h265": { | |
source: "iana", | |
}, | |
"video/iso.segment": { | |
source: "iana", | |
}, | |
"video/jpeg": { | |
source: "iana", | |
extensions: ["jpgv"], | |
}, | |
"video/jpeg2000": { | |
source: "iana", | |
}, | |
"video/jpm": { | |
source: "apache", | |
extensions: ["jpm", "jpgm"], | |
}, | |
"video/mj2": { | |
source: "iana", | |
extensions: ["mj2", "mjp2"], | |
}, | |
"video/mp1s": { | |
source: "iana", | |
}, | |
"video/mp2p": { | |
source: "iana", | |
}, | |
"video/mp2t": { | |
source: "iana", | |
extensions: ["ts"], | |
}, | |
"video/mp4": { | |
source: "iana", | |
compressible: false, | |
extensions: ["mp4", "mp4v", "mpg4"], | |
}, | |
"video/mp4v-es": { | |
source: "iana", | |
}, | |
"video/mpeg": { | |
source: "iana", | |
compressible: false, | |
extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"], | |
}, | |
"video/mpeg4-generic": { | |
source: "iana", | |
}, | |
"video/mpv": { | |
source: "iana", | |
}, | |
"video/nv": { | |
source: "iana", | |
}, | |
"video/ogg": { | |
source: "iana", | |
compressible: false, | |
extensions: ["ogv"], | |
}, | |
"video/parityfec": { | |
source: "iana", | |
}, | |
"video/pointer": { | |
source: "iana", | |
}, | |
"video/quicktime": { | |
source: "iana", | |
compressible: false, | |
extensions: ["qt", "mov"], | |
}, | |
"video/raptorfec": { | |
source: "iana", | |
}, | |
"video/raw": { | |
source: "iana", | |
}, | |
"video/rtp-enc-aescm128": { | |
source: "iana", | |
}, | |
"video/rtploopback": { | |
source: "iana", | |
}, | |
"video/rtx": { | |
source: "iana", | |
}, | |
"video/smpte291": { | |
source: "iana", | |
}, | |
"video/smpte292m": { | |
source: "iana", | |
}, | |
"video/ulpfec": { | |
source: "iana", | |
}, | |
"video/vc1": { | |
source: "iana", | |
}, | |
"video/vc2": { | |
source: "iana", | |
}, | |
"video/vnd.cctv": { | |
source: "iana", | |
}, | |
"video/vnd.dece.hd": { | |
source: "iana", | |
extensions: ["uvh", "uvvh"], | |
}, | |
"video/vnd.dece.mobile": { | |
source: "iana", | |
extensions: ["uvm", "uvvm"], | |
}, | |
"video/vnd.dece.mp4": { | |
source: "iana", | |
}, | |
"video/vnd.dece.pd": { | |
source: "iana", | |
extensions: ["uvp", "uvvp"], | |
}, | |
"video/vnd.dece.sd": { | |
source: "iana", | |
extensions: ["uvs", "uvvs"], | |
}, | |
"video/vnd.dece.video": { | |
source: "iana", | |
extensions: ["uvv", "uvvv"], | |
}, | |
"video/vnd.directv.mpeg": { | |
source: "iana", | |
}, | |
"video/vnd.directv.mpeg-tts": { | |
source: "iana", | |
}, | |
"video/vnd.dlna.mpeg-tts": { | |
source: "iana", | |
}, | |
"video/vnd.dvb.file": { | |
source: "iana", | |
extensions: ["dvb"], | |
}, | |
"video/vnd.fvt": { | |
source: "iana", | |
extensions: ["fvt"], | |
}, | |
"video/vnd.hns.video": { | |
source: "iana", | |
}, | |
"video/vnd.iptvforum.1dparityfec-1010": { | |
source: "iana", | |
}, | |
"video/vnd.iptvforum.1dparityfec-2005": { | |
source: "iana", | |
}, | |
"video/vnd.iptvforum.2dparityfec-1010": { | |
source: "iana", | |
}, | |
"video/vnd.iptvforum.2dparityfec-2005": { | |
source: "iana", | |
}, | |
"video/vnd.iptvforum.ttsavc": { | |
source: "iana", | |
}, | |
"video/vnd.iptvforum.ttsmpeg2": { | |
source: "iana", | |
}, | |
"video/vnd.motorola.video": { | |
source: "iana", | |
}, | |
"video/vnd.motorola.videop": { | |
source: "iana", | |
}, | |
"video/vnd.mpegurl": { | |
source: "iana", | |
extensions: ["mxu", "m4u"], | |
}, | |
"video/vnd.ms-playready.media.pyv": { | |
source: "iana", | |
extensions: ["pyv"], | |
}, | |
"video/vnd.nokia.interleaved-multimedia": { | |
source: "iana", | |
}, | |
"video/vnd.nokia.mp4vr": { | |
source: "iana", | |
}, | |
"video/vnd.nokia.videovoip": { | |
source: "iana", | |
}, | |
"video/vnd.objectvideo": { | |
source: "iana", | |
}, | |
"video/vnd.radgamettools.bink": { | |
source: "iana", | |
}, | |
"video/vnd.radgamettools.smacker": { | |
source: "iana", | |
}, | |
"video/vnd.sealed.mpeg1": { | |
source: "iana", | |
}, | |
"video/vnd.sealed.mpeg4": { | |
source: "iana", | |
}, | |
"video/vnd.sealed.swf": { | |
source: "iana", | |
}, | |
"video/vnd.sealedmedia.softseal.mov": { | |
source: "iana", | |
}, | |
"video/vnd.uvvu.mp4": { | |
source: "iana", | |
extensions: ["uvu", "uvvu"], | |
}, | |
"video/vnd.vivo": { | |
source: "iana", | |
extensions: ["viv"], | |
}, | |
"video/vnd.youtube.yt": { | |
source: "iana", | |
}, | |
"video/vp8": { | |
source: "iana", | |
}, | |
"video/webm": { | |
source: "apache", | |
compressible: false, | |
extensions: ["webm"], | |
}, | |
"video/x-f4v": { | |
source: "apache", | |
extensions: ["f4v"], | |
}, | |
"video/x-fli": { | |
source: "apache", | |
extensions: ["fli"], | |
}, | |
"video/x-flv": { | |
source: "apache", | |
compressible: false, | |
extensions: ["flv"], | |
}, | |
"video/x-m4v": { | |
source: "apache", | |
extensions: ["m4v"], | |
}, | |
"video/x-matroska": { | |
source: "apache", | |
compressible: false, | |
extensions: ["mkv", "mk3d", "mks"], | |
}, | |
"video/x-mng": { | |
source: "apache", | |
extensions: ["mng"], | |
}, | |
"video/x-ms-asf": { | |
source: "apache", | |
extensions: ["asf", "asx"], | |
}, | |
"video/x-ms-vob": { | |
source: "apache", | |
extensions: ["vob"], | |
}, | |
"video/x-ms-wm": { | |
source: "apache", | |
extensions: ["wm"], | |
}, | |
"video/x-ms-wmv": { | |
source: "apache", | |
compressible: false, | |
extensions: ["wmv"], | |
}, | |
"video/x-ms-wmx": { | |
source: "apache", | |
extensions: ["wmx"], | |
}, | |
"video/x-ms-wvx": { | |
source: "apache", | |
extensions: ["wvx"], | |
}, | |
"video/x-msvideo": { | |
source: "apache", | |
extensions: ["avi"], | |
}, | |
"video/x-sgi-movie": { | |
source: "apache", | |
extensions: ["movie"], | |
}, | |
"video/x-smv": { | |
source: "apache", | |
extensions: ["smv"], | |
}, | |
"x-conference/x-cooltalk": { | |
source: "apache", | |
extensions: ["ice"], | |
}, | |
"x-shader/x-fragment": { | |
compressible: true, | |
}, | |
"x-shader/x-vertex": { | |
compressible: true, | |
}, | |
}; | |
}, | |
}); | |
// node_modules/mime-db/index.js | |
var require_mime_db = __commonJS({ | |
"node_modules/mime-db/index.js"(exports2, module2) { | |
module2.exports = require_db(); | |
}, | |
}); | |
// node_modules/mime-types/index.js | |
var require_mime_types = __commonJS({ | |
"node_modules/mime-types/index.js"(exports2) { | |
"use strict"; | |
var db = require_mime_db(); | |
var extname = require("path").extname; | |
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; | |
var TEXT_TYPE_REGEXP = /^text\//i; | |
exports2.charset = charset; | |
exports2.charsets = {lookup: charset}; | |
exports2.contentType = contentType; | |
exports2.extension = extension; | |
exports2.extensions = /* @__PURE__ */ Object.create(null); | |
exports2.lookup = lookup; | |
exports2.types = /* @__PURE__ */ Object.create(null); | |
populateMaps(exports2.extensions, exports2.types); | |
function charset(type) { | |
if (!type || typeof type !== "string") { | |
return false; | |
} | |
var match = EXTRACT_TYPE_REGEXP.exec(type); | |
var mime = match && db[match[1].toLowerCase()]; | |
if (mime && mime.charset) { | |
return mime.charset; | |
} | |
if (match && TEXT_TYPE_REGEXP.test(match[1])) { | |
return "UTF-8"; | |
} | |
return false; | |
} | |
function contentType(str) { | |
if (!str || typeof str !== "string") { | |
return false; | |
} | |
var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; | |
if (!mime) { | |
return false; | |
} | |
if (mime.indexOf("charset") === -1) { | |
var charset2 = exports2.charset(mime); | |
if (charset2) mime += "; charset=" + charset2.toLowerCase(); | |
} | |
return mime; | |
} | |
function extension(type) { | |
if (!type || typeof type !== "string") { | |
return false; | |
} | |
var match = EXTRACT_TYPE_REGEXP.exec(type); | |
var exts = match && exports2.extensions[match[1].toLowerCase()]; | |
if (!exts || !exts.length) { | |
return false; | |
} | |
return exts[0]; | |
} | |
function lookup(path) { | |
if (!path || typeof path !== "string") { | |
return false; | |
} | |
var extension2 = extname("x." + path) | |
.toLowerCase() | |
.substr(1); | |
if (!extension2) { | |
return false; | |
} | |
return exports2.types[extension2] || false; | |
} | |
function populateMaps(extensions, types) { | |
var preference = ["nginx", "apache", void 0, "iana"]; | |
Object.keys(db).forEach(function forEachMimeType(type) { | |
var mime = db[type]; | |
var exts = mime.extensions; | |
if (!exts || !exts.length) { | |
return; | |
} | |
extensions[type] = exts; | |
for (var i = 0; i < exts.length; i++) { | |
var extension2 = exts[i]; | |
if (types[extension2]) { | |
var from = preference.indexOf(db[types[extension2]].source); | |
var to = preference.indexOf(mime.source); | |
if ( | |
types[extension2] !== "application/octet-stream" && | |
(from > to || | |
(from === to && | |
types[extension2].substr(0, 12) === "application/")) | |
) { | |
continue; | |
} | |
} | |
types[extension2] = type; | |
} | |
}); | |
} | |
}, | |
}); | |
// node_modules/asynckit/lib/defer.js | |
var require_defer = __commonJS({ | |
"node_modules/asynckit/lib/defer.js"(exports2, module2) { | |
module2.exports = defer; | |
function defer(fn) { | |
var nextTick = | |
typeof setImmediate == "function" | |
? setImmediate | |
: typeof process == "object" && typeof process.nextTick == "function" | |
? process.nextTick | |
: null; | |
if (nextTick) { | |
nextTick(fn); | |
} else { | |
setTimeout(fn, 0); | |
} | |
} | |
}, | |
}); | |
// node_modules/asynckit/lib/async.js | |
var require_async = __commonJS({ | |
"node_modules/asynckit/lib/async.js"(exports2, module2) { | |
var defer = require_defer(); | |
module2.exports = async; | |
function async(callback) { | |
var isAsync = false; | |
defer(function () { | |
isAsync = true; | |
}); | |
return function async_callback(err, result) { | |
if (isAsync) { | |
callback(err, result); | |
} else { | |
defer(function nextTick_callback() { | |
callback(err, result); | |
}); | |
} | |
}; | |
} | |
}, | |
}); | |
// node_modules/asynckit/lib/abort.js | |
var require_abort = __commonJS({ | |
"node_modules/asynckit/lib/abort.js"(exports2, module2) { | |
module2.exports = abort; | |
function abort(state) { | |
Object.keys(state.jobs).forEach(clean.bind(state)); | |
state.jobs = {}; | |
} | |
function clean(key) { | |
if (typeof this.jobs[key] == "function") { | |
this.jobs[key](); | |
} | |
} | |
}, | |
}); | |
// node_modules/asynckit/lib/iterate.js | |
var require_iterate = __commonJS({ | |
"node_modules/asynckit/lib/iterate.js"(exports2, module2) { | |
var async = require_async(); | |
var abort = require_abort(); | |
module2.exports = iterate; | |
function iterate(list, iterator, state, callback) { | |
var key = state["keyedList"] | |
? state["keyedList"][state.index] | |
: state.index; | |
state.jobs[key] = runJob( | |
iterator, | |
key, | |
list[key], | |
function (error, output) { | |
if (!(key in state.jobs)) { | |
return; | |
} | |
delete state.jobs[key]; | |
if (error) { | |
abort(state); | |
} else { | |
state.results[key] = output; | |
} | |
callback(error, state.results); | |
} | |
); | |
} | |
function runJob(iterator, key, item, callback) { | |
var aborter; | |
if (iterator.length == 2) { | |
aborter = iterator(item, async(callback)); | |
} else { | |
aborter = iterator(item, key, async(callback)); | |
} | |
return aborter; | |
} | |
}, | |
}); | |
// node_modules/asynckit/lib/state.js | |
var require_state = __commonJS({ | |
"node_modules/asynckit/lib/state.js"(exports2, module2) { | |
module2.exports = state; | |
function state(list, sortMethod) { | |
var isNamedList = !Array.isArray(list), | |
initState = { | |
index: 0, | |
keyedList: isNamedList || sortMethod ? Object.keys(list) : null, | |
jobs: {}, | |
results: isNamedList ? {} : [], | |
size: isNamedList ? Object.keys(list).length : list.length, | |
}; | |
if (sortMethod) { | |
initState.keyedList.sort( | |
isNamedList | |
? sortMethod | |
: function (a, b) { | |
return sortMethod(list[a], list[b]); | |
} | |
); | |
} | |
return initState; | |
} | |
}, | |
}); | |
// node_modules/asynckit/lib/terminator.js | |
var require_terminator = __commonJS({ | |
"node_modules/asynckit/lib/terminator.js"(exports2, module2) { | |
var abort = require_abort(); | |
var async = require_async(); | |
module2.exports = terminator; | |
function terminator(callback) { | |
if (!Object.keys(this.jobs).length) { | |
return; | |
} | |
this.index = this.size; | |
abort(this); | |
async(callback)(null, this.results); | |
} | |
}, | |
}); | |
// node_modules/asynckit/parallel.js | |
var require_parallel = __commonJS({ | |
"node_modules/asynckit/parallel.js"(exports2, module2) { | |
var iterate = require_iterate(); | |
var initState = require_state(); | |
var terminator = require_terminator(); | |
module2.exports = parallel; | |
function parallel(list, iterator, callback) { | |
var state = initState(list); | |
while (state.index < (state["keyedList"] || list).length) { | |
iterate(list, iterator, state, function (error, result) { | |
if (error) { | |
callback(error, result); | |
return; | |
} | |
if (Object.keys(state.jobs).length === 0) { | |
callback(null, state.results); | |
return; | |
} | |
}); | |
state.index++; | |
} | |
return terminator.bind(state, callback); | |
} | |
}, | |
}); | |
// node_modules/asynckit/serialOrdered.js | |
var require_serialOrdered = __commonJS({ | |
"node_modules/asynckit/serialOrdered.js"(exports2, module2) { | |
var iterate = require_iterate(); | |
var initState = require_state(); | |
var terminator = require_terminator(); | |
module2.exports = serialOrdered; | |
module2.exports.ascending = ascending; | |
module2.exports.descending = descending; | |
function serialOrdered(list, iterator, sortMethod, callback) { | |
var state = initState(list, sortMethod); | |
iterate(list, iterator, state, function iteratorHandler(error, result) { | |
if (error) { | |
callback(error, result); | |
return; | |
} | |
state.index++; | |
if (state.index < (state["keyedList"] || list).length) { | |
iterate(list, iterator, state, iteratorHandler); | |
return; | |
} | |
callback(null, state.results); | |
}); | |
return terminator.bind(state, callback); | |
} | |
function ascending(a, b) { | |
return a < b ? -1 : a > b ? 1 : 0; | |
} | |
function descending(a, b) { | |
return -1 * ascending(a, b); | |
} | |
}, | |
}); | |
// node_modules/asynckit/serial.js | |
var require_serial = __commonJS({ | |
"node_modules/asynckit/serial.js"(exports2, module2) { | |
var serialOrdered = require_serialOrdered(); | |
module2.exports = serial; | |
function serial(list, iterator, callback) { | |
return serialOrdered(list, iterator, null, callback); | |
} | |
}, | |
}); | |
// node_modules/asynckit/index.js | |
var require_asynckit = __commonJS({ | |
"node_modules/asynckit/index.js"(exports2, module2) { | |
module2.exports = { | |
parallel: require_parallel(), | |
serial: require_serial(), | |
serialOrdered: require_serialOrdered(), | |
}; | |
}, | |
}); | |
// node_modules/form-data/lib/populate.js | |
var require_populate = __commonJS({ | |
"node_modules/form-data/lib/populate.js"(exports2, module2) { | |
module2.exports = function (dst, src) { | |
Object.keys(src).forEach(function (prop) { | |
dst[prop] = dst[prop] || src[prop]; | |
}); | |
return dst; | |
}; | |
}, | |
}); | |
// node_modules/form-data/lib/form_data.js | |
var require_form_data = __commonJS({ | |
"node_modules/form-data/lib/form_data.js"(exports2, module2) { | |
var CombinedStream = require_combined_stream(); | |
var util2 = require("util"); | |
var path = require("path"); | |
var http2 = require("http"); | |
var https2 = require("https"); | |
var parseUrl = require("url").parse; | |
var fs = require("fs"); | |
var Stream = require("stream").Stream; | |
var mime = require_mime_types(); | |
var asynckit = require_asynckit(); | |
var populate = require_populate(); | |
module2.exports = FormData3; | |
util2.inherits(FormData3, CombinedStream); | |
function FormData3(options) { | |
if (!(this instanceof FormData3)) { | |
return new FormData3(options); | |
} | |
this._overheadLength = 0; | |
this._valueLength = 0; | |
this._valuesToMeasure = []; | |
CombinedStream.call(this); | |
options = options || {}; | |
for (var option in options) { | |
this[option] = options[option]; | |
} | |
} | |
FormData3.LINE_BREAK = "\r\n"; | |
FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream"; | |
FormData3.prototype.append = function (field, value, options) { | |
options = options || {}; | |
if (typeof options == "string") { | |
options = {filename: options}; | |
} | |
var append2 = CombinedStream.prototype.append.bind(this); | |
if (typeof value == "number") { | |
value = "" + value; | |
} | |
if (util2.isArray(value)) { | |
this._error(new Error("Arrays are not supported.")); | |
return; | |
} | |
var header = this._multiPartHeader(field, value, options); | |
var footer = this._multiPartFooter(); | |
append2(header); | |
append2(value); | |
append2(footer); | |
this._trackLength(header, value, options); | |
}; | |
FormData3.prototype._trackLength = function (header, value, options) { | |
var valueLength = 0; | |
if (options.knownLength != null) { | |
valueLength += +options.knownLength; | |
} else if (Buffer.isBuffer(value)) { | |
valueLength = value.length; | |
} else if (typeof value === "string") { | |
valueLength = Buffer.byteLength(value); | |
} | |
this._valueLength += valueLength; | |
this._overheadLength += | |
Buffer.byteLength(header) + FormData3.LINE_BREAK.length; | |
if ( | |
!value || | |
(!value.path && | |
!(value.readable && value.hasOwnProperty("httpVersion")) && | |
!(value instanceof Stream)) | |
) { | |
return; | |
} | |
if (!options.knownLength) { | |
this._valuesToMeasure.push(value); | |
} | |
}; | |
FormData3.prototype._lengthRetriever = function (value, callback) { | |
if (value.hasOwnProperty("fd")) { | |
if ( | |
value.end != void 0 && | |
value.end != Infinity && | |
value.start != void 0 | |
) { | |
callback(null, value.end + 1 - (value.start ? value.start : 0)); | |
} else { | |
fs.stat(value.path, function (err, stat) { | |
var fileSize; | |
if (err) { | |
callback(err); | |
return; | |
} | |
fileSize = stat.size - (value.start ? value.start : 0); | |
callback(null, fileSize); | |
}); | |
} | |
} else if (value.hasOwnProperty("httpVersion")) { | |
callback(null, +value.headers["content-length"]); | |
} else if (value.hasOwnProperty("httpModule")) { | |
value.on("response", function (response) { | |
value.pause(); | |
callback(null, +response.headers["content-length"]); | |
}); | |
value.resume(); | |
} else { | |
callback("Unknown stream"); | |
} | |
}; | |
FormData3.prototype._multiPartHeader = function (field, value, options) { | |
if (typeof options.header == "string") { | |
return options.header; | |
} | |
var contentDisposition = this._getContentDisposition(value, options); | |
var contentType = this._getContentType(value, options); | |
var contents = ""; | |
var headers = { | |
// add custom disposition as third element or keep it two elements if not | |
"Content-Disposition": ["form-data", 'name="' + field + '"'].concat( | |
contentDisposition || [] | |
), | |
// if no content type. allow it to be empty array | |
"Content-Type": [].concat(contentType || []), | |
}; | |
if (typeof options.header == "object") { | |
populate(headers, options.header); | |
} | |
var header; | |
for (var prop in headers) { | |
if (!headers.hasOwnProperty(prop)) continue; | |
header = headers[prop]; | |
if (header == null) { | |
continue; | |
} | |
if (!Array.isArray(header)) { | |
header = [header]; | |
} | |
if (header.length) { | |
contents += prop + ": " + header.join("; ") + FormData3.LINE_BREAK; | |
} | |
} | |
return ( | |
"--" + | |
this.getBoundary() + | |
FormData3.LINE_BREAK + | |
contents + | |
FormData3.LINE_BREAK | |
); | |
}; | |
FormData3.prototype._getContentDisposition = function (value, options) { | |
var filename, contentDisposition; | |
if (typeof options.filepath === "string") { | |
filename = path.normalize(options.filepath).replace(/\\/g, "/"); | |
} else if (options.filename || value.name || value.path) { | |
filename = path.basename(options.filename || value.name || value.path); | |
} else if (value.readable && value.hasOwnProperty("httpVersion")) { | |
filename = path.basename(value.client._httpMessage.path || ""); | |
} | |
if (filename) { | |
contentDisposition = 'filename="' + filename + '"'; | |
} | |
return contentDisposition; | |
}; | |
FormData3.prototype._getContentType = function (value, options) { | |
var contentType = options.contentType; | |
if (!contentType && value.name) { | |
contentType = mime.lookup(value.name); | |
} | |
if (!contentType && value.path) { | |
contentType = mime.lookup(value.path); | |
} | |
if ( | |
!contentType && | |
value.readable && | |
value.hasOwnProperty("httpVersion") | |
) { | |
contentType = value.headers["content-type"]; | |
} | |
if (!contentType && (options.filepath || options.filename)) { | |
contentType = mime.lookup(options.filepath || options.filename); | |
} | |
if (!contentType && typeof value == "object") { | |
contentType = FormData3.DEFAULT_CONTENT_TYPE; | |
} | |
return contentType; | |
}; | |
FormData3.prototype._multiPartFooter = function () { | |
return function (next) { | |
var footer = FormData3.LINE_BREAK; | |
var lastPart = this._streams.length === 0; | |
if (lastPart) { | |
footer += this._lastBoundary(); | |
} | |
next(footer); | |
}.bind(this); | |
}; | |
FormData3.prototype._lastBoundary = function () { | |
return "--" + this.getBoundary() + "--" + FormData3.LINE_BREAK; | |
}; | |
FormData3.prototype.getHeaders = function (userHeaders) { | |
var header; | |
var formHeaders = { | |
"content-type": "multipart/form-data; boundary=" + this.getBoundary(), | |
}; | |
for (header in userHeaders) { | |
if (userHeaders.hasOwnProperty(header)) { | |
formHeaders[header.toLowerCase()] = userHeaders[header]; | |
} | |
} | |
return formHeaders; | |
}; | |
FormData3.prototype.setBoundary = function (boundary) { | |
this._boundary = boundary; | |
}; | |
FormData3.prototype.getBoundary = function () { | |
if (!this._boundary) { | |
this._generateBoundary(); | |
} | |
return this._boundary; | |
}; | |
FormData3.prototype.getBuffer = function () { | |
var dataBuffer = new Buffer.alloc(0); | |
var boundary = this.getBoundary(); | |
for (var i = 0, len = this._streams.length; i < len; i++) { | |
if (typeof this._streams[i] !== "function") { | |
if (Buffer.isBuffer(this._streams[i])) { | |
dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); | |
} else { | |
dataBuffer = Buffer.concat([ | |
dataBuffer, | |
Buffer.from(this._streams[i]), | |
]); | |
} | |
if ( | |
typeof this._streams[i] !== "string" || | |
this._streams[i].substring(2, boundary.length + 2) !== boundary | |
) { | |
dataBuffer = Buffer.concat([ | |
dataBuffer, | |
Buffer.from(FormData3.LINE_BREAK), | |
]); | |
} | |
} | |
} | |
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); | |
}; | |
FormData3.prototype._generateBoundary = function () { | |
var boundary = "--------------------------"; | |
for (var i = 0; i < 24; i++) { | |
boundary += Math.floor(Math.random() * 10).toString(16); | |
} | |
this._boundary = boundary; | |
}; | |
FormData3.prototype.getLengthSync = function () { | |
var knownLength = this._overheadLength + this._valueLength; | |
if (this._streams.length) { | |
knownLength += this._lastBoundary().length; | |
} | |
if (!this.hasKnownLength()) { | |
this._error( | |
new Error("Cannot calculate proper length in synchronous way.") | |
); | |
} | |
return knownLength; | |
}; | |
FormData3.prototype.hasKnownLength = function () { | |
var hasKnownLength = true; | |
if (this._valuesToMeasure.length) { | |
hasKnownLength = false; | |
} | |
return hasKnownLength; | |
}; | |
FormData3.prototype.getLength = function (cb) { | |
var knownLength = this._overheadLength + this._valueLength; | |
if (this._streams.length) { | |
knownLength += this._lastBoundary().length; | |
} | |
if (!this._valuesToMeasure.length) { | |
process.nextTick(cb.bind(this, null, knownLength)); | |
return; | |
} | |
asynckit.parallel( | |
this._valuesToMeasure, | |
this._lengthRetriever, | |
function (err, values) { | |
if (err) { | |
cb(err); | |
return; | |
} | |
values.forEach(function (length) { | |
knownLength += length; | |
}); | |
cb(null, knownLength); | |
} | |
); | |
}; | |
FormData3.prototype.submit = function (params, cb) { | |
var request2, | |
options, | |
defaults2 = {method: "post"}; | |
if (typeof params == "string") { | |
params = parseUrl(params); | |
options = populate( | |
{ | |
port: params.port, | |
path: params.pathname, | |
host: params.hostname, | |
protocol: params.protocol, | |
}, | |
defaults2 | |
); | |
} else { | |
options = populate(params, defaults2); | |
if (!options.port) { | |
options.port = options.protocol == "https:" ? 443 : 80; | |
} | |
} | |
options.headers = this.getHeaders(params.headers); | |
if (options.protocol == "https:") { | |
request2 = https2.request(options); | |
} else { | |
request2 = http2.request(options); | |
} | |
this.getLength( | |
function (err, length) { | |
if (err && err !== "Unknown stream") { | |
this._error(err); | |
return; | |
} | |
if (length) { | |
request2.setHeader("Content-Length", length); | |
} | |
this.pipe(request2); | |
if (cb) { | |
var onResponse; | |
var callback = function (error, responce) { | |
request2.removeListener("error", callback); | |
request2.removeListener("response", onResponse); | |
return cb.call(this, error, responce); | |
}; | |
onResponse = callback.bind(this, null); | |
request2.on("error", callback); | |
request2.on("response", onResponse); | |
} | |
}.bind(this) | |
); | |
return request2; | |
}; | |
FormData3.prototype._error = function (err) { | |
if (!this.error) { | |
this.error = err; | |
this.pause(); | |
this.emit("error", err); | |
} | |
}; | |
FormData3.prototype.toString = function () { | |
return "[object FormData]"; | |
}; | |
}, | |
}); | |
// node_modules/proxy-from-env/index.js | |
var require_proxy_from_env = __commonJS({ | |
"node_modules/proxy-from-env/index.js"(exports2) { | |
"use strict"; | |
var parseUrl = require("url").parse; | |
var DEFAULT_PORTS = { | |
ftp: 21, | |
gopher: 70, | |
http: 80, | |
https: 443, | |
ws: 80, | |
wss: 443, | |
}; | |
var stringEndsWith = | |
String.prototype.endsWith || | |
function (s) { | |
return ( | |
s.length <= this.length && | |
this.indexOf(s, this.length - s.length) !== -1 | |
); | |
}; | |
function getProxyForUrl2(url2) { | |
var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; | |
var proto = parsedUrl.protocol; | |
var hostname = parsedUrl.host; | |
var port = parsedUrl.port; | |
if ( | |
typeof hostname !== "string" || | |
!hostname || | |
typeof proto !== "string" | |
) { | |
return ""; | |
} | |
proto = proto.split(":", 1)[0]; | |
hostname = hostname.replace(/:\d*$/, ""); | |
port = parseInt(port) || DEFAULT_PORTS[proto] || 0; | |
if (!shouldProxy(hostname, port)) { | |
return ""; | |
} | |
var proxy = | |
getEnv("npm_config_" + proto + "_proxy") || | |
getEnv(proto + "_proxy") || | |
getEnv("npm_config_proxy") || | |
getEnv("all_proxy"); | |
if (proxy && proxy.indexOf("://") === -1) { | |
proxy = proto + "://" + proxy; | |
} | |
return proxy; | |
} | |
function shouldProxy(hostname, port) { | |
var NO_PROXY = ( | |
getEnv("npm_config_no_proxy") || getEnv("no_proxy") | |
).toLowerCase(); | |
if (!NO_PROXY) { | |
return true; | |
} | |
if (NO_PROXY === "*") { | |
return false; | |
} | |
return NO_PROXY.split(/[,\s]/).every(function (proxy) { | |
if (!proxy) { | |
return true; | |
} | |
var parsedProxy = proxy.match(/^(.+):(\d+)$/); | |
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; | |
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; | |
if (parsedProxyPort && parsedProxyPort !== port) { | |
return true; | |
} | |
if (!/^[.*]/.test(parsedProxyHostname)) { | |
return hostname !== parsedProxyHostname; | |
} | |
if (parsedProxyHostname.charAt(0) === "*") { | |
parsedProxyHostname = parsedProxyHostname.slice(1); | |
} | |
return !stringEndsWith.call(hostname, parsedProxyHostname); | |
}); | |
} | |
function getEnv(key) { | |
return ( | |
process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "" | |
); | |
} | |
exports2.getProxyForUrl = getProxyForUrl2; | |
}, | |
}); | |
// node_modules/ms/index.js | |
var require_ms = __commonJS({ | |
"node_modules/ms/index.js"(exports2, module2) { | |
var s = 1e3; | |
var m = s * 60; | |
var h = m * 60; | |
var d = h * 24; | |
var w = d * 7; | |
var y = d * 365.25; | |
module2.exports = function (val, options) { | |
options = options || {}; | |
var type = typeof val; | |
if (type === "string" && val.length > 0) { | |
return parse(val); | |
} else if (type === "number" && isFinite(val)) { | |
return options.long ? fmtLong(val) : fmtShort(val); | |
} | |
throw new Error( | |
"val is not a non-empty string or a valid number. val=" + | |
JSON.stringify(val) | |
); | |
}; | |
function parse(str) { | |
str = String(str); | |
if (str.length > 100) { | |
return; | |
} | |
var match = | |
/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( | |
str | |
); | |
if (!match) { | |
return; | |
} | |
var n = parseFloat(match[1]); | |
var type = (match[2] || "ms").toLowerCase(); | |
switch (type) { | |
case "years": | |
case "year": | |
case "yrs": | |
case "yr": | |
case "y": | |
return n * y; | |
case "weeks": | |
case "week": | |
case "w": | |
return n * w; | |
case "days": | |
case "day": | |
case "d": | |
return n * d; | |
case "hours": | |
case "hour": | |
case "hrs": | |
case "hr": | |
case "h": | |
return n * h; | |
case "minutes": | |
case "minute": | |
case "mins": | |
case "min": | |
case "m": | |
return n * m; | |
case "seconds": | |
case "second": | |
case "secs": | |
case "sec": | |
case "s": | |
return n * s; | |
case "milliseconds": | |
case "millisecond": | |
case "msecs": | |
case "msec": | |
case "ms": | |
return n; | |
default: | |
return void 0; | |
} | |
} | |
function fmtShort(ms) { | |
var msAbs = Math.abs(ms); | |
if (msAbs >= d) { | |
return Math.round(ms / d) + "d"; | |
} | |
if (msAbs >= h) { | |
return Math.round(ms / h) + "h"; | |
} | |
if (msAbs >= m) { | |
return Math.round(ms / m) + "m"; | |
} | |
if (msAbs >= s) { | |
return Math.round(ms / s) + "s"; | |
} | |
return ms + "ms"; | |
} | |
function fmtLong(ms) { | |
var msAbs = Math.abs(ms); | |
if (msAbs >= d) { | |
return plural(ms, msAbs, d, "day"); | |
} | |
if (msAbs >= h) { | |
return plural(ms, msAbs, h, "hour"); | |
} | |
if (msAbs >= m) { | |
return plural(ms, msAbs, m, "minute"); | |
} | |
if (msAbs >= s) { | |
return plural(ms, msAbs, s, "second"); | |
} | |
return ms + " ms"; | |
} | |
function plural(ms, msAbs, n, name) { | |
var isPlural = msAbs >= n * 1.5; | |
return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); | |
} | |
}, | |
}); | |
// node_modules/debug/src/common.js | |
var require_common = __commonJS({ | |
"node_modules/debug/src/common.js"(exports2, module2) { | |
function setup(env) { | |
createDebug.debug = createDebug; | |
createDebug.default = createDebug; | |
createDebug.coerce = coerce; | |
createDebug.disable = disable; | |
createDebug.enable = enable; | |
createDebug.enabled = enabled; | |
createDebug.humanize = require_ms(); | |
createDebug.destroy = destroy; | |
Object.keys(env).forEach((key) => { | |
createDebug[key] = env[key]; | |
}); | |
createDebug.names = []; | |
createDebug.skips = []; | |
createDebug.formatters = {}; | |
function selectColor(namespace2) { | |
let hash = 0; | |
for (let i = 0; i < namespace2.length; i++) { | |
hash = (hash << 5) - hash + namespace2.charCodeAt(i); | |
hash |= 0; | |
} | |
return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; | |
} | |
createDebug.selectColor = selectColor; | |
function createDebug(namespace2) { | |
let prevTime; | |
let enableOverride = null; | |
let namespacesCache; | |
let enabledCache; | |
function debug(...args) { | |
if (!debug.enabled) { | |
return; | |
} | |
const self2 = debug; | |
const curr = Number(/* @__PURE__ */ new Date()); | |
const ms = curr - (prevTime || curr); | |
self2.diff = ms; | |
self2.prev = prevTime; | |
self2.curr = curr; | |
prevTime = curr; | |
args[0] = createDebug.coerce(args[0]); | |
if (typeof args[0] !== "string") { | |
args.unshift("%O"); | |
} | |
let index = 0; | |
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { | |
if (match === "%%") { | |
return "%"; | |
} | |
index++; | |
const formatter = createDebug.formatters[format]; | |
if (typeof formatter === "function") { | |
const val = args[index]; | |
match = formatter.call(self2, val); | |
args.splice(index, 1); | |
index--; | |
} | |
return match; | |
}); | |
createDebug.formatArgs.call(self2, args); | |
const logFn = self2.log || createDebug.log; | |
logFn.apply(self2, args); | |
} | |
debug.namespace = namespace2; | |
debug.useColors = createDebug.useColors(); | |
debug.color = createDebug.selectColor(namespace2); | |
debug.extend = extend2; | |
debug.destroy = createDebug.destroy; | |
Object.defineProperty(debug, "enabled", { | |
enumerable: true, | |
configurable: false, | |
get: () => { | |
if (enableOverride !== null) { | |
return enableOverride; | |
} | |
if (namespacesCache !== createDebug.namespaces) { | |
namespacesCache = createDebug.namespaces; | |
enabledCache = createDebug.enabled(namespace2); | |
} | |
return enabledCache; | |
}, | |
set: (v) => { | |
enableOverride = v; | |
}, | |
}); | |
if (typeof createDebug.init === "function") { | |
createDebug.init(debug); | |
} | |
return debug; | |
} | |
function extend2(namespace2, delimiter) { | |
const newDebug = createDebug( | |
this.namespace + | |
(typeof delimiter === "undefined" ? ":" : delimiter) + | |
namespace2 | |
); | |
newDebug.log = this.log; | |
return newDebug; | |
} | |
function enable(namespaces) { | |
createDebug.save(namespaces); | |
createDebug.namespaces = namespaces; | |
createDebug.names = []; | |
createDebug.skips = []; | |
let i; | |
const split = (typeof namespaces === "string" ? namespaces : "").split( | |
/[\s,]+/ | |
); | |
const len = split.length; | |
for (i = 0; i < len; i++) { | |
if (!split[i]) { | |
continue; | |
} | |
namespaces = split[i].replace(/\*/g, ".*?"); | |
if (namespaces[0] === "-") { | |
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); | |
} else { | |
createDebug.names.push(new RegExp("^" + namespaces + "$")); | |
} | |
} | |
} | |
function disable() { | |
const namespaces = [ | |
...createDebug.names.map(toNamespace), | |
...createDebug.skips | |
.map(toNamespace) | |
.map((namespace2) => "-" + namespace2), | |
].join(","); | |
createDebug.enable(""); | |
return namespaces; | |
} | |
function enabled(name) { | |
if (name[name.length - 1] === "*") { | |
return true; | |
} | |
let i; | |
let len; | |
for (i = 0, len = createDebug.skips.length; i < len; i++) { | |
if (createDebug.skips[i].test(name)) { | |
return false; | |
} | |
} | |
for (i = 0, len = createDebug.names.length; i < len; i++) { | |
if (createDebug.names[i].test(name)) { | |
return true; | |
} | |
} | |
return false; | |
} | |
function toNamespace(regexp) { | |
return regexp | |
.toString() | |
.substring(2, regexp.toString().length - 2) | |
.replace(/\.\*\?$/, "*"); | |
} | |
function coerce(val) { | |
if (val instanceof Error) { | |
return val.stack || val.message; | |
} | |
return val; | |
} | |
function destroy() { | |
console.warn( | |
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." | |
); | |
} | |
createDebug.enable(createDebug.load()); | |
return createDebug; | |
} | |
module2.exports = setup; | |
}, | |
}); | |
// node_modules/debug/src/browser.js | |
var require_browser = __commonJS({ | |
"node_modules/debug/src/browser.js"(exports2, module2) { | |
exports2.formatArgs = formatArgs; | |
exports2.save = save; | |
exports2.load = load; | |
exports2.useColors = useColors; | |
exports2.storage = localstorage(); | |
exports2.destroy = /* @__PURE__ */ (() => { | |
let warned = false; | |
return () => { | |
if (!warned) { | |
warned = true; | |
console.warn( | |
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." | |
); | |
} | |
}; | |
})(); | |
exports2.colors = [ | |
"#0000CC", | |
"#0000FF", | |
"#0033CC", | |
"#0033FF", | |
"#0066CC", | |
"#0066FF", | |
"#0099CC", | |
"#0099FF", | |
"#00CC00", | |
"#00CC33", | |
"#00CC66", | |
"#00CC99", | |
"#00CCCC", | |
"#00CCFF", | |
"#3300CC", | |
"#3300FF", | |
"#3333CC", | |
"#3333FF", | |
"#3366CC", | |
"#3366FF", | |
"#3399CC", | |
"#3399FF", | |
"#33CC00", | |
"#33CC33", | |
"#33CC66", | |
"#33CC99", | |
"#33CCCC", | |
"#33CCFF", | |
"#6600CC", | |
"#6600FF", | |
"#6633CC", | |
"#6633FF", | |
"#66CC00", | |
"#66CC33", | |
"#9900CC", | |
"#9900FF", | |
"#9933CC", | |
"#9933FF", | |
"#99CC00", | |
"#99CC33", | |
"#CC0000", | |
"#CC0033", | |
"#CC0066", | |
"#CC0099", | |
"#CC00CC", | |
"#CC00FF", | |
"#CC3300", | |
"#CC3333", | |
"#CC3366", | |
"#CC3399", | |
"#CC33CC", | |
"#CC33FF", | |
"#CC6600", | |
"#CC6633", | |
"#CC9900", | |
"#CC9933", | |
"#CCCC00", | |
"#CCCC33", | |
"#FF0000", | |
"#FF0033", | |
"#FF0066", | |
"#FF0099", | |
"#FF00CC", | |
"#FF00FF", | |
"#FF3300", | |
"#FF3333", | |
"#FF3366", | |
"#FF3399", | |
"#FF33CC", | |
"#FF33FF", | |
"#FF6600", | |
"#FF6633", | |
"#FF9900", | |
"#FF9933", | |
"#FFCC00", | |
"#FFCC33", | |
]; | |
function useColors() { | |
if ( | |
typeof window !== "undefined" && | |
window.process && | |
(window.process.type === "renderer" || window.process.__nwjs) | |
) { | |
return true; | |
} | |
if ( | |
typeof navigator !== "undefined" && | |
navigator.userAgent && | |
navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/) | |
) { | |
return false; | |
} | |
return ( | |
(typeof document !== "undefined" && | |
document.documentElement && | |
document.documentElement.style && | |
document.documentElement.style.WebkitAppearance) || // Is firebug? http://stackoverflow.com/a/398120/376773 | |
(typeof window !== "undefined" && | |
window.console && | |
(window.console.firebug || | |
(window.console.exception && window.console.table))) || // Is firefox >= v31? | |
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages | |
(typeof navigator !== "undefined" && | |
navigator.userAgent && | |
navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && | |
parseInt(RegExp.$1, 10) >= 31) || // Double check webkit in userAgent just in case we are in a worker | |
(typeof navigator !== "undefined" && | |
navigator.userAgent && | |
navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)) | |
); | |
} | |
function formatArgs(args) { | |
args[0] = | |
(this.useColors ? "%c" : "") + | |
this.namespace + | |
(this.useColors ? " %c" : " ") + | |
args[0] + | |
(this.useColors ? "%c " : " ") + | |
"+" + | |
module2.exports.humanize(this.diff); | |
if (!this.useColors) { | |
return; | |
} | |
const c = "color: " + this.color; | |
args.splice(1, 0, c, "color: inherit"); | |
let index = 0; | |
let lastC = 0; | |
args[0].replace(/%[a-zA-Z%]/g, (match) => { | |
if (match === "%%") { | |
return; | |
} | |
index++; | |
if (match === "%c") { | |
lastC = index; | |
} | |
}); | |
args.splice(lastC, 0, c); | |
} | |
exports2.log = console.debug || console.log || (() => {}); | |
function save(namespaces) { | |
try { | |
if (namespaces) { | |
exports2.storage.setItem("debug", namespaces); | |
} else { | |
exports2.storage.removeItem("debug"); | |
} | |
} catch (error) {} | |
} | |
function load() { | |
let r; | |
try { | |
r = exports2.storage.getItem("debug"); | |
} catch (error) {} | |
if (!r && typeof process !== "undefined" && "env" in process) { | |
r = process.env.DEBUG; | |
} | |
return r; | |
} | |
function localstorage() { | |
try { | |
return localStorage; | |
} catch (error) {} | |
} | |
module2.exports = require_common()(exports2); | |
var {formatters} = module2.exports; | |
formatters.j = function (v) { | |
try { | |
return JSON.stringify(v); | |
} catch (error) { | |
return "[UnexpectedJSONParseError]: " + error.message; | |
} | |
}; | |
}, | |
}); | |
// node_modules/has-flag/index.js | |
var require_has_flag = __commonJS({ | |
"node_modules/has-flag/index.js"(exports2, module2) { | |
"use strict"; | |
module2.exports = (flag, argv = process.argv) => { | |
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; | |
const position = argv.indexOf(prefix + flag); | |
const terminatorPosition = argv.indexOf("--"); | |
return ( | |
position !== -1 && | |
(terminatorPosition === -1 || position < terminatorPosition) | |
); | |
}; | |
}, | |
}); | |
// node_modules/supports-color/index.js | |
var require_supports_color = __commonJS({ | |
"node_modules/supports-color/index.js"(exports2, module2) { | |
"use strict"; | |
var os = require("os"); | |
var tty = require("tty"); | |
var hasFlag = require_has_flag(); | |
var {env} = process; | |
var forceColor; | |
if ( | |
hasFlag("no-color") || | |
hasFlag("no-colors") || | |
hasFlag("color=false") || | |
hasFlag("color=never") | |
) { | |
forceColor = 0; | |
} else if ( | |
hasFlag("color") || | |
hasFlag("colors") || | |
hasFlag("color=true") || | |
hasFlag("color=always") | |
) { | |
forceColor = 1; | |
} | |
if ("FORCE_COLOR" in env) { | |
if (env.FORCE_COLOR === "true") { | |
forceColor = 1; | |
} else if (env.FORCE_COLOR === "false") { | |
forceColor = 0; | |
} else { | |
forceColor = | |
env.FORCE_COLOR.length === 0 | |
? 1 | |
: Math.min(parseInt(env.FORCE_COLOR, 10), 3); | |
} | |
} | |
function translateLevel(level) { | |
if (level === 0) { | |
return false; | |
} | |
return { | |
level, | |
hasBasic: true, | |
has256: level >= 2, | |
has16m: level >= 3, | |
}; | |
} | |
function supportsColor(haveStream, streamIsTTY) { | |
if (forceColor === 0) { | |
return 0; | |
} | |
if ( | |
hasFlag("color=16m") || | |
hasFlag("color=full") || | |
hasFlag("color=truecolor") | |
) { | |
return 3; | |
} | |
if (hasFlag("color=256")) { | |
return 2; | |
} | |
if (haveStream && !streamIsTTY && forceColor === void 0) { | |
return 0; | |
} | |
const min = forceColor || 0; | |
if (env.TERM === "dumb") { | |
return min; | |
} | |
if (process.platform === "win32") { | |
const osRelease = os.release().split("."); | |
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { | |
return Number(osRelease[2]) >= 14931 ? 3 : 2; | |
} | |
return 1; | |
} | |
if ("CI" in env) { | |
if ( | |
[ | |
"TRAVIS", | |
"CIRCLECI", | |
"APPVEYOR", | |
"GITLAB_CI", | |
"GITHUB_ACTIONS", | |
"BUILDKITE", | |
].some((sign) => sign in env) || | |
env.CI_NAME === "codeship" | |
) { | |
return 1; | |
} | |
return min; | |
} | |
if ("TEAMCITY_VERSION" in env) { | |
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) | |
? 1 | |
: 0; | |
} | |
if (env.COLORTERM === "truecolor") { | |
return 3; | |
} | |
if ("TERM_PROGRAM" in env) { | |
const version = parseInt( | |
(env.TERM_PROGRAM_VERSION || "").split(".")[0], | |
10 | |
); | |
switch (env.TERM_PROGRAM) { | |
case "iTerm.app": | |
return version >= 3 ? 3 : 2; | |
case "Apple_Terminal": | |
return 2; | |
} | |
} | |
if (/-256(color)?$/i.test(env.TERM)) { | |
return 2; | |
} | |
if ( | |
/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test( | |
env.TERM | |
) | |
) { | |
return 1; | |
} | |
if ("COLORTERM" in env) { | |
return 1; | |
} | |
return min; | |
} | |
function getSupportLevel(stream4) { | |
const level = supportsColor(stream4, stream4 && stream4.isTTY); | |
return translateLevel(level); | |
} | |
module2.exports = { | |
supportsColor: getSupportLevel, | |
stdout: translateLevel(supportsColor(true, tty.isatty(1))), | |
stderr: translateLevel(supportsColor(true, tty.isatty(2))), | |
}; | |
}, | |
}); | |
// node_modules/debug/src/node.js | |
var require_node = __commonJS({ | |
"node_modules/debug/src/node.js"(exports2, module2) { | |
var tty = require("tty"); | |
var util2 = require("util"); | |
exports2.init = init; | |
exports2.log = log; | |
exports2.formatArgs = formatArgs; | |
exports2.save = save; | |
exports2.load = load; | |
exports2.useColors = useColors; | |
exports2.destroy = util2.deprecate(() => {}, | |
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); | |
exports2.colors = [6, 2, 3, 4, 5, 1]; | |
try { | |
const supportsColor = require_supports_color(); | |
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { | |
exports2.colors = [ | |
20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, | |
63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, | |
128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, | |
168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, | |
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221, | |
]; | |
} | |
} catch (error) {} | |
exports2.inspectOpts = Object.keys(process.env) | |
.filter((key) => { | |
return /^debug_/i.test(key); | |
}) | |
.reduce((obj, key) => { | |
const prop = key | |
.substring(6) | |
.toLowerCase() | |
.replace(/_([a-z])/g, (_, k) => { | |
return k.toUpperCase(); | |
}); | |
let val = process.env[key]; | |
if (/^(yes|on|true|enabled)$/i.test(val)) { | |
val = true; | |
} else if (/^(no|off|false|disabled)$/i.test(val)) { | |
val = false; | |
} else if (val === "null") { | |
val = null; | |
} else { | |
val = Number(val); | |
} | |
obj[prop] = val; | |
return obj; | |
}, {}); | |
function useColors() { | |
return "colors" in exports2.inspectOpts | |
? Boolean(exports2.inspectOpts.colors) | |
: tty.isatty(process.stderr.fd); | |
} | |
function formatArgs(args) { | |
const {namespace: name, useColors: useColors2} = this; | |
if (useColors2) { | |
const c = this.color; | |
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); | |
const prefix = ` ${colorCode};1m${name} \x1B[0m`; | |
args[0] = prefix + args[0].split("\n").join("\n" + prefix); | |
args.push( | |
colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m" | |
); | |
} else { | |
args[0] = getDate() + name + " " + args[0]; | |
} | |
} | |
function getDate() { | |
if (exports2.inspectOpts.hideDate) { | |
return ""; | |
} | |
return /* @__PURE__ */ new Date().toISOString() + " "; | |
} | |
function log(...args) { | |
return process.stderr.write(util2.format(...args) + "\n"); | |
} | |
function save(namespaces) { | |
if (namespaces) { | |
process.env.DEBUG = namespaces; | |
} else { | |
delete process.env.DEBUG; | |
} | |
} | |
function load() { | |
return process.env.DEBUG; | |
} | |
function init(debug) { | |
debug.inspectOpts = {}; | |
const keys = Object.keys(exports2.inspectOpts); | |
for (let i = 0; i < keys.length; i++) { | |
debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; | |
} | |
} | |
module2.exports = require_common()(exports2); | |
var {formatters} = module2.exports; | |
formatters.o = function (v) { | |
this.inspectOpts.colors = this.useColors; | |
return util2 | |
.inspect(v, this.inspectOpts) | |
.split("\n") | |
.map((str) => str.trim()) | |
.join(" "); | |
}; | |
formatters.O = function (v) { | |
this.inspectOpts.colors = this.useColors; | |
return util2.inspect(v, this.inspectOpts); | |
}; | |
}, | |
}); | |
// node_modules/debug/src/index.js | |
var require_src = __commonJS({ | |
"node_modules/debug/src/index.js"(exports2, module2) { | |
if ( | |
typeof process === "undefined" || | |
process.type === "renderer" || | |
process.browser === true || | |
process.__nwjs | |
) { | |
module2.exports = require_browser(); | |
} else { | |
module2.exports = require_node(); | |
} | |
}, | |
}); | |
// node_modules/follow-redirects/debug.js | |
var require_debug = __commonJS({ | |
"node_modules/follow-redirects/debug.js"(exports2, module2) { | |
var debug; | |
module2.exports = function () { | |
if (!debug) { | |
try { | |
debug = require_src()("follow-redirects"); | |
} catch (error) {} | |
if (typeof debug !== "function") { | |
debug = function () {}; | |
} | |
} | |
debug.apply(null, arguments); | |
}; | |
}, | |
}); | |
// node_modules/follow-redirects/index.js | |
var require_follow_redirects = __commonJS({ | |
"node_modules/follow-redirects/index.js"(exports2, module2) { | |
var url2 = require("url"); | |
var URL2 = url2.URL; | |
var http2 = require("http"); | |
var https2 = require("https"); | |
var Writable = require("stream").Writable; | |
var assert = require("assert"); | |
var debug = require_debug(); | |
var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; | |
var eventHandlers = /* @__PURE__ */ Object.create(null); | |
events.forEach(function (event) { | |
eventHandlers[event] = function (arg1, arg2, arg3) { | |
this._redirectable.emit(event, arg1, arg2, arg3); | |
}; | |
}); | |
var RedirectionError = createErrorType( | |
"ERR_FR_REDIRECTION_FAILURE", | |
"Redirected request failed" | |
); | |
var TooManyRedirectsError = createErrorType( | |
"ERR_FR_TOO_MANY_REDIRECTS", | |
"Maximum number of redirects exceeded" | |
); | |
var MaxBodyLengthExceededError = createErrorType( | |
"ERR_FR_MAX_BODY_LENGTH_EXCEEDED", | |
"Request body larger than maxBodyLength limit" | |
); | |
var WriteAfterEndError = createErrorType( | |
"ERR_STREAM_WRITE_AFTER_END", | |
"write after end" | |
); | |
function RedirectableRequest(options, responseCallback) { | |
Writable.call(this); | |
this._sanitizeOptions(options); | |
this._options = options; | |
this._ended = false; | |
this._ending = false; | |
this._redirectCount = 0; | |
this._redirects = []; | |
this._requestBodyLength = 0; | |
this._requestBodyBuffers = []; | |
if (responseCallback) { | |
this.on("response", responseCallback); | |
} | |
var self2 = this; | |
this._onNativeResponse = function (response) { | |
self2._processResponse(response); | |
}; | |
this._performRequest(); | |
} | |
RedirectableRequest.prototype = Object.create(Writable.prototype); | |
RedirectableRequest.prototype.abort = function () { | |
abortRequest(this._currentRequest); | |
this.emit("abort"); | |
}; | |
RedirectableRequest.prototype.write = function (data, encoding, callback) { | |
if (this._ending) { | |
throw new WriteAfterEndError(); | |
} | |
if ( | |
!( | |
typeof data === "string" || | |
(typeof data === "object" && "length" in data) | |
) | |
) { | |
throw new TypeError("data should be a string, Buffer or Uint8Array"); | |
} | |
if (typeof encoding === "function") { | |
callback = encoding; | |
encoding = null; | |
} | |
if (data.length === 0) { | |
if (callback) { | |
callback(); | |
} | |
return; | |
} | |
if ( | |
this._requestBodyLength + data.length <= | |
this._options.maxBodyLength | |
) { | |
this._requestBodyLength += data.length; | |
this._requestBodyBuffers.push({data, encoding}); | |
this._currentRequest.write(data, encoding, callback); | |
} else { | |
this.emit("error", new MaxBodyLengthExceededError()); | |
this.abort(); | |
} | |
}; | |
RedirectableRequest.prototype.end = function (data, encoding, callback) { | |
if (typeof data === "function") { | |
callback = data; | |
data = encoding = null; | |
} else if (typeof encoding === "function") { | |
callback = encoding; | |
encoding = null; | |
} | |
if (!data) { | |
this._ended = this._ending = true; | |
this._currentRequest.end(null, null, callback); | |
} else { | |
var self2 = this; | |
var currentRequest = this._currentRequest; | |
this.write(data, encoding, function () { | |
self2._ended = true; | |
currentRequest.end(null, null, callback); | |
}); | |
this._ending = true; | |
} | |
}; | |
RedirectableRequest.prototype.setHeader = function (name, value) { | |
this._options.headers[name] = value; | |
this._currentRequest.setHeader(name, value); | |
}; | |
RedirectableRequest.prototype.removeHeader = function (name) { | |
delete this._options.headers[name]; | |
this._currentRequest.removeHeader(name); | |
}; | |
RedirectableRequest.prototype.setTimeout = function (msecs, callback) { | |
var self2 = this; | |
function destroyOnTimeout(socket) { | |
socket.setTimeout(msecs); | |
socket.removeListener("timeout", socket.destroy); | |
socket.addListener("timeout", socket.destroy); | |
} | |
function startTimer(socket) { | |
if (self2._timeout) { | |
clearTimeout(self2._timeout); | |
} | |
self2._timeout = setTimeout(function () { | |
self2.emit("timeout"); | |
clearTimer(); | |
}, msecs); | |
destroyOnTimeout(socket); | |
} | |
function clearTimer() { | |
if (self2._timeout) { | |
clearTimeout(self2._timeout); | |
self2._timeout = null; | |
} | |
self2.removeListener("abort", clearTimer); | |
self2.removeListener("error", clearTimer); | |
self2.removeListener("response", clearTimer); | |
if (callback) { | |
self2.removeListener("timeout", callback); | |
} | |
if (!self2.socket) { | |
self2._currentRequest.removeListener("socket", startTimer); | |
} | |
} | |
if (callback) { | |
this.on("timeout", callback); | |
} | |
if (this.socket) { | |
startTimer(this.socket); | |
} else { | |
this._currentRequest.once("socket", startTimer); | |
} | |
this.on("socket", destroyOnTimeout); | |
this.on("abort", clearTimer); | |
this.on("error", clearTimer); | |
this.on("response", clearTimer); | |
return this; | |
}; | |
["flushHeaders", "getHeader", "setNoDelay", "setSocketKeepAlive"].forEach( | |
function (method) { | |
RedirectableRequest.prototype[method] = function (a, b) { | |
return this._currentRequest[method](a, b); | |
}; | |
} | |
); | |
["aborted", "connection", "socket"].forEach(function (property) { | |
Object.defineProperty(RedirectableRequest.prototype, property, { | |
get: function () { | |
return this._currentRequest[property]; | |
}, | |
}); | |
}); | |
RedirectableRequest.prototype._sanitizeOptions = function (options) { | |
if (!options.headers) { | |
options.headers = {}; | |
} | |
if (options.host) { | |
if (!options.hostname) { | |
options.hostname = options.host; | |
} | |
delete options.host; | |
} | |
if (!options.pathname && options.path) { | |
var searchPos = options.path.indexOf("?"); | |
if (searchPos < 0) { | |
options.pathname = options.path; | |
} else { | |
options.pathname = options.path.substring(0, searchPos); | |
options.search = options.path.substring(searchPos); | |
} | |
} | |
}; | |
RedirectableRequest.prototype._performRequest = function () { | |
var protocol = this._options.protocol; | |
var nativeProtocol = this._options.nativeProtocols[protocol]; | |
if (!nativeProtocol) { | |
this.emit("error", new TypeError("Unsupported protocol " + protocol)); | |
return; | |
} | |
if (this._options.agents) { | |
var scheme = protocol.slice(0, -1); | |
this._options.agent = this._options.agents[scheme]; | |
} | |
var request2 = (this._currentRequest = nativeProtocol.request( | |
this._options, | |
this._onNativeResponse | |
)); | |
this._currentUrl = url2.format(this._options); | |
request2._redirectable = this; | |
for (var e = 0; e < events.length; e++) { | |
request2.on(events[e], eventHandlers[events[e]]); | |
} | |
if (this._isRedirect) { | |
var i = 0; | |
var self2 = this; | |
var buffers = this._requestBodyBuffers; | |
(function writeNext(error) { | |
if (request2 === self2._currentRequest) { | |
if (error) { | |
self2.emit("error", error); | |
} else if (i < buffers.length) { | |
var buffer = buffers[i++]; | |
if (!request2.finished) { | |
request2.write(buffer.data, buffer.encoding, writeNext); | |
} | |
} else if (self2._ended) { | |
request2.end(); | |
} | |
} | |
})(); | |
} | |
}; | |
RedirectableRequest.prototype._processResponse = function (response) { | |
var statusCode = response.statusCode; | |
if (this._options.trackRedirects) { | |
this._redirects.push({ | |
url: this._currentUrl, | |
headers: response.headers, | |
statusCode, | |
}); | |
} | |
var location = response.headers.location; | |
if ( | |
!location || | |
this._options.followRedirects === false || | |
statusCode < 300 || | |
statusCode >= 400 | |
) { | |
response.responseUrl = this._currentUrl; | |
response.redirects = this._redirects; | |
this.emit("response", response); | |
this._requestBodyBuffers = []; | |
return; | |
} | |
abortRequest(this._currentRequest); | |
response.destroy(); | |
if (++this._redirectCount > this._options.maxRedirects) { | |
this.emit("error", new TooManyRedirectsError()); | |
return; | |
} | |
var requestHeaders; | |
var beforeRedirect = this._options.beforeRedirect; | |
if (beforeRedirect) { | |
requestHeaders = Object.assign( | |
{ | |
// The Host header was set by nativeProtocol.request | |
Host: response.req.getHeader("host"), | |
}, | |
this._options.headers | |
); | |
} | |
var method = this._options.method; | |
if ( | |
((statusCode === 301 || statusCode === 302) && | |
this._options.method === "POST") || // RFC7231§6.4.4: The 303 (See Other) status code indicates that | |
// the server is redirecting the user agent to a different resource […] | |
// A user agent can perform a retrieval request targeting that URI | |
// (a GET or HEAD request if using HTTP) […] | |
(statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) | |
) { | |
this._options.method = "GET"; | |
this._requestBodyBuffers = []; | |
removeMatchingHeaders(/^content-/i, this._options.headers); | |
} | |
var currentHostHeader = removeMatchingHeaders( | |
/^host$/i, | |
this._options.headers | |
); | |
var currentUrlParts = url2.parse(this._currentUrl); | |
var currentHost = currentHostHeader || currentUrlParts.host; | |
var currentUrl = /^\w+:/.test(location) | |
? this._currentUrl | |
: url2.format(Object.assign(currentUrlParts, {host: currentHost})); | |
var redirectUrl; | |
try { | |
redirectUrl = url2.resolve(currentUrl, location); | |
} catch (cause) { | |
this.emit("error", new RedirectionError(cause)); | |
return; | |
} | |
debug("redirecting to", redirectUrl); | |
this._isRedirect = true; | |
var redirectUrlParts = url2.parse(redirectUrl); | |
Object.assign(this._options, redirectUrlParts); | |
if ( | |
(redirectUrlParts.protocol !== currentUrlParts.protocol && | |
redirectUrlParts.protocol !== "https:") || | |
(redirectUrlParts.host !== currentHost && | |
!isSubdomain(redirectUrlParts.host, currentHost)) | |
) { | |
removeMatchingHeaders( | |
/^(?:authorization|cookie)$/i, | |
this._options.headers | |
); | |
} | |
if (typeof beforeRedirect === "function") { | |
var responseDetails = { | |
headers: response.headers, | |
statusCode, | |
}; | |
var requestDetails = { | |
url: currentUrl, | |
method, | |
headers: requestHeaders, | |
}; | |
try { | |
beforeRedirect(this._options, responseDetails, requestDetails); | |
} catch (err) { | |
this.emit("error", err); | |
return; | |
} | |
this._sanitizeOptions(this._options); | |
} | |
try { | |
this._performRequest(); | |
} catch (cause) { | |
this.emit("error", new RedirectionError(cause)); | |
} | |
}; | |
function wrap(protocols) { | |
var exports3 = { | |
maxRedirects: 21, | |
maxBodyLength: 10 * 1024 * 1024, | |
}; | |
var nativeProtocols = {}; | |
Object.keys(protocols).forEach(function (scheme) { | |
var protocol = scheme + ":"; | |
var nativeProtocol = (nativeProtocols[protocol] = protocols[scheme]); | |
var wrappedProtocol = (exports3[scheme] = | |
Object.create(nativeProtocol)); | |
function request2(input, options, callback) { | |
if (typeof input === "string") { | |
var urlStr = input; | |
try { | |
input = urlToOptions(new URL2(urlStr)); | |
} catch (err) { | |
input = url2.parse(urlStr); | |
} | |
} else if (URL2 && input instanceof URL2) { | |
input = urlToOptions(input); | |
} else { | |
callback = options; | |
options = input; | |
input = {protocol}; | |
} | |
if (typeof options === "function") { | |
callback = options; | |
options = null; | |
} | |
options = Object.assign( | |
{ | |
maxRedirects: exports3.maxRedirects, | |
maxBodyLength: exports3.maxBodyLength, | |
}, | |
input, | |
options | |
); | |
options.nativeProtocols = nativeProtocols; | |
assert.equal(options.protocol, protocol, "protocol mismatch"); | |
debug("options", options); | |
return new RedirectableRequest(options, callback); | |
} | |
function get(input, options, callback) { | |
var wrappedRequest = wrappedProtocol.request( | |
input, | |
options, | |
callback | |
); | |
wrappedRequest.end(); | |
return wrappedRequest; | |
} | |
Object.defineProperties(wrappedProtocol, { | |
request: { | |
value: request2, | |
configurable: true, | |
enumerable: true, | |
writable: true, | |
}, | |
get: { | |
value: get, | |
configurable: true, | |
enumerable: true, | |
writable: true, | |
}, | |
}); | |
}); | |
return exports3; | |
} | |
function noop2() {} | |
function urlToOptions(urlObject) { | |
var options = { | |
protocol: urlObject.protocol, | |
hostname: urlObject.hostname.startsWith("[") | |
? /* istanbul ignore next */ | |
urlObject.hostname.slice(1, -1) | |
: urlObject.hostname, | |
hash: urlObject.hash, | |
search: urlObject.search, | |
pathname: urlObject.pathname, | |
path: urlObject.pathname + urlObject.search, | |
href: urlObject.href, | |
}; | |
if (urlObject.port !== "") { | |
options.port = Number(urlObject.port); | |
} | |
return options; | |
} | |
function removeMatchingHeaders(regex, headers) { | |
var lastValue; | |
for (var header in headers) { | |
if (regex.test(header)) { | |
lastValue = headers[header]; | |
delete headers[header]; | |
} | |
} | |
return lastValue === null || typeof lastValue === "undefined" | |
? void 0 | |
: String(lastValue).trim(); | |
} | |
function createErrorType(code, defaultMessage) { | |
function CustomError2(cause) { | |
Error.captureStackTrace(this, this.constructor); | |
if (!cause) { | |
this.message = defaultMessage; | |
} else { | |
this.message = defaultMessage + ": " + cause.message; | |
this.cause = cause; | |
} | |
} | |
CustomError2.prototype = new Error(); | |
CustomError2.prototype.constructor = CustomError2; | |
CustomError2.prototype.name = "Error [" + code + "]"; | |
CustomError2.prototype.code = code; | |
return CustomError2; | |
} | |
function abortRequest(request2) { | |
for (var e = 0; e < events.length; e++) { | |
request2.removeListener(events[e], eventHandlers[events[e]]); | |
} | |
request2.on("error", noop2); | |
request2.abort(); | |
} | |
function isSubdomain(subdomain, domain) { | |
const dot = subdomain.length - domain.length - 1; | |
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); | |
} | |
module2.exports = wrap({http: http2, https: https2}); | |
module2.exports.wrap = wrap; | |
}, | |
}); | |
// node_modules/tslib/tslib.es6.js | |
var tslib_es6_exports = {}; | |
__export(tslib_es6_exports, { | |
__assign: () => __assign, | |
__asyncDelegator: () => __asyncDelegator, | |
__asyncGenerator: () => __asyncGenerator, | |
__asyncValues: () => __asyncValues, | |
__await: () => __await, | |
__awaiter: () => __awaiter, | |
__classPrivateFieldGet: () => __classPrivateFieldGet, | |
__classPrivateFieldSet: () => __classPrivateFieldSet, | |
__createBinding: () => __createBinding, | |
__decorate: () => __decorate, | |
__exportStar: () => __exportStar, | |
__extends: () => __extends, | |
__generator: () => __generator, | |
__importDefault: () => __importDefault, | |
__importStar: () => __importStar, | |
__makeTemplateObject: () => __makeTemplateObject, | |
__metadata: () => __metadata, | |
__param: () => __param, | |
__read: () => __read, | |
__rest: () => __rest, | |
__spread: () => __spread, | |
__spreadArray: () => __spreadArray, | |
__spreadArrays: () => __spreadArrays, | |
__values: () => __values, | |
}); | |
function __extends(d, b) { | |
if (typeof b !== "function" && b !== null) | |
throw new TypeError( | |
"Class extends value " + String(b) + " is not a constructor or null" | |
); | |
extendStatics(d, b); | |
function __() { | |
this.constructor = d; | |
} | |
d.prototype = | |
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __()); | |
} | |
function __rest(s, e) { | |
var t = {}; | |
for (var p in s) | |
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | |
t[p] = s[p]; | |
if (s != null && typeof Object.getOwnPropertySymbols === "function") | |
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | |
if ( | |
e.indexOf(p[i]) < 0 && | |
Object.prototype.propertyIsEnumerable.call(s, p[i]) | |
) | |
t[p[i]] = s[p[i]]; | |
} | |
return t; | |
} | |
function __decorate(decorators, target, key, desc) { | |
var c = arguments.length, | |
r = | |
c < 3 | |
? target | |
: desc === null | |
? (desc = Object.getOwnPropertyDescriptor(target, key)) | |
: desc, | |
d; | |
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") | |
r = Reflect.decorate(decorators, target, key, desc); | |
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; | |
return c > 3 && r && Object.defineProperty(target, key, r), r; | |
} | |
function __param(paramIndex, decorator) { | |
return function (target, key) { | |
decorator(target, key, paramIndex); | |
}; | |
} | |
function __metadata(metadataKey, metadataValue) { | |
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") | |
return Reflect.metadata(metadataKey, metadataValue); | |
} | |
function __awaiter(thisArg, _arguments, P, generator) { | |
function adopt(value) { | |
return value instanceof P | |
? value | |
: new P(function (resolve) { | |
resolve(value); | |
}); | |
} | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { | |
try { | |
step(generator.next(value)); | |
} catch (e) { | |
reject(e); | |
} | |
} | |
function rejected(value) { | |
try { | |
step(generator["throw"](value)); | |
} catch (e) { | |
reject(e); | |
} | |
} | |
function step(result) { | |
result.done | |
? resolve(result.value) | |
: adopt(result.value).then(fulfilled, rejected); | |
} | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
} | |
function __generator(thisArg, body) { | |
var _ = { | |
label: 0, | |
sent: function () { | |
if (t[0] & 1) throw t[1]; | |
return t[1]; | |
}, | |
trys: [], | |
ops: [], | |
}, | |
f, | |
y, | |
t, | |
g; | |
return ( | |
(g = {next: verb(0), throw: verb(1), return: verb(2)}), | |
typeof Symbol === "function" && | |
(g[Symbol.iterator] = function () { | |
return this; | |
}), | |
g | |
); | |
function verb(n) { | |
return function (v) { | |
return step([n, v]); | |
}; | |
} | |
function step(op) { | |
if (f) throw new TypeError("Generator is already executing."); | |
while (_) | |
try { | |
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; | |
if (((y = 0), t)) op = [op[0] & 2, t.value]; | |
switch (op[0]) { | |
case 0: | |
case 1: | |
t = op; | |
break; | |
case 4: | |
_.label++; | |
return {value: op[1], done: false}; | |
case 5: | |
_.label++; | |
y = op[1]; | |
op = [0]; | |
continue; | |
case 7: | |
op = _.ops.pop(); | |
_.trys.pop(); | |
continue; | |
default: | |
if ( | |
!((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && | |
(op[0] === 6 || op[0] === 2) | |
) { | |
_ = 0; | |
continue; | |
} | |
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { | |
_.label = op[1]; | |
break; | |
} | |
if (op[0] === 6 && _.label < t[1]) { | |
_.label = t[1]; | |
t = op; | |
break; | |
} | |
if (t && _.label < t[2]) { | |
_.label = t[2]; | |
_.ops.push(op); | |
break; | |
} | |
if (t[2]) _.ops.pop(); | |
_.trys.pop(); | |
continue; | |
} | |
op = body.call(thisArg, _); | |
} catch (e) { | |
op = [6, e]; | |
y = 0; | |
} finally { | |
f = t = 0; | |
} | |
if (op[0] & 5) throw op[1]; | |
return {value: op[0] ? op[1] : void 0, done: true}; | |
} | |
} | |
function __exportStar(m, o) { | |
for (var p in m) | |
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) | |
__createBinding(o, m, p); | |
} | |
function __values(o) { | |
var s = typeof Symbol === "function" && Symbol.iterator, | |
m = s && o[s], | |
i = 0; | |
if (m) return m.call(o); | |
if (o && typeof o.length === "number") | |
return { | |
next: function () { | |
if (o && i >= o.length) o = void 0; | |
return {value: o && o[i++], done: !o}; | |
}, | |
}; | |
throw new TypeError( | |
s ? "Object is not iterable." : "Symbol.iterator is not defined." | |
); | |
} | |
function __read(o, n) { | |
var m = typeof Symbol === "function" && o[Symbol.iterator]; | |
if (!m) return o; | |
var i = m.call(o), | |
r, | |
ar = [], | |
e; | |
try { | |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | |
} catch (error) { | |
e = {error}; | |
} finally { | |
try { | |
if (r && !r.done && (m = i["return"])) m.call(i); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
return ar; | |
} | |
function __spread() { | |
for (var ar = [], i = 0; i < arguments.length; i++) | |
ar = ar.concat(__read(arguments[i])); | |
return ar; | |
} | |
function __spreadArrays() { | |
for (var s = 0, i = 0, il = arguments.length; i < il; i++) | |
s += arguments[i].length; | |
for (var r = Array(s), k = 0, i = 0; i < il; i++) | |
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | |
r[k] = a[j]; | |
return r; | |
} | |
function __spreadArray(to, from, pack) { | |
if (pack || arguments.length === 2) | |
for (var i = 0, l = from.length, ar; i < l; i++) { | |
if (ar || !(i in from)) { | |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | |
ar[i] = from[i]; | |
} | |
} | |
return to.concat(ar || Array.prototype.slice.call(from)); | |
} | |
function __await(v) { | |
return this instanceof __await ? ((this.v = v), this) : new __await(v); | |
} | |
function __asyncGenerator(thisArg, _arguments, generator) { | |
if (!Symbol.asyncIterator) | |
throw new TypeError("Symbol.asyncIterator is not defined."); | |
var g = generator.apply(thisArg, _arguments || []), | |
i, | |
q = []; | |
return ( | |
(i = {}), | |
verb("next"), | |
verb("throw"), | |
verb("return"), | |
(i[Symbol.asyncIterator] = function () { | |
return this; | |
}), | |
i | |
); | |
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); | |
}); | |
}; | |
} | |
function resume(n, v) { | |
try { | |
step(g[n](v)); | |
} catch (e) { | |
settle2(q[0][3], e); | |
} | |
} | |
function step(r) { | |
r.value instanceof __await | |
? Promise.resolve(r.value.v).then(fulfill, reject) | |
: settle2(q[0][2], r); | |
} | |
function fulfill(value) { | |
resume("next", value); | |
} | |
function reject(value) { | |
resume("throw", value); | |
} | |
function settle2(f, v) { | |
if ((f(v), q.shift(), q.length)) resume(q[0][0], q[0][1]); | |
} | |
} | |
function __asyncDelegator(o) { | |
var i, p; | |
return ( | |
(i = {}), | |
verb("next"), | |
verb("throw", function (e) { | |
throw e; | |
}), | |
verb("return"), | |
(i[Symbol.iterator] = function () { | |
return this; | |
}), | |
i | |
); | |
function verb(n, f) { | |
i[n] = o[n] | |
? function (v) { | |
return (p = !p) | |
? {value: __await(o[n](v)), done: n === "return"} | |
: f | |
? f(v) | |
: v; | |
} | |
: f; | |
} | |
} | |
function __asyncValues(o) { | |
if (!Symbol.asyncIterator) | |
throw new TypeError("Symbol.asyncIterator is not defined."); | |
var m = o[Symbol.asyncIterator], | |
i; | |
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); | |
function verb(n) { | |
i[n] = | |
o[n] && | |
function (v) { | |
return new Promise(function (resolve, reject) { | |
(v = o[n](v)), settle2(resolve, reject, v.done, v.value); | |
}); | |
}; | |
} | |
function settle2(resolve, reject, d, v) { | |
Promise.resolve(v).then(function (v2) { | |
resolve({value: v2, done: d}); | |
}, reject); | |
} | |
} | |
function __makeTemplateObject(cooked, raw) { | |
if (Object.defineProperty) { | |
Object.defineProperty(cooked, "raw", {value: raw}); | |
} else { | |
cooked.raw = raw; | |
} | |
return cooked; | |
} | |
function __importStar(mod) { | |
if (mod && mod.__esModule) return mod; | |
var result = {}; | |
if (mod != null) { | |
for (var k in mod) | |
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) | |
__createBinding(result, mod, k); | |
} | |
__setModuleDefault(result, mod); | |
return result; | |
} | |
function __importDefault(mod) { | |
return mod && mod.__esModule ? mod : {default: mod}; | |
} | |
function __classPrivateFieldGet(receiver, state, kind, f) { | |
if (kind === "a" && !f) | |
throw new TypeError("Private accessor was defined without a getter"); | |
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" | |
); | |
return kind === "m" | |
? f | |
: kind === "a" | |
? f.call(receiver) | |
: f | |
? f.value | |
: state.get(receiver); | |
} | |
function __classPrivateFieldSet(receiver, state, value, kind, f) { | |
if (kind === "m") throw new TypeError("Private method is not writable"); | |
if (kind === "a" && !f) | |
throw new TypeError("Private accessor was defined without a setter"); | |
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" | |
); | |
return ( | |
kind === "a" | |
? f.call(receiver, value) | |
: f | |
? (f.value = value) | |
: state.set(receiver, value), | |
value | |
); | |
} | |
var extendStatics, __assign, __createBinding, __setModuleDefault; | |
var init_tslib_es6 = __esm({ | |
"node_modules/tslib/tslib.es6.js"() { | |
extendStatics = function (d, b) { | |
extendStatics = | |
Object.setPrototypeOf || | |
({__proto__: []} instanceof Array && | |
function (d2, b2) { | |
d2.__proto__ = b2; | |
}) || | |
function (d2, b2) { | |
for (var p in b2) | |
if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; | |
}; | |
return extendStatics(d, b); | |
}; | |
__assign = function () { | |
__assign = | |
Object.assign || | |
function __assign2(t) { | |
for (var s, i = 1, n = arguments.length; i < n; i++) { | |
s = arguments[i]; | |
for (var p in s) | |
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | |
} | |
return t; | |
}; | |
return __assign.apply(this, arguments); | |
}; | |
__createBinding = Object.create | |
? function (o, m, k, k2) { | |
if (k2 === void 0) k2 = k; | |
Object.defineProperty(o, k2, { | |
enumerable: true, | |
get: function () { | |
return m[k]; | |
}, | |
}); | |
} | |
: function (o, m, k, k2) { | |
if (k2 === void 0) k2 = k; | |
o[k2] = m[k]; | |
}; | |
__setModuleDefault = Object.create | |
? function (o, v) { | |
Object.defineProperty(o, "default", {enumerable: true, value: v}); | |
} | |
: function (o, v) { | |
o["default"] = v; | |
}; | |
}, | |
}); | |
// node_modules/lower-case/dist/index.js | |
var require_dist = __commonJS({ | |
"node_modules/lower-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.lowerCase = exports2.localeLowerCase = void 0; | |
var SUPPORTED_LOCALE = { | |
tr: { | |
regexp: /\u0130|\u0049|\u0049\u0307/g, | |
map: { | |
İ: "i", | |
I: "\u0131", | |
İ: "i", | |
}, | |
}, | |
az: { | |
regexp: /\u0130/g, | |
map: { | |
İ: "i", | |
I: "\u0131", | |
İ: "i", | |
}, | |
}, | |
lt: { | |
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, | |
map: { | |
I: "i\u0307", | |
J: "j\u0307", | |
Į: "\u012F\u0307", | |
Ì: "i\u0307\u0300", | |
Í: "i\u0307\u0301", | |
Ĩ: "i\u0307\u0303", | |
}, | |
}, | |
}; | |
function localeLowerCase(str, locale) { | |
var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; | |
if (lang) | |
return lowerCase( | |
str.replace(lang.regexp, function (m) { | |
return lang.map[m]; | |
}) | |
); | |
return lowerCase(str); | |
} | |
exports2.localeLowerCase = localeLowerCase; | |
function lowerCase(str) { | |
return str.toLowerCase(); | |
} | |
exports2.lowerCase = lowerCase; | |
}, | |
}); | |
// node_modules/no-case/dist/index.js | |
var require_dist2 = __commonJS({ | |
"node_modules/no-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.noCase = void 0; | |
var lower_case_1 = require_dist(); | |
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; | |
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; | |
function noCase(input, options) { | |
if (options === void 0) { | |
options = {}; | |
} | |
var _a = options.splitRegexp, | |
splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, | |
_b = options.stripRegexp, | |
stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, | |
_c = options.transform, | |
transform = _c === void 0 ? lower_case_1.lowerCase : _c, | |
_d = options.delimiter, | |
delimiter = _d === void 0 ? " " : _d; | |
var result = replace( | |
replace(input, splitRegexp, "$1\0$2"), | |
stripRegexp, | |
"\0" | |
); | |
var start = 0; | |
var end = result.length; | |
while (result.charAt(start) === "\0") start++; | |
while (result.charAt(end - 1) === "\0") end--; | |
return result | |
.slice(start, end) | |
.split("\0") | |
.map(transform) | |
.join(delimiter); | |
} | |
exports2.noCase = noCase; | |
function replace(input, re, value) { | |
if (re instanceof RegExp) return input.replace(re, value); | |
return re.reduce(function (input2, re2) { | |
return input2.replace(re2, value); | |
}, input); | |
} | |
}, | |
}); | |
// node_modules/pascal-case/dist/index.js | |
var require_dist3 = __commonJS({ | |
"node_modules/pascal-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.pascalCase = | |
exports2.pascalCaseTransformMerge = | |
exports2.pascalCaseTransform = | |
void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var no_case_1 = require_dist2(); | |
function pascalCaseTransform(input, index) { | |
var firstChar = input.charAt(0); | |
var lowerChars = input.substr(1).toLowerCase(); | |
if (index > 0 && firstChar >= "0" && firstChar <= "9") { | |
return "_" + firstChar + lowerChars; | |
} | |
return "" + firstChar.toUpperCase() + lowerChars; | |
} | |
exports2.pascalCaseTransform = pascalCaseTransform; | |
function pascalCaseTransformMerge(input) { | |
return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase(); | |
} | |
exports2.pascalCaseTransformMerge = pascalCaseTransformMerge; | |
function pascalCase(input, options) { | |
if (options === void 0) { | |
options = {}; | |
} | |
return no_case_1.noCase( | |
input, | |
tslib_1.__assign( | |
{delimiter: "", transform: pascalCaseTransform}, | |
options | |
) | |
); | |
} | |
exports2.pascalCase = pascalCase; | |
}, | |
}); | |
// node_modules/camel-case/dist/index.js | |
var require_dist4 = __commonJS({ | |
"node_modules/camel-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.camelCase = | |
exports2.camelCaseTransformMerge = | |
exports2.camelCaseTransform = | |
void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var pascal_case_1 = require_dist3(); | |
function camelCaseTransform(input, index) { | |
if (index === 0) return input.toLowerCase(); | |
return pascal_case_1.pascalCaseTransform(input, index); | |
} | |
exports2.camelCaseTransform = camelCaseTransform; | |
function camelCaseTransformMerge(input, index) { | |
if (index === 0) return input.toLowerCase(); | |
return pascal_case_1.pascalCaseTransformMerge(input); | |
} | |
exports2.camelCaseTransformMerge = camelCaseTransformMerge; | |
function camelCase(input, options) { | |
if (options === void 0) { | |
options = {}; | |
} | |
return pascal_case_1.pascalCase( | |
input, | |
tslib_1.__assign({transform: camelCaseTransform}, options) | |
); | |
} | |
exports2.camelCase = camelCase; | |
}, | |
}); | |
// node_modules/dot-case/dist/index.js | |
var require_dist5 = __commonJS({ | |
"node_modules/dot-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.dotCase = void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var no_case_1 = require_dist2(); | |
function dotCase(input, options) { | |
if (options === void 0) { | |
options = {}; | |
} | |
return no_case_1.noCase( | |
input, | |
tslib_1.__assign({delimiter: "."}, options) | |
); | |
} | |
exports2.dotCase = dotCase; | |
}, | |
}); | |
// node_modules/snake-case/dist/index.js | |
var require_dist6 = __commonJS({ | |
"node_modules/snake-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.snakeCase = void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var dot_case_1 = require_dist5(); | |
function snakeCase(input, options) { | |
if (options === void 0) { | |
options = {}; | |
} | |
return dot_case_1.dotCase( | |
input, | |
tslib_1.__assign({delimiter: "_"}, options) | |
); | |
} | |
exports2.snakeCase = snakeCase; | |
}, | |
}); | |
// node_modules/upper-case-first/dist/index.js | |
var require_dist7 = __commonJS({ | |
"node_modules/upper-case-first/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.upperCaseFirst = void 0; | |
function upperCaseFirst(input) { | |
return input.charAt(0).toUpperCase() + input.substr(1); | |
} | |
exports2.upperCaseFirst = upperCaseFirst; | |
}, | |
}); | |
// node_modules/capital-case/dist/index.js | |
var require_dist8 = __commonJS({ | |
"node_modules/capital-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.capitalCase = exports2.capitalCaseTransform = void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var no_case_1 = require_dist2(); | |
var upper_case_first_1 = require_dist7(); | |
function capitalCaseTransform(input) { | |
return upper_case_first_1.upperCaseFirst(input.toLowerCase()); | |
} | |
exports2.capitalCaseTransform = capitalCaseTransform; | |
function capitalCase(input, options) { | |
if (options === void 0) { | |
options = {}; | |
} | |
return no_case_1.noCase( | |
input, | |
tslib_1.__assign( | |
{delimiter: " ", transform: capitalCaseTransform}, | |
options | |
) | |
); | |
} | |
exports2.capitalCase = capitalCase; | |
}, | |
}); | |
// node_modules/header-case/dist/index.js | |
var require_dist9 = __commonJS({ | |
"node_modules/header-case/dist/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.headerCase = void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var capital_case_1 = require_dist8(); | |
function headerCase(input, options) { | |
if (options === void 0) { | |
options = {}; | |
} | |
return capital_case_1.capitalCase( | |
input, | |
tslib_1.__assign({delimiter: "-"}, options) | |
); | |
} | |
exports2.headerCase = headerCase; | |
}, | |
}); | |
// node_modules/axios-case-converter/lib/decorators.js | |
var require_decorators = __commonJS({ | |
"node_modules/axios-case-converter/lib/decorators.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.preserveSpecificKeys = exports2.applyCaseOptions = void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var applyCaseOptions = function (fn, defaultOptions) { | |
return function (input, options) { | |
return fn( | |
input, | |
tslib_1.__assign(tslib_1.__assign({}, defaultOptions), options) | |
); | |
}; | |
}; | |
exports2.applyCaseOptions = applyCaseOptions; | |
var preserveSpecificKeys = function (fn, keys) { | |
var condition = | |
typeof keys === "function" | |
? keys | |
: function (input) { | |
return keys.includes(input); | |
}; | |
return function (input, options) { | |
return condition(input, options) ? input : fn(input, options); | |
}; | |
}; | |
exports2.preserveSpecificKeys = preserveSpecificKeys; | |
}, | |
}); | |
// node_modules/axios-case-converter/lib/util.js | |
var require_util2 = __commonJS({ | |
"node_modules/axios-case-converter/lib/util.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.isAxiosHeaders = | |
exports2.isTransformable = | |
exports2.isPlainObject = | |
exports2.isFormData = | |
exports2.isURLSearchParams = | |
void 0; | |
var isURLSearchParams2 = function (value) { | |
return ( | |
typeof URLSearchParams !== "undefined" && | |
value instanceof URLSearchParams | |
); | |
}; | |
exports2.isURLSearchParams = isURLSearchParams2; | |
var isFormData2 = function (value) { | |
return typeof FormData !== "undefined" && value instanceof FormData; | |
}; | |
exports2.isFormData = isFormData2; | |
var isPlainObject2 = function (value) { | |
if (value == null) { | |
return false; | |
} | |
var proto = Object.getPrototypeOf(value); | |
return proto === null || proto === Object.prototype; | |
}; | |
exports2.isPlainObject = isPlainObject2; | |
var isTransformable = function (value) { | |
return ( | |
Array.isArray(value) || | |
(0, exports2.isPlainObject)(value) || | |
(0, exports2.isFormData)(value) || | |
(0, exports2.isURLSearchParams)(value) | |
); | |
}; | |
exports2.isTransformable = isTransformable; | |
var isAxiosHeaders = function (value) { | |
var _a, _b; | |
if (value == null) { | |
return false; | |
} | |
return ( | |
((_b = | |
(_a = Object.getPrototypeOf(value)) === null || _a === void 0 | |
? void 0 | |
: _a.constructor) === null || _b === void 0 | |
? void 0 | |
: _b.name) === "AxiosHeaders" | |
); | |
}; | |
exports2.isAxiosHeaders = isAxiosHeaders; | |
}, | |
}); | |
// node_modules/axios-case-converter/lib/transformers.js | |
var require_transformers = __commonJS({ | |
"node_modules/axios-case-converter/lib/transformers.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.createObjectTransformers = | |
exports2.createObjectTransformerOf = | |
exports2.createObjectTransformer = | |
void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var camel_case_1 = require_dist4(); | |
var snake_case_1 = require_dist6(); | |
var header_case_1 = require_dist9(); | |
var decorators_1 = require_decorators(); | |
var util_1 = require_util2(); | |
var caseFunctions = { | |
snake: snake_case_1.snakeCase, | |
camel: camel_case_1.camelCase, | |
header: header_case_1.headerCase, | |
}; | |
var transformObjectUsingCallbackRecursive = function (data, fn, overwrite) { | |
var e_1, _a, e_2, _b, e_3, _c; | |
if (!(0, util_1.isTransformable)(data)) { | |
return data; | |
} | |
if ( | |
((0, util_1.isFormData)(data) || (0, util_1.isURLSearchParams)(data)) && | |
(!data.entries || (overwrite && !data.delete)) | |
) { | |
var type = (0, util_1.isFormData)(data) | |
? "FormData" | |
: "URLSearchParams"; | |
var polyfill = (0, util_1.isFormData)(data) | |
? "https://github.com/jimmywarting/FormData" | |
: "https://github.com/jerrybendy/url-search-params-polyfill"; | |
if ( | |
typeof navigator !== "undefined" && | |
navigator.product === "ReactNative" | |
) { | |
console.warn( | |
"Be careful that ".concat( | |
type, | |
" cannot be transformed on React Native. If you intentionally implemented, ignore this kind of warning: https://facebook.github.io/react-native/docs/debugging.html" | |
) | |
); | |
} else { | |
if (!data.entries) { | |
console.warn( | |
"You must use polyfill of " | |
.concat( | |
type, | |
".prototype.entries() on Internet Explorer or Safari: " | |
) | |
.concat(polyfill) | |
); | |
} | |
if (overwrite && !data.delete) { | |
console.warn( | |
"You must use polyfill of " | |
.concat( | |
type, | |
".prototype.delete() on Internet Explorer or Safari: " | |
) | |
.concat(polyfill) | |
); | |
} | |
} | |
return data; | |
} | |
var prototype3 = Object.getPrototypeOf(data); | |
var store = overwrite | |
? data | |
: !prototype3 | |
? /* @__PURE__ */ Object.create(null) | |
: new prototype3.constructor(); | |
var series; | |
if ((0, util_1.isFormData)(data) || (0, util_1.isURLSearchParams)(data)) { | |
series = data.entries(); | |
if (overwrite) { | |
series = tslib_1.__spreadArray([], tslib_1.__read(series), false); | |
try { | |
for ( | |
var series_1 = tslib_1.__values(series), | |
series_1_1 = series_1.next(); | |
!series_1_1.done; | |
series_1_1 = series_1.next() | |
) { | |
var _d = tslib_1.__read(series_1_1.value, 1), | |
key = _d[0]; | |
data.delete(key); | |
} | |
} catch (e_1_1) { | |
e_1 = {error: e_1_1}; | |
} finally { | |
try { | |
if (series_1_1 && !series_1_1.done && (_a = series_1.return)) | |
_a.call(series_1); | |
} finally { | |
if (e_1) throw e_1.error; | |
} | |
} | |
} | |
} else { | |
series = Object.entries(data); | |
if (overwrite && !Array.isArray(data)) { | |
try { | |
for ( | |
var series_2 = tslib_1.__values(series), | |
series_2_1 = series_2.next(); | |
!series_2_1.done; | |
series_2_1 = series_2.next() | |
) { | |
var _e = tslib_1.__read(series_2_1.value, 1), | |
key = _e[0]; | |
delete data[key]; | |
} | |
} catch (e_2_1) { | |
e_2 = {error: e_2_1}; | |
} finally { | |
try { | |
if (series_2_1 && !series_2_1.done && (_b = series_2.return)) | |
_b.call(series_2); | |
} finally { | |
if (e_2) throw e_2.error; | |
} | |
} | |
} | |
} | |
try { | |
for ( | |
var series_3 = tslib_1.__values(series), series_3_1 = series_3.next(); | |
!series_3_1.done; | |
series_3_1 = series_3.next() | |
) { | |
var _f = tslib_1.__read(series_3_1.value, 2), | |
key = _f[0], | |
value = _f[1]; | |
if ( | |
(0, util_1.isFormData)(store) || | |
(0, util_1.isURLSearchParams)(store) | |
) { | |
store.append(fn(key), value); | |
} else if (key !== "__proto__") { | |
store[Array.isArray(data) ? Number(key) : fn("".concat(key))] = | |
transformObjectUsingCallbackRecursive(value, fn, overwrite); | |
} | |
} | |
} catch (e_3_1) { | |
e_3 = {error: e_3_1}; | |
} finally { | |
try { | |
if (series_3_1 && !series_3_1.done && (_c = series_3.return)) | |
_c.call(series_3); | |
} finally { | |
if (e_3) throw e_3.error; | |
} | |
} | |
return store; | |
}; | |
var transformObjectUsingCallback = function (data, fn, options) { | |
fn = (0, decorators_1.applyCaseOptions)( | |
fn, | |
tslib_1.__assign( | |
{stripRegexp: /[^A-Z0-9[\]]+/gi}, | |
options === null || options === void 0 ? void 0 : options.caseOptions | |
) | |
); | |
if ( | |
options === null || options === void 0 ? void 0 : options.preservedKeys | |
) { | |
fn = (0, decorators_1.preserveSpecificKeys)(fn, options.preservedKeys); | |
} | |
return transformObjectUsingCallbackRecursive( | |
data, | |
fn, | |
(options === null || options === void 0 ? void 0 : options.overwrite) || | |
false | |
); | |
}; | |
var createObjectTransformer = function (fn) { | |
return function (data, options) { | |
return transformObjectUsingCallback(data, fn, options); | |
}; | |
}; | |
exports2.createObjectTransformer = createObjectTransformer; | |
var createObjectTransformerOf = function (functionName, options) { | |
return (0, exports2.createObjectTransformer)( | |
(options === null || options === void 0 | |
? void 0 | |
: options[functionName]) || caseFunctions[functionName] | |
); | |
}; | |
exports2.createObjectTransformerOf = createObjectTransformerOf; | |
var createObjectTransformers = function (options) { | |
var e_4, _a; | |
var functionNames = Object.keys(caseFunctions); | |
var objectTransformers = {}; | |
try { | |
for ( | |
var functionNames_1 = tslib_1.__values(functionNames), | |
functionNames_1_1 = functionNames_1.next(); | |
!functionNames_1_1.done; | |
functionNames_1_1 = functionNames_1.next() | |
) { | |
var functionName = functionNames_1_1.value; | |
objectTransformers[functionName] = (0, | |
exports2.createObjectTransformerOf)(functionName, options); | |
} | |
} catch (e_4_1) { | |
e_4 = {error: e_4_1}; | |
} finally { | |
try { | |
if ( | |
functionNames_1_1 && | |
!functionNames_1_1.done && | |
(_a = functionNames_1.return) | |
) | |
_a.call(functionNames_1); | |
} finally { | |
if (e_4) throw e_4.error; | |
} | |
} | |
return objectTransformers; | |
}; | |
exports2.createObjectTransformers = createObjectTransformers; | |
}, | |
}); | |
// node_modules/axios-case-converter/lib/middleware.js | |
var require_middleware = __commonJS({ | |
"node_modules/axios-case-converter/lib/middleware.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
exports2.applyCaseMiddleware = | |
exports2.createCamelResponseTransformer = | |
exports2.createSnakeRequestTransformer = | |
exports2.createSnakeParamsInterceptor = | |
void 0; | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var transformers_1 = require_transformers(); | |
var util_1 = require_util2(); | |
var createSnakeParamsInterceptor = function (options) { | |
var snake = (0, transformers_1.createObjectTransformers)( | |
options === null || options === void 0 ? void 0 : options.caseFunctions | |
).snake; | |
return function (config) { | |
if ( | |
!(options === null || options === void 0 | |
? void 0 | |
: options.ignoreParams) && | |
config.params | |
) { | |
config.params = snake(config.params, options); | |
} | |
return config; | |
}; | |
}; | |
exports2.createSnakeParamsInterceptor = createSnakeParamsInterceptor; | |
var createSnakeRequestTransformer = function (options) { | |
var _a = (0, transformers_1.createObjectTransformers)( | |
options === null || options === void 0 | |
? void 0 | |
: options.caseFunctions | |
), | |
snake = _a.snake, | |
header = _a.header; | |
return function (data, headers) { | |
overwriteHeadersOrNoop(headers, header, options, [ | |
"common", | |
"delete", | |
"get", | |
"head", | |
"post", | |
"put", | |
"patch", | |
]); | |
return snake(data, options); | |
}; | |
}; | |
exports2.createSnakeRequestTransformer = createSnakeRequestTransformer; | |
var createCamelResponseTransformer = function (options) { | |
var camel = (0, transformers_1.createObjectTransformers)( | |
options === null || options === void 0 ? void 0 : options.caseFunctions | |
).camel; | |
return function (data, headers) { | |
overwriteHeadersOrNoop(headers, camel, options); | |
return camel(data, options); | |
}; | |
}; | |
exports2.createCamelResponseTransformer = createCamelResponseTransformer; | |
var overwriteHeadersOrNoop = function (headers, fn, options, excludedKeys) { | |
var e_1, _a, _b, _c; | |
if ( | |
(options === null || options === void 0 | |
? void 0 | |
: options.ignoreHeaders) || | |
(!(0, util_1.isPlainObject)(headers) && | |
!(0, util_1.isAxiosHeaders)(headers)) | |
) { | |
return; | |
} | |
try { | |
for ( | |
var _d = tslib_1.__values(Object.entries(headers)), _e = _d.next(); | |
!_e.done; | |
_e = _d.next() | |
) { | |
var _f = tslib_1.__read(_e.value, 2), | |
key = _f[0], | |
value = _f[1]; | |
fn(value, tslib_1.__assign({overwrite: true}, options)); | |
if ((excludedKeys || []).includes(key)) { | |
continue; | |
} | |
if ((0, util_1.isAxiosHeaders)(headers)) { | |
headers.delete(key); | |
headers.set( | |
Object.keys(fn(((_b = {}), (_b[key] = null), _b), options))[0], | |
value, | |
true | |
); | |
} else { | |
delete headers[key]; | |
headers[ | |
Object.keys(fn(((_c = {}), (_c[key] = null), _c), options))[0] | |
] = value; | |
} | |
} | |
} catch (e_1_1) { | |
e_1 = {error: e_1_1}; | |
} finally { | |
try { | |
if (_e && !_e.done && (_a = _d.return)) _a.call(_d); | |
} finally { | |
if (e_1) throw e_1.error; | |
} | |
} | |
}; | |
var applyCaseMiddleware2 = function (axios2, options) { | |
var _a, _b, _c; | |
axios2.defaults.transformRequest = tslib_1.__spreadArray( | |
[ | |
((_a = | |
options === null || options === void 0 | |
? void 0 | |
: options.caseMiddleware) === null || _a === void 0 | |
? void 0 | |
: _a.requestTransformer) || | |
(0, exports2.createSnakeRequestTransformer)(options), | |
], | |
tslib_1.__read( | |
Array.isArray(axios2.defaults.transformRequest) | |
? axios2.defaults.transformRequest | |
: axios2.defaults.transformRequest !== void 0 | |
? [axios2.defaults.transformRequest] | |
: [] | |
), | |
false | |
); | |
axios2.defaults.transformResponse = tslib_1.__spreadArray( | |
tslib_1.__spreadArray( | |
[], | |
tslib_1.__read( | |
Array.isArray(axios2.defaults.transformResponse) | |
? axios2.defaults.transformResponse | |
: axios2.defaults.transformResponse !== void 0 | |
? [axios2.defaults.transformResponse] | |
: [] | |
), | |
false | |
), | |
[ | |
((_b = | |
options === null || options === void 0 | |
? void 0 | |
: options.caseMiddleware) === null || _b === void 0 | |
? void 0 | |
: _b.responseTransformer) || | |
(0, exports2.createCamelResponseTransformer)(options), | |
], | |
false | |
); | |
axios2.interceptors.request.use( | |
((_c = | |
options === null || options === void 0 | |
? void 0 | |
: options.caseMiddleware) === null || _c === void 0 | |
? void 0 | |
: _c.requestInterceptor) || | |
(0, exports2.createSnakeParamsInterceptor)(options) | |
); | |
return axios2; | |
}; | |
exports2.applyCaseMiddleware = applyCaseMiddleware2; | |
}, | |
}); | |
// node_modules/axios-case-converter/lib/types.js | |
var require_types = __commonJS({ | |
"node_modules/axios-case-converter/lib/types.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
}, | |
}); | |
// node_modules/axios-case-converter/lib/index.js | |
var require_lib2 = __commonJS({ | |
"node_modules/axios-case-converter/lib/index.js"(exports2) { | |
"use strict"; | |
Object.defineProperty(exports2, "__esModule", {value: true}); | |
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); | |
var middleware_1 = require_middleware(); | |
exports2.default = middleware_1.applyCaseMiddleware; | |
tslib_1.__exportStar(require_types(), exports2); | |
}, | |
}); | |
// node_modules/ts-custom-error/dist/custom-error.js | |
var require_custom_error = __commonJS({ | |
"node_modules/ts-custom-error/dist/custom-error.js"(exports2) { | |
function fixProto(target, prototype3) { | |
var setPrototypeOf = Object.setPrototypeOf; | |
setPrototypeOf | |
? setPrototypeOf(target, prototype3) | |
: (target.__proto__ = prototype3); | |
} | |
function fixStack(target, fn) { | |
if (fn === void 0) { | |
fn = target.constructor; | |
} | |
var captureStackTrace = Error.captureStackTrace; | |
captureStackTrace && captureStackTrace(target, fn); | |
} | |
var __extends2 = /* @__PURE__ */ (function () { | |
var extendStatics2 = function (d, b) { | |
extendStatics2 = | |
Object.setPrototypeOf || | |
({ | |
__proto__: [], | |
} instanceof Array && | |
function (d2, b2) { | |
d2.__proto__ = b2; | |
}) || | |
function (d2, b2) { | |
for (var p in b2) { | |
if (b2.hasOwnProperty(p)) { | |
d2[p] = b2[p]; | |
} | |
} | |
}; | |
return extendStatics2(d, b); | |
}; | |
return function (d, b) { | |
extendStatics2(d, b); | |
function __() { | |
this.constructor = d; | |
} | |
d.prototype = | |
b === null | |
? Object.create(b) | |
: ((__.prototype = b.prototype), new __()); | |
}; | |
})(); | |
var CustomError2 = (function (_super) { | |
__extends2(CustomError3, _super); | |
function CustomError3(message) { | |
var _newTarget = this.constructor; | |
var _this = _super.call(this, message) || this; | |
Object.defineProperty(_this, "name", { | |
value: _newTarget.name, | |
enumerable: false, | |
configurable: true, | |
}); | |
fixProto(_this, _newTarget.prototype); | |
fixStack(_this); | |
return _this; | |
} | |
return CustomError3; | |
})(Error); | |
var __spreadArrays2 = function () { | |
var arguments$1 = arguments; | |
for (var s = 0, i = 0, il = arguments.length; i < il; i++) { | |
s += arguments$1[i].length; | |
} | |
for (var r = Array(s), k = 0, i = 0; i < il; i++) { | |
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) { | |
r[k] = a[j]; | |
} | |
} | |
return r; | |
}; | |
function customErrorFactory(fn, parent) { | |
if (parent === void 0) { | |
parent = Error; | |
} | |
function CustomError3() { | |
var arguments$1 = arguments; | |
var args = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
args[_i] = arguments$1[_i]; | |
} | |
if (!(this instanceof CustomError3)) { | |
return new (CustomError3.bind.apply( | |
CustomError3, | |
__spreadArrays2([void 0], args) | |
))(); | |
} | |
parent.apply(this, args); | |
Object.defineProperty(this, "name", { | |
value: fn.name || parent.name, | |
enumerable: false, | |
configurable: true, | |
}); | |
fn.apply(this, args); | |
fixStack(this, CustomError3); | |
} | |
return Object.defineProperties(CustomError3, { | |
prototype: { | |
value: Object.create(parent.prototype, { | |
constructor: { | |
value: CustomError3, | |
writable: true, | |
configurable: true, | |
}, | |
}), | |
}, | |
}); | |
} | |
exports2.CustomError = CustomError2; | |
exports2.customErrorFactory = customErrorFactory; | |
}, | |
}); | |
// node_modules/is-retry-allowed/index.js | |
var require_is_retry_allowed = __commonJS({ | |
"node_modules/is-retry-allowed/index.js"(exports2, module2) { | |
"use strict"; | |
var denyList = /* @__PURE__ */ new Set([ | |
"ENOTFOUND", | |
"ENETUNREACH", | |
// SSL errors from https://github.com/nodejs/node/blob/fc8e3e2cdc521978351de257030db0076d79e0ab/src/crypto/crypto_common.cc#L301-L328 | |
"UNABLE_TO_GET_ISSUER_CERT", | |
"UNABLE_TO_GET_CRL", | |
"UNABLE_TO_DECRYPT_CERT_SIGNATURE", | |
"UNABLE_TO_DECRYPT_CRL_SIGNATURE", | |
"UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY", | |
"CERT_SIGNATURE_FAILURE", | |
"CRL_SIGNATURE_FAILURE", | |
"CERT_NOT_YET_VALID", | |
"CERT_HAS_EXPIRED", | |
"CRL_NOT_YET_VALID", | |
"CRL_HAS_EXPIRED", | |
"ERROR_IN_CERT_NOT_BEFORE_FIELD", | |
"ERROR_IN_CERT_NOT_AFTER_FIELD", | |
"ERROR_IN_CRL_LAST_UPDATE_FIELD", | |
"ERROR_IN_CRL_NEXT_UPDATE_FIELD", | |
"OUT_OF_MEM", | |
"DEPTH_ZERO_SELF_SIGNED_CERT", | |
"SELF_SIGNED_CERT_IN_CHAIN", | |
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY", | |
"UNABLE_TO_VERIFY_LEAF_SIGNATURE", | |
"CERT_CHAIN_TOO_LONG", | |
"CERT_REVOKED", | |
"INVALID_CA", | |
"PATH_LENGTH_EXCEEDED", | |
"INVALID_PURPOSE", | |
"CERT_UNTRUSTED", | |
"CERT_REJECTED", | |
"HOSTNAME_MISMATCH", | |
]); | |
module2.exports = (error) => !denyList.has(error && error.code); | |
}, | |
}); | |
// src/index.ts | |
var src_exports = {}; | |
__export(src_exports, { | |
TodoistApi: () => TodoistApi, | |
}); | |
// module.exports = __toCommonJS(src_exports); | |
// src/TodoistApi.ts | |
var import_runtypes2 = __toESM(require_lib()); | |
// node_modules/axios/lib/helpers/bind.js | |
function bind(fn, thisArg) { | |
return function wrap() { | |
return fn.apply(thisArg, arguments); | |
}; | |
} | |
// node_modules/axios/lib/utils.js | |
var {toString} = Object.prototype; | |
var {getPrototypeOf} = Object; | |
var kindOf = /* @__PURE__ */ ((cache) => (thing) => { | |
const str = toString.call(thing); | |
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); | |
})(/* @__PURE__ */ Object.create(null)); | |
var kindOfTest = (type) => { | |
type = type.toLowerCase(); | |
return (thing) => kindOf(thing) === type; | |
}; | |
var typeOfTest = (type) => (thing) => typeof thing === type; | |
var {isArray} = Array; | |
var isUndefined = typeOfTest("undefined"); | |
function isBuffer(val) { | |
return ( | |
val !== null && | |
!isUndefined(val) && | |
val.constructor !== null && | |
!isUndefined(val.constructor) && | |
isFunction(val.constructor.isBuffer) && | |
val.constructor.isBuffer(val) | |
); | |
} | |
var isArrayBuffer = kindOfTest("ArrayBuffer"); | |
function isArrayBufferView(val) { | |
let result; | |
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { | |
result = ArrayBuffer.isView(val); | |
} else { | |
result = val && val.buffer && isArrayBuffer(val.buffer); | |
} | |
return result; | |
} | |
var isString = typeOfTest("string"); | |
var isFunction = typeOfTest("function"); | |
var isNumber = typeOfTest("number"); | |
var isObject = (thing) => thing !== null && typeof thing === "object"; | |
var isBoolean = (thing) => thing === true || thing === false; | |
var isPlainObject = (val) => { | |
if (kindOf(val) !== "object") { | |
return false; | |
} | |
const prototype3 = getPrototypeOf(val); | |
return ( | |
(prototype3 === null || | |
prototype3 === Object.prototype || | |
Object.getPrototypeOf(prototype3) === null) && | |
!(Symbol.toStringTag in val) && | |
!(Symbol.iterator in val) | |
); | |
}; | |
var isDate = kindOfTest("Date"); | |
var isFile = kindOfTest("File"); | |
var isBlob = kindOfTest("Blob"); | |
var isFileList = kindOfTest("FileList"); | |
var isStream = (val) => isObject(val) && isFunction(val.pipe); | |
var isFormData = (thing) => { | |
let kind; | |
return ( | |
thing && | |
((typeof FormData === "function" && thing instanceof FormData) || | |
(isFunction(thing.append) && | |
((kind = kindOf(thing)) === "formdata" || // detect form-data instance | |
(kind === "object" && | |
isFunction(thing.toString) && | |
thing.toString() === "[object FormData]")))) | |
); | |
}; | |
var isURLSearchParams = kindOfTest("URLSearchParams"); | |
var trim = (str) => | |
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); | |
function forEach(obj, fn, {allOwnKeys = false} = {}) { | |
if (obj === null || typeof obj === "undefined") { | |
return; | |
} | |
let i; | |
let l; | |
if (typeof obj !== "object") { | |
obj = [obj]; | |
} | |
if (isArray(obj)) { | |
for (i = 0, l = obj.length; i < l; i++) { | |
fn.call(null, obj[i], i, obj); | |
} | |
} else { | |
const keys = allOwnKeys | |
? Object.getOwnPropertyNames(obj) | |
: Object.keys(obj); | |
const len = keys.length; | |
let key; | |
for (i = 0; i < len; i++) { | |
key = keys[i]; | |
fn.call(null, obj[key], key, obj); | |
} | |
} | |
} | |
function findKey(obj, key) { | |
key = key.toLowerCase(); | |
const keys = Object.keys(obj); | |
let i = keys.length; | |
let _key; | |
while (i-- > 0) { | |
_key = keys[i]; | |
if (key === _key.toLowerCase()) { | |
return _key; | |
} | |
} | |
return null; | |
} | |
var _global = (() => { | |
if (typeof globalThis !== "undefined") return globalThis; | |
return typeof self !== "undefined" | |
? self | |
: typeof window !== "undefined" | |
? window | |
: global; | |
})(); | |
var isContextDefined = (context) => | |
!isUndefined(context) && context !== _global; | |
function merge() { | |
const {caseless} = (isContextDefined(this) && this) || {}; | |
const result = {}; | |
const assignValue = (val, key) => { | |
const targetKey = (caseless && findKey(result, key)) || key; | |
if (isPlainObject(result[targetKey]) && isPlainObject(val)) { | |
result[targetKey] = merge(result[targetKey], val); | |
} else if (isPlainObject(val)) { | |
result[targetKey] = merge({}, val); | |
} else if (isArray(val)) { | |
result[targetKey] = val.slice(); | |
} else { | |
result[targetKey] = val; | |
} | |
}; | |
for (let i = 0, l = arguments.length; i < l; i++) { | |
arguments[i] && forEach(arguments[i], assignValue); | |
} | |
return result; | |
} | |
var extend = (a, b, thisArg, {allOwnKeys} = {}) => { | |
forEach( | |
b, | |
(val, key) => { | |
if (thisArg && isFunction(val)) { | |
a[key] = bind(val, thisArg); | |
} else { | |
a[key] = val; | |
} | |
}, | |
{allOwnKeys} | |
); | |
return a; | |
}; | |
var stripBOM = (content) => { | |
if (content.charCodeAt(0) === 65279) { | |
content = content.slice(1); | |
} | |
return content; | |
}; | |
var inherits = (constructor, superConstructor, props, descriptors2) => { | |
constructor.prototype = Object.create( | |
superConstructor.prototype, | |
descriptors2 | |
); | |
constructor.prototype.constructor = constructor; | |
Object.defineProperty(constructor, "super", { | |
value: superConstructor.prototype, | |
}); | |
props && Object.assign(constructor.prototype, props); | |
}; | |
var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { | |
let props; | |
let i; | |
let prop; | |
const merged = {}; | |
destObj = destObj || {}; | |
if (sourceObj == null) return destObj; | |
do { | |
props = Object.getOwnPropertyNames(sourceObj); | |
i = props.length; | |
while (i-- > 0) { | |
prop = props[i]; | |
if ( | |
(!propFilter || propFilter(prop, sourceObj, destObj)) && | |
!merged[prop] | |
) { | |
destObj[prop] = sourceObj[prop]; | |
merged[prop] = true; | |
} | |
} | |
sourceObj = filter2 !== false && getPrototypeOf(sourceObj); | |
} while ( | |
sourceObj && | |
(!filter2 || filter2(sourceObj, destObj)) && | |
sourceObj !== Object.prototype | |
); | |
return destObj; | |
}; | |
var endsWith = (str, searchString, position) => { | |
str = String(str); | |
if (position === void 0 || position > str.length) { | |
position = str.length; | |
} | |
position -= searchString.length; | |
const lastIndex = str.indexOf(searchString, position); | |
return lastIndex !== -1 && lastIndex === position; | |
}; | |
var toArray = (thing) => { | |
if (!thing) return null; | |
if (isArray(thing)) return thing; | |
let i = thing.length; | |
if (!isNumber(i)) return null; | |
const arr = new Array(i); | |
while (i-- > 0) { | |
arr[i] = thing[i]; | |
} | |
return arr; | |
}; | |
var isTypedArray = /* @__PURE__ */ ((TypedArray) => { | |
return (thing) => { | |
return TypedArray && thing instanceof TypedArray; | |
}; | |
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); | |
var forEachEntry = (obj, fn) => { | |
const generator = obj && obj[Symbol.iterator]; | |
const iterator = generator.call(obj); | |
let result; | |
while ((result = iterator.next()) && !result.done) { | |
const pair = result.value; | |
fn.call(obj, pair[0], pair[1]); | |
} | |
}; | |
var matchAll = (regExp, str) => { | |
let matches; | |
const arr = []; | |
while ((matches = regExp.exec(str)) !== null) { | |
arr.push(matches); | |
} | |
return arr; | |
}; | |
var isHTMLForm = kindOfTest("HTMLFormElement"); | |
var toCamelCase = (str) => { | |
return str | |
.toLowerCase() | |
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { | |
return p1.toUpperCase() + p2; | |
}); | |
}; | |
var hasOwnProperty = ( | |
({hasOwnProperty: hasOwnProperty2}) => | |
(obj, prop) => | |
hasOwnProperty2.call(obj, prop) | |
)(Object.prototype); | |
var isRegExp = kindOfTest("RegExp"); | |
var reduceDescriptors = (obj, reducer) => { | |
const descriptors2 = Object.getOwnPropertyDescriptors(obj); | |
const reducedDescriptors = {}; | |
forEach(descriptors2, (descriptor, name) => { | |
let ret; | |
if ((ret = reducer(descriptor, name, obj)) !== false) { | |
reducedDescriptors[name] = ret || descriptor; | |
} | |
}); | |
Object.defineProperties(obj, reducedDescriptors); | |
}; | |
var freezeMethods = (obj) => { | |
reduceDescriptors(obj, (descriptor, name) => { | |
if ( | |
isFunction(obj) && | |
["arguments", "caller", "callee"].indexOf(name) !== -1 | |
) { | |
return false; | |
} | |
const value = obj[name]; | |
if (!isFunction(value)) return; | |
descriptor.enumerable = false; | |
if ("writable" in descriptor) { | |
descriptor.writable = false; | |
return; | |
} | |
if (!descriptor.set) { | |
descriptor.set = () => { | |
throw Error("Can not rewrite read-only method '" + name + "'"); | |
}; | |
} | |
}); | |
}; | |
var toObjectSet = (arrayOrString, delimiter) => { | |
const obj = {}; | |
const define = (arr) => { | |
arr.forEach((value) => { | |
obj[value] = true; | |
}); | |
}; | |
isArray(arrayOrString) | |
? define(arrayOrString) | |
: define(String(arrayOrString).split(delimiter)); | |
return obj; | |
}; | |
var noop = () => {}; | |
var toFiniteNumber = (value, defaultValue) => { | |
value = +value; | |
return Number.isFinite(value) ? value : defaultValue; | |
}; | |
var ALPHA = "abcdefghijklmnopqrstuvwxyz"; | |
var DIGIT = "0123456789"; | |
var ALPHABET = { | |
DIGIT, | |
ALPHA, | |
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT, | |
}; | |
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { | |
let str = ""; | |
const {length} = alphabet; | |
while (size--) { | |
str += alphabet[(Math.random() * length) | 0]; | |
} | |
return str; | |
}; | |
function isSpecCompliantForm(thing) { | |
return !!( | |
thing && | |
isFunction(thing.append) && | |
thing[Symbol.toStringTag] === "FormData" && | |
thing[Symbol.iterator] | |
); | |
} | |
var toJSONObject = (obj) => { | |
const stack = new Array(10); | |
const visit = (source, i) => { | |
if (isObject(source)) { | |
if (stack.indexOf(source) >= 0) { | |
return; | |
} | |
if (!("toJSON" in source)) { | |
stack[i] = source; | |
const target = isArray(source) ? [] : {}; | |
forEach(source, (value, key) => { | |
const reducedValue = visit(value, i + 1); | |
!isUndefined(reducedValue) && (target[key] = reducedValue); | |
}); | |
stack[i] = void 0; | |
return target; | |
} | |
} | |
return source; | |
}; | |
return visit(obj, 0); | |
}; | |
var isAsyncFn = kindOfTest("AsyncFunction"); | |
var isThenable = (thing) => | |
thing && | |
(isObject(thing) || isFunction(thing)) && | |
isFunction(thing.then) && | |
isFunction(thing.catch); | |
var utils_default = { | |
isArray, | |
isArrayBuffer, | |
isBuffer, | |
isFormData, | |
isArrayBufferView, | |
isString, | |
isNumber, | |
isBoolean, | |
isObject, | |
isPlainObject, | |
isUndefined, | |
isDate, | |
isFile, | |
isBlob, | |
isRegExp, | |
isFunction, | |
isStream, | |
isURLSearchParams, | |
isTypedArray, | |
isFileList, | |
forEach, | |
merge, | |
extend, | |
trim, | |
stripBOM, | |
inherits, | |
toFlatObject, | |
kindOf, | |
kindOfTest, | |
endsWith, | |
toArray, | |
forEachEntry, | |
matchAll, | |
isHTMLForm, | |
hasOwnProperty, | |
hasOwnProp: hasOwnProperty, | |
// an alias to avoid ESLint no-prototype-builtins detection | |
reduceDescriptors, | |
freezeMethods, | |
toObjectSet, | |
toCamelCase, | |
noop, | |
toFiniteNumber, | |
findKey, | |
global: _global, | |
isContextDefined, | |
ALPHABET, | |
generateString, | |
isSpecCompliantForm, | |
toJSONObject, | |
isAsyncFn, | |
isThenable, | |
}; | |
// node_modules/axios/lib/core/AxiosError.js | |
function AxiosError(message, code, config, request2, response) { | |
Error.call(this); | |
if (Error.captureStackTrace) { | |
Error.captureStackTrace(this, this.constructor); | |
} else { | |
this.stack = new Error().stack; | |
} | |
this.message = message; | |
this.name = "AxiosError"; | |
code && (this.code = code); | |
config && (this.config = config); | |
request2 && (this.request = request2); | |
response && (this.response = response); | |
} | |
utils_default.inherits(AxiosError, Error, { | |
toJSON: function toJSON() { | |
return { | |
// Standard | |
message: this.message, | |
name: this.name, | |
// Microsoft | |
description: this.description, | |
number: this.number, | |
// Mozilla | |
fileName: this.fileName, | |
lineNumber: this.lineNumber, | |
columnNumber: this.columnNumber, | |
stack: this.stack, | |
// Axios | |
config: utils_default.toJSONObject(this.config), | |
code: this.code, | |
status: | |
this.response && this.response.status ? this.response.status : null, | |
}; | |
}, | |
}); | |
var prototype = AxiosError.prototype; | |
var descriptors = {}; | |
[ | |
"ERR_BAD_OPTION_VALUE", | |
"ERR_BAD_OPTION", | |
"ECONNABORTED", | |
"ETIMEDOUT", | |
"ERR_NETWORK", | |
"ERR_FR_TOO_MANY_REDIRECTS", | |
"ERR_DEPRECATED", | |
"ERR_BAD_RESPONSE", | |
"ERR_BAD_REQUEST", | |
"ERR_CANCELED", | |
"ERR_NOT_SUPPORT", | |
"ERR_INVALID_URL", | |
// eslint-disable-next-line func-names | |
].forEach((code) => { | |
descriptors[code] = {value: code}; | |
}); | |
Object.defineProperties(AxiosError, descriptors); | |
Object.defineProperty(prototype, "isAxiosError", {value: true}); | |
AxiosError.from = (error, code, config, request2, response, customProps) => { | |
const axiosError = Object.create(prototype); | |
utils_default.toFlatObject( | |
error, | |
axiosError, | |
function filter2(obj) { | |
return obj !== Error.prototype; | |
}, | |
(prop) => { | |
return prop !== "isAxiosError"; | |
} | |
); | |
AxiosError.call(axiosError, error.message, code, config, request2, response); | |
axiosError.cause = error; | |
axiosError.name = error.name; | |
customProps && Object.assign(axiosError, customProps); | |
return axiosError; | |
}; | |
var AxiosError_default = AxiosError; | |
// node_modules/axios/lib/platform/node/classes/FormData.js | |
var import_form_data = __toESM(require_form_data(), 1); | |
var FormData_default = import_form_data.default; | |
// node_modules/axios/lib/helpers/toFormData.js | |
function isVisitable(thing) { | |
return utils_default.isPlainObject(thing) || utils_default.isArray(thing); | |
} | |
function removeBrackets(key) { | |
return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; | |
} | |
function renderKey(path, key, dots) { | |
if (!path) return key; | |
return path | |
.concat(key) | |
.map(function each(token, i) { | |
token = removeBrackets(token); | |
return !dots && i ? "[" + token + "]" : token; | |
}) | |
.join(dots ? "." : ""); | |
} | |
function isFlatArray(arr) { | |
return utils_default.isArray(arr) && !arr.some(isVisitable); | |
} | |
var predicates = utils_default.toFlatObject( | |
utils_default, | |
{}, | |
null, | |
function filter(prop) { | |
return /^is[A-Z]/.test(prop); | |
} | |
); | |
function toFormData(obj, formData, options) { | |
if (!utils_default.isObject(obj)) { | |
throw new TypeError("target must be an object"); | |
} | |
formData = formData || new (FormData_default || FormData)(); | |
options = utils_default.toFlatObject( | |
options, | |
{ | |
metaTokens: true, | |
dots: false, | |
indexes: false, | |
}, | |
false, | |
function defined(option, source) { | |
return !utils_default.isUndefined(source[option]); | |
} | |
); | |
const metaTokens = options.metaTokens; | |
const visitor = options.visitor || defaultVisitor; | |
const dots = options.dots; | |
const indexes = options.indexes; | |
const _Blob = options.Blob || (typeof Blob !== "undefined" && Blob); | |
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); | |
if (!utils_default.isFunction(visitor)) { | |
throw new TypeError("visitor must be a function"); | |
} | |
function convertValue(value) { | |
if (value === null) return ""; | |
if (utils_default.isDate(value)) { | |
return value.toISOString(); | |
} | |
if (!useBlob && utils_default.isBlob(value)) { | |
throw new AxiosError_default( | |
"Blob is not supported. Use a Buffer instead." | |
); | |
} | |
if ( | |
utils_default.isArrayBuffer(value) || | |
utils_default.isTypedArray(value) | |
) { | |
return useBlob && typeof Blob === "function" | |
? new Blob([value]) | |
: Buffer.from(value); | |
} | |
return value; | |
} | |
function defaultVisitor(value, key, path) { | |
let arr = value; | |
if (value && !path && typeof value === "object") { | |
if (utils_default.endsWith(key, "{}")) { | |
key = metaTokens ? key : key.slice(0, -2); | |
value = JSON.stringify(value); | |
} else if ( | |
(utils_default.isArray(value) && isFlatArray(value)) || | |
((utils_default.isFileList(value) || | |
utils_default.endsWith(key, "[]")) && | |
(arr = utils_default.toArray(value))) | |
) { | |
key = removeBrackets(key); | |
arr.forEach(function each(el, index) { | |
!(utils_default.isUndefined(el) || el === null) && | |
formData.append( | |
// eslint-disable-next-line no-nested-ternary | |
indexes === true | |
? renderKey([key], index, dots) | |
: indexes === null | |
? key | |
: key + "[]", | |
convertValue(el) | |
); | |
}); | |
return false; | |
} | |
} | |
if (isVisitable(value)) { | |
return true; | |
} | |
formData.append(renderKey(path, key, dots), convertValue(value)); | |
return false; | |
} | |
const stack = []; | |
const exposedHelpers = Object.assign(predicates, { | |
defaultVisitor, | |
convertValue, | |
isVisitable, | |
}); | |
function build(value, path) { | |
if (utils_default.isUndefined(value)) return; | |
if (stack.indexOf(value) !== -1) { | |
throw Error("Circular reference detected in " + path.join(".")); | |
} | |
stack.push(value); | |
utils_default.forEach(value, function each(el, key) { | |
const result = | |
!(utils_default.isUndefined(el) || el === null) && | |
visitor.call( | |
formData, | |
el, | |
utils_default.isString(key) ? key.trim() : key, | |
path, | |
exposedHelpers | |
); | |
if (result === true) { | |
build(el, path ? path.concat(key) : [key]); | |
} | |
}); | |
stack.pop(); | |
} | |
if (!utils_default.isObject(obj)) { | |
throw new TypeError("data must be an object"); | |
} | |
build(obj); | |
return formData; | |
} | |
var toFormData_default = toFormData; | |
// node_modules/axios/lib/helpers/AxiosURLSearchParams.js | |
function encode(str) { | |
const charMap = { | |
"!": "%21", | |
"'": "%27", | |
"(": "%28", | |
")": "%29", | |
"~": "%7E", | |
"%20": "+", | |
"%00": "\0", | |
}; | |
return encodeURIComponent(str).replace( | |
/[!'()~]|%20|%00/g, | |
function replacer(match) { | |
return charMap[match]; | |
} | |
); | |
} | |
function AxiosURLSearchParams(params, options) { | |
this._pairs = []; | |
params && toFormData_default(params, this, options); | |
} | |
var prototype2 = AxiosURLSearchParams.prototype; | |
prototype2.append = function append(name, value) { | |
this._pairs.push([name, value]); | |
}; | |
prototype2.toString = function toString2(encoder) { | |
const _encode = encoder | |
? function (value) { | |
return encoder.call(this, value, encode); | |
} | |
: encode; | |
return this._pairs | |
.map(function each(pair) { | |
return _encode(pair[0]) + "=" + _encode(pair[1]); | |
}, "") | |
.join("&"); | |
}; | |
var AxiosURLSearchParams_default = AxiosURLSearchParams; | |
// node_modules/axios/lib/helpers/buildURL.js | |
function encode2(val) { | |
return encodeURIComponent(val) | |
.replace(/%3A/gi, ":") | |
.replace(/%24/g, "$") | |
.replace(/%2C/gi, ",") | |
.replace(/%20/g, "+") | |
.replace(/%5B/gi, "[") | |
.replace(/%5D/gi, "]"); | |
} | |
function buildURL(url2, params, options) { | |
if (!params) { | |
return url2; | |
} | |
const _encode = (options && options.encode) || encode2; | |
const serializeFn = options && options.serialize; | |
let serializedParams; | |
if (serializeFn) { | |
serializedParams = serializeFn(params, options); | |
} else { | |
serializedParams = utils_default.isURLSearchParams(params) | |
? params.toString() | |
: new AxiosURLSearchParams_default(params, options).toString(_encode); | |
} | |
if (serializedParams) { | |
const hashmarkIndex = url2.indexOf("#"); | |
if (hashmarkIndex !== -1) { | |
url2 = url2.slice(0, hashmarkIndex); | |
} | |
url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; | |
} | |
return url2; | |
} | |
// node_modules/axios/lib/core/InterceptorManager.js | |
var InterceptorManager = class { | |
constructor() { | |
this.handlers = []; | |
} | |
/** | |
* Add a new interceptor to the stack | |
* | |
* @param {Function} fulfilled The function to handle `then` for a `Promise` | |
* @param {Function} rejected The function to handle `reject` for a `Promise` | |
* | |
* @return {Number} An ID used to remove interceptor later | |
*/ | |
use(fulfilled, rejected, options) { | |
this.handlers.push({ | |
fulfilled, | |
rejected, | |
synchronous: options ? options.synchronous : false, | |
runWhen: options ? options.runWhen : null, | |
}); | |
return this.handlers.length - 1; | |
} | |
/** | |
* Remove an interceptor from the stack | |
* | |
* @param {Number} id The ID that was returned by `use` | |
* | |
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise | |
*/ | |
eject(id) { | |
if (this.handlers[id]) { | |
this.handlers[id] = null; | |
} | |
} | |
/** | |
* Clear all interceptors from the stack | |
* | |
* @returns {void} | |
*/ | |
clear() { | |
if (this.handlers) { | |
this.handlers = []; | |
} | |
} | |
/** | |
* Iterate over all the registered interceptors | |
* | |
* This method is particularly useful for skipping over any | |
* interceptors that may have become `null` calling `eject`. | |
* | |
* @param {Function} fn The function to call for each interceptor | |
* | |
* @returns {void} | |
*/ | |
forEach(fn) { | |
utils_default.forEach(this.handlers, function forEachHandler(h) { | |
if (h !== null) { | |
fn(h); | |
} | |
}); | |
} | |
}; | |
var InterceptorManager_default = InterceptorManager; | |
// node_modules/axios/lib/defaults/transitional.js | |
var transitional_default = { | |
silentJSONParsing: true, | |
forcedJSONParsing: true, | |
clarifyTimeoutError: false, | |
}; | |
// node_modules/axios/lib/platform/node/classes/URLSearchParams.js | |
var import_url = __toESM(require("url"), 1); | |
var URLSearchParams_default = import_url.default.URLSearchParams; | |
// node_modules/axios/lib/platform/node/index.js | |
var node_default = { | |
isNode: true, | |
classes: { | |
URLSearchParams: URLSearchParams_default, | |
FormData: FormData_default, | |
Blob: (typeof Blob !== "undefined" && Blob) || null, | |
}, | |
protocols: ["http", "https", "file", "data"], | |
}; | |
// node_modules/axios/lib/helpers/toURLEncodedForm.js | |
function toURLEncodedForm(data, options) { | |
return toFormData_default( | |
data, | |
new node_default.classes.URLSearchParams(), | |
Object.assign( | |
{ | |
visitor: function (value, key, path, helpers) { | |
if (node_default.isNode && utils_default.isBuffer(value)) { | |
this.append(key, value.toString("base64")); | |
return false; | |
} | |
return helpers.defaultVisitor.apply(this, arguments); | |
}, | |
}, | |
options | |
) | |
); | |
} | |
// node_modules/axios/lib/helpers/formDataToJSON.js | |
function parsePropPath(name) { | |
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => { | |
return match[0] === "[]" ? "" : match[1] || match[0]; | |
}); | |
} | |
function arrayToObject(arr) { | |
const obj = {}; | |
const keys = Object.keys(arr); | |
let i; | |
const len = keys.length; | |
let key; | |
for (i = 0; i < len; i++) { | |
key = keys[i]; | |
obj[key] = arr[key]; | |
} | |
return obj; | |
} | |
function formDataToJSON(formData) { | |
function buildPath(path, value, target, index) { | |
let name = path[index++]; | |
const isNumericKey = Number.isFinite(+name); | |
const isLast = index >= path.length; | |
name = !name && utils_default.isArray(target) ? target.length : name; | |
if (isLast) { | |
if (utils_default.hasOwnProp(target, name)) { | |
target[name] = [target[name], value]; | |
} else { | |
target[name] = value; | |
} | |
return !isNumericKey; | |
} | |
if (!target[name] || !utils_default.isObject(target[name])) { | |
target[name] = []; | |
} | |
const result = buildPath(path, value, target[name], index); | |
if (result && utils_default.isArray(target[name])) { | |
target[name] = arrayToObject(target[name]); | |
} | |
return !isNumericKey; | |
} | |
if ( | |
utils_default.isFormData(formData) && | |
utils_default.isFunction(formData.entries) | |
) { | |
const obj = {}; | |
utils_default.forEachEntry(formData, (name, value) => { | |
buildPath(parsePropPath(name), value, obj, 0); | |
}); | |
return obj; | |
} | |
return null; | |
} | |
var formDataToJSON_default = formDataToJSON; | |
// node_modules/axios/lib/defaults/index.js | |
function stringifySafely(rawValue, parser, encoder) { | |
if (utils_default.isString(rawValue)) { | |
try { | |
(parser || JSON.parse)(rawValue); | |
return utils_default.trim(rawValue); | |
} catch (e) { | |
if (e.name !== "SyntaxError") { | |
throw e; | |
} | |
} | |
} | |
return (encoder || JSON.stringify)(rawValue); | |
} | |
var defaults = { | |
transitional: transitional_default, | |
adapter: ["xhr", "http"], | |
transformRequest: [ | |
function transformRequest(data, headers) { | |
const contentType = headers.getContentType() || ""; | |
const hasJSONContentType = contentType.indexOf("application/json") > -1; | |
const isObjectPayload = utils_default.isObject(data); | |
if (isObjectPayload && utils_default.isHTMLForm(data)) { | |
data = new FormData(data); | |
} | |
const isFormData2 = utils_default.isFormData(data); | |
if (isFormData2) { | |
if (!hasJSONContentType) { | |
return data; | |
} | |
return hasJSONContentType | |
? JSON.stringify(formDataToJSON_default(data)) | |
: data; | |
} | |
if ( | |
utils_default.isArrayBuffer(data) || | |
utils_default.isBuffer(data) || | |
utils_default.isStream(data) || | |
utils_default.isFile(data) || | |
utils_default.isBlob(data) | |
) { | |
return data; | |
} | |
if (utils_default.isArrayBufferView(data)) { | |
return data.buffer; | |
} | |
if (utils_default.isURLSearchParams(data)) { | |
headers.setContentType( | |
"application/x-www-form-urlencoded;charset=utf-8", | |
false | |
); | |
return data.toString(); | |
} | |
let isFileList2; | |
if (isObjectPayload) { | |
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { | |
return toURLEncodedForm(data, this.formSerializer).toString(); | |
} | |
if ( | |
(isFileList2 = utils_default.isFileList(data)) || | |
contentType.indexOf("multipart/form-data") > -1 | |
) { | |
const _FormData = this.env && this.env.FormData; | |
return toFormData_default( | |
isFileList2 ? {"files[]": data} : data, | |
_FormData && new _FormData(), | |
this.formSerializer | |
); | |
} | |
} | |
if (isObjectPayload || hasJSONContentType) { | |
headers.setContentType("application/json", false); | |
return stringifySafely(data); | |
} | |
return data; | |
}, | |
], | |
transformResponse: [ | |
function transformResponse(data) { | |
const transitional2 = this.transitional || defaults.transitional; | |
const forcedJSONParsing = | |
transitional2 && transitional2.forcedJSONParsing; | |
const JSONRequested = this.responseType === "json"; | |
if ( | |
data && | |
utils_default.isString(data) && | |
((forcedJSONParsing && !this.responseType) || JSONRequested) | |
) { | |
const silentJSONParsing = | |
transitional2 && transitional2.silentJSONParsing; | |
const strictJSONParsing = !silentJSONParsing && JSONRequested; | |
try { | |
return JSON.parse(data); | |
} catch (e) { | |
if (strictJSONParsing) { | |
if (e.name === "SyntaxError") { | |
throw AxiosError_default.from( | |
e, | |
AxiosError_default.ERR_BAD_RESPONSE, | |
this, | |
null, | |
this.response | |
); | |
} | |
throw e; | |
} | |
} | |
} | |
return data; | |
}, | |
], | |
/** | |
* A timeout in milliseconds to abort a request. If set to 0 (default) a | |
* timeout is not created. | |
*/ | |
timeout: 0, | |
xsrfCookieName: "XSRF-TOKEN", | |
xsrfHeaderName: "X-XSRF-TOKEN", | |
maxContentLength: -1, | |
maxBodyLength: -1, | |
env: { | |
FormData: node_default.classes.FormData, | |
Blob: node_default.classes.Blob, | |
}, | |
validateStatus: function validateStatus(status) { | |
return status >= 200 && status < 300; | |
}, | |
headers: { | |
common: { | |
Accept: "application/json, text/plain, */*", | |
"Content-Type": void 0, | |
}, | |
}, | |
}; | |
utils_default.forEach( | |
["delete", "get", "head", "post", "put", "patch"], | |
(method) => { | |
defaults.headers[method] = {}; | |
} | |
); | |
var defaults_default = defaults; | |
// node_modules/axios/lib/helpers/parseHeaders.js | |
var ignoreDuplicateOf = utils_default.toObjectSet([ | |
"age", | |
"authorization", | |
"content-length", | |
"content-type", | |
"etag", | |
"expires", | |
"from", | |
"host", | |
"if-modified-since", | |
"if-unmodified-since", | |
"last-modified", | |
"location", | |
"max-forwards", | |
"proxy-authorization", | |
"referer", | |
"retry-after", | |
"user-agent", | |
]); | |
var parseHeaders_default = (rawHeaders) => { | |
const parsed = {}; | |
let key; | |
let val; | |
let i; | |
rawHeaders && | |
rawHeaders.split("\n").forEach(function parser(line) { | |
i = line.indexOf(":"); | |
key = line.substring(0, i).trim().toLowerCase(); | |
val = line.substring(i + 1).trim(); | |
if (!key || (parsed[key] && ignoreDuplicateOf[key])) { | |
return; | |
} | |
if (key === "set-cookie") { | |
if (parsed[key]) { | |
parsed[key].push(val); | |
} else { | |
parsed[key] = [val]; | |
} | |
} else { | |
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; | |
} | |
}); | |
return parsed; | |
}; | |
// node_modules/axios/lib/core/AxiosHeaders.js | |
var $internals = Symbol("internals"); | |
function normalizeHeader(header) { | |
return header && String(header).trim().toLowerCase(); | |
} | |
function normalizeValue(value) { | |
if (value === false || value == null) { | |
return value; | |
} | |
return utils_default.isArray(value) | |
? value.map(normalizeValue) | |
: String(value); | |
} | |
function parseTokens(str) { | |
const tokens = /* @__PURE__ */ Object.create(null); | |
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; | |
let match; | |
while ((match = tokensRE.exec(str))) { | |
tokens[match[1]] = match[2]; | |
} | |
return tokens; | |
} | |
var isValidHeaderName = (str) => | |
/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); | |
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { | |
if (utils_default.isFunction(filter2)) { | |
return filter2.call(this, value, header); | |
} | |
if (isHeaderNameFilter) { | |
value = header; | |
} | |
if (!utils_default.isString(value)) return; | |
if (utils_default.isString(filter2)) { | |
return value.indexOf(filter2) !== -1; | |
} | |
if (utils_default.isRegExp(filter2)) { | |
return filter2.test(value); | |
} | |
} | |
function formatHeader(header) { | |
return header | |
.trim() | |
.toLowerCase() | |
.replace(/([a-z\d])(\w*)/g, (w, char, str) => { | |
return char.toUpperCase() + str; | |
}); | |
} | |
function buildAccessors(obj, header) { | |
const accessorName = utils_default.toCamelCase(" " + header); | |
["get", "set", "has"].forEach((methodName) => { | |
Object.defineProperty(obj, methodName + accessorName, { | |
value: function (arg1, arg2, arg3) { | |
return this[methodName].call(this, header, arg1, arg2, arg3); | |
}, | |
configurable: true, | |
}); | |
}); | |
} | |
var AxiosHeaders = class { | |
constructor(headers) { | |
headers && this.set(headers); | |
} | |
set(header, valueOrRewrite, rewrite) { | |
const self2 = this; | |
function setHeader(_value, _header, _rewrite) { | |
const lHeader = normalizeHeader(_header); | |
if (!lHeader) { | |
throw new Error("header name must be a non-empty string"); | |
} | |
const key = utils_default.findKey(self2, lHeader); | |
if ( | |
!key || | |
self2[key] === void 0 || | |
_rewrite === true || | |
(_rewrite === void 0 && self2[key] !== false) | |
) { | |
self2[key || _header] = normalizeValue(_value); | |
} | |
} | |
const setHeaders = (headers, _rewrite) => | |
utils_default.forEach(headers, (_value, _header) => | |
setHeader(_value, _header, _rewrite) | |
); | |
if ( | |
utils_default.isPlainObject(header) || | |
header instanceof this.constructor | |
) { | |
setHeaders(header, valueOrRewrite); | |
} else if ( | |
utils_default.isString(header) && | |
(header = header.trim()) && | |
!isValidHeaderName(header) | |
) { | |
setHeaders(parseHeaders_default(header), valueOrRewrite); | |
} else { | |
header != null && setHeader(valueOrRewrite, header, rewrite); | |
} | |
return this; | |
} | |
get(header, parser) { | |
header = normalizeHeader(header); | |
if (header) { | |
const key = utils_default.findKey(this, header); | |
if (key) { | |
const value = this[key]; | |
if (!parser) { | |
return value; | |
} | |
if (parser === true) { | |
return parseTokens(value); | |
} | |
if (utils_default.isFunction(parser)) { | |
return parser.call(this, value, key); | |
} | |
if (utils_default.isRegExp(parser)) { | |
return parser.exec(value); | |
} | |
throw new TypeError("parser must be boolean|regexp|function"); | |
} | |
} | |
} | |
has(header, matcher) { | |
header = normalizeHeader(header); | |
if (header) { | |
const key = utils_default.findKey(this, header); | |
return !!( | |
key && | |
this[key] !== void 0 && | |
(!matcher || matchHeaderValue(this, this[key], key, matcher)) | |
); | |
} | |
return false; | |
} | |
delete(header, matcher) { | |
const self2 = this; | |
let deleted = false; | |
function deleteHeader(_header) { | |
_header = normalizeHeader(_header); | |
if (_header) { | |
const key = utils_default.findKey(self2, _header); | |
if ( | |
key && | |
(!matcher || matchHeaderValue(self2, self2[key], key, matcher)) | |
) { | |
delete self2[key]; | |
deleted = true; | |
} | |
} | |
} | |
if (utils_default.isArray(header)) { | |
header.forEach(deleteHeader); | |
} else { | |
deleteHeader(header); | |
} | |
return deleted; | |
} | |
clear(matcher) { | |
const keys = Object.keys(this); | |
let i = keys.length; | |
let deleted = false; | |
while (i--) { | |
const key = keys[i]; | |
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { | |
delete this[key]; | |
deleted = true; | |
} | |
} | |
return deleted; | |
} | |
normalize(format) { | |
const self2 = this; | |
const headers = {}; | |
utils_default.forEach(this, (value, header) => { | |
const key = utils_default.findKey(headers, header); | |
if (key) { | |
self2[key] = normalizeValue(value); | |
delete self2[header]; | |
return; | |
} | |
const normalized = format ? formatHeader(header) : String(header).trim(); | |
if (normalized !== header) { | |
delete self2[header]; | |
} | |
self2[normalized] = normalizeValue(value); | |
headers[normalized] = true; | |
}); | |
return this; | |
} | |
concat(...targets) { | |
return this.constructor.concat(this, ...targets); | |
} | |
toJSON(asStrings) { | |
const obj = /* @__PURE__ */ Object.create(null); | |
utils_default.forEach(this, (value, header) => { | |
value != null && | |
value !== false && | |
(obj[header] = | |
asStrings && utils_default.isArray(value) ? value.join(", ") : value); | |
}); | |
return obj; | |
} | |
[Symbol.iterator]() { | |
return Object.entries(this.toJSON())[Symbol.iterator](); | |
} | |
toString() { | |
return Object.entries(this.toJSON()) | |
.map(([header, value]) => header + ": " + value) | |
.join("\n"); | |
} | |
get [Symbol.toStringTag]() { | |
return "AxiosHeaders"; | |
} | |
static from(thing) { | |
return thing instanceof this ? thing : new this(thing); | |
} | |
static concat(first, ...targets) { | |
const computed = new this(first); | |
targets.forEach((target) => computed.set(target)); | |
return computed; | |
} | |
static accessor(header) { | |
const internals = | |
(this[$internals] = | |
this[$internals] = | |
{ | |
accessors: {}, | |
}); | |
const accessors = internals.accessors; | |
const prototype3 = this.prototype; | |
function defineAccessor(_header) { | |
const lHeader = normalizeHeader(_header); | |
if (!accessors[lHeader]) { | |
buildAccessors(prototype3, _header); | |
accessors[lHeader] = true; | |
} | |
} | |
utils_default.isArray(header) | |
? header.forEach(defineAccessor) | |
: defineAccessor(header); | |
return this; | |
} | |
}; | |
AxiosHeaders.accessor([ | |
"Content-Type", | |
"Content-Length", | |
"Accept", | |
"Accept-Encoding", | |
"User-Agent", | |
"Authorization", | |
]); | |
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { | |
let mapped = key[0].toUpperCase() + key.slice(1); | |
return { | |
get: () => value, | |
set(headerValue) { | |
this[mapped] = headerValue; | |
}, | |
}; | |
}); | |
utils_default.freezeMethods(AxiosHeaders); | |
var AxiosHeaders_default = AxiosHeaders; | |
// node_modules/axios/lib/core/transformData.js | |
function transformData(fns, response) { | |
const config = this || defaults_default; | |
const context = response || config; | |
const headers = AxiosHeaders_default.from(context.headers); | |
let data = context.data; | |
utils_default.forEach(fns, function transform(fn) { | |
data = fn.call( | |
config, | |
data, | |
headers.normalize(), | |
response ? response.status : void 0 | |
); | |
}); | |
headers.normalize(); | |
return data; | |
} | |
// node_modules/axios/lib/cancel/isCancel.js | |
function isCancel(value) { | |
return !!(value && value.__CANCEL__); | |
} | |
// node_modules/axios/lib/cancel/CanceledError.js | |
function CanceledError(message, config, request2) { | |
AxiosError_default.call( | |
this, | |
message == null ? "canceled" : message, | |
AxiosError_default.ERR_CANCELED, | |
config, | |
request2 | |
); | |
this.name = "CanceledError"; | |
} | |
utils_default.inherits(CanceledError, AxiosError_default, { | |
__CANCEL__: true, | |
}); | |
var CanceledError_default = CanceledError; | |
// node_modules/axios/lib/core/settle.js | |
function settle(resolve, reject, response) { | |
const validateStatus2 = response.config.validateStatus; | |
if ( | |
!response.status || | |
!validateStatus2 || | |
validateStatus2(response.status) | |
) { | |
resolve(response); | |
} else { | |
reject( | |
new AxiosError_default( | |
"Request failed with status code " + response.status, | |
[ | |
AxiosError_default.ERR_BAD_REQUEST, | |
AxiosError_default.ERR_BAD_RESPONSE, | |
][Math.floor(response.status / 100) - 4], | |
response.config, | |
response.request, | |
response | |
) | |
); | |
} | |
} | |
// node_modules/axios/lib/helpers/isAbsoluteURL.js | |
function isAbsoluteURL(url2) { | |
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); | |
} | |
// node_modules/axios/lib/helpers/combineURLs.js | |
function combineURLs(baseURL, relativeURL) { | |
return relativeURL | |
? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") | |
: baseURL; | |
} | |
// node_modules/axios/lib/core/buildFullPath.js | |
function buildFullPath(baseURL, requestedURL) { | |
if (baseURL && !isAbsoluteURL(requestedURL)) { | |
return combineURLs(baseURL, requestedURL); | |
} | |
return requestedURL; | |
} | |
// node_modules/axios/lib/adapters/http.js | |
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1); | |
var import_http = __toESM(require("http"), 1); | |
var import_https = __toESM(require("https"), 1); | |
var import_util2 = __toESM(require("util"), 1); | |
var import_follow_redirects = __toESM(require_follow_redirects(), 1); | |
var import_zlib = __toESM(require("zlib"), 1); | |
// node_modules/axios/lib/env/data.js | |
var VERSION = "1.6.0"; | |
// node_modules/axios/lib/helpers/parseProtocol.js | |
function parseProtocol(url2) { | |
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); | |
return (match && match[1]) || ""; | |
} | |
// node_modules/axios/lib/helpers/fromDataURI.js | |
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; | |
function fromDataURI(uri, asBlob, options) { | |
const _Blob = (options && options.Blob) || node_default.classes.Blob; | |
const protocol = parseProtocol(uri); | |
if (asBlob === void 0 && _Blob) { | |
asBlob = true; | |
} | |
if (protocol === "data") { | |
uri = protocol.length ? uri.slice(protocol.length + 1) : uri; | |
const match = DATA_URL_PATTERN.exec(uri); | |
if (!match) { | |
throw new AxiosError_default( | |
"Invalid URL", | |
AxiosError_default.ERR_INVALID_URL | |
); | |
} | |
const mime = match[1]; | |
const isBase64 = match[2]; | |
const body = match[3]; | |
const buffer = Buffer.from( | |
decodeURIComponent(body), | |
isBase64 ? "base64" : "utf8" | |
); | |
if (asBlob) { | |
if (!_Blob) { | |
throw new AxiosError_default( | |
"Blob is not supported", | |
AxiosError_default.ERR_NOT_SUPPORT | |
); | |
} | |
return new _Blob([buffer], {type: mime}); | |
} | |
return buffer; | |
} | |
throw new AxiosError_default( | |
"Unsupported protocol " + protocol, | |
AxiosError_default.ERR_NOT_SUPPORT | |
); | |
} | |
// node_modules/axios/lib/adapters/http.js | |
var import_stream4 = __toESM(require("stream"), 1); | |
// node_modules/axios/lib/helpers/AxiosTransformStream.js | |
var import_stream = __toESM(require("stream"), 1); | |
// node_modules/axios/lib/helpers/throttle.js | |
function throttle(fn, freq) { | |
let timestamp = 0; | |
const threshold = 1e3 / freq; | |
let timer = null; | |
return function throttled(force, args) { | |
const now = Date.now(); | |
if (force || now - timestamp > threshold) { | |
if (timer) { | |
clearTimeout(timer); | |
timer = null; | |
} | |
timestamp = now; | |
return fn.apply(null, args); | |
} | |
if (!timer) { | |
timer = setTimeout(() => { | |
timer = null; | |
timestamp = Date.now(); | |
return fn.apply(null, args); | |
}, threshold - (now - timestamp)); | |
} | |
}; | |
} | |
var throttle_default = throttle; | |
// node_modules/axios/lib/helpers/speedometer.js | |
function speedometer(samplesCount, min) { | |
samplesCount = samplesCount || 10; | |
const bytes = new Array(samplesCount); | |
const timestamps = new Array(samplesCount); | |
let head = 0; | |
let tail = 0; | |
let firstSampleTS; | |
min = min !== void 0 ? min : 1e3; | |
return function push(chunkLength) { | |
const now = Date.now(); | |
const startedAt = timestamps[tail]; | |
if (!firstSampleTS) { | |
firstSampleTS = now; | |
} | |
bytes[head] = chunkLength; | |
timestamps[head] = now; | |
let i = tail; | |
let bytesCount = 0; | |
while (i !== head) { | |
bytesCount += bytes[i++]; | |
i = i % samplesCount; | |
} | |
head = (head + 1) % samplesCount; | |
if (head === tail) { | |
tail = (tail + 1) % samplesCount; | |
} | |
if (now - firstSampleTS < min) { | |
return; | |
} | |
const passed = startedAt && now - startedAt; | |
return passed ? Math.round((bytesCount * 1e3) / passed) : void 0; | |
}; | |
} | |
var speedometer_default = speedometer; | |
// node_modules/axios/lib/helpers/AxiosTransformStream.js | |
var kInternals = Symbol("internals"); | |
var AxiosTransformStream = class extends import_stream.default.Transform { | |
constructor(options) { | |
options = utils_default.toFlatObject( | |
options, | |
{ | |
maxRate: 0, | |
chunkSize: 64 * 1024, | |
minChunkSize: 100, | |
timeWindow: 500, | |
ticksRate: 2, | |
samplesCount: 15, | |
}, | |
null, | |
(prop, source) => { | |
return !utils_default.isUndefined(source[prop]); | |
} | |
); | |
super({ | |
readableHighWaterMark: options.chunkSize, | |
}); | |
const self2 = this; | |
const internals = (this[kInternals] = { | |
length: options.length, | |
timeWindow: options.timeWindow, | |
ticksRate: options.ticksRate, | |
chunkSize: options.chunkSize, | |
maxRate: options.maxRate, | |
minChunkSize: options.minChunkSize, | |
bytesSeen: 0, | |
isCaptured: false, | |
notifiedBytesLoaded: 0, | |
ts: Date.now(), | |
bytes: 0, | |
onReadCallback: null, | |
}); | |
const _speedometer = speedometer_default( | |
internals.ticksRate * options.samplesCount, | |
internals.timeWindow | |
); | |
this.on("newListener", (event) => { | |
if (event === "progress") { | |
if (!internals.isCaptured) { | |
internals.isCaptured = true; | |
} | |
} | |
}); | |
let bytesNotified = 0; | |
internals.updateProgress = throttle_default(function throttledHandler() { | |
const totalBytes = internals.length; | |
const bytesTransferred = internals.bytesSeen; | |
const progressBytes = bytesTransferred - bytesNotified; | |
if (!progressBytes || self2.destroyed) return; | |
const rate = _speedometer(progressBytes); | |
bytesNotified = bytesTransferred; | |
process.nextTick(() => { | |
self2.emit("progress", { | |
loaded: bytesTransferred, | |
total: totalBytes, | |
progress: totalBytes ? bytesTransferred / totalBytes : void 0, | |
bytes: progressBytes, | |
rate: rate ? rate : void 0, | |
estimated: | |
rate && totalBytes && bytesTransferred <= totalBytes | |
? (totalBytes - bytesTransferred) / rate | |
: void 0, | |
}); | |
}); | |
}, internals.ticksRate); | |
const onFinish = () => { | |
internals.updateProgress(true); | |
}; | |
this.once("end", onFinish); | |
this.once("error", onFinish); | |
} | |
_read(size) { | |
const internals = this[kInternals]; | |
if (internals.onReadCallback) { | |
internals.onReadCallback(); | |
} | |
return super._read(size); | |
} | |
_transform(chunk, encoding, callback) { | |
const self2 = this; | |
const internals = this[kInternals]; | |
const maxRate = internals.maxRate; | |
const readableHighWaterMark = this.readableHighWaterMark; | |
const timeWindow = internals.timeWindow; | |
const divider = 1e3 / timeWindow; | |
const bytesThreshold = maxRate / divider; | |
const minChunkSize = | |
internals.minChunkSize !== false | |
? Math.max(internals.minChunkSize, bytesThreshold * 0.01) | |
: 0; | |
function pushChunk(_chunk, _callback) { | |
const bytes = Buffer.byteLength(_chunk); | |
internals.bytesSeen += bytes; | |
internals.bytes += bytes; | |
if (internals.isCaptured) { | |
internals.updateProgress(); | |
} | |
if (self2.push(_chunk)) { | |
process.nextTick(_callback); | |
} else { | |
internals.onReadCallback = () => { | |
internals.onReadCallback = null; | |
process.nextTick(_callback); | |
}; | |
} | |
} | |
const transformChunk = (_chunk, _callback) => { | |
const chunkSize = Buffer.byteLength(_chunk); | |
let chunkRemainder = null; | |
let maxChunkSize = readableHighWaterMark; | |
let bytesLeft; | |
let passed = 0; | |
if (maxRate) { | |
const now = Date.now(); | |
if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { | |
internals.ts = now; | |
bytesLeft = bytesThreshold - internals.bytes; | |
internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; | |
passed = 0; | |
} | |
bytesLeft = bytesThreshold - internals.bytes; | |
} | |
if (maxRate) { | |
if (bytesLeft <= 0) { | |
return setTimeout(() => { | |
_callback(null, _chunk); | |
}, timeWindow - passed); | |
} | |
if (bytesLeft < maxChunkSize) { | |
maxChunkSize = bytesLeft; | |
} | |
} | |
if ( | |
maxChunkSize && | |
chunkSize > maxChunkSize && | |
chunkSize - maxChunkSize > minChunkSize | |
) { | |
chunkRemainder = _chunk.subarray(maxChunkSize); | |
_chunk = _chunk.subarray(0, maxChunkSize); | |
} | |
pushChunk( | |
_chunk, | |
chunkRemainder | |
? () => { | |
process.nextTick(_callback, null, chunkRemainder); | |
} | |
: _callback | |
); | |
}; | |
transformChunk(chunk, function transformNextChunk(err, _chunk) { | |
if (err) { | |
return callback(err); | |
} | |
if (_chunk) { | |
transformChunk(_chunk, transformNextChunk); | |
} else { | |
callback(null); | |
} | |
}); | |
} | |
setLength(length) { | |
this[kInternals].length = +length; | |
return this; | |
} | |
}; | |
var AxiosTransformStream_default = AxiosTransformStream; | |
// node_modules/axios/lib/adapters/http.js | |
var import_events = __toESM(require("events"), 1); | |
// node_modules/axios/lib/helpers/formDataToStream.js | |
var import_util = require("util"); | |
var import_stream2 = require("stream"); | |
// node_modules/axios/lib/helpers/readBlob.js | |
var {asyncIterator} = Symbol; | |
var readBlob = async function* (blob) { | |
if (blob.stream) { | |
yield* blob.stream(); | |
} else if (blob.arrayBuffer) { | |
yield await blob.arrayBuffer(); | |
} else if (blob[asyncIterator]) { | |
yield* blob[asyncIterator](); | |
} else { | |
yield blob; | |
} | |
}; | |
var readBlob_default = readBlob; | |
// node_modules/axios/lib/helpers/formDataToStream.js | |
var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_"; | |
var textEncoder = new import_util.TextEncoder(); | |
var CRLF = "\r\n"; | |
var CRLF_BYTES = textEncoder.encode(CRLF); | |
var CRLF_BYTES_COUNT = 2; | |
var FormDataPart = class { | |
constructor(name, value) { | |
const {escapeName} = this.constructor; | |
const isStringValue = utils_default.isString(value); | |
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${ | |
!isStringValue && value.name | |
? `; filename="${escapeName(value.name)}"` | |
: "" | |
}${CRLF}`; | |
if (isStringValue) { | |
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); | |
} else { | |
headers += `Content-Type: ${ | |
value.type || "application/octet-stream" | |
}${CRLF}`; | |
} | |
this.headers = textEncoder.encode(headers + CRLF); | |
this.contentLength = isStringValue ? value.byteLength : value.size; | |
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; | |
this.name = name; | |
this.value = value; | |
} | |
async *encode() { | |
yield this.headers; | |
const {value} = this; | |
if (utils_default.isTypedArray(value)) { | |
yield value; | |
} else { | |
yield* readBlob_default(value); | |
} | |
yield CRLF_BYTES; | |
} | |
static escapeName(name) { | |
return String(name).replace( | |
/[\r\n"]/g, | |
(match) => | |
({ | |
"\r": "%0D", | |
"\n": "%0A", | |
'"': "%22", | |
}[match]) | |
); | |
} | |
}; | |
var formDataToStream = (form, headersHandler, options) => { | |
const { | |
tag = "form-data-boundary", | |
size = 25, | |
boundary = tag + | |
"-" + | |
utils_default.generateString(size, BOUNDARY_ALPHABET), | |
} = options || {}; | |
if (!utils_default.isFormData(form)) { | |
throw TypeError("FormData instance required"); | |
} | |
if (boundary.length < 1 || boundary.length > 70) { | |
throw Error("boundary must be 10-70 characters long"); | |
} | |
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF); | |
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF); | |
let contentLength = footerBytes.byteLength; | |
const parts = Array.from(form.entries()).map(([name, value]) => { | |
const part = new FormDataPart(name, value); | |
contentLength += part.size; | |
return part; | |
}); | |
contentLength += boundaryBytes.byteLength * parts.length; | |
contentLength = utils_default.toFiniteNumber(contentLength); | |
const computedHeaders = { | |
"Content-Type": `multipart/form-data; boundary=${boundary}`, | |
}; | |
if (Number.isFinite(contentLength)) { | |
computedHeaders["Content-Length"] = contentLength; | |
} | |
headersHandler && headersHandler(computedHeaders); | |
return import_stream2.Readable.from( | |
(async function* () { | |
for (const part of parts) { | |
yield boundaryBytes; | |
yield* part.encode(); | |
} | |
yield footerBytes; | |
})() | |
); | |
}; | |
var formDataToStream_default = formDataToStream; | |
// node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js | |
var import_stream3 = __toESM(require("stream"), 1); | |
var ZlibHeaderTransformStream = class extends import_stream3.default.Transform { | |
__transform(chunk, encoding, callback) { | |
this.push(chunk); | |
callback(); | |
} | |
_transform(chunk, encoding, callback) { | |
if (chunk.length !== 0) { | |
this._transform = this.__transform; | |
if (chunk[0] !== 120) { | |
const header = Buffer.alloc(2); | |
header[0] = 120; | |
header[1] = 156; | |
this.push(header, encoding); | |
} | |
} | |
this.__transform(chunk, encoding, callback); | |
} | |
}; | |
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; | |
// node_modules/axios/lib/helpers/callbackify.js | |
var callbackify = (fn, reducer) => { | |
return utils_default.isAsyncFn(fn) | |
? function (...args) { | |
const cb = args.pop(); | |
fn.apply(this, args).then((value) => { | |
try { | |
reducer ? cb(null, ...reducer(value)) : cb(null, value); | |
} catch (err) { | |
cb(err); | |
} | |
}, cb); | |
} | |
: fn; | |
}; | |
var callbackify_default = callbackify; | |
// node_modules/axios/lib/adapters/http.js | |
var zlibOptions = { | |
flush: import_zlib.default.constants.Z_SYNC_FLUSH, | |
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH, | |
}; | |
var brotliOptions = { | |
flush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH, | |
finishFlush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH, | |
}; | |
var isBrotliSupported = utils_default.isFunction( | |
import_zlib.default.createBrotliDecompress | |
); | |
var {http: httpFollow, https: httpsFollow} = import_follow_redirects.default; | |
var isHttps = /https:?/; | |
var supportedProtocols = node_default.protocols.map((protocol) => { | |
return protocol + ":"; | |
}); | |
function dispatchBeforeRedirect(options) { | |
if (options.beforeRedirects.proxy) { | |
options.beforeRedirects.proxy(options); | |
} | |
if (options.beforeRedirects.config) { | |
options.beforeRedirects.config(options); | |
} | |
} | |
function setProxy(options, configProxy, location) { | |
let proxy = configProxy; | |
if (!proxy && proxy !== false) { | |
const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location); | |
if (proxyUrl) { | |
proxy = new URL(proxyUrl); | |
} | |
} | |
if (proxy) { | |
if (proxy.username) { | |
proxy.auth = (proxy.username || "") + ":" + (proxy.password || ""); | |
} | |
if (proxy.auth) { | |
if (proxy.auth.username || proxy.auth.password) { | |
proxy.auth = | |
(proxy.auth.username || "") + ":" + (proxy.auth.password || ""); | |
} | |
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64"); | |
options.headers["Proxy-Authorization"] = "Basic " + base64; | |
} | |
options.headers.host = | |
options.hostname + (options.port ? ":" + options.port : ""); | |
const proxyHost = proxy.hostname || proxy.host; | |
options.hostname = proxyHost; | |
options.host = proxyHost; | |
options.port = proxy.port; | |
options.path = location; | |
if (proxy.protocol) { | |
options.protocol = proxy.protocol.includes(":") | |
? proxy.protocol | |
: `${proxy.protocol}:`; | |
} | |
} | |
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { | |
setProxy(redirectOptions, configProxy, redirectOptions.href); | |
}; | |
} | |
var isHttpAdapterSupported = | |
typeof process !== "undefined" && utils_default.kindOf(process) === "process"; | |
var wrapAsync = (asyncExecutor) => { | |
return new Promise((resolve, reject) => { | |
let onDone; | |
let isDone; | |
const done = (value, isRejected) => { | |
if (isDone) return; | |
isDone = true; | |
onDone && onDone(value, isRejected); | |
}; | |
const _resolve = (value) => { | |
done(value); | |
resolve(value); | |
}; | |
const _reject = (reason) => { | |
done(reason, true); | |
reject(reason); | |
}; | |
asyncExecutor( | |
_resolve, | |
_reject, | |
(onDoneHandler) => (onDone = onDoneHandler) | |
).catch(_reject); | |
}); | |
}; | |
var resolveFamily = ({address, family}) => { | |
if (!utils_default.isString(address)) { | |
throw TypeError("address must be a string"); | |
} | |
return { | |
address, | |
family: family || (address.indexOf(".") < 0 ? 6 : 4), | |
}; | |
}; | |
var buildAddressEntry = (address, family) => | |
resolveFamily(utils_default.isObject(address) ? address : {address, family}); | |
var http_default = | |
isHttpAdapterSupported && | |
function httpAdapter(config) { | |
return wrapAsync(async function dispatchHttpRequest( | |
resolve, | |
reject, | |
onDone | |
) { | |
let {data, lookup, family} = config; | |
const {responseType, responseEncoding} = config; | |
const method = config.method.toUpperCase(); | |
let isDone; | |
let rejected = false; | |
let req; | |
if (lookup) { | |
const _lookup = callbackify_default(lookup, (value) => | |
utils_default.isArray(value) ? value : [value] | |
); | |
lookup = (hostname, opt, cb) => { | |
_lookup(hostname, opt, (err, arg0, arg1) => { | |
const addresses = utils_default.isArray(arg0) | |
? arg0.map((addr) => buildAddressEntry(addr)) | |
: [buildAddressEntry(arg0, arg1)]; | |
opt.all | |
? cb(err, addresses) | |
: cb(err, addresses[0].address, addresses[0].family); | |
}); | |
}; | |
} | |
const emitter = new import_events.default(); | |
const onFinished = () => { | |
if (config.cancelToken) { | |
config.cancelToken.unsubscribe(abort); | |
} | |
if (config.signal) { | |
config.signal.removeEventListener("abort", abort); | |
} | |
emitter.removeAllListeners(); | |
}; | |
onDone((value, isRejected) => { | |
isDone = true; | |
if (isRejected) { | |
rejected = true; | |
onFinished(); | |
} | |
}); | |
function abort(reason) { | |
emitter.emit( | |
"abort", | |
!reason || reason.type | |
? new CanceledError_default(null, config, req) | |
: reason | |
); | |
} | |
emitter.once("abort", reject); | |
if (config.cancelToken || config.signal) { | |
config.cancelToken && config.cancelToken.subscribe(abort); | |
if (config.signal) { | |
config.signal.aborted | |
? abort() | |
: config.signal.addEventListener("abort", abort); | |
} | |
} | |
const fullPath = buildFullPath(config.baseURL, config.url); | |
const parsed = new URL(fullPath, "http://localhost"); | |
const protocol = parsed.protocol || supportedProtocols[0]; | |
if (protocol === "data:") { | |
let convertedData; | |
if (method !== "GET") { | |
return settle(resolve, reject, { | |
status: 405, | |
statusText: "method not allowed", | |
headers: {}, | |
config, | |
}); | |
} | |
try { | |
convertedData = fromDataURI(config.url, responseType === "blob", { | |
Blob: config.env && config.env.Blob, | |
}); | |
} catch (err) { | |
throw AxiosError_default.from( | |
err, | |
AxiosError_default.ERR_BAD_REQUEST, | |
config | |
); | |
} | |
if (responseType === "text") { | |
convertedData = convertedData.toString(responseEncoding); | |
if (!responseEncoding || responseEncoding === "utf8") { | |
convertedData = utils_default.stripBOM(convertedData); | |
} | |
} else if (responseType === "stream") { | |
convertedData = import_stream4.default.Readable.from(convertedData); | |
} | |
return settle(resolve, reject, { | |
data: convertedData, | |
status: 200, | |
statusText: "OK", | |
headers: new AxiosHeaders_default(), | |
config, | |
}); | |
} | |
if (supportedProtocols.indexOf(protocol) === -1) { | |
return reject( | |
new AxiosError_default( | |
"Unsupported protocol " + protocol, | |
AxiosError_default.ERR_BAD_REQUEST, | |
config | |
) | |
); | |
} | |
const headers = AxiosHeaders_default.from(config.headers).normalize(); | |
headers.set("User-Agent", "axios/" + VERSION, false); | |
const onDownloadProgress = config.onDownloadProgress; | |
const onUploadProgress = config.onUploadProgress; | |
const maxRate = config.maxRate; | |
let maxUploadRate = void 0; | |
let maxDownloadRate = void 0; | |
if (utils_default.isSpecCompliantForm(data)) { | |
const userBoundary = headers.getContentType( | |
/boundary=([-_\w\d]{10,70})/i | |
); | |
data = formDataToStream_default( | |
data, | |
(formHeaders) => { | |
headers.set(formHeaders); | |
}, | |
{ | |
tag: `axios-${VERSION}-boundary`, | |
boundary: (userBoundary && userBoundary[1]) || void 0, | |
} | |
); | |
} else if ( | |
utils_default.isFormData(data) && | |
utils_default.isFunction(data.getHeaders) | |
) { | |
headers.set(data.getHeaders()); | |
if (!headers.hasContentLength()) { | |
try { | |
const knownLength = await import_util2.default | |
.promisify(data.getLength) | |
.call(data); | |
Number.isFinite(knownLength) && | |
knownLength >= 0 && | |
headers.setContentLength(knownLength); | |
} catch (e) {} | |
} | |
} else if (utils_default.isBlob(data)) { | |
data.size && | |
headers.setContentType(data.type || "application/octet-stream"); | |
headers.setContentLength(data.size || 0); | |
data = import_stream4.default.Readable.from(readBlob_default(data)); | |
} else if (data && !utils_default.isStream(data)) { | |
if (Buffer.isBuffer(data)) { | |
} else if (utils_default.isArrayBuffer(data)) { | |
data = Buffer.from(new Uint8Array(data)); | |
} else if (utils_default.isString(data)) { | |
data = Buffer.from(data, "utf-8"); | |
} else { | |
return reject( | |
new AxiosError_default( | |
"Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", | |
AxiosError_default.ERR_BAD_REQUEST, | |
config | |
) | |
); | |
} | |
headers.setContentLength(data.length, false); | |
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { | |
return reject( | |
new AxiosError_default( | |
"Request body larger than maxBodyLength limit", | |
AxiosError_default.ERR_BAD_REQUEST, | |
config | |
) | |
); | |
} | |
} | |
const contentLength = utils_default.toFiniteNumber( | |
headers.getContentLength() | |
); | |
if (utils_default.isArray(maxRate)) { | |
maxUploadRate = maxRate[0]; | |
maxDownloadRate = maxRate[1]; | |
} else { | |
maxUploadRate = maxDownloadRate = maxRate; | |
} | |
if (data && (onUploadProgress || maxUploadRate)) { | |
if (!utils_default.isStream(data)) { | |
data = import_stream4.default.Readable.from(data, { | |
objectMode: false, | |
}); | |
} | |
data = import_stream4.default.pipeline( | |
[ | |
data, | |
new AxiosTransformStream_default({ | |
length: contentLength, | |
maxRate: utils_default.toFiniteNumber(maxUploadRate), | |
}), | |
], | |
utils_default.noop | |
); | |
onUploadProgress && | |
data.on("progress", (progress) => { | |
onUploadProgress( | |
Object.assign(progress, { | |
upload: true, | |
}) | |
); | |
}); | |
} | |
let auth = void 0; | |
if (config.auth) { | |
const username = config.auth.username || ""; | |
const password = config.auth.password || ""; | |
auth = username + ":" + password; | |
} | |
if (!auth && parsed.username) { | |
const urlUsername = parsed.username; | |
const urlPassword = parsed.password; | |
auth = urlUsername + ":" + urlPassword; | |
} | |
auth && headers.delete("authorization"); | |
let path; | |
try { | |
path = buildURL( | |
parsed.pathname + parsed.search, | |
config.params, | |
config.paramsSerializer | |
).replace(/^\?/, ""); | |
} catch (err) { | |
const customErr = new Error(err.message); | |
customErr.config = config; | |
customErr.url = config.url; | |
customErr.exists = true; | |
return reject(customErr); | |
} | |
headers.set( | |
"Accept-Encoding", | |
"gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), | |
false | |
); | |
const options = { | |
path, | |
method, | |
headers: headers.toJSON(), | |
agents: {http: config.httpAgent, https: config.httpsAgent}, | |
auth, | |
protocol, | |
family, | |
beforeRedirect: dispatchBeforeRedirect, | |
beforeRedirects: {}, | |
}; | |
!utils_default.isUndefined(lookup) && (options.lookup = lookup); | |
if (config.socketPath) { | |
options.socketPath = config.socketPath; | |
} else { | |
options.hostname = parsed.hostname; | |
options.port = parsed.port; | |
setProxy( | |
options, | |
config.proxy, | |
protocol + | |
"//" + | |
parsed.hostname + | |
(parsed.port ? ":" + parsed.port : "") + | |
options.path | |
); | |
} | |
let transport; | |
const isHttpsRequest = isHttps.test(options.protocol); | |
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; | |
if (config.transport) { | |
transport = config.transport; | |
} else if (config.maxRedirects === 0) { | |
transport = isHttpsRequest ? import_https.default : import_http.default; | |
} else { | |
if (config.maxRedirects) { | |
options.maxRedirects = config.maxRedirects; | |
} | |
if (config.beforeRedirect) { | |
options.beforeRedirects.config = config.beforeRedirect; | |
} | |
transport = isHttpsRequest ? httpsFollow : httpFollow; | |
} | |
if (config.maxBodyLength > -1) { | |
options.maxBodyLength = config.maxBodyLength; | |
} else { | |
options.maxBodyLength = Infinity; | |
} | |
if (config.insecureHTTPParser) { | |
options.insecureHTTPParser = config.insecureHTTPParser; | |
} | |
req = transport.request(options, function handleResponse(res) { | |
if (req.destroyed) return; | |
const streams = [res]; | |
const responseLength = +res.headers["content-length"]; | |
if (onDownloadProgress) { | |
const transformStream = new AxiosTransformStream_default({ | |
length: utils_default.toFiniteNumber(responseLength), | |
maxRate: utils_default.toFiniteNumber(maxDownloadRate), | |
}); | |
onDownloadProgress && | |
transformStream.on("progress", (progress) => { | |
onDownloadProgress( | |
Object.assign(progress, { | |
download: true, | |
}) | |
); | |
}); | |
streams.push(transformStream); | |
} | |
let responseStream = res; | |
const lastRequest = res.req || req; | |
if (config.decompress !== false && res.headers["content-encoding"]) { | |
if (method === "HEAD" || res.statusCode === 204) { | |
delete res.headers["content-encoding"]; | |
} | |
switch ((res.headers["content-encoding"] || "").toLowerCase()) { | |
/*eslint default-case:0*/ | |
case "gzip": | |
case "x-gzip": | |
case "compress": | |
case "x-compress": | |
streams.push(import_zlib.default.createUnzip(zlibOptions)); | |
delete res.headers["content-encoding"]; | |
break; | |
case "deflate": | |
streams.push(new ZlibHeaderTransformStream_default()); | |
streams.push(import_zlib.default.createUnzip(zlibOptions)); | |
delete res.headers["content-encoding"]; | |
break; | |
case "br": | |
if (isBrotliSupported) { | |
streams.push( | |
import_zlib.default.createBrotliDecompress(brotliOptions) | |
); | |
delete res.headers["content-encoding"]; | |
} | |
} | |
} | |
responseStream = | |
streams.length > 1 | |
? import_stream4.default.pipeline(streams, utils_default.noop) | |
: streams[0]; | |
const offListeners = import_stream4.default.finished( | |
responseStream, | |
() => { | |
offListeners(); | |
onFinished(); | |
} | |
); | |
const response = { | |
status: res.statusCode, | |
statusText: res.statusMessage, | |
headers: new AxiosHeaders_default(res.headers), | |
config, | |
request: lastRequest, | |
}; | |
if (responseType === "stream") { | |
response.data = responseStream; | |
settle(resolve, reject, response); | |
} else { | |
const responseBuffer = []; | |
let totalResponseBytes = 0; | |
responseStream.on("data", function handleStreamData(chunk) { | |
responseBuffer.push(chunk); | |
totalResponseBytes += chunk.length; | |
if ( | |
config.maxContentLength > -1 && | |
totalResponseBytes > config.maxContentLength | |
) { | |
rejected = true; | |
responseStream.destroy(); | |
reject( | |
new AxiosError_default( | |
"maxContentLength size of " + | |
config.maxContentLength + | |
" exceeded", | |
AxiosError_default.ERR_BAD_RESPONSE, | |
config, | |
lastRequest | |
) | |
); | |
} | |
}); | |
responseStream.on("aborted", function handlerStreamAborted() { | |
if (rejected) { | |
return; | |
} | |
const err = new AxiosError_default( | |
"maxContentLength size of " + | |
config.maxContentLength + | |
" exceeded", | |
AxiosError_default.ERR_BAD_RESPONSE, | |
config, | |
lastRequest | |
); | |
responseStream.destroy(err); | |
reject(err); | |
}); | |
responseStream.on("error", function handleStreamError(err) { | |
if (req.destroyed) return; | |
reject(AxiosError_default.from(err, null, config, lastRequest)); | |
}); | |
responseStream.on("end", function handleStreamEnd() { | |
try { | |
let responseData = | |
responseBuffer.length === 1 | |
? responseBuffer[0] | |
: Buffer.concat(responseBuffer); | |
if (responseType !== "arraybuffer") { | |
responseData = responseData.toString(responseEncoding); | |
if (!responseEncoding || responseEncoding === "utf8") { | |
responseData = utils_default.stripBOM(responseData); | |
} | |
} | |
response.data = responseData; | |
} catch (err) { | |
return reject( | |
AxiosError_default.from( | |
err, | |
null, | |
config, | |
response.request, | |
response | |
) | |
); | |
} | |
settle(resolve, reject, response); | |
}); | |
} | |
emitter.once("abort", (err) => { | |
if (!responseStream.destroyed) { | |
responseStream.emit("error", err); | |
responseStream.destroy(); | |
} | |
}); | |
}); | |
emitter.once("abort", (err) => { | |
reject(err); | |
req.destroy(err); | |
}); | |
req.on("error", function handleRequestError(err) { | |
reject(AxiosError_default.from(err, null, config, req)); | |
}); | |
req.on("socket", function handleRequestSocket(socket) { | |
socket.setKeepAlive(true, 1e3 * 60); | |
}); | |
if (config.timeout) { | |
const timeout = parseInt(config.timeout, 10); | |
if (Number.isNaN(timeout)) { | |
reject( | |
new AxiosError_default( | |
"error trying to parse `config.timeout` to int", | |
AxiosError_default.ERR_BAD_OPTION_VALUE, | |
config, | |
req | |
) | |
); | |
return; | |
} | |
req.setTimeout(timeout, function handleRequestTimeout() { | |
if (isDone) return; | |
let timeoutErrorMessage = config.timeout | |
? "timeout of " + config.timeout + "ms exceeded" | |
: "timeout exceeded"; | |
const transitional2 = config.transitional || transitional_default; | |
if (config.timeoutErrorMessage) { | |
timeoutErrorMessage = config.timeoutErrorMessage; | |
} | |
reject( | |
new AxiosError_default( | |
timeoutErrorMessage, | |
transitional2.clarifyTimeoutError | |
? AxiosError_default.ETIMEDOUT | |
: AxiosError_default.ECONNABORTED, | |
config, | |
req | |
) | |
); | |
abort(); | |
}); | |
} | |
if (utils_default.isStream(data)) { | |
let ended = false; | |
let errored = false; | |
data.on("end", () => { | |
ended = true; | |
}); | |
data.once("error", (err) => { | |
errored = true; | |
req.destroy(err); | |
}); | |
data.on("close", () => { | |
if (!ended && !errored) { | |
abort( | |
new CanceledError_default( | |
"Request stream has been aborted", | |
config, | |
req | |
) | |
); | |
} | |
}); | |
data.pipe(req); | |
} else { | |
req.end(data); | |
} | |
}); | |
}; | |
// node_modules/axios/lib/helpers/cookies.js | |
var cookies_default = node_default.isStandardBrowserEnv | |
? // Standard browser envs support document.cookie | |
/* @__PURE__ */ (function standardBrowserEnv() { | |
return { | |
write: function write(name, value, expires, path, domain, secure) { | |
const cookie = []; | |
cookie.push(name + "=" + encodeURIComponent(value)); | |
if (utils_default.isNumber(expires)) { | |
cookie.push("expires=" + new Date(expires).toGMTString()); | |
} | |
if (utils_default.isString(path)) { | |
cookie.push("path=" + path); | |
} | |
if (utils_default.isString(domain)) { | |
cookie.push("domain=" + domain); | |
} | |
if (secure === true) { | |
cookie.push("secure"); | |
} | |
document.cookie = cookie.join("; "); | |
}, | |
read: function read(name) { | |
const match = document.cookie.match( | |
new RegExp("(^|;\\s*)(" + name + ")=([^;]*)") | |
); | |
return match ? decodeURIComponent(match[3]) : null; | |
}, | |
remove: function remove(name) { | |
this.write(name, "", Date.now() - 864e5); | |
}, | |
}; | |
})() | |
: // Non standard browser env (web workers, react-native) lack needed support. | |
/* @__PURE__ */ (function nonStandardBrowserEnv() { | |
return { | |
write: function write() {}, | |
read: function read() { | |
return null; | |
}, | |
remove: function remove() {}, | |
}; | |
})(); | |
// node_modules/axios/lib/helpers/isURLSameOrigin.js | |
var isURLSameOrigin_default = node_default.isStandardBrowserEnv | |
? // Standard browser envs have full support of the APIs needed to test | |
// whether the request URL is of the same origin as current location. | |
(function standardBrowserEnv2() { | |
const msie = /(msie|trident)/i.test(navigator.userAgent); | |
const urlParsingNode = document.createElement("a"); | |
let originURL; | |
function resolveURL(url2) { | |
let href = url2; | |
if (msie) { | |
urlParsingNode.setAttribute("href", href); | |
href = urlParsingNode.href; | |
} | |
urlParsingNode.setAttribute("href", href); | |
return { | |
href: urlParsingNode.href, | |
protocol: urlParsingNode.protocol | |
? urlParsingNode.protocol.replace(/:$/, "") | |
: "", | |
host: urlParsingNode.host, | |
search: urlParsingNode.search | |
? urlParsingNode.search.replace(/^\?/, "") | |
: "", | |
hash: urlParsingNode.hash | |
? urlParsingNode.hash.replace(/^#/, "") | |
: "", | |
hostname: urlParsingNode.hostname, | |
port: urlParsingNode.port, | |
pathname: | |
urlParsingNode.pathname.charAt(0) === "/" | |
? urlParsingNode.pathname | |
: "/" + urlParsingNode.pathname, | |
}; | |
} | |
originURL = resolveURL(window.location.href); | |
return function isURLSameOrigin(requestURL) { | |
const parsed = utils_default.isString(requestURL) | |
? resolveURL(requestURL) | |
: requestURL; | |
return ( | |
parsed.protocol === originURL.protocol && | |
parsed.host === originURL.host | |
); | |
}; | |
})() | |
: // Non standard browser envs (web workers, react-native) lack needed support. | |
/* @__PURE__ */ (function nonStandardBrowserEnv2() { | |
return function isURLSameOrigin() { | |
return true; | |
}; | |
})(); | |
// node_modules/axios/lib/adapters/xhr.js | |
function progressEventReducer(listener, isDownloadStream) { | |
let bytesNotified = 0; | |
const _speedometer = speedometer_default(50, 250); | |
return (e) => { | |
const loaded = e.loaded; | |
const total = e.lengthComputable ? e.total : void 0; | |
const progressBytes = loaded - bytesNotified; | |
const rate = _speedometer(progressBytes); | |
const inRange = loaded <= total; | |
bytesNotified = loaded; | |
const data = { | |
loaded, | |
total, | |
progress: total ? loaded / total : void 0, | |
bytes: progressBytes, | |
rate: rate ? rate : void 0, | |
estimated: rate && total && inRange ? (total - loaded) / rate : void 0, | |
event: e, | |
}; | |
data[isDownloadStream ? "download" : "upload"] = true; | |
listener(data); | |
}; | |
} | |
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; | |
var xhr_default = | |
isXHRAdapterSupported && | |
function (config) { | |
return new Promise(function dispatchXhrRequest(resolve, reject) { | |
let requestData = config.data; | |
const requestHeaders = AxiosHeaders_default.from( | |
config.headers | |
).normalize(); | |
const responseType = config.responseType; | |
let onCanceled; | |
function done() { | |
if (config.cancelToken) { | |
config.cancelToken.unsubscribe(onCanceled); | |
} | |
if (config.signal) { | |
config.signal.removeEventListener("abort", onCanceled); | |
} | |
} | |
let contentType; | |
if (utils_default.isFormData(requestData)) { | |
if ( | |
node_default.isStandardBrowserEnv || | |
node_default.isStandardBrowserWebWorkerEnv | |
) { | |
requestHeaders.setContentType(false); | |
} else if (!requestHeaders.getContentType(/^\s*multipart\/form-data/)) { | |
requestHeaders.setContentType("multipart/form-data"); | |
} else if ( | |
utils_default.isString( | |
(contentType = requestHeaders.getContentType()) | |
) | |
) { | |
requestHeaders.setContentType( | |
contentType.replace(/^\s*(multipart\/form-data);+/, "$1") | |
); | |
} | |
} | |
let request2 = new XMLHttpRequest(); | |
if (config.auth) { | |
const username = config.auth.username || ""; | |
const password = config.auth.password | |
? unescape(encodeURIComponent(config.auth.password)) | |
: ""; | |
requestHeaders.set( | |
"Authorization", | |
"Basic " + btoa(username + ":" + password) | |
); | |
} | |
const fullPath = buildFullPath(config.baseURL, config.url); | |
request2.open( | |
config.method.toUpperCase(), | |
buildURL(fullPath, config.params, config.paramsSerializer), | |
true | |
); | |
request2.timeout = config.timeout; | |
function onloadend() { | |
if (!request2) { | |
return; | |
} | |
const responseHeaders = AxiosHeaders_default.from( | |
"getAllResponseHeaders" in request2 && | |
request2.getAllResponseHeaders() | |
); | |
const responseData = | |
!responseType || responseType === "text" || responseType === "json" | |
? request2.responseText | |
: request2.response; | |
const response = { | |
data: responseData, | |
status: request2.status, | |
statusText: request2.statusText, | |
headers: responseHeaders, | |
config, | |
request: request2, | |
}; | |
settle( | |
function _resolve(value) { | |
resolve(value); | |
done(); | |
}, | |
function _reject(err) { | |
reject(err); | |
done(); | |
}, | |
response | |
); | |
request2 = null; | |
} | |
if ("onloadend" in request2) { | |
request2.onloadend = onloadend; | |
} else { | |
request2.onreadystatechange = function handleLoad() { | |
if (!request2 || request2.readyState !== 4) { | |
return; | |
} | |
if ( | |
request2.status === 0 && | |
!( | |
request2.responseURL && | |
request2.responseURL.indexOf("file:") === 0 | |
) | |
) { | |
return; | |
} | |
setTimeout(onloadend); | |
}; | |
} | |
request2.onabort = function handleAbort() { | |
if (!request2) { | |
return; | |
} | |
reject( | |
new AxiosError_default( | |
"Request aborted", | |
AxiosError_default.ECONNABORTED, | |
config, | |
request2 | |
) | |
); | |
request2 = null; | |
}; | |
request2.onerror = function handleError() { | |
reject( | |
new AxiosError_default( | |
"Network Error", | |
AxiosError_default.ERR_NETWORK, | |
config, | |
request2 | |
) | |
); | |
request2 = null; | |
}; | |
request2.ontimeout = function handleTimeout() { | |
let timeoutErrorMessage = config.timeout | |
? "timeout of " + config.timeout + "ms exceeded" | |
: "timeout exceeded"; | |
const transitional2 = config.transitional || transitional_default; | |
if (config.timeoutErrorMessage) { | |
timeoutErrorMessage = config.timeoutErrorMessage; | |
} | |
reject( | |
new AxiosError_default( | |
timeoutErrorMessage, | |
transitional2.clarifyTimeoutError | |
? AxiosError_default.ETIMEDOUT | |
: AxiosError_default.ECONNABORTED, | |
config, | |
request2 | |
) | |
); | |
request2 = null; | |
}; | |
if (node_default.isStandardBrowserEnv) { | |
const xsrfValue = | |
isURLSameOrigin_default(fullPath) && | |
config.xsrfCookieName && | |
cookies_default.read(config.xsrfCookieName); | |
if (xsrfValue) { | |
requestHeaders.set(config.xsrfHeaderName, xsrfValue); | |
} | |
} | |
requestData === void 0 && requestHeaders.setContentType(null); | |
if ("setRequestHeader" in request2) { | |
utils_default.forEach( | |
requestHeaders.toJSON(), | |
function setRequestHeader(val, key) { | |
request2.setRequestHeader(key, val); | |
} | |
); | |
} | |
if (!utils_default.isUndefined(config.withCredentials)) { | |
request2.withCredentials = !!config.withCredentials; | |
} | |
if (responseType && responseType !== "json") { | |
request2.responseType = config.responseType; | |
} | |
if (typeof config.onDownloadProgress === "function") { | |
request2.addEventListener( | |
"progress", | |
progressEventReducer(config.onDownloadProgress, true) | |
); | |
} | |
if (typeof config.onUploadProgress === "function" && request2.upload) { | |
request2.upload.addEventListener( | |
"progress", | |
progressEventReducer(config.onUploadProgress) | |
); | |
} | |
if (config.cancelToken || config.signal) { | |
onCanceled = (cancel) => { | |
if (!request2) { | |
return; | |
} | |
reject( | |
!cancel || cancel.type | |
? new CanceledError_default(null, config, request2) | |
: cancel | |
); | |
request2.abort(); | |
request2 = null; | |
}; | |
config.cancelToken && config.cancelToken.subscribe(onCanceled); | |
if (config.signal) { | |
config.signal.aborted | |
? onCanceled() | |
: config.signal.addEventListener("abort", onCanceled); | |
} | |
} | |
const protocol = parseProtocol(fullPath); | |
if (protocol && node_default.protocols.indexOf(protocol) === -1) { | |
reject( | |
new AxiosError_default( | |
"Unsupported protocol " + protocol + ":", | |
AxiosError_default.ERR_BAD_REQUEST, | |
config | |
) | |
); | |
return; | |
} | |
request2.send(requestData || null); | |
}); | |
}; | |
// node_modules/axios/lib/adapters/adapters.js | |
var knownAdapters = { | |
http: http_default, | |
xhr: xhr_default, | |
}; | |
utils_default.forEach(knownAdapters, (fn, value) => { | |
if (fn) { | |
try { | |
Object.defineProperty(fn, "name", {value}); | |
} catch (e) {} | |
Object.defineProperty(fn, "adapterName", {value}); | |
} | |
}); | |
var renderReason = (reason) => `- ${reason}`; | |
var isResolvedHandle = (adapter) => | |
utils_default.isFunction(adapter) || adapter === null || adapter === false; | |
var adapters_default = { | |
getAdapter: (adapters) => { | |
adapters = utils_default.isArray(adapters) ? adapters : [adapters]; | |
const {length} = adapters; | |
let nameOrAdapter; | |
let adapter; | |
const rejectedReasons = {}; | |
for (let i = 0; i < length; i++) { | |
nameOrAdapter = adapters[i]; | |
let id; | |
adapter = nameOrAdapter; | |
if (!isResolvedHandle(nameOrAdapter)) { | |
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; | |
if (adapter === void 0) { | |
throw new AxiosError_default(`Unknown adapter '${id}'`); | |
} | |
} | |
if (adapter) { | |
break; | |
} | |
rejectedReasons[id || "#" + i] = adapter; | |
} | |
if (!adapter) { | |
const reasons = Object.entries(rejectedReasons).map( | |
([id, state]) => | |
`adapter ${id} ` + | |
(state === false | |
? "is not supported by the environment" | |
: "is not available in the build") | |
); | |
let s = length | |
? reasons.length > 1 | |
? "since :\n" + reasons.map(renderReason).join("\n") | |
: " " + renderReason(reasons[0]) | |
: "as no adapter specified"; | |
throw new AxiosError_default( | |
`There is no suitable adapter to dispatch the request ` + s, | |
"ERR_NOT_SUPPORT" | |
); | |
} | |
return adapter; | |
}, | |
adapters: knownAdapters, | |
}; | |
// node_modules/axios/lib/core/dispatchRequest.js | |
function throwIfCancellationRequested(config) { | |
if (config.cancelToken) { | |
config.cancelToken.throwIfRequested(); | |
} | |
if (config.signal && config.signal.aborted) { | |
throw new CanceledError_default(null, config); | |
} | |
} | |
function dispatchRequest(config) { | |
throwIfCancellationRequested(config); | |
config.headers = AxiosHeaders_default.from(config.headers); | |
config.data = transformData.call(config, config.transformRequest); | |
if (["post", "put", "patch"].indexOf(config.method) !== -1) { | |
config.headers.setContentType("application/x-www-form-urlencoded", false); | |
} | |
const adapter = adapters_default.getAdapter( | |
config.adapter || defaults_default.adapter | |
); | |
return adapter(config).then( | |
function onAdapterResolution(response) { | |
throwIfCancellationRequested(config); | |
response.data = transformData.call( | |
config, | |
config.transformResponse, | |
response | |
); | |
response.headers = AxiosHeaders_default.from(response.headers); | |
return response; | |
}, | |
function onAdapterRejection(reason) { | |
if (!isCancel(reason)) { | |
throwIfCancellationRequested(config); | |
if (reason && reason.response) { | |
reason.response.data = transformData.call( | |
config, | |
config.transformResponse, | |
reason.response | |
); | |
reason.response.headers = AxiosHeaders_default.from( | |
reason.response.headers | |
); | |
} | |
} | |
return Promise.reject(reason); | |
} | |
); | |
} | |
// node_modules/axios/lib/core/mergeConfig.js | |
var headersToObject = (thing) => | |
thing instanceof AxiosHeaders_default ? thing.toJSON() : thing; | |
function mergeConfig(config1, config2) { | |
config2 = config2 || {}; | |
const config = {}; | |
function getMergedValue(target, source, caseless) { | |
if ( | |
utils_default.isPlainObject(target) && | |
utils_default.isPlainObject(source) | |
) { | |
return utils_default.merge.call({caseless}, target, source); | |
} else if (utils_default.isPlainObject(source)) { | |
return utils_default.merge({}, source); | |
} else if (utils_default.isArray(source)) { | |
return source.slice(); | |
} | |
return source; | |
} | |
function mergeDeepProperties(a, b, caseless) { | |
if (!utils_default.isUndefined(b)) { | |
return getMergedValue(a, b, caseless); | |
} else if (!utils_default.isUndefined(a)) { | |
return getMergedValue(void 0, a, caseless); | |
} | |
} | |
function valueFromConfig2(a, b) { | |
if (!utils_default.isUndefined(b)) { | |
return getMergedValue(void 0, b); | |
} | |
} | |
function defaultToConfig2(a, b) { | |
if (!utils_default.isUndefined(b)) { | |
return getMergedValue(void 0, b); | |
} else if (!utils_default.isUndefined(a)) { | |
return getMergedValue(void 0, a); | |
} | |
} | |
function mergeDirectKeys(a, b, prop) { | |
if (prop in config2) { | |
return getMergedValue(a, b); | |
} else if (prop in config1) { | |
return getMergedValue(void 0, a); | |
} | |
} | |
const mergeMap = { | |
url: valueFromConfig2, | |
method: valueFromConfig2, | |
data: valueFromConfig2, | |
baseURL: defaultToConfig2, | |
transformRequest: defaultToConfig2, | |
transformResponse: defaultToConfig2, | |
paramsSerializer: defaultToConfig2, | |
timeout: defaultToConfig2, | |
timeoutMessage: defaultToConfig2, | |
withCredentials: defaultToConfig2, | |
adapter: defaultToConfig2, | |
responseType: defaultToConfig2, | |
xsrfCookieName: defaultToConfig2, | |
xsrfHeaderName: defaultToConfig2, | |
onUploadProgress: defaultToConfig2, | |
onDownloadProgress: defaultToConfig2, | |
decompress: defaultToConfig2, | |
maxContentLength: defaultToConfig2, | |
maxBodyLength: defaultToConfig2, | |
beforeRedirect: defaultToConfig2, | |
transport: defaultToConfig2, | |
httpAgent: defaultToConfig2, | |
httpsAgent: defaultToConfig2, | |
cancelToken: defaultToConfig2, | |
socketPath: defaultToConfig2, | |
responseEncoding: defaultToConfig2, | |
validateStatus: mergeDirectKeys, | |
headers: (a, b) => | |
mergeDeepProperties(headersToObject(a), headersToObject(b), true), | |
}; | |
utils_default.forEach( | |
Object.keys(Object.assign({}, config1, config2)), | |
function computeConfigValue(prop) { | |
const merge2 = mergeMap[prop] || mergeDeepProperties; | |
const configValue = merge2(config1[prop], config2[prop], prop); | |
(utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys) || | |
(config[prop] = configValue); | |
} | |
); | |
return config; | |
} | |
// node_modules/axios/lib/helpers/validator.js | |
var validators = {}; | |
["object", "boolean", "number", "function", "string", "symbol"].forEach( | |
(type, i) => { | |
validators[type] = function validator(thing) { | |
return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type; | |
}; | |
} | |
); | |
var deprecatedWarnings = {}; | |
validators.transitional = function transitional(validator, version, message) { | |
function formatMessage(opt, desc) { | |
return ( | |
"[Axios v" + | |
VERSION + | |
"] Transitional option '" + | |
opt + | |
"'" + | |
desc + | |
(message ? ". " + message : "") | |
); | |
} | |
return (value, opt, opts) => { | |
if (validator === false) { | |
throw new AxiosError_default( | |
formatMessage( | |
opt, | |
" has been removed" + (version ? " in " + version : "") | |
), | |
AxiosError_default.ERR_DEPRECATED | |
); | |
} | |
if (version && !deprecatedWarnings[opt]) { | |
deprecatedWarnings[opt] = true; | |
console.warn( | |
formatMessage( | |
opt, | |
" has been deprecated since v" + | |
version + | |
" and will be removed in the near future" | |
) | |
); | |
} | |
return validator ? validator(value, opt, opts) : true; | |
}; | |
}; | |
function assertOptions(options, schema, allowUnknown) { | |
if (typeof options !== "object") { | |
throw new AxiosError_default( | |
"options must be an object", | |
AxiosError_default.ERR_BAD_OPTION_VALUE | |
); | |
} | |
const keys = Object.keys(options); | |
let i = keys.length; | |
while (i-- > 0) { | |
const opt = keys[i]; | |
const validator = schema[opt]; | |
if (validator) { | |
const value = options[opt]; | |
const result = value === void 0 || validator(value, opt, options); | |
if (result !== true) { | |
throw new AxiosError_default( | |
"option " + opt + " must be " + result, | |
AxiosError_default.ERR_BAD_OPTION_VALUE | |
); | |
} | |
continue; | |
} | |
if (allowUnknown !== true) { | |
throw new AxiosError_default( | |
"Unknown option " + opt, | |
AxiosError_default.ERR_BAD_OPTION | |
); | |
} | |
} | |
} | |
var validator_default = { | |
assertOptions, | |
validators, | |
}; | |
// node_modules/axios/lib/core/Axios.js | |
var validators2 = validator_default.validators; | |
var Axios = class { | |
constructor(instanceConfig) { | |
this.defaults = instanceConfig; | |
this.interceptors = { | |
request: new InterceptorManager_default(), | |
response: new InterceptorManager_default(), | |
}; | |
} | |
/** | |
* Dispatch a request | |
* | |
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) | |
* @param {?Object} config | |
* | |
* @returns {Promise} The Promise to be fulfilled | |
*/ | |
request(configOrUrl, config) { | |
if (typeof configOrUrl === "string") { | |
config = config || {}; | |
config.url = configOrUrl; | |
} else { | |
config = configOrUrl || {}; | |
} | |
config = mergeConfig(this.defaults, config); | |
const { | |
transitional: transitional2, | |
paramsSerializer: paramsSerializer2, | |
headers, | |
} = config; | |
if (transitional2 !== void 0) { | |
validator_default.assertOptions( | |
transitional2, | |
{ | |
silentJSONParsing: validators2.transitional(validators2.boolean), | |
forcedJSONParsing: validators2.transitional(validators2.boolean), | |
clarifyTimeoutError: validators2.transitional(validators2.boolean), | |
}, | |
false | |
); | |
} | |
if (paramsSerializer2 != null) { | |
if (utils_default.isFunction(paramsSerializer2)) { | |
config.paramsSerializer = { | |
serialize: paramsSerializer2, | |
}; | |
} else { | |
validator_default.assertOptions( | |
paramsSerializer2, | |
{ | |
encode: validators2.function, | |
serialize: validators2.function, | |
}, | |
true | |
); | |
} | |
} | |
config.method = ( | |
config.method || | |
this.defaults.method || | |
"get" | |
).toLowerCase(); | |
let contextHeaders = | |
headers && utils_default.merge(headers.common, headers[config.method]); | |
headers && | |
utils_default.forEach( | |
["delete", "get", "head", "post", "put", "patch", "common"], | |
(method) => { | |
delete headers[method]; | |
} | |
); | |
config.headers = AxiosHeaders_default.concat(contextHeaders, headers); | |
const requestInterceptorChain = []; | |
let synchronousRequestInterceptors = true; | |
this.interceptors.request.forEach(function unshiftRequestInterceptors( | |
interceptor | |
) { | |
if ( | |
typeof interceptor.runWhen === "function" && | |
interceptor.runWhen(config) === false | |
) { | |
return; | |
} | |
synchronousRequestInterceptors = | |
synchronousRequestInterceptors && interceptor.synchronous; | |
requestInterceptorChain.unshift( | |
interceptor.fulfilled, | |
interceptor.rejected | |
); | |
}); | |
const responseInterceptorChain = []; | |
this.interceptors.response.forEach(function pushResponseInterceptors( | |
interceptor | |
) { | |
responseInterceptorChain.push( | |
interceptor.fulfilled, | |
interceptor.rejected | |
); | |
}); | |
let promise; | |
let i = 0; | |
let len; | |
if (!synchronousRequestInterceptors) { | |
const chain = [dispatchRequest.bind(this), void 0]; | |
chain.unshift.apply(chain, requestInterceptorChain); | |
chain.push.apply(chain, responseInterceptorChain); | |
len = chain.length; | |
promise = Promise.resolve(config); | |
while (i < len) { | |
promise = promise.then(chain[i++], chain[i++]); | |
} | |
return promise; | |
} | |
len = requestInterceptorChain.length; | |
let newConfig = config; | |
i = 0; | |
while (i < len) { | |
const onFulfilled = requestInterceptorChain[i++]; | |
const onRejected = requestInterceptorChain[i++]; | |
try { | |
newConfig = onFulfilled(newConfig); | |
} catch (error) { | |
onRejected.call(this, error); | |
break; | |
} | |
} | |
try { | |
promise = dispatchRequest.call(this, newConfig); | |
} catch (error) { | |
return Promise.reject(error); | |
} | |
i = 0; | |
len = responseInterceptorChain.length; | |
while (i < len) { | |
promise = promise.then( | |
responseInterceptorChain[i++], | |
responseInterceptorChain[i++] | |
); | |
} | |
return promise; | |
} | |
getUri(config) { | |
config = mergeConfig(this.defaults, config); | |
const fullPath = buildFullPath(config.baseURL, config.url); | |
return buildURL(fullPath, config.params, config.paramsSerializer); | |
} | |
}; | |
utils_default.forEach( | |
["delete", "get", "head", "options"], | |
function forEachMethodNoData(method) { | |
Axios.prototype[method] = function (url2, config) { | |
return this.request( | |
mergeConfig(config || {}, { | |
method, | |
url: url2, | |
data: (config || {}).data, | |
}) | |
); | |
}; | |
} | |
); | |
utils_default.forEach( | |
["post", "put", "patch"], | |
function forEachMethodWithData(method) { | |
function generateHTTPMethod(isForm) { | |
return function httpMethod(url2, data, config) { | |
return this.request( | |
mergeConfig(config || {}, { | |
method, | |
headers: isForm | |
? { | |
"Content-Type": "multipart/form-data", | |
} | |
: {}, | |
url: url2, | |
data, | |
}) | |
); | |
}; | |
} | |
Axios.prototype[method] = generateHTTPMethod(); | |
Axios.prototype[method + "Form"] = generateHTTPMethod(true); | |
} | |
); | |
var Axios_default = Axios; | |
// node_modules/axios/lib/cancel/CancelToken.js | |
var CancelToken = class _CancelToken { | |
constructor(executor) { | |
if (typeof executor !== "function") { | |
throw new TypeError("executor must be a function."); | |
} | |
let resolvePromise; | |
this.promise = new Promise(function promiseExecutor(resolve) { | |
resolvePromise = resolve; | |
}); | |
const token = this; | |
this.promise.then((cancel) => { | |
if (!token._listeners) return; | |
let i = token._listeners.length; | |
while (i-- > 0) { | |
token._listeners[i](cancel); | |
} | |
token._listeners = null; | |
}); | |
this.promise.then = (onfulfilled) => { | |
let _resolve; | |
const promise = new Promise((resolve) => { | |
token.subscribe(resolve); | |
_resolve = resolve; | |
}).then(onfulfilled); | |
promise.cancel = function reject() { | |
token.unsubscribe(_resolve); | |
}; | |
return promise; | |
}; | |
executor(function cancel(message, config, request2) { | |
if (token.reason) { | |
return; | |
} | |
token.reason = new CanceledError_default(message, config, request2); | |
resolvePromise(token.reason); | |
}); | |
} | |
/** | |
* Throws a `CanceledError` if cancellation has been requested. | |
*/ | |
throwIfRequested() { | |
if (this.reason) { | |
throw this.reason; | |
} | |
} | |
/** | |
* Subscribe to the cancel signal | |
*/ | |
subscribe(listener) { | |
if (this.reason) { | |
listener(this.reason); | |
return; | |
} | |
if (this._listeners) { | |
this._listeners.push(listener); | |
} else { | |
this._listeners = [listener]; | |
} | |
} | |
/** | |
* Unsubscribe from the cancel signal | |
*/ | |
unsubscribe(listener) { | |
if (!this._listeners) { | |
return; | |
} | |
const index = this._listeners.indexOf(listener); | |
if (index !== -1) { | |
this._listeners.splice(index, 1); | |
} | |
} | |
/** | |
* Returns an object that contains a new `CancelToken` and a function that, when called, | |
* cancels the `CancelToken`. | |
*/ | |
static source() { | |
let cancel; | |
const token = new _CancelToken(function executor(c) { | |
cancel = c; | |
}); | |
return { | |
token, | |
cancel, | |
}; | |
} | |
}; | |
var CancelToken_default = CancelToken; | |
// node_modules/axios/lib/helpers/spread.js | |
function spread(callback) { | |
return function wrap(arr) { | |
return callback.apply(null, arr); | |
}; | |
} | |
// node_modules/axios/lib/helpers/isAxiosError.js | |
function isAxiosError(payload) { | |
return utils_default.isObject(payload) && payload.isAxiosError === true; | |
} | |
// node_modules/axios/lib/helpers/HttpStatusCode.js | |
var HttpStatusCode = { | |
Continue: 100, | |
SwitchingProtocols: 101, | |
Processing: 102, | |
EarlyHints: 103, | |
Ok: 200, | |
Created: 201, | |
Accepted: 202, | |
NonAuthoritativeInformation: 203, | |
NoContent: 204, | |
ResetContent: 205, | |
PartialContent: 206, | |
MultiStatus: 207, | |
AlreadyReported: 208, | |
ImUsed: 226, | |
MultipleChoices: 300, | |
MovedPermanently: 301, | |
Found: 302, | |
SeeOther: 303, | |
NotModified: 304, | |
UseProxy: 305, | |
Unused: 306, | |
TemporaryRedirect: 307, | |
PermanentRedirect: 308, | |
BadRequest: 400, | |
Unauthorized: 401, | |
PaymentRequired: 402, | |
Forbidden: 403, | |
NotFound: 404, | |
MethodNotAllowed: 405, | |
NotAcceptable: 406, | |
ProxyAuthenticationRequired: 407, | |
RequestTimeout: 408, | |
Conflict: 409, | |
Gone: 410, | |
LengthRequired: 411, | |
PreconditionFailed: 412, | |
PayloadTooLarge: 413, | |
UriTooLong: 414, | |
UnsupportedMediaType: 415, | |
RangeNotSatisfiable: 416, | |
ExpectationFailed: 417, | |
ImATeapot: 418, | |
MisdirectedRequest: 421, | |
UnprocessableEntity: 422, | |
Locked: 423, | |
FailedDependency: 424, | |
TooEarly: 425, | |
UpgradeRequired: 426, | |
PreconditionRequired: 428, | |
TooManyRequests: 429, | |
RequestHeaderFieldsTooLarge: 431, | |
UnavailableForLegalReasons: 451, | |
InternalServerError: 500, | |
NotImplemented: 501, | |
BadGateway: 502, | |
ServiceUnavailable: 503, | |
GatewayTimeout: 504, | |
HttpVersionNotSupported: 505, | |
VariantAlsoNegotiates: 506, | |
InsufficientStorage: 507, | |
LoopDetected: 508, | |
NotExtended: 510, | |
NetworkAuthenticationRequired: 511, | |
}; | |
Object.entries(HttpStatusCode).forEach(([key, value]) => { | |
HttpStatusCode[value] = key; | |
}); | |
var HttpStatusCode_default = HttpStatusCode; | |
// node_modules/axios/lib/axios.js | |
function createInstance(defaultConfig) { | |
const context = new Axios_default(defaultConfig); | |
const instance = bind(Axios_default.prototype.request, context); | |
utils_default.extend(instance, Axios_default.prototype, context, { | |
allOwnKeys: true, | |
}); | |
utils_default.extend(instance, context, null, {allOwnKeys: true}); | |
instance.create = function create(instanceConfig) { | |
return createInstance(mergeConfig(defaultConfig, instanceConfig)); | |
}; | |
return instance; | |
} | |
var axios = createInstance(defaults_default); | |
axios.Axios = Axios_default; | |
axios.CanceledError = CanceledError_default; | |
axios.CancelToken = CancelToken_default; | |
axios.isCancel = isCancel; | |
axios.VERSION = VERSION; | |
axios.toFormData = toFormData_default; | |
axios.AxiosError = AxiosError_default; | |
axios.Cancel = axios.CanceledError; | |
axios.all = function all(promises) { | |
return Promise.all(promises); | |
}; | |
axios.spread = spread; | |
axios.isAxiosError = isAxiosError; | |
axios.mergeConfig = mergeConfig; | |
axios.AxiosHeaders = AxiosHeaders_default; | |
axios.formToJSON = (thing) => | |
formDataToJSON_default( | |
utils_default.isHTMLForm(thing) ? new FormData(thing) : thing | |
); | |
axios.getAdapter = adapters_default.getAdapter; | |
axios.HttpStatusCode = HttpStatusCode_default; | |
axios.default = axios; | |
var axios_default = axios; | |
// node_modules/axios/index.js | |
var { | |
Axios: Axios2, | |
AxiosError: AxiosError2, | |
CanceledError: CanceledError2, | |
isCancel: isCancel2, | |
CancelToken: CancelToken2, | |
VERSION: VERSION2, | |
all: all2, | |
Cancel, | |
isAxiosError: isAxiosError2, | |
spread: spread2, | |
toFormData: toFormData2, | |
AxiosHeaders: AxiosHeaders2, | |
HttpStatusCode: HttpStatusCode2, | |
formToJSON, | |
getAdapter, | |
mergeConfig: mergeConfig2, | |
} = axios_default; | |
// src/restClient.ts | |
var import_axios_case_converter = __toESM(require_lib2()); | |
// src/types/errors.ts | |
var import_ts_custom_error = __toESM(require_custom_error()); | |
var authenticationErrorCodes = [401, 403]; | |
var TodoistRequestError = class extends import_ts_custom_error.CustomError { | |
constructor(message, httpStatusCode, responseData) { | |
super(message); | |
this.message = message; | |
this.httpStatusCode = httpStatusCode; | |
this.responseData = responseData; | |
this.isAuthenticationError = () => { | |
if (!this.httpStatusCode) { | |
return false; | |
} | |
return authenticationErrorCodes.includes(this.httpStatusCode); | |
}; | |
Object.defineProperty(this, "name", {value: "TodoistRequestError"}); | |
} | |
}; | |
// node_modules/uuid/dist/esm-node/rng.js | |
var import_crypto = __toESM(require("crypto")); | |
var rnds8Pool = new Uint8Array(256); | |
var poolPtr = rnds8Pool.length; | |
function rng() { | |
if (poolPtr > rnds8Pool.length - 16) { | |
import_crypto.default.randomFillSync(rnds8Pool); | |
poolPtr = 0; | |
} | |
return rnds8Pool.slice(poolPtr, (poolPtr += 16)); | |
} | |
// node_modules/uuid/dist/esm-node/stringify.js | |
var byteToHex = []; | |
for (let i = 0; i < 256; ++i) { | |
byteToHex.push((i + 256).toString(16).slice(1)); | |
} | |
function unsafeStringify(arr, offset = 0) { | |
return ( | |
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(); | |
} | |
// node_modules/uuid/dist/esm-node/native.js | |
var import_crypto2 = __toESM(require("crypto")); | |
var native_default = { | |
randomUUID: import_crypto2.default.randomUUID, | |
}; | |
// node_modules/uuid/dist/esm-node/v4.js | |
function v4(options, buf, offset) { | |
if (native_default.randomUUID && !buf && !options) { | |
return native_default.randomUUID(); | |
} | |
options = options || {}; | |
const rnds = options.random || (options.rng || rng)(); | |
rnds[6] = (rnds[6] & 15) | 64; | |
rnds[8] = (rnds[8] & 63) | 128; | |
if (buf) { | |
offset = offset || 0; | |
for (let i = 0; i < 16; ++i) { | |
buf[offset + i] = rnds[i]; | |
} | |
return buf; | |
} | |
return unsafeStringify(rnds); | |
} | |
var v4_default = v4; | |
// node_modules/axios-retry/lib/esm/index.js | |
var import_is_retry_allowed = __toESM(require_is_retry_allowed(), 1); | |
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | |
try { | |
var info = gen[key](arg); | |
var value = info.value; | |
} catch (error) { | |
reject(error); | |
return; | |
} | |
if (info.done) { | |
resolve(value); | |
} else { | |
Promise.resolve(value).then(_next, _throw); | |
} | |
} | |
function _asyncToGenerator(fn) { | |
return function () { | |
var self2 = this, | |
args = arguments; | |
return new Promise(function (resolve, reject) { | |
var gen = fn.apply(self2, args); | |
function _next(value) { | |
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); | |
} | |
function _throw(err) { | |
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); | |
} | |
_next(void 0); | |
}); | |
}; | |
} | |
function ownKeys(object, enumerableOnly) { | |
var keys = Object.keys(object); | |
if (Object.getOwnPropertySymbols) { | |
var symbols = Object.getOwnPropertySymbols(object); | |
if (enumerableOnly) { | |
symbols = symbols.filter(function (sym) { | |
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | |
}); | |
} | |
keys.push.apply(keys, symbols); | |
} | |
return keys; | |
} | |
function _objectSpread(target) { | |
for (var i = 1; i < arguments.length; i++) { | |
var source = arguments[i] != null ? arguments[i] : {}; | |
if (i % 2) { | |
ownKeys(Object(source), true).forEach(function (key) { | |
_defineProperty(target, key, source[key]); | |
}); | |
} else if (Object.getOwnPropertyDescriptors) { | |
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | |
} else { | |
ownKeys(Object(source)).forEach(function (key) { | |
Object.defineProperty( | |
target, | |
key, | |
Object.getOwnPropertyDescriptor(source, key) | |
); | |
}); | |
} | |
} | |
return target; | |
} | |
function _defineProperty(obj, key, value) { | |
if (key in obj) { | |
Object.defineProperty(obj, key, { | |
value, | |
enumerable: true, | |
configurable: true, | |
writable: true, | |
}); | |
} else { | |
obj[key] = value; | |
} | |
return obj; | |
} | |
var namespace = "axios-retry"; | |
function isNetworkError(error) { | |
return ( | |
!error.response && | |
Boolean(error.code) && // Prevents retrying cancelled requests | |
error.code !== "ECONNABORTED" && // Prevents retrying timed out requests | |
(0, import_is_retry_allowed.default)(error) | |
); | |
} | |
var SAFE_HTTP_METHODS = ["get", "head", "options"]; | |
var IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(["put", "delete"]); | |
function isRetryableError(error) { | |
return ( | |
error.code !== "ECONNABORTED" && | |
(!error.response || | |
(error.response.status >= 500 && error.response.status <= 599)) | |
); | |
} | |
function isSafeRequestError(error) { | |
if (!error.config) { | |
return false; | |
} | |
return ( | |
isRetryableError(error) && | |
SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1 | |
); | |
} | |
function isIdempotentRequestError(error) { | |
if (!error.config) { | |
return false; | |
} | |
return ( | |
isRetryableError(error) && | |
IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1 | |
); | |
} | |
function isNetworkOrIdempotentRequestError(error) { | |
return isNetworkError(error) || isIdempotentRequestError(error); | |
} | |
function noDelay() { | |
return 0; | |
} | |
function exponentialDelay() { | |
var retryNumber = | |
arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; | |
var delay = Math.pow(2, retryNumber) * 100; | |
var randomSum = delay * 0.2 * Math.random(); | |
return delay + randomSum; | |
} | |
function getCurrentState(config) { | |
var currentState = config[namespace] || {}; | |
currentState.retryCount = currentState.retryCount || 0; | |
config[namespace] = currentState; | |
return currentState; | |
} | |
function getRequestOptions(config, defaultOptions) { | |
return _objectSpread(_objectSpread({}, defaultOptions), config[namespace]); | |
} | |
function fixConfig(axios2, config) { | |
if (axios2.defaults.agent === config.agent) { | |
delete config.agent; | |
} | |
if (axios2.defaults.httpAgent === config.httpAgent) { | |
delete config.httpAgent; | |
} | |
if (axios2.defaults.httpsAgent === config.httpsAgent) { | |
delete config.httpsAgent; | |
} | |
} | |
function shouldRetry(_x, _x2, _x3, _x4) { | |
return _shouldRetry.apply(this, arguments); | |
} | |
function _shouldRetry() { | |
_shouldRetry = _asyncToGenerator(function* ( | |
retries, | |
retryCondition, | |
currentState, | |
error | |
) { | |
var shouldRetryOrPromise = | |
currentState.retryCount < retries && retryCondition(error); | |
if (typeof shouldRetryOrPromise === "object") { | |
try { | |
yield shouldRetryOrPromise; | |
return true; | |
} catch (_err) { | |
return false; | |
} | |
} | |
return shouldRetryOrPromise; | |
}); | |
return _shouldRetry.apply(this, arguments); | |
} | |
function axiosRetry(axios2, defaultOptions) { | |
axios2.interceptors.request.use((config) => { | |
var currentState = getCurrentState(config); | |
currentState.lastRequestTime = Date.now(); | |
return config; | |
}); | |
axios2.interceptors.response.use( | |
null, | |
/* @__PURE__ */ (function () { | |
var _ref = _asyncToGenerator(function* (error) { | |
var {config} = error; | |
if (!config) { | |
return Promise.reject(error); | |
} | |
var { | |
retries = 3, | |
retryCondition = isNetworkOrIdempotentRequestError, | |
retryDelay = noDelay, | |
shouldResetTimeout = false, | |
} = getRequestOptions(config, defaultOptions); | |
var currentState = getCurrentState(config); | |
if (yield shouldRetry(retries, retryCondition, currentState, error)) { | |
currentState.retryCount += 1; | |
var delay = retryDelay(currentState.retryCount, error); | |
fixConfig(axios2, config); | |
if ( | |
!shouldResetTimeout && | |
config.timeout && | |
currentState.lastRequestTime | |
) { | |
var lastRequestDuration = Date.now() - currentState.lastRequestTime; | |
config.timeout = Math.max( | |
config.timeout - lastRequestDuration - delay, | |
1 | |
); | |
} | |
config.transformRequest = [(data) => data]; | |
return new Promise((resolve) => | |
setTimeout(() => resolve(axios2(config)), delay) | |
); | |
} | |
return Promise.reject(error); | |
}); | |
return function (_x5) { | |
return _ref.apply(this, arguments); | |
}; | |
})() | |
); | |
} | |
axiosRetry.isNetworkError = isNetworkError; | |
axiosRetry.isSafeRequestError = isSafeRequestError; | |
axiosRetry.isIdempotentRequestError = isIdempotentRequestError; | |
axiosRetry.isNetworkOrIdempotentRequestError = | |
isNetworkOrIdempotentRequestError; | |
axiosRetry.exponentialDelay = exponentialDelay; | |
axiosRetry.isRetryableError = isRetryableError; | |
// src/consts/endpoints.ts | |
var BASE_URI = "https://api.todoist.com"; | |
var API_REST_BASE_URI = "/rest/v2/"; | |
var API_SYNC_BASE_URI = "/sync/v9/"; | |
function getRestBaseUri(domainBase = BASE_URI) { | |
return new URL(API_REST_BASE_URI, domainBase).toString(); | |
} | |
function getSyncBaseUri(domainBase = BASE_URI) { | |
return new URL(API_SYNC_BASE_URI, domainBase).toString(); | |
} | |
var ENDPOINT_REST_TASKS = "tasks"; | |
var ENDPOINT_REST_PROJECTS = "projects"; | |
var ENDPOINT_REST_SECTIONS = "sections"; | |
var ENDPOINT_REST_LABELS = "labels"; | |
var ENDPOINT_REST_LABELS_SHARED = ENDPOINT_REST_LABELS + "/shared"; | |
var ENDPOINT_REST_LABELS_SHARED_RENAME = | |
ENDPOINT_REST_LABELS_SHARED + "/rename"; | |
var ENDPOINT_REST_LABELS_SHARED_REMOVE = | |
ENDPOINT_REST_LABELS_SHARED + "/remove"; | |
var ENDPOINT_REST_COMMENTS = "comments"; | |
var ENDPOINT_REST_TASK_CLOSE = "close"; | |
var ENDPOINT_REST_TASK_REOPEN = "reopen"; | |
var ENDPOINT_REST_PROJECT_COLLABORATORS = "collaborators"; | |
var ENDPOINT_SYNC_QUICK_ADD = "quick/add"; | |
// src/restClient.ts | |
function paramsSerializer(params) { | |
const qs = new URLSearchParams(); | |
Object.keys(params).forEach((key) => { | |
const value = params[key]; | |
if (Array.isArray(value)) { | |
qs.append(key, value.join(",")); | |
} else { | |
qs.append(key, String(value)); | |
} | |
}); | |
return qs.toString(); | |
} | |
var defaultHeaders = { | |
"Content-Type": "application/json", | |
}; | |
function getAuthHeader(apiKey) { | |
return `Bearer ${apiKey}`; | |
} | |
function isNetworkError2(error) { | |
return Boolean(!error.response && error.code !== "ECONNABORTED"); | |
} | |
function getRetryDelay(retryCount) { | |
return retryCount === 1 ? 0 : 500; | |
} | |
function isAxiosError3(error) { | |
return Boolean(error?.isAxiosError); | |
} | |
function getTodoistRequestError(error, originalStack) { | |
const requestError = new TodoistRequestError(error.message); | |
requestError.stack = | |
isAxiosError3(error) && originalStack ? originalStack.stack : error.stack; | |
if (isAxiosError3(error) && error.response) { | |
requestError.httpStatusCode = error.response.status; | |
requestError.responseData = error.response.data; | |
} | |
return requestError; | |
} | |
function getRequestConfiguration(baseURL, apiToken, requestId) { | |
const authHeader = apiToken | |
? {Authorization: getAuthHeader(apiToken)} | |
: void 0; | |
const requestIdHeader = requestId ? {"X-Request-Id": requestId} : void 0; | |
const headers = {...defaultHeaders, ...authHeader, ...requestIdHeader}; | |
return {baseURL, headers}; | |
} | |
function getAxiosClient(baseURL, apiToken, requestId) { | |
const configuration = getRequestConfiguration(baseURL, apiToken, requestId); | |
const client = (0, import_axios_case_converter.default)( | |
axios_default.create(configuration) | |
); | |
axiosRetry(client, { | |
retries: 3, | |
retryCondition: isNetworkError2, | |
retryDelay: getRetryDelay, | |
}); | |
return client; | |
} | |
function isSuccess(response) { | |
return response.status >= 200 && response.status < 300; | |
} | |
async function request( | |
httpMethod, | |
baseUri, | |
relativePath, | |
apiToken, | |
payload, | |
requestId | |
) { | |
const originalStack = new Error(); | |
try { | |
if ( | |
httpMethod === "POST" && | |
!requestId && | |
!baseUri.includes(API_SYNC_BASE_URI) | |
) { | |
requestId = v4_default(); | |
} | |
const axiosClient = getAxiosClient(baseUri, apiToken, requestId); | |
switch (httpMethod) { | |
case "GET": | |
return await axiosClient.get(relativePath, { | |
params: payload, | |
paramsSerializer: { | |
serialize: paramsSerializer, | |
}, | |
}); | |
case "POST": | |
return await axiosClient.post(relativePath, payload); | |
case "DELETE": | |
return await axiosClient.delete(relativePath); | |
} | |
} catch (error) { | |
if (!isAxiosError3(error) && !(error instanceof Error)) { | |
throw new Error("An unknown error occurred during the request"); | |
} | |
throw getTodoistRequestError(error, originalStack); | |
} | |
} | |
// src/utils/taskConverters.ts | |
var showTaskEndpoint = "https://todoist.com/showTask"; | |
function getTaskUrlFromQuickAddResponse(responseData) { | |
return `${showTaskEndpoint}?id=${responseData.id}`; | |
} | |
function getTaskFromQuickAddResponse(responseData) { | |
const due = responseData.due | |
? { | |
isRecurring: responseData.due.isRecurring, | |
string: responseData.due.string, | |
date: responseData.due.date, | |
...(responseData.due.timezone !== null && { | |
datetime: responseData.due.date, | |
}), | |
...(responseData.due.timezone !== null && { | |
timezone: responseData.due.timezone, | |
}), | |
} | |
: void 0; | |
const task = { | |
id: responseData.id, | |
order: responseData.childOrder, | |
content: responseData.content, | |
description: responseData.description, | |
projectId: responseData.projectId, | |
sectionId: responseData.sectionId ? responseData.sectionId : void 0, | |
isCompleted: responseData.checked, | |
labels: responseData.labels, | |
priority: responseData.priority, | |
commentCount: 0, | |
// Will always be 0 for a quick add | |
createdAt: responseData.addedAt, | |
url: getTaskUrlFromQuickAddResponse(responseData), | |
creatorId: responseData.addedByUid ?? "", | |
...(due !== void 0 && {due}), | |
...(responseData.parentId !== null && {parentId: responseData.parentId}), | |
...(responseData.responsibleUid !== null && { | |
assigneeId: responseData.responsibleUid, | |
}), | |
duration: responseData.duration, | |
}; | |
return task; | |
} | |
// src/types/entities.ts | |
var import_runtypes = __toESM(require_lib()); | |
var Int = import_runtypes.Number.withConstraint( | |
(n) => | |
Number.isInteger(n) || `${n} is not a valid entity id. Should be a string` | |
); | |
var DueDate = (0, import_runtypes.Record)({ | |
isRecurring: import_runtypes.Boolean, | |
string: import_runtypes.String, | |
date: import_runtypes.String, | |
}).And( | |
(0, import_runtypes.Partial)({ | |
datetime: import_runtypes.String.Or(import_runtypes.Null), | |
timezone: import_runtypes.String.Or(import_runtypes.Null), | |
lang: import_runtypes.String.Or(import_runtypes.Null), | |
}) | |
); | |
var Duration = (0, import_runtypes.Record)({ | |
amount: import_runtypes.Number.withConstraint( | |
(n) => n > 0 || "Value should be greater than zero" | |
), | |
unit: (0, import_runtypes.Union)( | |
(0, import_runtypes.Literal)("minute"), | |
(0, import_runtypes.Literal)("day") | |
), | |
}); | |
var Task = (0, import_runtypes.Record)({ | |
id: import_runtypes.String, | |
order: Int, | |
content: import_runtypes.String, | |
description: import_runtypes.String, | |
projectId: import_runtypes.String, | |
isCompleted: import_runtypes.Boolean, | |
labels: (0, import_runtypes.Array)(import_runtypes.String), | |
priority: Int, | |
commentCount: Int, | |
createdAt: import_runtypes.String, | |
url: import_runtypes.String, | |
creatorId: import_runtypes.String, | |
}).And( | |
(0, import_runtypes.Partial)({ | |
due: DueDate.Or(import_runtypes.Null), | |
duration: Duration.Or(import_runtypes.Null), | |
assigneeId: import_runtypes.String.Or(import_runtypes.Null), | |
assignerId: import_runtypes.String.Or(import_runtypes.Null), | |
parentId: import_runtypes.String.Or(import_runtypes.Null), | |
sectionId: import_runtypes.String.Or(import_runtypes.Null), | |
}) | |
); | |
var Project = (0, import_runtypes.Record)({ | |
id: import_runtypes.String, | |
name: import_runtypes.String, | |
color: import_runtypes.String, | |
commentCount: Int, | |
isShared: import_runtypes.Boolean, | |
isFavorite: import_runtypes.Boolean, | |
url: import_runtypes.String, | |
isInboxProject: import_runtypes.Boolean, | |
isTeamInbox: import_runtypes.Boolean, | |
order: Int, | |
viewStyle: import_runtypes.String, | |
}).And( | |
(0, import_runtypes.Partial)({ | |
parentId: import_runtypes.String.Or(import_runtypes.Null), | |
}) | |
); | |
var Section = (0, import_runtypes.Record)({ | |
id: import_runtypes.String, | |
order: Int, | |
name: import_runtypes.String, | |
projectId: import_runtypes.String, | |
}); | |
var Label = (0, import_runtypes.Record)({ | |
id: import_runtypes.String, | |
order: Int, | |
name: import_runtypes.String, | |
color: import_runtypes.String, | |
isFavorite: import_runtypes.Boolean, | |
}); | |
var Attachment = (0, import_runtypes.Record)({ | |
resourceType: import_runtypes.String, | |
}).And( | |
(0, import_runtypes.Partial)({ | |
fileName: import_runtypes.String.Or(import_runtypes.Null), | |
fileSize: Int.Or(import_runtypes.Null), | |
fileType: import_runtypes.String.Or(import_runtypes.Null), | |
fileUrl: import_runtypes.String.Or(import_runtypes.Null), | |
fileDuration: Int.Or(import_runtypes.Null), | |
uploadState: (0, import_runtypes.Union)( | |
(0, import_runtypes.Literal)("pending"), | |
(0, import_runtypes.Literal)("completed") | |
).Or(import_runtypes.Null), | |
image: import_runtypes.String.Or(import_runtypes.Null), | |
imageWidth: Int.Or(import_runtypes.Null), | |
imageHeight: Int.Or(import_runtypes.Null), | |
url: import_runtypes.String.Or(import_runtypes.Null), | |
title: import_runtypes.String.Or(import_runtypes.Null), | |
}) | |
); | |
var Comment = (0, import_runtypes.Record)({ | |
id: import_runtypes.String, | |
content: import_runtypes.String, | |
postedAt: import_runtypes.String, | |
}).And( | |
(0, import_runtypes.Partial)({ | |
taskId: import_runtypes.String.Or(import_runtypes.Null), | |
projectId: import_runtypes.String.Or(import_runtypes.Null), | |
attachment: Attachment.Or(import_runtypes.Null), | |
}) | |
); | |
var User = (0, import_runtypes.Record)({ | |
id: import_runtypes.String, | |
name: import_runtypes.String, | |
email: import_runtypes.String, | |
}); | |
// src/utils/validators.ts | |
function validateTask(input) { | |
return Task.check(input); | |
} | |
function validateTaskArray(input) { | |
return input.map(validateTask); | |
} | |
function validateProject(input) { | |
return Project.check(input); | |
} | |
function validateProjectArray(input) { | |
return input.map(validateProject); | |
} | |
function validateSection(input) { | |
return Section.check(input); | |
} | |
function validateSectionArray(input) { | |
return input.map(validateSection); | |
} | |
function validateLabel(input) { | |
return Label.check(input); | |
} | |
function validateLabelArray(input) { | |
return input.map(validateLabel); | |
} | |
function validateComment(input) { | |
return Comment.check(input); | |
} | |
function validateCommentArray(input) { | |
return input.map(validateComment); | |
} | |
function validateUser(input) { | |
return User.check(input); | |
} | |
function validateUserArray(input) { | |
return input.map(validateUser); | |
} | |
// src/TodoistApi.ts | |
function generatePath(...segments) { | |
return segments.join("/"); | |
} | |
var TodoistApi = class { | |
constructor(authToken, baseUrl) { | |
this.authToken = authToken; | |
this.restApiBase = getRestBaseUri(baseUrl); | |
this.syncApiBase = getSyncBaseUri(baseUrl); | |
} | |
async getTask(id) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_TASKS, id), | |
this.authToken | |
); | |
return validateTask(response.data); | |
} | |
async getTasks(args) { | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
ENDPOINT_REST_TASKS, | |
this.authToken, | |
args | |
); | |
return validateTaskArray(response.data); | |
} | |
async addTask(args, requestId) { | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
ENDPOINT_REST_TASKS, | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateTask(response.data); | |
} | |
async quickAddTask(args) { | |
const response = await request( | |
"POST", | |
this.syncApiBase, | |
ENDPOINT_SYNC_QUICK_ADD, | |
this.authToken, | |
args | |
); | |
const task = getTaskFromQuickAddResponse(response.data); | |
return validateTask(task); | |
} | |
async updateTask(id, args, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_TASKS, id), | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateTask(response.data); | |
} | |
async closeTask(id, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_TASKS, id, ENDPOINT_REST_TASK_CLOSE), | |
this.authToken, | |
void 0, | |
requestId | |
); | |
return isSuccess(response); | |
} | |
async reopenTask(id, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_TASKS, id, ENDPOINT_REST_TASK_REOPEN), | |
this.authToken, | |
void 0, | |
requestId | |
); | |
return isSuccess(response); | |
} | |
async deleteTask(id, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"DELETE", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_TASKS, id), | |
this.authToken, | |
void 0, | |
requestId | |
); | |
return isSuccess(response); | |
} | |
async getProject(id) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_PROJECTS, id), | |
this.authToken | |
); | |
return validateProject(response.data); | |
} | |
async getProjects() { | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
ENDPOINT_REST_PROJECTS, | |
this.authToken | |
); | |
return validateProjectArray(response.data); | |
} | |
async addProject(args, requestId) { | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
ENDPOINT_REST_PROJECTS, | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateProject(response.data); | |
} | |
async updateProject(id, args, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_PROJECTS, id), | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateProject(response.data); | |
} | |
async deleteProject(id, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"DELETE", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_PROJECTS, id), | |
this.authToken, | |
void 0, | |
requestId | |
); | |
return isSuccess(response); | |
} | |
async getProjectCollaborators(projectId) { | |
import_runtypes2.String.check(projectId); | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
generatePath( | |
ENDPOINT_REST_PROJECTS, | |
projectId, | |
ENDPOINT_REST_PROJECT_COLLABORATORS | |
), | |
this.authToken | |
); | |
return validateUserArray(response.data); | |
} | |
async getSections(projectId) { | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
ENDPOINT_REST_SECTIONS, | |
this.authToken, | |
projectId ? {projectId} : void 0 | |
); | |
return validateSectionArray(response.data); | |
} | |
async getSection(id) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_SECTIONS, id), | |
this.authToken | |
); | |
return validateSection(response.data); | |
} | |
async addSection(args, requestId) { | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
ENDPOINT_REST_SECTIONS, | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateSection(response.data); | |
} | |
async updateSection(id, args, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_SECTIONS, id), | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateSection(response.data); | |
} | |
async deleteSection(id, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"DELETE", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_SECTIONS, id), | |
this.authToken, | |
void 0, | |
requestId | |
); | |
return isSuccess(response); | |
} | |
/** | |
* Fetches a personal label | |
*/ | |
async getLabel(id) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_LABELS, id), | |
this.authToken | |
); | |
return validateLabel(response.data); | |
} | |
/** | |
* Fetches the personal labels | |
*/ | |
async getLabels() { | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
ENDPOINT_REST_LABELS, | |
this.authToken | |
); | |
return validateLabelArray(response.data); | |
} | |
/** | |
* Adds a personal label | |
*/ | |
async addLabel(args, requestId) { | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
ENDPOINT_REST_LABELS, | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateLabel(response.data); | |
} | |
/** | |
* Updates a personal label | |
*/ | |
async updateLabel(id, args, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_LABELS, id), | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateLabel(response.data); | |
} | |
/** | |
* Deletes a personal label | |
*/ | |
async deleteLabel(id, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"DELETE", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_LABELS, id), | |
this.authToken, | |
void 0, | |
requestId | |
); | |
return isSuccess(response); | |
} | |
async getSharedLabels(args) { | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
ENDPOINT_REST_LABELS_SHARED, | |
this.authToken, | |
args | |
); | |
return response.data; | |
} | |
async renameSharedLabel(args) { | |
await request( | |
"POST", | |
this.restApiBase, | |
ENDPOINT_REST_LABELS_SHARED_RENAME, | |
this.authToken, | |
args | |
); | |
} | |
async removeSharedLabel(args) { | |
await request( | |
"POST", | |
this.restApiBase, | |
ENDPOINT_REST_LABELS_SHARED_REMOVE, | |
this.authToken, | |
args | |
); | |
} | |
async getComments(args) { | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
ENDPOINT_REST_COMMENTS, | |
this.authToken, | |
args | |
); | |
return validateCommentArray(response.data); | |
} | |
async getComment(id) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"GET", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_COMMENTS, id), | |
this.authToken | |
); | |
return validateComment(response.data); | |
} | |
async addComment(args, requestId) { | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
ENDPOINT_REST_COMMENTS, | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateComment(response.data); | |
} | |
async updateComment(id, args, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"POST", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_COMMENTS, id), | |
this.authToken, | |
args, | |
requestId | |
); | |
return validateComment(response.data); | |
} | |
async deleteComment(id, requestId) { | |
import_runtypes2.String.check(id); | |
const response = await request( | |
"DELETE", | |
this.restApiBase, | |
generatePath(ENDPOINT_REST_COMMENTS, id), | |
this.authToken, | |
void 0, | |
requestId | |
); | |
return isSuccess(response); | |
} | |
}; | |
// Annotate the CommonJS export names for ESM import in node: | |
// 0 && | |
// (module.exports = { | |
// TodoistApi, | |
// }); | |
/*! Bundled license information: | |
mime-db/index.js: | |
(*! | |
* mime-db | |
* Copyright(c) 2014 Jonathan Ong | |
* MIT Licensed | |
*) | |
mime-types/index.js: | |
(*! | |
* mime-types | |
* Copyright(c) 2014 Jonathan Ong | |
* Copyright(c) 2015 Douglas Christopher Wilson | |
* MIT Licensed | |
*) | |
tslib/tslib.es6.js: | |
(*! ***************************************************************************** | |
Copyright (c) Microsoft Corporation. | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | |
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | |
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | |
PERFORMANCE OF THIS SOFTWARE. | |
***************************************************************************** *) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const logs = []; | |
const lastSyncTokenPath = "Download/todoist_last_sync_token.txt"; | |
// logs.push("before global('TodoistLib')"); | |
// eval(readFile("Download/one_bundle.js")); | |
// logs.push("after global('TodoistLib')"); | |
if (typeof todoist_header !== "string") { | |
logs.push("missing todoist_header!"); | |
logAndExit(); | |
} | |
const syncToken = getSyncToken(); | |
const result = callTodoistSyncApi(syncToken); | |
result | |
.then((r) => { | |
logs.push("result then"); | |
logAndExit(); | |
}) | |
.catch((e) => { | |
logs.push("result catch"); | |
logAndExit(); | |
}); | |
// exit(); | |
function setSyncToken(syncToken) { | |
logs.push(`setSyncToken: ${syncToken}`); | |
writeFile(lastSyncTokenPath, syncToken); | |
logs.push(`setSyncToken ok 👌🏻`); | |
} | |
function getSyncToken(syncToken) { | |
const lastToken = readFile(lastSyncTokenPath); | |
if (lastToken) { | |
//flash(`lastToken: ${lastToken}`); | |
return lastToken; | |
} else { | |
return false; | |
} | |
} | |
async function callTodoistSyncApi(syncToken) { | |
const url = `https://api.todoist.com/sync/v9/sync?resource_types=["all"]&sync_token=${syncToken}`; | |
const headers = new Headers(); | |
headers.append("Authorization", `Bearer ${todoist_header}`); | |
const requestOptions = { | |
headers: headers, | |
}; | |
let httpResponse; | |
try { | |
httpResponse = await fetch(url, requestOptions); | |
} catch (e) { | |
logs.push("callTodoistSyncApi fetch Error: " + e.message); | |
logAndExit(); | |
} | |
if (!httpResponse.ok) { | |
logs.push(`Network response was not ok: ${httpResponse.statusCode}`); | |
log.push(JSON.stringify(httpResponse, null, 2)); | |
logAndExit(); | |
} | |
let jsonResponse; | |
try { | |
jsonResponse = await httpResponse.json(); | |
} catch (e) { | |
logs.push("callTodoistSyncApi jsonResponse Error: " + e.message); | |
logAndExit(); | |
} | |
setSyncToken(jsonResponse.sync_token); | |
let formattedResponse; | |
try { | |
formattedResponse = JSON.stringify(jsonResponse, null, 2); | |
} catch (e) { | |
logs.push("callTodoistSyncApi formattedResponse Error: " + e.message); | |
logAndExit(); | |
} | |
logs.push("callTodoistSyncApi ok"); | |
logs.push(formattedResponse); | |
return jsonResponse; | |
} | |
// setLocal("debugtext", JSON.stringify(dataobj, null, 2)); | |
// if (typeof http_data !== "string") { | |
// flash("empty data!"); | |
// } else { | |
// let dataobj; | |
// try { | |
// dataobj = JSON.parse(http_data); | |
// } catch (e) { | |
// flash("json parse Error: " + e.message); | |
// exit(); | |
// } | |
// const todos = dataobj.items; | |
// const todaysTodos = todos.filter((todo) => todo.due !== null); | |
// // checked | |
// // due.date | |
// // due.is_recurring | |
// // completed_at (null | |
// // content (title) | |
// //day_order (number) | |
// // labels (array) | |
// // priority | |
// // | |
// setLocal("debugtext", JSON.stringify(dataobj, null, 2)); | |
// const keys = Object.keys(todos[0]); | |
// } | |
function logAndExit() { | |
setLocal("debugtext", logs.join("\n")); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment