@sapphire/shapeshift
Version:
Blazing fast input validation and transformation ⚡
1,529 lines (1,456 loc) • 165 kB
JavaScript
var SapphireShapeshift = (function (exports) {
'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 __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
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.
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// node_modules/lodash/isArray.js
var require_isArray = __commonJS({
"node_modules/lodash/isArray.js"(exports, module) {
var isArray3 = Array.isArray;
module.exports = isArray3;
}
});
// node_modules/lodash/_freeGlobal.js
var require_freeGlobal = __commonJS({
"node_modules/lodash/_freeGlobal.js"(exports, module) {
var freeGlobal = typeof globalThis == "object" && globalThis && globalThis.Object === Object && globalThis;
module.exports = freeGlobal;
}
});
// node_modules/lodash/_root.js
var require_root = __commonJS({
"node_modules/lodash/_root.js"(exports, module) {
var freeGlobal = require_freeGlobal();
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
module.exports = root;
}
});
// node_modules/lodash/_Symbol.js
var require_Symbol = __commonJS({
"node_modules/lodash/_Symbol.js"(exports, module) {
var root = require_root();
var Symbol2 = root.Symbol;
module.exports = Symbol2;
}
});
// node_modules/lodash/_getRawTag.js
var require_getRawTag = __commonJS({
"node_modules/lodash/_getRawTag.js"(exports, module) {
var Symbol2 = require_Symbol();
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
var nativeObjectToString = objectProto.toString;
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
try {
value[symToStringTag] = void 0;
var unmasked = true;
} catch (e3) {
}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
__name(getRawTag, "getRawTag");
module.exports = getRawTag;
}
});
// node_modules/lodash/_objectToString.js
var require_objectToString = __commonJS({
"node_modules/lodash/_objectToString.js"(exports, module) {
var objectProto = Object.prototype;
var nativeObjectToString = objectProto.toString;
function objectToString(value) {
return nativeObjectToString.call(value);
}
__name(objectToString, "objectToString");
module.exports = objectToString;
}
});
// node_modules/lodash/_baseGetTag.js
var require_baseGetTag = __commonJS({
"node_modules/lodash/_baseGetTag.js"(exports, module) {
var Symbol2 = require_Symbol();
var getRawTag = require_getRawTag();
var objectToString = require_objectToString();
var nullTag = "[object Null]";
var undefinedTag = "[object Undefined]";
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
function baseGetTag(value) {
if (value == null) {
return value === void 0 ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
__name(baseGetTag, "baseGetTag");
module.exports = baseGetTag;
}
});
// node_modules/lodash/isObjectLike.js
var require_isObjectLike = __commonJS({
"node_modules/lodash/isObjectLike.js"(exports, module) {
function isObjectLike(value) {
return value != null && typeof value == "object";
}
__name(isObjectLike, "isObjectLike");
module.exports = isObjectLike;
}
});
// node_modules/lodash/isSymbol.js
var require_isSymbol = __commonJS({
"node_modules/lodash/isSymbol.js"(exports, module) {
var baseGetTag = require_baseGetTag();
var isObjectLike = require_isObjectLike();
var symbolTag = "[object Symbol]";
function isSymbol3(value) {
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
__name(isSymbol3, "isSymbol");
module.exports = isSymbol3;
}
});
// node_modules/lodash/_isKey.js
var require_isKey = __commonJS({
"node_modules/lodash/_isKey.js"(exports, module) {
var isArray3 = require_isArray();
var isSymbol3 = require_isSymbol();
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reIsPlainProp = /^\w*$/;
function isKey(value, object) {
if (isArray3(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol3(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
__name(isKey, "isKey");
module.exports = isKey;
}
});
// node_modules/lodash/isObject.js
var require_isObject = __commonJS({
"node_modules/lodash/isObject.js"(exports, module) {
function isObject3(value) {
var type = typeof value;
return value != null && (type == "object" || type == "function");
}
__name(isObject3, "isObject");
module.exports = isObject3;
}
});
// node_modules/lodash/isFunction.js
var require_isFunction = __commonJS({
"node_modules/lodash/isFunction.js"(exports, module) {
var baseGetTag = require_baseGetTag();
var isObject3 = require_isObject();
var asyncTag = "[object AsyncFunction]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var proxyTag = "[object Proxy]";
function isFunction3(value) {
if (!isObject3(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
__name(isFunction3, "isFunction");
module.exports = isFunction3;
}
});
// node_modules/lodash/_coreJsData.js
var require_coreJsData = __commonJS({
"node_modules/lodash/_coreJsData.js"(exports, module) {
var root = require_root();
var coreJsData = root["__core-js_shared__"];
module.exports = coreJsData;
}
});
// node_modules/lodash/_isMasked.js
var require_isMasked = __commonJS({
"node_modules/lodash/_isMasked.js"(exports, module) {
var coreJsData = require_coreJsData();
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
__name(isMasked, "isMasked");
module.exports = isMasked;
}
});
// node_modules/lodash/_toSource.js
var require_toSource = __commonJS({
"node_modules/lodash/_toSource.js"(exports, module) {
var funcProto = Function.prototype;
var funcToString = funcProto.toString;
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e3) {
}
try {
return func + "";
} catch (e3) {
}
}
return "";
}
__name(toSource, "toSource");
module.exports = toSource;
}
});
// node_modules/lodash/_baseIsNative.js
var require_baseIsNative = __commonJS({
"node_modules/lodash/_baseIsNative.js"(exports, module) {
var isFunction3 = require_isFunction();
var isMasked = require_isMasked();
var isObject3 = require_isObject();
var toSource = require_toSource();
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var reIsNative = RegExp(
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function baseIsNative(value) {
if (!isObject3(value) || isMasked(value)) {
return false;
}
var pattern = isFunction3(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
__name(baseIsNative, "baseIsNative");
module.exports = baseIsNative;
}
});
// node_modules/lodash/_getValue.js
var require_getValue = __commonJS({
"node_modules/lodash/_getValue.js"(exports, module) {
function getValue2(object, key) {
return object == null ? void 0 : object[key];
}
__name(getValue2, "getValue");
module.exports = getValue2;
}
});
// node_modules/lodash/_getNative.js
var require_getNative = __commonJS({
"node_modules/lodash/_getNative.js"(exports, module) {
var baseIsNative = require_baseIsNative();
var getValue2 = require_getValue();
function getNative(object, key) {
var value = getValue2(object, key);
return baseIsNative(value) ? value : void 0;
}
__name(getNative, "getNative");
module.exports = getNative;
}
});
// node_modules/lodash/_nativeCreate.js
var require_nativeCreate = __commonJS({
"node_modules/lodash/_nativeCreate.js"(exports, module) {
var getNative = require_getNative();
var nativeCreate = getNative(Object, "create");
module.exports = nativeCreate;
}
});
// node_modules/lodash/_hashClear.js
var require_hashClear = __commonJS({
"node_modules/lodash/_hashClear.js"(exports, module) {
var nativeCreate = require_nativeCreate();
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
__name(hashClear, "hashClear");
module.exports = hashClear;
}
});
// node_modules/lodash/_hashDelete.js
var require_hashDelete = __commonJS({
"node_modules/lodash/_hashDelete.js"(exports, module) {
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
__name(hashDelete, "hashDelete");
module.exports = hashDelete;
}
});
// node_modules/lodash/_hashGet.js
var require_hashGet = __commonJS({
"node_modules/lodash/_hashGet.js"(exports, module) {
var nativeCreate = require_nativeCreate();
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
__name(hashGet, "hashGet");
module.exports = hashGet;
}
});
// node_modules/lodash/_hashHas.js
var require_hashHas = __commonJS({
"node_modules/lodash/_hashHas.js"(exports, module) {
var nativeCreate = require_nativeCreate();
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
__name(hashHas, "hashHas");
module.exports = hashHas;
}
});
// node_modules/lodash/_hashSet.js
var require_hashSet = __commonJS({
"node_modules/lodash/_hashSet.js"(exports, module) {
var nativeCreate = require_nativeCreate();
var HASH_UNDEFINED = "__lodash_hash_undefined__";
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
__name(hashSet, "hashSet");
module.exports = hashSet;
}
});
// node_modules/lodash/_Hash.js
var require_Hash = __commonJS({
"node_modules/lodash/_Hash.js"(exports, module) {
var hashClear = require_hashClear();
var hashDelete = require_hashDelete();
var hashGet = require_hashGet();
var hashHas = require_hashHas();
var hashSet = require_hashSet();
function Hash(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
__name(Hash, "Hash");
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
}
});
// node_modules/lodash/_listCacheClear.js
var require_listCacheClear = __commonJS({
"node_modules/lodash/_listCacheClear.js"(exports, module) {
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
__name(listCacheClear, "listCacheClear");
module.exports = listCacheClear;
}
});
// node_modules/lodash/eq.js
var require_eq = __commonJS({
"node_modules/lodash/eq.js"(exports, module) {
function eq(value, other) {
return value === other || value !== value && other !== other;
}
__name(eq, "eq");
module.exports = eq;
}
});
// node_modules/lodash/_assocIndexOf.js
var require_assocIndexOf = __commonJS({
"node_modules/lodash/_assocIndexOf.js"(exports, module) {
var eq = require_eq();
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
__name(assocIndexOf, "assocIndexOf");
module.exports = assocIndexOf;
}
});
// node_modules/lodash/_listCacheDelete.js
var require_listCacheDelete = __commonJS({
"node_modules/lodash/_listCacheDelete.js"(exports, module) {
var assocIndexOf = require_assocIndexOf();
var arrayProto = Array.prototype;
var splice = arrayProto.splice;
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
__name(listCacheDelete, "listCacheDelete");
module.exports = listCacheDelete;
}
});
// node_modules/lodash/_listCacheGet.js
var require_listCacheGet = __commonJS({
"node_modules/lodash/_listCacheGet.js"(exports, module) {
var assocIndexOf = require_assocIndexOf();
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
__name(listCacheGet, "listCacheGet");
module.exports = listCacheGet;
}
});
// node_modules/lodash/_listCacheHas.js
var require_listCacheHas = __commonJS({
"node_modules/lodash/_listCacheHas.js"(exports, module) {
var assocIndexOf = require_assocIndexOf();
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
__name(listCacheHas, "listCacheHas");
module.exports = listCacheHas;
}
});
// node_modules/lodash/_listCacheSet.js
var require_listCacheSet = __commonJS({
"node_modules/lodash/_listCacheSet.js"(exports, module) {
var assocIndexOf = require_assocIndexOf();
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
__name(listCacheSet, "listCacheSet");
module.exports = listCacheSet;
}
});
// node_modules/lodash/_ListCache.js
var require_ListCache = __commonJS({
"node_modules/lodash/_ListCache.js"(exports, module) {
var listCacheClear = require_listCacheClear();
var listCacheDelete = require_listCacheDelete();
var listCacheGet = require_listCacheGet();
var listCacheHas = require_listCacheHas();
var listCacheSet = require_listCacheSet();
function ListCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
__name(ListCache, "ListCache");
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
}
});
// node_modules/lodash/_Map.js
var require_Map = __commonJS({
"node_modules/lodash/_Map.js"(exports, module) {
var getNative = require_getNative();
var root = require_root();
var Map2 = getNative(root, "Map");
module.exports = Map2;
}
});
// node_modules/lodash/_mapCacheClear.js
var require_mapCacheClear = __commonJS({
"node_modules/lodash/_mapCacheClear.js"(exports, module) {
var Hash = require_Hash();
var ListCache = require_ListCache();
var Map2 = require_Map();
function mapCacheClear() {
this.size = 0;
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
__name(mapCacheClear, "mapCacheClear");
module.exports = mapCacheClear;
}
});
// node_modules/lodash/_isKeyable.js
var require_isKeyable = __commonJS({
"node_modules/lodash/_isKeyable.js"(exports, module) {
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
__name(isKeyable, "isKeyable");
module.exports = isKeyable;
}
});
// node_modules/lodash/_getMapData.js
var require_getMapData = __commonJS({
"node_modules/lodash/_getMapData.js"(exports, module) {
var isKeyable = require_isKeyable();
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
__name(getMapData, "getMapData");
module.exports = getMapData;
}
});
// node_modules/lodash/_mapCacheDelete.js
var require_mapCacheDelete = __commonJS({
"node_modules/lodash/_mapCacheDelete.js"(exports, module) {
var getMapData = require_getMapData();
function mapCacheDelete(key) {
var result = getMapData(this, key)["delete"](key);
this.size -= result ? 1 : 0;
return result;
}
__name(mapCacheDelete, "mapCacheDelete");
module.exports = mapCacheDelete;
}
});
// node_modules/lodash/_mapCacheGet.js
var require_mapCacheGet = __commonJS({
"node_modules/lodash/_mapCacheGet.js"(exports, module) {
var getMapData = require_getMapData();
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
__name(mapCacheGet, "mapCacheGet");
module.exports = mapCacheGet;
}
});
// node_modules/lodash/_mapCacheHas.js
var require_mapCacheHas = __commonJS({
"node_modules/lodash/_mapCacheHas.js"(exports, module) {
var getMapData = require_getMapData();
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
__name(mapCacheHas, "mapCacheHas");
module.exports = mapCacheHas;
}
});
// node_modules/lodash/_mapCacheSet.js
var require_mapCacheSet = __commonJS({
"node_modules/lodash/_mapCacheSet.js"(exports, module) {
var getMapData = require_getMapData();
function mapCacheSet(key, value) {
var data = getMapData(this, key), size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
__name(mapCacheSet, "mapCacheSet");
module.exports = mapCacheSet;
}
});
// node_modules/lodash/_MapCache.js
var require_MapCache = __commonJS({
"node_modules/lodash/_MapCache.js"(exports, module) {
var mapCacheClear = require_mapCacheClear();
var mapCacheDelete = require_mapCacheDelete();
var mapCacheGet = require_mapCacheGet();
var mapCacheHas = require_mapCacheHas();
var mapCacheSet = require_mapCacheSet();
function MapCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
__name(MapCache, "MapCache");
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
}
});
// node_modules/lodash/memoize.js
var require_memoize = __commonJS({
"node_modules/lodash/memoize.js"(exports, module) {
var MapCache = require_MapCache();
var FUNC_ERROR_TEXT = "Expected a function";
function memoize(func, resolver) {
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = /* @__PURE__ */ __name(function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
}, "memoized");
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
__name(memoize, "memoize");
memoize.Cache = MapCache;
module.exports = memoize;
}
});
// node_modules/lodash/_memoizeCapped.js
var require_memoizeCapped = __commonJS({
"node_modules/lodash/_memoizeCapped.js"(exports, module) {
var memoize = require_memoize();
var MAX_MEMOIZE_SIZE = 500;
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
__name(memoizeCapped, "memoizeCapped");
module.exports = memoizeCapped;
}
});
// node_modules/lodash/_stringToPath.js
var require_stringToPath = __commonJS({
"node_modules/lodash/_stringToPath.js"(exports, module) {
var memoizeCapped = require_memoizeCapped();
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reEscapeChar = /\\(\\)?/g;
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (string.charCodeAt(0) === 46) {
result.push("");
}
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
});
return result;
});
module.exports = stringToPath;
}
});
// node_modules/lodash/_arrayMap.js
var require_arrayMap = __commonJS({
"node_modules/lodash/_arrayMap.js"(exports, module) {
function arrayMap(array, iteratee) {
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
__name(arrayMap, "arrayMap");
module.exports = arrayMap;
}
});
// node_modules/lodash/_baseToString.js
var require_baseToString = __commonJS({
"node_modules/lodash/_baseToString.js"(exports, module) {
var Symbol2 = require_Symbol();
var arrayMap = require_arrayMap();
var isArray3 = require_isArray();
var isSymbol3 = require_isSymbol();
var INFINITY = 1 / 0;
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
var symbolToString = symbolProto ? symbolProto.toString : void 0;
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isArray3(value)) {
return arrayMap(value, baseToString) + "";
}
if (isSymbol3(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
__name(baseToString, "baseToString");
module.exports = baseToString;
}
});
// node_modules/lodash/toString.js
var require_toString = __commonJS({
"node_modules/lodash/toString.js"(exports, module) {
var baseToString = require_baseToString();
function toString(value) {
return value == null ? "" : baseToString(value);
}
__name(toString, "toString");
module.exports = toString;
}
});
// node_modules/lodash/_castPath.js
var require_castPath = __commonJS({
"node_modules/lodash/_castPath.js"(exports, module) {
var isArray3 = require_isArray();
var isKey = require_isKey();
var stringToPath = require_stringToPath();
var toString = require_toString();
function castPath(value, object) {
if (isArray3(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
__name(castPath, "castPath");
module.exports = castPath;
}
});
// node_modules/lodash/_toKey.js
var require_toKey = __commonJS({
"node_modules/lodash/_toKey.js"(exports, module) {
var isSymbol3 = require_isSymbol();
var INFINITY = 1 / 0;
function toKey(value) {
if (typeof value == "string" || isSymbol3(value)) {
return value;
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
__name(toKey, "toKey");
module.exports = toKey;
}
});
// node_modules/lodash/_baseGet.js
var require_baseGet = __commonJS({
"node_modules/lodash/_baseGet.js"(exports, module) {
var castPath = require_castPath();
var toKey = require_toKey();
function baseGet(object, path) {
path = castPath(path, object);
var index = 0, length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : void 0;
}
__name(baseGet, "baseGet");
module.exports = baseGet;
}
});
// node_modules/lodash/get.js
var require_get = __commonJS({
"node_modules/lodash/get.js"(exports, module) {
var baseGet = require_baseGet();
function get2(object, path, defaultValue) {
var result = object == null ? void 0 : baseGet(object, path);
return result === void 0 ? defaultValue : result;
}
__name(get2, "get");
module.exports = get2;
}
});
// node_modules/fast-deep-equal/es6/index.js
var require_es6 = __commonJS({
"node_modules/fast-deep-equal/es6/index.js"(exports, module) {
module.exports = /* @__PURE__ */ __name(function equal2(a3, b2) {
if (a3 === b2)
return true;
if (a3 && b2 && typeof a3 == "object" && typeof b2 == "object") {
if (a3.constructor !== b2.constructor)
return false;
var length, i3, keys;
if (Array.isArray(a3)) {
length = a3.length;
if (length != b2.length)
return false;
for (i3 = length; i3-- !== 0; )
if (!equal2(a3[i3], b2[i3]))
return false;
return true;
}
if (a3 instanceof Map && b2 instanceof Map) {
if (a3.size !== b2.size)
return false;
for (i3 of a3.entries())
if (!b2.has(i3[0]))
return false;
for (i3 of a3.entries())
if (!equal2(i3[1], b2.get(i3[0])))
return false;
return true;
}
if (a3 instanceof Set && b2 instanceof Set) {
if (a3.size !== b2.size)
return false;
for (i3 of a3.entries())
if (!b2.has(i3[0]))
return false;
return true;
}
if (ArrayBuffer.isView(a3) && ArrayBuffer.isView(b2)) {
length = a3.length;
if (length != b2.length)
return false;
for (i3 = length; i3-- !== 0; )
if (a3[i3] !== b2[i3])
return false;
return true;
}
if (a3.constructor === RegExp)
return a3.source === b2.source && a3.flags === b2.flags;
if (a3.valueOf !== Object.prototype.valueOf)
return a3.valueOf() === b2.valueOf();
if (a3.toString !== Object.prototype.toString)
return a3.toString() === b2.toString();
keys = Object.keys(a3);
length = keys.length;
if (length !== Object.keys(b2).length)
return false;
for (i3 = length; i3-- !== 0; )
if (!Object.prototype.hasOwnProperty.call(b2, keys[i3]))
return false;
for (i3 = length; i3-- !== 0; ) {
var key = keys[i3];
if (!equal2(a3[key], b2[key]))
return false;
}
return true;
}
return a3 !== a3 && b2 !== b2;
}, "equal");
}
});
// node_modules/lodash/_setCacheAdd.js
var require_setCacheAdd = __commonJS({
"node_modules/lodash/_setCacheAdd.js"(exports, module) {
var HASH_UNDEFINED = "__lodash_hash_undefined__";
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
__name(setCacheAdd, "setCacheAdd");
module.exports = setCacheAdd;
}
});
// node_modules/lodash/_setCacheHas.js
var require_setCacheHas = __commonJS({
"node_modules/lodash/_setCacheHas.js"(exports, module) {
function setCacheHas(value) {
return this.__data__.has(value);
}
__name(setCacheHas, "setCacheHas");
module.exports = setCacheHas;
}
});
// node_modules/lodash/_SetCache.js
var require_SetCache = __commonJS({
"node_modules/lodash/_SetCache.js"(exports, module) {
var MapCache = require_MapCache();
var setCacheAdd = require_setCacheAdd();
var setCacheHas = require_setCacheHas();
function SetCache(values) {
var index = -1, length = values == null ? 0 : values.length;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values[index]);
}
}
__name(SetCache, "SetCache");
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
}
});
// node_modules/lodash/_baseFindIndex.js
var require_baseFindIndex = __commonJS({
"node_modules/lodash/_baseFindIndex.js"(exports, module) {
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
while (fromRight ? index-- : ++index < length) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
__name(baseFindIndex, "baseFindIndex");
module.exports = baseFindIndex;
}
});
// node_modules/lodash/_baseIsNaN.js
var require_baseIsNaN = __commonJS({
"node_modules/lodash/_baseIsNaN.js"(exports, module) {
function baseIsNaN(value) {
return value !== value;
}
__name(baseIsNaN, "baseIsNaN");
module.exports = baseIsNaN;
}
});
// node_modules/lodash/_strictIndexOf.js
var require_strictIndexOf = __commonJS({
"node_modules/lodash/_strictIndexOf.js"(exports, module) {
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1, length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
__name(strictIndexOf, "strictIndexOf");
module.exports = strictIndexOf;
}
});
// node_modules/lodash/_baseIndexOf.js
var require_baseIndexOf = __commonJS({
"node_modules/lodash/_baseIndexOf.js"(exports, module) {
var baseFindIndex = require_baseFindIndex();
var baseIsNaN = require_baseIsNaN();
var strictIndexOf = require_strictIndexOf();
function baseIndexOf(array, value, fromIndex) {
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
}
__name(baseIndexOf, "baseIndexOf");
module.exports = baseIndexOf;
}
});
// node_modules/lodash/_arrayIncludes.js
var require_arrayIncludes = __commonJS({
"node_modules/lodash/_arrayIncludes.js"(exports, module) {
var baseIndexOf = require_baseIndexOf();
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
__name(arrayIncludes, "arrayIncludes");
module.exports = arrayIncludes;
}
});
// node_modules/lodash/_arrayIncludesWith.js
var require_arrayIncludesWith = __commonJS({
"node_modules/lodash/_arrayIncludesWith.js"(exports, module) {
function arrayIncludesWith(array, value, comparator) {
var index = -1, length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
__name(arrayIncludesWith, "arrayIncludesWith");
module.exports = arrayIncludesWith;
}
});
// node_modules/lodash/_cacheHas.js
var require_cacheHas = __commonJS({
"node_modules/lodash/_cacheHas.js"(exports, module) {
function cacheHas(cache, key) {
return cache.has(key);
}
__name(cacheHas, "cacheHas");
module.exports = cacheHas;
}
});
// node_modules/lodash/_Set.js
var require_Set = __commonJS({
"node_modules/lodash/_Set.js"(exports, module) {
var getNative = require_getNative();
var root = require_root();
var Set2 = getNative(root, "Set");
module.exports = Set2;
}
});
// node_modules/lodash/noop.js
var require_noop = __commonJS({
"node_modules/lodash/noop.js"(exports, module) {
function noop() {
}
__name(noop, "noop");
module.exports = noop;
}
});
// node_modules/lodash/_setToArray.js
var require_setToArray = __commonJS({
"node_modules/lodash/_setToArray.js"(exports, module) {
function setToArray(set) {
var index = -1, result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
__name(setToArray, "setToArray");
module.exports = setToArray;
}
});
// node_modules/lodash/_createSet.js
var require_createSet = __commonJS({
"node_modules/lodash/_createSet.js"(exports, module) {
var Set2 = require_Set();
var noop = require_noop();
var setToArray = require_setToArray();
var INFINITY = 1 / 0;
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) {
return new Set2(values);
};
module.exports = createSet;
}
});
// node_modules/lodash/_baseUniq.js
var require_baseUniq = __commonJS({
"node_modules/lodash/_baseUniq.js"(exports, module) {
var SetCache = require_SetCache();
var arrayIncludes = require_arrayIncludes();
var arrayIncludesWith = require_arrayIncludesWith();
var cacheHas = require_cacheHas();
var createSet = require_createSet();
var setToArray = require_setToArray();
var LARGE_ARRAY_SIZE = 200;
function baseUniq(array, iteratee, comparator) {
var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
} else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache();
} else {
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index], computed = iteratee ? iteratee(value) : value;
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
} else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
__name(baseUniq, "baseUniq");
module.exports = baseUniq;
}
});
// node_modules/lodash/uniqWith.js
var require_uniqWith = __commonJS({
"node_modules/lodash/uniqWith.js"(exports, module) {
var baseUniq = require_baseUniq();
function uniqWith2(array, comparator) {
comparator = typeof comparator == "function" ? comparator : void 0;
return array && array.length ? baseUniq(array, void 0, comparator) : [];
}
__name(uniqWith2, "uniqWith");
module.exports = uniqWith2;
}
});
// src/constraints/ObjectConstrains.ts
var import_get = __toESM(require_get());
// node_modules/@jspm/core/nodelibs/browser/chunk-5decc758.js
var e;
var t;
var n;
var r = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : globalThis;
var o = e = {};
function i() {
throw new Error("setTimeout has not been defined");
}
__name(i, "i");
function u() {
throw new Error("clearTimeout has not been defined");
}
__name(u, "u");
function c(e3) {
if (t === setTimeout)
return setTimeout(e3, 0);
if ((t === i || !t) && setTimeout)
return t = setTimeout, setTimeout(e3, 0);
try {
return t(e3, 0);
} catch (n3) {
try {
return t.call(null, e3, 0);
} catch (n4) {
return t.call(this || r, e3, 0);
}
}
}
__name(c, "c");
!function() {
try {
t = "function" == typeof setTimeout ? setTimeout : i;
} catch (e3) {
t = i;
}
try {
n = "function" == typeof clearTimeout ? clearTimeout : u;
} catch (e3) {
n = u;
}
}();
var l;
var s = [];
var f = false;
var a = -1;
function h() {
f && l && (f = false, l.length ? s = l.concat(s) : a = -1, s.length && d());
}
__name(h, "h");
function d() {
if (!f) {
var e3 = c(h);
f = true;
for (var t3 = s.length; t3; ) {
for (l = s, s = []; ++a < t3; )
l && l[a].run();
a = -1, t3 = s.length;
}
l = null, f = false, function(e4) {
if (n === clearTimeout)
return clearTimeout(e4);
if ((n === u || !n) && clearTimeout)
return n = clearTimeout, clearTimeout(e4);
try {
n(e4);
} catch (t4) {
try {
return n.call(null, e4);
} catch (t5) {
return n.call(this || r, e4);
}
}
}(e3);
}
}
__name(d, "d");
function m(e3, t3) {
(this || r).fun = e3, (this || r).array = t3;
}
__name(m, "m");
function p() {
}
__name(p, "p");
o.nextTick = function(e3) {
var t3 = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var n3 = 1; n3 < arguments.length; n3++)
t3[n3 - 1] = arguments[n3];
s.push(new m(e3, t3)), 1 !== s.length || f || c(d);
}, m.prototype.run = function() {
(this || r).fun.apply(null, (this || r).array);
}, o.title = "browser", o.browser = true, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = p, o.addListener = p, o.once = p, o.off = p, o.removeListener = p, o.removeAllListeners = p, o.emit = p, o.prependListener = p, o.prependOnceListener = p, o.listeners = function(e3) {
return [];
}, o.binding = function(e3) {
throw new Error("process.binding is not supported");
}, o.cwd = function() {
return "/";
}, o.chdir = function(e3) {
throw new Error("process.chdir is not supported");
}, o.umask = function() {
return 0;
};
var T = e;
T.addListener;
T.argv;
T.binding;
T.browser;
T.chdir;
T.cwd;
T.emit;
T.env;
T.listeners;
T.nextTick;
T.off;
T.on;
T.once;
T.prependListener;
T.prependOnceListener;
T.removeAllListeners;
T.removeListener;
T.title;
T.umask;
T.version;
T.versions;
// node_modules/@jspm/core/nodelibs/browser/chunk-b4205b57.js
var t2 = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
var e2 = Object.prototype.toString;
var o2 = /* @__PURE__ */ __name(function(o3) {
return !(t2 && o3 && "object" == typeof o3 && Symbol.toStringTag in o3) && "[object Arguments]" === e2.call(o3);
}, "o");
var n2 = /* @__PURE__ */ __name(function(t3) {
return !!o2(t3) || null !== t3 && "object" == typeof t3 && "number" == typeof t3.length && t3.length >= 0 && "[object Array]" !== e2.call(t3) && "[object Function]" === e2.call(t3.callee);
}, "n");
var r2 = function() {
return o2(arguments);
}();
o2.isLegacyArguments = n2;
var l2 = r2 ? o2 : n2;
var t$1 = Object.prototype.toString;
var o$1 = Function.prototype.toString;
var n$1 = /^\s*(?:function)?\*/;
var e$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
var r$1 = Object.getPrototypeOf;
var c2 = function() {
if (!e$1)
return false;
try {
return Function("return function*() {}")();
} catch (t3) {
}
}();
var u2 = c2 ? r$1(c2) : {};
var i2 = /* @__PURE__ */ __name(function(c3) {
return "function" == typeof c3 && (!!n$1.test(o$1.call(c3)) || (e$1 ? r$1(c3) === u2 : "[object GeneratorFunction]" === t$1.call(c3)));
}, "i");
var t$2 = "function" == typeof Object.create ? function(t3, e3) {
e3 && (t3.super_ = e3, t3.prototype = Object.create(e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }));
} : function(t3, e3) {
if (e3) {
t3.super_ = e3;
var o3 = /* @__PURE__ */ __name(function() {
}, "o");
o3.prototype = e3.prototype, t3.prototype = new o3(), t3.prototype.constructor = t3;
}
};
var i$1 = /* @__PURE__ */ __name(function(e3) {
return e3 && "object" == typeof e3 && "function" == typeof e3.copy && "function" == typeof e3.fill && "function" == typeof e3.readUInt8;
}, "i$1");
var o$2 = {};
var u$1 = i$1;
var f2 = l2;
var a2 = i2;
function c$1(e3) {
return e3.call.bind(e3);
}
__name(c$1, "c$1");
var s2 = "undefined" != typeof BigInt;
var p2 = "undefined" != typeof Symbol;
var y = p2 && void 0 !== Symbol.toStringTag;
var l$1 = "undefined" != typeof Uint8Array;
var d2 = "undefined" != typeof ArrayBuffer;
if (l$1 && y)
var g = Object.getPrototypeOf(Uint8Array.prototype), b = c$1(Object.getOwnPropertyDescriptor(g, Symbol.toStringTag).get);
var m2 = c$1(Object.prototype.toString);
var h2 = c$1(Number.prototype.valueOf);
var j = c$1(String.prototype.valueOf);
var A = c$1(Boolean.prototype.valueOf);
if (s2)
var w = c$1(BigInt.prototype.valueOf);
if (p2)
var v = c$1(Symbol.prototype.valueOf);
function O(e3, t3) {
if ("object" != typeof e3)
return false;
try {
return t3(e3), true;
} catch (e4) {
return false;
}
}
__name(O, "O");
function S(e3) {
return l$1 && y ? void 0 !== b(e3) : B(e3) || k(e3) || E(e3) || D(e3) || U(e3) || P(e3) || x(e3) || I(e3) || M(e3) || z(e3) || F(e3);
}
__name(S, "S");
function B(e3) {
return l$1 && y ? "Uint8Array" === b(e3) : "[object Uint8Array]" === m2(e3) || u$1(e3) && void 0 !== e3.buffer;
}
__name(B, "B");
function k(e3) {
return l$1 && y ? "Uint8ClampedArray" === b(e3) : "[object Uint8ClampedArray]" === m2(e3);
}
__name(k, "k");
function E(e3) {
return l$1 && y ? "Uint16Array" === b(e3) : "[object Uint16Array]" === m2(e3);
}
__name(E, "E");
function D(e3) {
return l$1 && y ? "Uint32Array" === b(e3) : "[object Uint32Array]" === m2(e3);
}
__name(D, "D");
function U(e3) {
return l$1 && y ? "Int8Array" === b(e3) : "[object Int8Array]" === m2(e3);
}
__name(U, "U");
function P(e3) {
return l$1 && y ? "Int16Array" === b(e3) : "[object Int16Array]" === m2(e3);
}
__name(P, "P");
function x(e3) {
return l$1 && y ? "Int32Array" === b(e3) : "[object Int32Array]" === m2(e3);
}
__name(x, "x");
function I(e3) {
return l$1 && y ? "Float32Array" === b(e3) : "[object Float32Array]" === m2(e3);
}
__name(I, "I");
function M(e3) {
return l$1 && y ? "Float64Array" === b(e3) : "[object Float64Array]" === m2(e3);
}
__name(M, "M");
function z(e3) {
return l$1 && y ? "BigInt64Array" === b(e3) : "[object BigInt64Array]" === m2(e3);
}
__name(z, "z");
function F(e3) {
return l$1 && y ? "BigUint64Array" === b(e3) : "[object BigUint64Array]" === m2(e3);
}
__name(F, "F");
function T2(e3) {
return "[object Map]" === m2(e3);
}
__name(T2, "T");
function N(e3) {
return "[object Set]" === m2(e3);
}
__name(N, "N");
function W(e3) {
return "[object WeakMap]" === m2(e3);
}
__name(W, "W");
function $(e3) {
return "[object WeakSet]" === m2(e3);
}
__name($, "$");
function C(e3) {
return "[object ArrayBuffer]" === m2(e3);
}
__name(C, "C");
function V(e3) {
return "undefined" != typeof ArrayBuffer && (C.working ? C(e3) : e3 instanceof ArrayBuffer);
}
__name(V, "V");
function G(e3) {
return "[object DataView]" === m2(e3);
}
__name(G, "G");
function R(e3) {
return "undefined" != typeof DataView && (G.working ? G(e3) : e3 instanceof DataView);
}
__name(R, "R");
function J(e3) {
return "[object SharedArrayBuffer]" === m2(e3);
}
__name(J, "J");
function _(e3) {
return "undefined" != typeof SharedArrayBuffer && (J.working ? J(e3) : e3 instanceof SharedArrayBuffer);
}
__name(_, "_");
function H(e3) {
return O(e3, h2);
}
__name(H, "H");
function Z(e3) {
return O(e3, j);
}
__name(Z, "Z");
function q(e3) {
return O(e3, A);
}
__name(q, "q");
function K(e3) {
return s2 && O(e3, w);
}
__name(K, "K");
function L(e3) {
return p2 && O(e3, v);
}
__name(L, "L");
o$2.isArgumentsObject = f2, o$2.isGeneratorFunction = a2, o$2.isPromise = function(e3) {
return "undefined" != typeof Promise && e3 instanceof Promise || null !== e3 && "object" == typeof e3 && "function" == typeof e3.then && "function" == typeof e3.catch;
}, o$2.isArrayBufferView = function(e3) {
return d2 && ArrayBuffer.isView ? Arra