New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

check-types-mini

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-types-mini - npm Package Compare versions

Comparing version 7.1.2 to 7.1.3

7

CHANGELOG.md

@@ -6,2 +6,9 @@ # Change Log

## 7.1.3 (2022-04-18)
### Bug Fixes
- correct the Quick Take example ([86566b9](https://github.com/codsen/codsen/commit/86566b9ba8a3ad2371b4de48b3a6a474a5e71cfc))
- tweak types ([8105826](https://github.com/codsen/codsen/commit/8105826931820464072a9320a8bfbc0e10022955))
# 7.1.0 (2022-04-10)

@@ -8,0 +15,0 @@

8

dist/check-types-mini.esm.js
/**
* @name check-types-mini
* @fileoverview Validate options object
* @version 7.1.2
* @version 7.1.3
* @author Roy Revelt, Codsen Ltd

@@ -10,3 +10,3 @@ * @license MIT

import i from"type-detect";import u from"lodash.pullall";import{traverse as j}from"ast-monkey-traverse";import k from"lodash.intersection";import{arrayiffy as w}from"arrayiffy-if-string";import E from"object-path";import{isMatch as S}from"matcher";var N="7.1.2";var M=N,T={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function J(a,r,y){function p(s){return s!=null}function $(s){return i(s)==="Object"}function b(s,l){return typeof l=="string"&&(l=w(l)),Array.from(s).filter(n=>!l.some(t=>S(n,t,{caseSensitive:!0})))}let V=Object.prototype.hasOwnProperty,D=["any","anything","every","everything","all","whatever","whatevs"];if(!p(a))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let e={...T,...y};if(typeof e.ignoreKeys=="string"&&(e.ignoreKeys=[e.ignoreKeys]),typeof e.ignorePaths=="string"&&(e.ignorePaths=[e.ignorePaths]),typeof e.acceptArraysIgnore=="string"&&(e.acceptArraysIgnore=[e.acceptArraysIgnore]),e.msg=`${e.msg}`.trim(),e.msg[e.msg.length-1]===":"&&(e.msg=e.msg.slice(0,e.msg.length-1).trim()),$(e.schema))Object.keys(e.schema).forEach(s=>{if($(e.schema[s])){let l={};j(e.schema[s],(n,t,h)=>{let m=t!==void 0?t:n;return!Array.isArray(m)&&!$(m)&&(l[`${s}.${h.path}`]=m),m}),delete e.schema[s],e.schema={...e.schema,...l}}}),Object.keys(e.schema).forEach(s=>{Array.isArray(e.schema[s])||(e.schema[s]=[e.schema[s]]),e.schema[s]=e.schema[s].map(l=>`${l}`.toLowerCase().trim())});else if(e.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(e.schema,null,0)} which is not object but ${typeof e.schema}`);if(p(r)||(r={}),e.enforceStrictKeyset)if(p(e.schema)&&Object.keys(e.schema).length){if(r&&b(u(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema))),e.ignoreKeys).length){let s=u(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema)));throw new TypeError(`${e.msg}: ${e.optsVarName}.enforceStrictKeyset is on and the following key${s.length>1?"s":""} ${s.length>1?"are":"is"} not covered by schema and/or reference objects: ${s.join(", ")}`)}}else if($(r)&&Object.keys(r).length){if(b(u(Object.keys(a),Object.keys(r)),e.ignoreKeys).length!==0){let s=u(Object.keys(a),Object.keys(r));throw new TypeError(`${e.msg}: The input object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not covered by the reference object: ${s.join(", ")}`)}else if(b(u(Object.keys(r),Object.keys(a)),e.ignoreKeys).length!==0){let s=u(Object.keys(r),Object.keys(a));throw new TypeError(`${e.msg}: The reference object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not present in the input object: ${s.join(", ")}`)}}else throw new TypeError(`${e.msg}: Both ${e.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via opts.enforceStrictKeyset!`);let g=[];j(a,(s,l,n)=>{let t=l,h=s;if(n.parentType==="array"&&(h=void 0,t=s),Array.isArray(g)&&g.length&&g.some(o=>n.path.startsWith(o))||h&&e.ignoreKeys.some(o=>S(h,o))||e.ignorePaths.some(o=>S(n.path,o)))return t;let m=!(!$(t)&&!Array.isArray(t)&&Array.isArray(n.parent)),f=!1;$(e.schema)&&V.call(e.schema,n.path)&&(f=!0);let d=!1;if($(r)&&E.has(r,n.path)&&(d=!0),e.enforceStrictKeyset&&m&&!f&&!d)throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} is neither covered by reference object (second input argument), nor ${e.optsVarName}.schema! To stop this error, turn off ${e.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${e.optsVarName}.schema).
import i from"type-detect";import u from"lodash.pullall";import{traverse as j}from"ast-monkey-traverse";import k from"lodash.intersection";import{arrayiffy as w}from"arrayiffy-if-string";import E from"object-path";import{isMatch as S}from"matcher";var N="7.1.3";var M=N,v={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function T(a,r,y){function p(s){return s!=null}function $(s){return i(s)==="Object"}function b(s,l){return typeof l=="string"&&(l=w(l)),Array.from(s).filter(n=>!l.some(t=>S(n,t,{caseSensitive:!0})))}let V=Object.prototype.hasOwnProperty,D=["any","anything","every","everything","all","whatever","whatevs"];if(!p(a))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let e={...v,...y};if(typeof e.ignoreKeys=="string"&&(e.ignoreKeys=[e.ignoreKeys]),typeof e.ignorePaths=="string"&&(e.ignorePaths=[e.ignorePaths]),typeof e.acceptArraysIgnore=="string"&&(e.acceptArraysIgnore=[e.acceptArraysIgnore]),e.msg=`${e.msg}`.trim(),e.msg[e.msg.length-1]===":"&&(e.msg=e.msg.slice(0,e.msg.length-1).trim()),$(e.schema))Object.keys(e.schema).forEach(s=>{if($(e.schema[s])){let l={};j(e.schema[s],(n,t,h)=>{let m=t!==void 0?t:n;return!Array.isArray(m)&&!$(m)&&(l[`${s}.${h.path}`]=m),m}),delete e.schema[s],e.schema={...e.schema,...l}}}),Object.keys(e.schema).forEach(s=>{Array.isArray(e.schema[s])||(e.schema[s]=[e.schema[s]]),e.schema[s]=e.schema[s].map(l=>`${l}`.toLowerCase().trim())});else if(e.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(e.schema,null,0)} which is not object but ${typeof e.schema}`);if(p(r)||(r={}),e.enforceStrictKeyset)if(p(e.schema)&&Object.keys(e.schema).length){if(r&&b(u(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema))),e.ignoreKeys).length){let s=u(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema)));throw new TypeError(`${e.msg}: ${e.optsVarName}.enforceStrictKeyset is on and the following key${s.length>1?"s":""} ${s.length>1?"are":"is"} not covered by schema and/or reference objects: ${s.join(", ")}`)}}else if($(r)&&Object.keys(r).length){if(b(u(Object.keys(a),Object.keys(r)),e.ignoreKeys).length!==0){let s=u(Object.keys(a),Object.keys(r));throw new TypeError(`${e.msg}: The input object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not covered by the reference object: ${s.join(", ")}`)}else if(b(u(Object.keys(r),Object.keys(a)),e.ignoreKeys).length!==0){let s=u(Object.keys(r),Object.keys(a));throw new TypeError(`${e.msg}: The reference object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not present in the input object: ${s.join(", ")}`)}}else throw new TypeError(`${e.msg}: Both ${e.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via resolvedOpts.enforceStrictKeyset!`);let g=[];j(a,(s,l,n)=>{let t=l,h=s;if(n.parentType==="array"&&(h=void 0,t=s),Array.isArray(g)&&g.length&&g.some(o=>n.path.startsWith(o))||h&&e.ignoreKeys.some(o=>S(h,o))||e.ignorePaths.some(o=>S(n.path,o)))return t;let m=!(!$(t)&&!Array.isArray(t)&&Array.isArray(n.parent)),f=!1;$(e.schema)&&V.call(e.schema,n.path)&&(f=!0);let d=!1;if($(r)&&E.has(r,n.path)&&(d=!0),e.enforceStrictKeyset&&m&&!f&&!d)throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} is neither covered by reference object (second input argument), nor ${e.optsVarName}.schema! To stop this error, turn off ${e.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${e.optsVarName}.schema).

@@ -21,6 +21,6 @@ Debug info:

opts = ${JSON.stringify(e,null,4)}
resolvedOpts = ${JSON.stringify(e,null,4)}
current = ${JSON.stringify(t,null,4)}
`);if(f){let o=w(e.schema[n.path]).map(c=>`${c}`.toLowerCase());if(E.set(e.schema,n.path,o),k(o,D).length)g.push(n.path);else if(t!==!0&&t!==!1&&!o.includes(i(t).toLowerCase())||(t===!0||t===!1)&&!o.includes(String(t))&&!o.includes("boolean"))if(Array.isArray(t)&&e.acceptArrays){for(let c=0,O=t.length;c<O;c++)if(!o.includes(i(t[c]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path}.${c}, the ${c}th element (equal to ${JSON.stringify(t[c],null,0)}) is of a type ${i(t[c]).toLowerCase()}, but only the following are allowed by the ${e.optsVarName}.schema: ${o.join(", ")}`)}else throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t)!=="string"?'"':""}${JSON.stringify(t,null,0)}${i(t)!=="string"?'"':""} (type: ${i(t).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(o,null,0)})`)}else if(r&&$(r)&&d){let o=E.get(r,n.path);if(e.acceptArrays&&Array.isArray(t)&&!e.acceptArraysIgnore.includes(s)){if(!t.every(O=>i(O).toLowerCase()===i(r[s]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to be array, but not all of its elements are ${i(r[s]).toLowerCase()}-type`)}else if(i(t)!==i(o))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t).toLowerCase()==="string"?"":'"'}${JSON.stringify(t,null,0)}${i(t).toLowerCase()==="string"?"":'"'} which is not ${i(o).toLowerCase()} but ${i(t).toLowerCase()}`)}return t})}function F(a,r,y){J(a,r,y)}export{F as checkTypesMini,T as defaults,M as version};
`);if(f){let o=w(e.schema[n.path]).map(c=>`${c}`.toLowerCase());if(E.set(e.schema,n.path,o),k(o,D).length)g.push(n.path);else if(t!==!0&&t!==!1&&!o.includes(i(t).toLowerCase())||(t===!0||t===!1)&&!o.includes(String(t))&&!o.includes("boolean"))if(Array.isArray(t)&&e.acceptArrays){for(let c=0,O=t.length;c<O;c++)if(!o.includes(i(t[c]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path}.${c}, the ${c}th element (equal to ${JSON.stringify(t[c],null,0)}) is of a type ${i(t[c]).toLowerCase()}, but only the following are allowed by the ${e.optsVarName}.schema: ${o.join(", ")}`)}else throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t)!=="string"?'"':""}${JSON.stringify(t,null,0)}${i(t)!=="string"?'"':""} (type: ${i(t).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(o,null,0)})`)}else if(r&&$(r)&&d){let o=E.get(r,n.path);if(e.acceptArrays&&Array.isArray(t)&&!e.acceptArraysIgnore.includes(s)){if(!t.every(O=>i(O).toLowerCase()===i(r[s]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to be array, but not all of its elements are ${i(r[s]).toLowerCase()}-type`)}else if(i(t)!==i(o))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t).toLowerCase()==="string"?"":'"'}${JSON.stringify(t,null,0)}${i(t).toLowerCase()==="string"?"":'"'} which is not ${i(o).toLowerCase()} but ${i(t).toLowerCase()}`)}return t})}function F(a,r,y){T(a,r,y)}export{F as checkTypesMini,v as defaults,M as version};
/**
* @name check-types-mini
* @fileoverview Validate options object
* @version 7.1.2
* @version 7.1.3
* @author Roy Revelt, Codsen Ltd

@@ -10,3 +10,3 @@ * @license MIT

var checkTypesMini=(()=>{var er=Object.create;var R=Object.defineProperty,tr=Object.defineProperties,rr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,ir=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,or=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable;var Me=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))ke.call(t,r)&&Me(e,r,t[r]);if(Ve)for(var r of Ve(t))sr.call(t,r)&&Me(e,r,t[r]);return e},F=(e,t)=>tr(e,nr(t));var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var r in t)R(e,r,{get:t[r],enumerable:!0})},Le=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of ir(t))!ke.call(e,c)&&c!==r&&R(e,c,{get:()=>t[c],enumerable:!(n=rr(t,c))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?er(or(e)):{},Le(t||!e||!e.__esModule?R(r,"default",{value:e,enumerable:!0}):r,e)),cr=e=>Le(R({},"__esModule",{value:!0}),e);var Ke=I((ue,le)=>{(function(e,t){typeof ue=="object"&&typeof le<"u"?le.exports=t():typeof define=="function"&&define.amd?define(t):e.typeDetect=t()})(ue,function(){"use strict";var e=typeof Promise=="function",t=typeof self=="object"?self:global,r=typeof Symbol<"u",n=typeof Map<"u",c=typeof Set<"u",l=typeof WeakMap<"u",d=typeof WeakSet<"u",h=typeof DataView<"u",i=r&&typeof Symbol.iterator<"u",m=r&&typeof Symbol.toStringTag<"u",o=c&&typeof Set.prototype.entries=="function",a=n&&typeof Map.prototype.entries=="function",y=o&&Object.getPrototypeOf(new Set().entries()),p=a&&Object.getPrototypeOf(new Map().entries()),$=i&&typeof Array.prototype[Symbol.iterator]=="function",S=$&&Object.getPrototypeOf([][Symbol.iterator]()),f=i&&typeof String.prototype[Symbol.iterator]=="function",s=f&&Object.getPrototypeOf(""[Symbol.iterator]()),u=8,g=-1;function w(O){var De=typeof O;if(De!=="object")return De;if(O===null)return"null";if(O===t)return"global";if(Array.isArray(O)&&(m===!1||!(Symbol.toStringTag in O)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&O===window.location)return"Location";if(typeof window.document=="object"&&O===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&O===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&O===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&O instanceof window.HTMLElement){if(O.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(O.tagName==="TD")return"HTMLTableDataCellElement";if(O.tagName==="TH")return"HTMLTableHeaderCellElement"}}var Ie=m&&O[Symbol.toStringTag];if(typeof Ie=="string")return Ie;var v=Object.getPrototypeOf(O);return v===RegExp.prototype?"RegExp":v===Date.prototype?"Date":e&&v===Promise.prototype?"Promise":c&&v===Set.prototype?"Set":n&&v===Map.prototype?"Map":d&&v===WeakSet.prototype?"WeakSet":l&&v===WeakMap.prototype?"WeakMap":h&&v===DataView.prototype?"DataView":n&&v===p?"Map Iterator":c&&v===y?"Set Iterator":$&&v===S?"Array Iterator":f&&v===s?"String Iterator":v===null?"Object":Object.prototype.toString.call(O).slice(u,g)}return w})});var Re=I((fo,Je)=>{function ur(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function lr(e,t,r,n){for(var c=e.length,l=r+(n?1:-1);n?l--:++l<c;)if(t(e[l],l,e))return l;return-1}function fr(e,t,r){if(t!==t)return lr(e,hr,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function pr(e,t,r,n){for(var c=r-1,l=e.length;++c<l;)if(n(e[c],t))return c;return-1}function hr(e){return e!==e}function gr(e){return function(t){return e(t)}}var yr=Array.prototype,He=yr.splice;function dr(e,t,r,n){var c=n?pr:fr,l=-1,d=t.length,h=e;for(e===t&&(t=mr(t)),r&&(h=ur(e,gr(r)));++l<d;)for(var i=0,m=t[l],o=r?r(m):m;(i=c(h,o,i,n))>-1;)h!==e&&He.call(h,i,1),He.call(e,i,1);return e}function mr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function br(e,t){return e&&e.length&&t&&t.length?dr(e,t):e}Je.exports=br});var Pt=I((G,M)=>{var $r=200,et="__lodash_hash_undefined__",tt=9007199254740991,be="[object Arguments]",wr="[object Array]",rt="[object Boolean]",nt="[object Date]",Or="[object Error]",$e="[object Function]",it="[object GeneratorFunction]",Y="[object Map]",ot="[object Number]",we="[object Object]",Fe="[object Promise]",st="[object RegExp]",q="[object Set]",at="[object String]",ct="[object Symbol]",pe="[object WeakMap]",ut="[object ArrayBuffer]",Q="[object DataView]",lt="[object Float32Array]",ft="[object Float64Array]",pt="[object Int8Array]",ht="[object Int16Array]",gt="[object Int32Array]",yt="[object Uint8Array]",dt="[object Uint8ClampedArray]",mt="[object Uint16Array]",bt="[object Uint32Array]",_r=/[\\^$.*+?()[\]{}|]/g,Sr=/\w*$/,vr=/^\[object .+?Constructor\]$/,Er=/^(?:0|[1-9]\d*)$/,b={};b[be]=b[wr]=b[ut]=b[Q]=b[rt]=b[nt]=b[lt]=b[ft]=b[pt]=b[ht]=b[gt]=b[Y]=b[ot]=b[we]=b[st]=b[q]=b[at]=b[ct]=b[yt]=b[dt]=b[mt]=b[bt]=!0;b[Or]=b[$e]=b[pe]=!1;var Ar=typeof global=="object"&&global&&global.Object===Object&&global,xr=typeof self=="object"&&self&&self.Object===Object&&self,A=Ar||xr||Function("return this")(),$t=typeof G=="object"&&G&&!G.nodeType&&G,Ge=$t&&typeof M=="object"&&M&&!M.nodeType&&M,Tr=Ge&&Ge.exports===$t;function jr(e,t){return e.set(t[0],t[1]),e}function Pr(e,t){return e.add(t),e}function Nr(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Cr(e,t){for(var r=-1,n=t.length,c=e.length;++r<n;)e[c+r]=t[r];return e}function wt(e,t,r,n){var c=-1,l=e?e.length:0;for(n&&l&&(r=e[++c]);++c<l;)r=t(r,e[c],c,e);return r}function Dr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ir(e,t){return e==null?void 0:e[t]}function Ot(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Ue(e){var t=-1,r=Array(e.size);return e.forEach(function(n,c){r[++t]=[c,n]}),r}function Oe(e,t){return function(r){return e(t(r))}}function We(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Vr=Array.prototype,Mr=Function.prototype,X=Object.prototype,fe=A["__core-js_shared__"],Be=function(){var e=/[^.]+$/.exec(fe&&fe.keys&&fe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),_t=Mr.toString,T=X.hasOwnProperty,Z=X.toString,kr=RegExp("^"+_t.call(T).replace(_r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=Tr?A.Buffer:void 0,qe=A.Symbol,Qe=A.Uint8Array,Lr=Oe(Object.getPrototypeOf,Object),Kr=Object.create,Hr=X.propertyIsEnumerable,Jr=Vr.splice,Xe=Object.getOwnPropertySymbols,Rr=Ye?Ye.isBuffer:void 0,Fr=Oe(Object.keys,Object),he=K(A,"DataView"),U=K(A,"Map"),ge=K(A,"Promise"),ye=K(A,"Set"),de=K(A,"WeakMap"),W=K(Object,"create"),Gr=N(he),Ur=N(U),Wr=N(ge),Br=N(ye),Yr=N(de),Ze=qe?qe.prototype:void 0,ze=Ze?Ze.valueOf:void 0;function P(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(){this.__data__=W?W(null):{}}function Qr(e){return this.has(e)&&delete this.__data__[e]}function Xr(e){var t=this.__data__;if(W){var r=t[e];return r===et?void 0:r}return T.call(t,e)?t[e]:void 0}function Zr(e){var t=this.__data__;return W?t[e]!==void 0:T.call(t,e)}function zr(e,t){var r=this.__data__;return r[e]=W&&t===void 0?et:t,this}P.prototype.clear=qr;P.prototype.delete=Qr;P.prototype.get=Xr;P.prototype.has=Zr;P.prototype.set=zr;function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function en(){this.__data__=[]}function tn(e){var t=this.__data__,r=z(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Jr.call(t,r,1),!0}function rn(e){var t=this.__data__,r=z(t,e);return r<0?void 0:t[r][1]}function nn(e){return z(this.__data__,e)>-1}function on(e,t){var r=this.__data__,n=z(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}x.prototype.clear=en;x.prototype.delete=tn;x.prototype.get=rn;x.prototype.has=nn;x.prototype.set=on;function k(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function sn(){this.__data__={hash:new P,map:new(U||x),string:new P}}function an(e){return ee(this,e).delete(e)}function cn(e){return ee(this,e).get(e)}function un(e){return ee(this,e).has(e)}function ln(e,t){return ee(this,e).set(e,t),this}k.prototype.clear=sn;k.prototype.delete=an;k.prototype.get=cn;k.prototype.has=un;k.prototype.set=ln;function L(e){this.__data__=new x(e)}function fn(){this.__data__=new x}function pn(e){return this.__data__.delete(e)}function hn(e){return this.__data__.get(e)}function gn(e){return this.__data__.has(e)}function yn(e,t){var r=this.__data__;if(r instanceof x){var n=r.__data__;if(!U||n.length<$r-1)return n.push([e,t]),this;r=this.__data__=new k(n)}return r.set(e,t),this}L.prototype.clear=fn;L.prototype.delete=pn;L.prototype.get=hn;L.prototype.has=gn;L.prototype.set=yn;function dn(e,t){var r=Se(e)||Hn(e)?Dr(e.length,String):[],n=r.length,c=!!n;for(var l in e)(t||T.call(e,l))&&!(c&&(l=="length"||Mn(l,n)))&&r.push(l);return r}function St(e,t,r){var n=e[t];(!(T.call(e,t)&&xt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function z(e,t){for(var r=e.length;r--;)if(xt(e[r][0],t))return r;return-1}function mn(e,t){return e&&vt(t,ve(t),e)}function me(e,t,r,n,c,l,d){var h;if(n&&(h=l?n(e,c,l,d):n(e)),h!==void 0)return h;if(!te(e))return e;var i=Se(e);if(i){if(h=Dn(e),!t)return Pn(e,h)}else{var m=j(e),o=m==$e||m==it;if(Rn(e))return Sn(e,t);if(m==we||m==be||o&&!l){if(Ot(e))return l?e:{};if(h=In(o?{}:e),!t)return Nn(e,mn(h,e))}else{if(!b[m])return l?e:{};h=Vn(e,m,me,t)}}d||(d=new L);var a=d.get(e);if(a)return a;if(d.set(e,h),!i)var y=r?Cn(e):ve(e);return Nr(y||e,function(p,$){y&&($=p,p=e[$]),St(h,$,me(p,t,r,n,$,e,d))}),h}function bn(e){return te(e)?Kr(e):{}}function $n(e,t,r){var n=t(e);return Se(e)?n:Cr(n,r(e))}function wn(e){return Z.call(e)}function On(e){if(!te(e)||Ln(e))return!1;var t=jt(e)||Ot(e)?kr:vr;return t.test(N(e))}function _n(e){if(!At(e))return Fr(e);var t=[];for(var r in Object(e))T.call(e,r)&&r!="constructor"&&t.push(r);return t}function Sn(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function _e(e){var t=new e.constructor(e.byteLength);return new Qe(t).set(new Qe(e)),t}function vn(e,t){var r=t?_e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function En(e,t,r){var n=t?r(Ue(e),!0):Ue(e);return wt(n,jr,new e.constructor)}function An(e){var t=new e.constructor(e.source,Sr.exec(e));return t.lastIndex=e.lastIndex,t}function xn(e,t,r){var n=t?r(We(e),!0):We(e);return wt(n,Pr,new e.constructor)}function Tn(e){return ze?Object(ze.call(e)):{}}function jn(e,t){var r=t?_e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Pn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function vt(e,t,r,n){r||(r={});for(var c=-1,l=t.length;++c<l;){var d=t[c],h=n?n(r[d],e[d],d,r,e):void 0;St(r,d,h===void 0?e[d]:h)}return r}function Nn(e,t){return vt(e,Et(e),t)}function Cn(e){return $n(e,ve,Et)}function ee(e,t){var r=e.__data__;return kn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function K(e,t){var r=Ir(e,t);return On(r)?r:void 0}var Et=Xe?Oe(Xe,Object):Un,j=wn;(he&&j(new he(new ArrayBuffer(1)))!=Q||U&&j(new U)!=Y||ge&&j(ge.resolve())!=Fe||ye&&j(new ye)!=q||de&&j(new de)!=pe)&&(j=function(e){var t=Z.call(e),r=t==we?e.constructor:void 0,n=r?N(r):void 0;if(n)switch(n){case Gr:return Q;case Ur:return Y;case Wr:return Fe;case Br:return q;case Yr:return pe}return t});function Dn(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&T.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function In(e){return typeof e.constructor=="function"&&!At(e)?bn(Lr(e)):{}}function Vn(e,t,r,n){var c=e.constructor;switch(t){case ut:return _e(e);case rt:case nt:return new c(+e);case Q:return vn(e,n);case lt:case ft:case pt:case ht:case gt:case yt:case dt:case mt:case bt:return jn(e,n);case Y:return En(e,n,r);case ot:case at:return new c(e);case st:return An(e);case q:return xn(e,n,r);case ct:return Tn(e)}}function Mn(e,t){return t=t==null?tt:t,!!t&&(typeof e=="number"||Er.test(e))&&e>-1&&e%1==0&&e<t}function kn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ln(e){return!!Be&&Be in e}function At(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||X;return e===r}function N(e){if(e!=null){try{return _t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Kn(e){return me(e,!0,!0)}function xt(e,t){return e===t||e!==e&&t!==t}function Hn(e){return Jn(e)&&T.call(e,"callee")&&(!Hr.call(e,"callee")||Z.call(e)==be)}var Se=Array.isArray;function Tt(e){return e!=null&&Fn(e.length)&&!jt(e)}function Jn(e){return Gn(e)&&Tt(e)}var Rn=Rr||Wn;function jt(e){var t=te(e)?Z.call(e):"";return t==$e||t==it}function Fn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tt}function te(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Gn(e){return!!e&&typeof e=="object"}function ve(e){return Tt(e)?dn(e):_n(e)}function Un(){return[]}function Wn(){return!1}M.exports=Kn});var It=I((po,Dt)=>{var Bn="[object Object]";function Yn(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function qn(e,t){return function(r){return e(t(r))}}var Qn=Function.prototype,Nt=Object.prototype,Ct=Qn.toString,Xn=Nt.hasOwnProperty,Zn=Ct.call(Object),zn=Nt.toString,ei=qn(Object.getPrototypeOf,Object);function ti(e){return!!e&&typeof e=="object"}function ri(e){if(!ti(e)||zn.call(e)!=Bn||Yn(e))return!1;var t=ei(e);if(t===null)return!0;var r=Xn.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ct.call(r)==Zn}Dt.exports=ri});var Bt=I((mo,Wt)=>{var Te="__lodash_hash_undefined__",ii=9007199254740991,oi="[object Function]",si="[object GeneratorFunction]",ai=/[\\^$.*+?()[\]{}|]/g,ci=/^\[object .+?Constructor\]$/,ui=typeof global=="object"&&global&&global.Object===Object&&global,li=typeof self=="object"&&self&&self.Object===Object&&self,Kt=ui||li||Function("return this")();function fi(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function pi(e,t){var r=e?e.length:0;return!!r&&yi(e,t,0)>-1}function hi(e,t,r){for(var n=-1,c=e?e.length:0;++n<c;)if(r(t,e[n]))return!0;return!1}function Ht(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function gi(e,t,r,n){for(var c=e.length,l=r+(n?1:-1);n?l--:++l<c;)if(t(e[l],l,e))return l;return-1}function yi(e,t,r){if(t!==t)return gi(e,di,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function di(e){return e!==e}function mi(e){return function(t){return e(t)}}function Mt(e,t){return e.has(t)}function bi(e,t){return e==null?void 0:e[t]}function $i(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}var wi=Array.prototype,Oi=Function.prototype,Jt=Object.prototype,xe=Kt["__core-js_shared__"],kt=function(){var e=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Rt=Oi.toString,je=Jt.hasOwnProperty,_i=Jt.toString,Si=RegExp("^"+Rt.call(je).replace(ai,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=wi.splice,Lt=Math.max,Ei=Math.min,Ai=Ft(Kt,"Map"),B=Ft(Object,"create");function C(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xi(){this.__data__=B?B(null):{}}function Ti(e){return this.has(e)&&delete this.__data__[e]}function ji(e){var t=this.__data__;if(B){var r=t[e];return r===Te?void 0:r}return je.call(t,e)?t[e]:void 0}function Pi(e){var t=this.__data__;return B?t[e]!==void 0:je.call(t,e)}function Ni(e,t){var r=this.__data__;return r[e]=B&&t===void 0?Te:t,this}C.prototype.clear=xi;C.prototype.delete=Ti;C.prototype.get=ji;C.prototype.has=Pi;C.prototype.set=Ni;function H(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ci(){this.__data__=[]}function Di(e){var t=this.__data__,r=ie(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():vi.call(t,r,1),!0}function Ii(e){var t=this.__data__,r=ie(t,e);return r<0?void 0:t[r][1]}function Vi(e){return ie(this.__data__,e)>-1}function Mi(e,t){var r=this.__data__,n=ie(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}H.prototype.clear=Ci;H.prototype.delete=Di;H.prototype.get=Ii;H.prototype.has=Vi;H.prototype.set=Mi;function J(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ki(){this.__data__={hash:new C,map:new(Ai||H),string:new C}}function Li(e){return oe(this,e).delete(e)}function Ki(e){return oe(this,e).get(e)}function Hi(e){return oe(this,e).has(e)}function Ji(e,t){return oe(this,e).set(e,t),this}J.prototype.clear=ki;J.prototype.delete=Li;J.prototype.get=Ki;J.prototype.has=Hi;J.prototype.set=Ji;function ne(e){var t=-1,r=e?e.length:0;for(this.__data__=new J;++t<r;)this.add(e[t])}function Ri(e){return this.__data__.set(e,Te),this}function Fi(e){return this.__data__.has(e)}ne.prototype.add=ne.prototype.push=Ri;ne.prototype.has=Fi;function ie(e,t){for(var r=e.length;r--;)if(Zi(e[r][0],t))return r;return-1}function Gi(e,t,r){for(var n=r?hi:pi,c=e[0].length,l=e.length,d=l,h=Array(l),i=1/0,m=[];d--;){var o=e[d];d&&t&&(o=Ht(o,mi(t))),i=Ei(o.length,i),h[d]=!r&&(t||c>=120&&o.length>=120)?new ne(d&&o):void 0}o=e[0];var a=-1,y=h[0];e:for(;++a<c&&m.length<i;){var p=o[a],$=t?t(p):p;if(p=r||p!==0?p:0,!(y?Mt(y,$):n(m,$,r))){for(d=l;--d;){var S=h[d];if(!(S?Mt(S,$):n(e[d],$,r)))continue e}y&&y.push($),m.push(p)}}return m}function Ui(e){if(!Ut(e)||qi(e))return!1;var t=Gt(e)||$i(e)?Si:ci;return t.test(Qi(e))}function Wi(e,t){return t=Lt(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,c=Lt(r.length-t,0),l=Array(c);++n<c;)l[n]=r[t+n];n=-1;for(var d=Array(t+1);++n<t;)d[n]=r[n];return d[t]=l,fi(e,this,d)}}function Bi(e){return eo(e)?e:[]}function oe(e,t){var r=e.__data__;return Yi(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ft(e,t){var r=bi(e,t);return Ui(r)?r:void 0}function Yi(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qi(e){return!!kt&&kt in e}function Qi(e){if(e!=null){try{return Rt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Xi=Wi(function(e){var t=Ht(e,Bi);return t.length&&t[0]===e[0]?Gi(t):[]});function Zi(e,t){return e===t||e!==e&&t!==t}function zi(e){return e!=null&&to(e.length)&&!Gt(e)}function eo(e){return ro(e)&&zi(e)}function Gt(e){var t=Ut(e)?_i.call(e):"";return t==oi||t==si}function to(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ii}function Ut(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ro(e){return!!e&&typeof e=="object"}Wt.exports=Xi});var qt=I((Yt,se)=>{(function(e,t){"use strict";typeof se=="object"&&typeof se.exports=="object"?se.exports=t():typeof define=="function"&&define.amd?define([],t):e.objectPath=t()})(Yt,function(){"use strict";var e=Object.prototype.toString;function t(o,a){return o==null?!1:Object.prototype.hasOwnProperty.call(o,a)}function r(o){if(!o||l(o)&&o.length===0)return!0;if(typeof o!="string"){for(var a in o)if(t(o,a))return!1;return!0}return!1}function n(o){return e.call(o)}function c(o){return typeof o=="object"&&n(o)==="[object Object]"}var l=Array.isArray||function(o){return e.call(o)==="[object Array]"};function d(o){return typeof o=="boolean"||n(o)==="[object Boolean]"}function h(o){var a=parseInt(o);return a.toString()===o?a:o}function i(o){o=o||{};var a=function(f){return Object.keys(a).reduce(function(s,u){return u==="create"||typeof a[u]=="function"&&(s[u]=a[u].bind(a,f)),s},{})},y;o.includeInheritedProps?y=function(){return!0}:y=function(f,s){return typeof s=="number"&&Array.isArray(f)||t(f,s)};function p(f,s){if(y(f,s))return f[s]}var $;o.includeInheritedProps?$=function(f,s){typeof s!="string"&&typeof s!="number"&&(s=String(s));var u=p(f,s);if(s==="__proto__"||s==="prototype"||s==="constructor"&&typeof u=="function")throw new Error("For security reasons, object's magic properties cannot be set");return u}:$=function(f,s){return p(f,s)};function S(f,s,u,g){if(typeof s=="number"&&(s=[s]),!s||s.length===0)return f;if(typeof s=="string")return S(f,s.split(".").map(h),u,g);var w=s[0],O=$(f,w);return s.length===1?((O===void 0||!g)&&(f[w]=u),O):(O===void 0&&(typeof s[1]=="number"?f[w]=[]:f[w]={}),S(f[w],s.slice(1),u,g))}return a.has=function(f,s){if(typeof s=="number"?s=[s]:typeof s=="string"&&(s=s.split(".")),!s||s.length===0)return!!f;for(var u=0;u<s.length;u++){var g=h(s[u]);if(typeof g=="number"&&l(f)&&g<f.length||(o.includeInheritedProps?g in Object(f):t(f,g)))f=f[g];else return!1}return!0},a.ensureExists=function(f,s,u){return S(f,s,u,!0)},a.set=function(f,s,u,g){return S(f,s,u,g)},a.insert=function(f,s,u,g){var w=a.get(f,s);g=~~g,l(w)||(w=[],a.set(f,s,w)),w.splice(g,0,u)},a.empty=function(f,s){if(!r(s)&&f!=null){var u,g;if(!!(u=a.get(f,s))){if(typeof u=="string")return a.set(f,s,"");if(d(u))return a.set(f,s,!1);if(typeof u=="number")return a.set(f,s,0);if(l(u))u.length=0;else if(c(u))for(g in u)y(u,g)&&delete u[g];else return a.set(f,s,null)}}},a.push=function(f,s){var u=a.get(f,s);l(u)||(u=[],a.set(f,s,u)),u.push.apply(u,Array.prototype.slice.call(arguments,2))},a.coalesce=function(f,s,u){for(var g,w=0,O=s.length;w<O;w++)if((g=a.get(f,s[w]))!==void 0)return g;return u},a.get=function(f,s,u){if(typeof s=="number"&&(s=[s]),!s||s.length===0)return f;if(f==null)return u;if(typeof s=="string")return a.get(f,s.split("."),u);var g=h(s[0]),w=$(f,g);return w===void 0?u:s.length===1?w:a.get(f[g],s.slice(1),u)},a.del=function(s,u){if(typeof u=="number"&&(u=[u]),s==null||r(u))return s;if(typeof u=="string")return a.del(s,u.split("."));var g=h(u[0]);if($(s,g),!y(s,g))return s;if(u.length===1)l(s)?s.splice(g,1):delete s[g];else return a.del(s[g],u.slice(1));return s},a}var m=i();return m.create=i,m.withInheritedProps=i({includeInheritedProps:!0}),m})});var uo={};ar(uo,{checkTypesMini:()=>co,defaults:()=>zt,version:()=>so});var _=V(Ke(),1),D=V(Re(),1);var re=V(Pt(),1),Vt=V(It(),1);function ni(e){if(e.includes(".")){let t=e.lastIndexOf(".");if(!e.slice(0,t).includes("."))return e.slice(0,t);for(let r=t-1;r--;)if(e[r]===".")return e.slice(r+1,t)}return null}var Ee=ni;function Ae(e,t){let r={now:!1};function n(c,l,d,h){let i=(0,re.default)(c),m,o=E({depth:-1,path:""},d);if(o.depth+=1,Array.isArray(i))for(let a=0,y=i.length;a<y&&!h.now;a++){let p=o.path?`${o.path}.${a}`:`${a}`;i[a]!==void 0?(o.parent=(0,re.default)(i),o.parentType="array",o.parentKey=Ee(p),m=n(l(i[a],void 0,F(E({},o),{path:p}),h),l,F(E({},o),{path:p}),h),Number.isNaN(m)&&a<i.length?(i.splice(a,1),a-=1):i[a]=m):i.splice(a,1)}else if((0,Vt.default)(i))for(let a in i){if(h.now&&a!=null)break;let y=o.path?`${o.path}.${a}`:a;o.depth===0&&a!=null&&(o.topmostKey=a),o.parent=(0,re.default)(i),o.parentType="object",o.parentKey=Ee(y),m=n(l(a,i[a],F(E({},o),{path:y}),h),l,F(E({},o),{path:y}),h),Number.isNaN(m)?delete i[a]:i[a]=m}return i}return n(e,t,{},r)}var Zt=V(Bt(),1);function Pe(e){return typeof e=="string"?e.length?[e]:[]:e}var ce=V(qt(),1);function Ne(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ce=new Map,Qt=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},no=(e,t)=>{t=E({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(Ce.has(r))return Ce.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=Ne(e).replace(/\\\*/g,"[\\s\\S]*");let c=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return c.negated=n,Ce.set(r,c),c},io=(e,t,r,n)=>{if(e=Qt(e,"inputs"),t=Qt(t,"patterns"),t.length===0)return[];t=t.map(d=>no(d,r));let{allPatterns:c}=r||{},l=[];for(let d of e){let h,i=[...t].fill(!1);for(let[m,o]of t.entries())if(o.test(d)&&(i[m]=!0,h=!o.negated,!h))break;if(!(h===!1||h===void 0&&t.some(m=>!m.negated)||c&&i.some((m,o)=>!m&&!t[o].negated))&&(l.push(d),n))break}return l};function ae(e,t,r){return io(e,t,r,!0).length>0}var Xt="7.1.2";var so=Xt,zt={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function ao(e,t,r){function n(o){return o!=null}function c(o){return(0,_.default)(o)==="Object"}function l(o,a){return typeof a=="string"&&(a=Pe(a)),Array.from(o).filter(y=>!a.some(p=>ae(y,p,{caseSensitive:!0})))}let d=Object.prototype.hasOwnProperty,h=["any","anything","every","everything","all","whatever","whatevs"];if(!n(e))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let i=E(E({},zt),r);if(typeof i.ignoreKeys=="string"&&(i.ignoreKeys=[i.ignoreKeys]),typeof i.ignorePaths=="string"&&(i.ignorePaths=[i.ignorePaths]),typeof i.acceptArraysIgnore=="string"&&(i.acceptArraysIgnore=[i.acceptArraysIgnore]),i.msg=`${i.msg}`.trim(),i.msg[i.msg.length-1]===":"&&(i.msg=i.msg.slice(0,i.msg.length-1).trim()),c(i.schema))Object.keys(i.schema).forEach(o=>{if(c(i.schema[o])){let a={};Ae(i.schema[o],(y,p,$)=>{let S=p!==void 0?p:y;return!Array.isArray(S)&&!c(S)&&(a[`${o}.${$.path}`]=S),S}),delete i.schema[o],i.schema=E(E({},i.schema),a)}}),Object.keys(i.schema).forEach(o=>{Array.isArray(i.schema[o])||(i.schema[o]=[i.schema[o]]),i.schema[o]=i.schema[o].map(a=>`${a}`.toLowerCase().trim())});else if(i.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(i.schema,null,0)} which is not object but ${typeof i.schema}`);if(n(t)||(t={}),i.enforceStrictKeyset)if(n(i.schema)&&Object.keys(i.schema).length){if(t&&l((0,D.default)(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema))),i.ignoreKeys).length){let o=(0,D.default)(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema)));throw new TypeError(`${i.msg}: ${i.optsVarName}.enforceStrictKeyset is on and the following key${o.length>1?"s":""} ${o.length>1?"are":"is"} not covered by schema and/or reference objects: ${o.join(", ")}`)}}else if(c(t)&&Object.keys(t).length){if(l((0,D.default)(Object.keys(e),Object.keys(t)),i.ignoreKeys).length!==0){let o=(0,D.default)(Object.keys(e),Object.keys(t));throw new TypeError(`${i.msg}: The input object has key${o.length>1?"s":""} which ${o.length>1?"are":"is"} not covered by the reference object: ${o.join(", ")}`)}else if(l((0,D.default)(Object.keys(t),Object.keys(e)),i.ignoreKeys).length!==0){let o=(0,D.default)(Object.keys(t),Object.keys(e));throw new TypeError(`${i.msg}: The reference object has key${o.length>1?"s":""} which ${o.length>1?"are":"is"} not present in the input object: ${o.join(", ")}`)}}else throw new TypeError(`${i.msg}: Both ${i.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via opts.enforceStrictKeyset!`);let m=[];Ae(e,(o,a,y)=>{let p=a,$=o;if(y.parentType==="array"&&($=void 0,p=o),Array.isArray(m)&&m.length&&m.some(u=>y.path.startsWith(u))||$&&i.ignoreKeys.some(u=>ae($,u))||i.ignorePaths.some(u=>ae(y.path,u)))return p;let S=!(!c(p)&&!Array.isArray(p)&&Array.isArray(y.parent)),f=!1;c(i.schema)&&d.call(i.schema,y.path)&&(f=!0);let s=!1;if(c(t)&&ce.default.has(t,y.path)&&(s=!0),i.enforceStrictKeyset&&S&&!f&&!s)throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} is neither covered by reference object (second input argument), nor ${i.optsVarName}.schema! To stop this error, turn off ${i.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${i.optsVarName}.schema).
var checkTypesMini=(()=>{var er=Object.create;var R=Object.defineProperty,tr=Object.defineProperties,rr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,ir=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,or=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable;var Me=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))ke.call(t,r)&&Me(e,r,t[r]);if(Ve)for(var r of Ve(t))sr.call(t,r)&&Me(e,r,t[r]);return e},F=(e,t)=>tr(e,nr(t));var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var r in t)R(e,r,{get:t[r],enumerable:!0})},Le=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of ir(t))!ke.call(e,c)&&c!==r&&R(e,c,{get:()=>t[c],enumerable:!(n=rr(t,c))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?er(or(e)):{},Le(t||!e||!e.__esModule?R(r,"default",{value:e,enumerable:!0}):r,e)),cr=e=>Le(R({},"__esModule",{value:!0}),e);var Ke=I((le,ue)=>{(function(e,t){typeof le=="object"&&typeof ue<"u"?ue.exports=t():typeof define=="function"&&define.amd?define(t):e.typeDetect=t()})(le,function(){"use strict";var e=typeof Promise=="function",t=typeof self=="object"?self:global,r=typeof Symbol<"u",n=typeof Map<"u",c=typeof Set<"u",u=typeof WeakMap<"u",d=typeof WeakSet<"u",h=typeof DataView<"u",i=r&&typeof Symbol.iterator<"u",m=r&&typeof Symbol.toStringTag<"u",o=c&&typeof Set.prototype.entries=="function",a=n&&typeof Map.prototype.entries=="function",y=o&&Object.getPrototypeOf(new Set().entries()),p=a&&Object.getPrototypeOf(new Map().entries()),$=i&&typeof Array.prototype[Symbol.iterator]=="function",v=$&&Object.getPrototypeOf([][Symbol.iterator]()),f=i&&typeof String.prototype[Symbol.iterator]=="function",s=f&&Object.getPrototypeOf(""[Symbol.iterator]()),l=8,g=-1;function O(w){var De=typeof w;if(De!=="object")return De;if(w===null)return"null";if(w===t)return"global";if(Array.isArray(w)&&(m===!1||!(Symbol.toStringTag in w)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&w===window.location)return"Location";if(typeof window.document=="object"&&w===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&w===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&w===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&w instanceof window.HTMLElement){if(w.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(w.tagName==="TD")return"HTMLTableDataCellElement";if(w.tagName==="TH")return"HTMLTableHeaderCellElement"}}var Ie=m&&w[Symbol.toStringTag];if(typeof Ie=="string")return Ie;var S=Object.getPrototypeOf(w);return S===RegExp.prototype?"RegExp":S===Date.prototype?"Date":e&&S===Promise.prototype?"Promise":c&&S===Set.prototype?"Set":n&&S===Map.prototype?"Map":d&&S===WeakSet.prototype?"WeakSet":u&&S===WeakMap.prototype?"WeakMap":h&&S===DataView.prototype?"DataView":n&&S===p?"Map Iterator":c&&S===y?"Set Iterator":$&&S===v?"Array Iterator":f&&S===s?"String Iterator":S===null?"Object":Object.prototype.toString.call(w).slice(l,g)}return O})});var Re=I((fo,Je)=>{function lr(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function ur(e,t,r,n){for(var c=e.length,u=r+(n?1:-1);n?u--:++u<c;)if(t(e[u],u,e))return u;return-1}function fr(e,t,r){if(t!==t)return ur(e,hr,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function pr(e,t,r,n){for(var c=r-1,u=e.length;++c<u;)if(n(e[c],t))return c;return-1}function hr(e){return e!==e}function gr(e){return function(t){return e(t)}}var yr=Array.prototype,He=yr.splice;function dr(e,t,r,n){var c=n?pr:fr,u=-1,d=t.length,h=e;for(e===t&&(t=mr(t)),r&&(h=lr(e,gr(r)));++u<d;)for(var i=0,m=t[u],o=r?r(m):m;(i=c(h,o,i,n))>-1;)h!==e&&He.call(h,i,1),He.call(e,i,1);return e}function mr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function br(e,t){return e&&e.length&&t&&t.length?dr(e,t):e}Je.exports=br});var Pt=I((G,M)=>{var $r=200,et="__lodash_hash_undefined__",tt=9007199254740991,be="[object Arguments]",Or="[object Array]",rt="[object Boolean]",nt="[object Date]",wr="[object Error]",$e="[object Function]",it="[object GeneratorFunction]",Y="[object Map]",ot="[object Number]",Oe="[object Object]",Fe="[object Promise]",st="[object RegExp]",q="[object Set]",at="[object String]",ct="[object Symbol]",pe="[object WeakMap]",lt="[object ArrayBuffer]",Q="[object DataView]",ut="[object Float32Array]",ft="[object Float64Array]",pt="[object Int8Array]",ht="[object Int16Array]",gt="[object Int32Array]",yt="[object Uint8Array]",dt="[object Uint8ClampedArray]",mt="[object Uint16Array]",bt="[object Uint32Array]",_r=/[\\^$.*+?()[\]{}|]/g,vr=/\w*$/,Sr=/^\[object .+?Constructor\]$/,Er=/^(?:0|[1-9]\d*)$/,b={};b[be]=b[Or]=b[lt]=b[Q]=b[rt]=b[nt]=b[ut]=b[ft]=b[pt]=b[ht]=b[gt]=b[Y]=b[ot]=b[Oe]=b[st]=b[q]=b[at]=b[ct]=b[yt]=b[dt]=b[mt]=b[bt]=!0;b[wr]=b[$e]=b[pe]=!1;var Ar=typeof global=="object"&&global&&global.Object===Object&&global,xr=typeof self=="object"&&self&&self.Object===Object&&self,A=Ar||xr||Function("return this")(),$t=typeof G=="object"&&G&&!G.nodeType&&G,Ge=$t&&typeof M=="object"&&M&&!M.nodeType&&M,Tr=Ge&&Ge.exports===$t;function jr(e,t){return e.set(t[0],t[1]),e}function Pr(e,t){return e.add(t),e}function Nr(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Cr(e,t){for(var r=-1,n=t.length,c=e.length;++r<n;)e[c+r]=t[r];return e}function Ot(e,t,r,n){var c=-1,u=e?e.length:0;for(n&&u&&(r=e[++c]);++c<u;)r=t(r,e[c],c,e);return r}function Dr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ir(e,t){return e==null?void 0:e[t]}function wt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Ue(e){var t=-1,r=Array(e.size);return e.forEach(function(n,c){r[++t]=[c,n]}),r}function we(e,t){return function(r){return e(t(r))}}function We(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Vr=Array.prototype,Mr=Function.prototype,X=Object.prototype,fe=A["__core-js_shared__"],Be=function(){var e=/[^.]+$/.exec(fe&&fe.keys&&fe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),_t=Mr.toString,T=X.hasOwnProperty,Z=X.toString,kr=RegExp("^"+_t.call(T).replace(_r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=Tr?A.Buffer:void 0,qe=A.Symbol,Qe=A.Uint8Array,Lr=we(Object.getPrototypeOf,Object),Kr=Object.create,Hr=X.propertyIsEnumerable,Jr=Vr.splice,Xe=Object.getOwnPropertySymbols,Rr=Ye?Ye.isBuffer:void 0,Fr=we(Object.keys,Object),he=K(A,"DataView"),U=K(A,"Map"),ge=K(A,"Promise"),ye=K(A,"Set"),de=K(A,"WeakMap"),W=K(Object,"create"),Gr=N(he),Ur=N(U),Wr=N(ge),Br=N(ye),Yr=N(de),Ze=qe?qe.prototype:void 0,ze=Ze?Ze.valueOf:void 0;function P(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(){this.__data__=W?W(null):{}}function Qr(e){return this.has(e)&&delete this.__data__[e]}function Xr(e){var t=this.__data__;if(W){var r=t[e];return r===et?void 0:r}return T.call(t,e)?t[e]:void 0}function Zr(e){var t=this.__data__;return W?t[e]!==void 0:T.call(t,e)}function zr(e,t){var r=this.__data__;return r[e]=W&&t===void 0?et:t,this}P.prototype.clear=qr;P.prototype.delete=Qr;P.prototype.get=Xr;P.prototype.has=Zr;P.prototype.set=zr;function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function en(){this.__data__=[]}function tn(e){var t=this.__data__,r=z(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Jr.call(t,r,1),!0}function rn(e){var t=this.__data__,r=z(t,e);return r<0?void 0:t[r][1]}function nn(e){return z(this.__data__,e)>-1}function on(e,t){var r=this.__data__,n=z(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}x.prototype.clear=en;x.prototype.delete=tn;x.prototype.get=rn;x.prototype.has=nn;x.prototype.set=on;function k(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function sn(){this.__data__={hash:new P,map:new(U||x),string:new P}}function an(e){return ee(this,e).delete(e)}function cn(e){return ee(this,e).get(e)}function ln(e){return ee(this,e).has(e)}function un(e,t){return ee(this,e).set(e,t),this}k.prototype.clear=sn;k.prototype.delete=an;k.prototype.get=cn;k.prototype.has=ln;k.prototype.set=un;function L(e){this.__data__=new x(e)}function fn(){this.__data__=new x}function pn(e){return this.__data__.delete(e)}function hn(e){return this.__data__.get(e)}function gn(e){return this.__data__.has(e)}function yn(e,t){var r=this.__data__;if(r instanceof x){var n=r.__data__;if(!U||n.length<$r-1)return n.push([e,t]),this;r=this.__data__=new k(n)}return r.set(e,t),this}L.prototype.clear=fn;L.prototype.delete=pn;L.prototype.get=hn;L.prototype.has=gn;L.prototype.set=yn;function dn(e,t){var r=ve(e)||Hn(e)?Dr(e.length,String):[],n=r.length,c=!!n;for(var u in e)(t||T.call(e,u))&&!(c&&(u=="length"||Mn(u,n)))&&r.push(u);return r}function vt(e,t,r){var n=e[t];(!(T.call(e,t)&&xt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function z(e,t){for(var r=e.length;r--;)if(xt(e[r][0],t))return r;return-1}function mn(e,t){return e&&St(t,Se(t),e)}function me(e,t,r,n,c,u,d){var h;if(n&&(h=u?n(e,c,u,d):n(e)),h!==void 0)return h;if(!te(e))return e;var i=ve(e);if(i){if(h=Dn(e),!t)return Pn(e,h)}else{var m=j(e),o=m==$e||m==it;if(Rn(e))return vn(e,t);if(m==Oe||m==be||o&&!u){if(wt(e))return u?e:{};if(h=In(o?{}:e),!t)return Nn(e,mn(h,e))}else{if(!b[m])return u?e:{};h=Vn(e,m,me,t)}}d||(d=new L);var a=d.get(e);if(a)return a;if(d.set(e,h),!i)var y=r?Cn(e):Se(e);return Nr(y||e,function(p,$){y&&($=p,p=e[$]),vt(h,$,me(p,t,r,n,$,e,d))}),h}function bn(e){return te(e)?Kr(e):{}}function $n(e,t,r){var n=t(e);return ve(e)?n:Cr(n,r(e))}function On(e){return Z.call(e)}function wn(e){if(!te(e)||Ln(e))return!1;var t=jt(e)||wt(e)?kr:Sr;return t.test(N(e))}function _n(e){if(!At(e))return Fr(e);var t=[];for(var r in Object(e))T.call(e,r)&&r!="constructor"&&t.push(r);return t}function vn(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function _e(e){var t=new e.constructor(e.byteLength);return new Qe(t).set(new Qe(e)),t}function Sn(e,t){var r=t?_e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function En(e,t,r){var n=t?r(Ue(e),!0):Ue(e);return Ot(n,jr,new e.constructor)}function An(e){var t=new e.constructor(e.source,vr.exec(e));return t.lastIndex=e.lastIndex,t}function xn(e,t,r){var n=t?r(We(e),!0):We(e);return Ot(n,Pr,new e.constructor)}function Tn(e){return ze?Object(ze.call(e)):{}}function jn(e,t){var r=t?_e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Pn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function St(e,t,r,n){r||(r={});for(var c=-1,u=t.length;++c<u;){var d=t[c],h=n?n(r[d],e[d],d,r,e):void 0;vt(r,d,h===void 0?e[d]:h)}return r}function Nn(e,t){return St(e,Et(e),t)}function Cn(e){return $n(e,Se,Et)}function ee(e,t){var r=e.__data__;return kn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function K(e,t){var r=Ir(e,t);return wn(r)?r:void 0}var Et=Xe?we(Xe,Object):Un,j=On;(he&&j(new he(new ArrayBuffer(1)))!=Q||U&&j(new U)!=Y||ge&&j(ge.resolve())!=Fe||ye&&j(new ye)!=q||de&&j(new de)!=pe)&&(j=function(e){var t=Z.call(e),r=t==Oe?e.constructor:void 0,n=r?N(r):void 0;if(n)switch(n){case Gr:return Q;case Ur:return Y;case Wr:return Fe;case Br:return q;case Yr:return pe}return t});function Dn(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&T.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function In(e){return typeof e.constructor=="function"&&!At(e)?bn(Lr(e)):{}}function Vn(e,t,r,n){var c=e.constructor;switch(t){case lt:return _e(e);case rt:case nt:return new c(+e);case Q:return Sn(e,n);case ut:case ft:case pt:case ht:case gt:case yt:case dt:case mt:case bt:return jn(e,n);case Y:return En(e,n,r);case ot:case at:return new c(e);case st:return An(e);case q:return xn(e,n,r);case ct:return Tn(e)}}function Mn(e,t){return t=t==null?tt:t,!!t&&(typeof e=="number"||Er.test(e))&&e>-1&&e%1==0&&e<t}function kn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ln(e){return!!Be&&Be in e}function At(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||X;return e===r}function N(e){if(e!=null){try{return _t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Kn(e){return me(e,!0,!0)}function xt(e,t){return e===t||e!==e&&t!==t}function Hn(e){return Jn(e)&&T.call(e,"callee")&&(!Hr.call(e,"callee")||Z.call(e)==be)}var ve=Array.isArray;function Tt(e){return e!=null&&Fn(e.length)&&!jt(e)}function Jn(e){return Gn(e)&&Tt(e)}var Rn=Rr||Wn;function jt(e){var t=te(e)?Z.call(e):"";return t==$e||t==it}function Fn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tt}function te(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Gn(e){return!!e&&typeof e=="object"}function Se(e){return Tt(e)?dn(e):_n(e)}function Un(){return[]}function Wn(){return!1}M.exports=Kn});var It=I((po,Dt)=>{var Bn="[object Object]";function Yn(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function qn(e,t){return function(r){return e(t(r))}}var Qn=Function.prototype,Nt=Object.prototype,Ct=Qn.toString,Xn=Nt.hasOwnProperty,Zn=Ct.call(Object),zn=Nt.toString,ei=qn(Object.getPrototypeOf,Object);function ti(e){return!!e&&typeof e=="object"}function ri(e){if(!ti(e)||zn.call(e)!=Bn||Yn(e))return!1;var t=ei(e);if(t===null)return!0;var r=Xn.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ct.call(r)==Zn}Dt.exports=ri});var Bt=I((mo,Wt)=>{var Te="__lodash_hash_undefined__",ii=9007199254740991,oi="[object Function]",si="[object GeneratorFunction]",ai=/[\\^$.*+?()[\]{}|]/g,ci=/^\[object .+?Constructor\]$/,li=typeof global=="object"&&global&&global.Object===Object&&global,ui=typeof self=="object"&&self&&self.Object===Object&&self,Kt=li||ui||Function("return this")();function fi(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function pi(e,t){var r=e?e.length:0;return!!r&&yi(e,t,0)>-1}function hi(e,t,r){for(var n=-1,c=e?e.length:0;++n<c;)if(r(t,e[n]))return!0;return!1}function Ht(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function gi(e,t,r,n){for(var c=e.length,u=r+(n?1:-1);n?u--:++u<c;)if(t(e[u],u,e))return u;return-1}function yi(e,t,r){if(t!==t)return gi(e,di,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function di(e){return e!==e}function mi(e){return function(t){return e(t)}}function Mt(e,t){return e.has(t)}function bi(e,t){return e==null?void 0:e[t]}function $i(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}var Oi=Array.prototype,wi=Function.prototype,Jt=Object.prototype,xe=Kt["__core-js_shared__"],kt=function(){var e=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Rt=wi.toString,je=Jt.hasOwnProperty,_i=Jt.toString,vi=RegExp("^"+Rt.call(je).replace(ai,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Si=Oi.splice,Lt=Math.max,Ei=Math.min,Ai=Ft(Kt,"Map"),B=Ft(Object,"create");function C(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xi(){this.__data__=B?B(null):{}}function Ti(e){return this.has(e)&&delete this.__data__[e]}function ji(e){var t=this.__data__;if(B){var r=t[e];return r===Te?void 0:r}return je.call(t,e)?t[e]:void 0}function Pi(e){var t=this.__data__;return B?t[e]!==void 0:je.call(t,e)}function Ni(e,t){var r=this.__data__;return r[e]=B&&t===void 0?Te:t,this}C.prototype.clear=xi;C.prototype.delete=Ti;C.prototype.get=ji;C.prototype.has=Pi;C.prototype.set=Ni;function H(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ci(){this.__data__=[]}function Di(e){var t=this.__data__,r=ie(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Si.call(t,r,1),!0}function Ii(e){var t=this.__data__,r=ie(t,e);return r<0?void 0:t[r][1]}function Vi(e){return ie(this.__data__,e)>-1}function Mi(e,t){var r=this.__data__,n=ie(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}H.prototype.clear=Ci;H.prototype.delete=Di;H.prototype.get=Ii;H.prototype.has=Vi;H.prototype.set=Mi;function J(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ki(){this.__data__={hash:new C,map:new(Ai||H),string:new C}}function Li(e){return oe(this,e).delete(e)}function Ki(e){return oe(this,e).get(e)}function Hi(e){return oe(this,e).has(e)}function Ji(e,t){return oe(this,e).set(e,t),this}J.prototype.clear=ki;J.prototype.delete=Li;J.prototype.get=Ki;J.prototype.has=Hi;J.prototype.set=Ji;function ne(e){var t=-1,r=e?e.length:0;for(this.__data__=new J;++t<r;)this.add(e[t])}function Ri(e){return this.__data__.set(e,Te),this}function Fi(e){return this.__data__.has(e)}ne.prototype.add=ne.prototype.push=Ri;ne.prototype.has=Fi;function ie(e,t){for(var r=e.length;r--;)if(Zi(e[r][0],t))return r;return-1}function Gi(e,t,r){for(var n=r?hi:pi,c=e[0].length,u=e.length,d=u,h=Array(u),i=1/0,m=[];d--;){var o=e[d];d&&t&&(o=Ht(o,mi(t))),i=Ei(o.length,i),h[d]=!r&&(t||c>=120&&o.length>=120)?new ne(d&&o):void 0}o=e[0];var a=-1,y=h[0];e:for(;++a<c&&m.length<i;){var p=o[a],$=t?t(p):p;if(p=r||p!==0?p:0,!(y?Mt(y,$):n(m,$,r))){for(d=u;--d;){var v=h[d];if(!(v?Mt(v,$):n(e[d],$,r)))continue e}y&&y.push($),m.push(p)}}return m}function Ui(e){if(!Ut(e)||qi(e))return!1;var t=Gt(e)||$i(e)?vi:ci;return t.test(Qi(e))}function Wi(e,t){return t=Lt(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,c=Lt(r.length-t,0),u=Array(c);++n<c;)u[n]=r[t+n];n=-1;for(var d=Array(t+1);++n<t;)d[n]=r[n];return d[t]=u,fi(e,this,d)}}function Bi(e){return eo(e)?e:[]}function oe(e,t){var r=e.__data__;return Yi(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ft(e,t){var r=bi(e,t);return Ui(r)?r:void 0}function Yi(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qi(e){return!!kt&&kt in e}function Qi(e){if(e!=null){try{return Rt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Xi=Wi(function(e){var t=Ht(e,Bi);return t.length&&t[0]===e[0]?Gi(t):[]});function Zi(e,t){return e===t||e!==e&&t!==t}function zi(e){return e!=null&&to(e.length)&&!Gt(e)}function eo(e){return ro(e)&&zi(e)}function Gt(e){var t=Ut(e)?_i.call(e):"";return t==oi||t==si}function to(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ii}function Ut(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ro(e){return!!e&&typeof e=="object"}Wt.exports=Xi});var qt=I((Yt,se)=>{(function(e,t){"use strict";typeof se=="object"&&typeof se.exports=="object"?se.exports=t():typeof define=="function"&&define.amd?define([],t):e.objectPath=t()})(Yt,function(){"use strict";var e=Object.prototype.toString;function t(o,a){return o==null?!1:Object.prototype.hasOwnProperty.call(o,a)}function r(o){if(!o||u(o)&&o.length===0)return!0;if(typeof o!="string"){for(var a in o)if(t(o,a))return!1;return!0}return!1}function n(o){return e.call(o)}function c(o){return typeof o=="object"&&n(o)==="[object Object]"}var u=Array.isArray||function(o){return e.call(o)==="[object Array]"};function d(o){return typeof o=="boolean"||n(o)==="[object Boolean]"}function h(o){var a=parseInt(o);return a.toString()===o?a:o}function i(o){o=o||{};var a=function(f){return Object.keys(a).reduce(function(s,l){return l==="create"||typeof a[l]=="function"&&(s[l]=a[l].bind(a,f)),s},{})},y;o.includeInheritedProps?y=function(){return!0}:y=function(f,s){return typeof s=="number"&&Array.isArray(f)||t(f,s)};function p(f,s){if(y(f,s))return f[s]}var $;o.includeInheritedProps?$=function(f,s){typeof s!="string"&&typeof s!="number"&&(s=String(s));var l=p(f,s);if(s==="__proto__"||s==="prototype"||s==="constructor"&&typeof l=="function")throw new Error("For security reasons, object's magic properties cannot be set");return l}:$=function(f,s){return p(f,s)};function v(f,s,l,g){if(typeof s=="number"&&(s=[s]),!s||s.length===0)return f;if(typeof s=="string")return v(f,s.split(".").map(h),l,g);var O=s[0],w=$(f,O);return s.length===1?((w===void 0||!g)&&(f[O]=l),w):(w===void 0&&(typeof s[1]=="number"?f[O]=[]:f[O]={}),v(f[O],s.slice(1),l,g))}return a.has=function(f,s){if(typeof s=="number"?s=[s]:typeof s=="string"&&(s=s.split(".")),!s||s.length===0)return!!f;for(var l=0;l<s.length;l++){var g=h(s[l]);if(typeof g=="number"&&u(f)&&g<f.length||(o.includeInheritedProps?g in Object(f):t(f,g)))f=f[g];else return!1}return!0},a.ensureExists=function(f,s,l){return v(f,s,l,!0)},a.set=function(f,s,l,g){return v(f,s,l,g)},a.insert=function(f,s,l,g){var O=a.get(f,s);g=~~g,u(O)||(O=[],a.set(f,s,O)),O.splice(g,0,l)},a.empty=function(f,s){if(!r(s)&&f!=null){var l,g;if(!!(l=a.get(f,s))){if(typeof l=="string")return a.set(f,s,"");if(d(l))return a.set(f,s,!1);if(typeof l=="number")return a.set(f,s,0);if(u(l))l.length=0;else if(c(l))for(g in l)y(l,g)&&delete l[g];else return a.set(f,s,null)}}},a.push=function(f,s){var l=a.get(f,s);u(l)||(l=[],a.set(f,s,l)),l.push.apply(l,Array.prototype.slice.call(arguments,2))},a.coalesce=function(f,s,l){for(var g,O=0,w=s.length;O<w;O++)if((g=a.get(f,s[O]))!==void 0)return g;return l},a.get=function(f,s,l){if(typeof s=="number"&&(s=[s]),!s||s.length===0)return f;if(f==null)return l;if(typeof s=="string")return a.get(f,s.split("."),l);var g=h(s[0]),O=$(f,g);return O===void 0?l:s.length===1?O:a.get(f[g],s.slice(1),l)},a.del=function(s,l){if(typeof l=="number"&&(l=[l]),s==null||r(l))return s;if(typeof l=="string")return a.del(s,l.split("."));var g=h(l[0]);if($(s,g),!y(s,g))return s;if(l.length===1)u(s)?s.splice(g,1):delete s[g];else return a.del(s[g],l.slice(1));return s},a}var m=i();return m.create=i,m.withInheritedProps=i({includeInheritedProps:!0}),m})});var lo={};ar(lo,{checkTypesMini:()=>co,defaults:()=>zt,version:()=>so});var _=V(Ke(),1),D=V(Re(),1);var re=V(Pt(),1),Vt=V(It(),1);function ni(e){if(e.includes(".")){let t=e.lastIndexOf(".");if(!e.slice(0,t).includes("."))return e.slice(0,t);for(let r=t-1;r--;)if(e[r]===".")return e.slice(r+1,t)}return null}var Ee=ni;function Ae(e,t){let r={now:!1};function n(c,u,d,h){let i=(0,re.default)(c),m,o=E({depth:-1,path:""},d);if(o.depth+=1,Array.isArray(i))for(let a=0,y=i.length;a<y&&!h.now;a++){let p=o.path?`${o.path}.${a}`:`${a}`;i[a]!==void 0?(o.parent=(0,re.default)(i),o.parentType="array",o.parentKey=Ee(p),m=n(u(i[a],void 0,F(E({},o),{path:p}),h),u,F(E({},o),{path:p}),h),Number.isNaN(m)&&a<i.length?(i.splice(a,1),a-=1):i[a]=m):i.splice(a,1)}else if((0,Vt.default)(i))for(let a in i){if(h.now&&a!=null)break;let y=o.path?`${o.path}.${a}`:a;o.depth===0&&a!=null&&(o.topmostKey=a),o.parent=(0,re.default)(i),o.parentType="object",o.parentKey=Ee(y),m=n(u(a,i[a],F(E({},o),{path:y}),h),u,F(E({},o),{path:y}),h),Number.isNaN(m)?delete i[a]:i[a]=m}return i}return n(e,t,{},r)}var Zt=V(Bt(),1);function Pe(e){return typeof e=="string"?e.length?[e]:[]:e}var ce=V(qt(),1);function Ne(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ce=new Map,Qt=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},no=(e,t)=>{t=E({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(Ce.has(r))return Ce.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=Ne(e).replace(/\\\*/g,"[\\s\\S]*");let c=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return c.negated=n,Ce.set(r,c),c},io=(e,t,r,n)=>{if(e=Qt(e,"inputs"),t=Qt(t,"patterns"),t.length===0)return[];t=t.map(d=>no(d,r));let{allPatterns:c}=r||{},u=[];for(let d of e){let h,i=[...t].fill(!1);for(let[m,o]of t.entries())if(o.test(d)&&(i[m]=!0,h=!o.negated,!h))break;if(!(h===!1||h===void 0&&t.some(m=>!m.negated)||c&&i.some((m,o)=>!m&&!t[o].negated))&&(u.push(d),n))break}return u};function ae(e,t,r){return io(e,t,r,!0).length>0}var Xt="7.1.3";var so=Xt,zt={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function ao(e,t,r){function n(o){return o!=null}function c(o){return(0,_.default)(o)==="Object"}function u(o,a){return typeof a=="string"&&(a=Pe(a)),Array.from(o).filter(y=>!a.some(p=>ae(y,p,{caseSensitive:!0})))}let d=Object.prototype.hasOwnProperty,h=["any","anything","every","everything","all","whatever","whatevs"];if(!n(e))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let i=E(E({},zt),r);if(typeof i.ignoreKeys=="string"&&(i.ignoreKeys=[i.ignoreKeys]),typeof i.ignorePaths=="string"&&(i.ignorePaths=[i.ignorePaths]),typeof i.acceptArraysIgnore=="string"&&(i.acceptArraysIgnore=[i.acceptArraysIgnore]),i.msg=`${i.msg}`.trim(),i.msg[i.msg.length-1]===":"&&(i.msg=i.msg.slice(0,i.msg.length-1).trim()),c(i.schema))Object.keys(i.schema).forEach(o=>{if(c(i.schema[o])){let a={};Ae(i.schema[o],(y,p,$)=>{let v=p!==void 0?p:y;return!Array.isArray(v)&&!c(v)&&(a[`${o}.${$.path}`]=v),v}),delete i.schema[o],i.schema=E(E({},i.schema),a)}}),Object.keys(i.schema).forEach(o=>{Array.isArray(i.schema[o])||(i.schema[o]=[i.schema[o]]),i.schema[o]=i.schema[o].map(a=>`${a}`.toLowerCase().trim())});else if(i.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(i.schema,null,0)} which is not object but ${typeof i.schema}`);if(n(t)||(t={}),i.enforceStrictKeyset)if(n(i.schema)&&Object.keys(i.schema).length){if(t&&u((0,D.default)(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema))),i.ignoreKeys).length){let o=(0,D.default)(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema)));throw new TypeError(`${i.msg}: ${i.optsVarName}.enforceStrictKeyset is on and the following key${o.length>1?"s":""} ${o.length>1?"are":"is"} not covered by schema and/or reference objects: ${o.join(", ")}`)}}else if(c(t)&&Object.keys(t).length){if(u((0,D.default)(Object.keys(e),Object.keys(t)),i.ignoreKeys).length!==0){let o=(0,D.default)(Object.keys(e),Object.keys(t));throw new TypeError(`${i.msg}: The input object has key${o.length>1?"s":""} which ${o.length>1?"are":"is"} not covered by the reference object: ${o.join(", ")}`)}else if(u((0,D.default)(Object.keys(t),Object.keys(e)),i.ignoreKeys).length!==0){let o=(0,D.default)(Object.keys(t),Object.keys(e));throw new TypeError(`${i.msg}: The reference object has key${o.length>1?"s":""} which ${o.length>1?"are":"is"} not present in the input object: ${o.join(", ")}`)}}else throw new TypeError(`${i.msg}: Both ${i.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via resolvedOpts.enforceStrictKeyset!`);let m=[];Ae(e,(o,a,y)=>{let p=a,$=o;if(y.parentType==="array"&&($=void 0,p=o),Array.isArray(m)&&m.length&&m.some(l=>y.path.startsWith(l))||$&&i.ignoreKeys.some(l=>ae($,l))||i.ignorePaths.some(l=>ae(y.path,l)))return p;let v=!(!c(p)&&!Array.isArray(p)&&Array.isArray(y.parent)),f=!1;c(i.schema)&&d.call(i.schema,y.path)&&(f=!0);let s=!1;if(c(t)&&ce.default.has(t,y.path)&&(s=!0),i.enforceStrictKeyset&&v&&!f&&!s)throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} is neither covered by reference object (second input argument), nor ${i.optsVarName}.schema! To stop this error, turn off ${i.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${i.optsVarName}.schema).

@@ -21,11 +21,11 @@ Debug info:

opts = ${JSON.stringify(i,null,4)}
resolvedOpts = ${JSON.stringify(i,null,4)}
current = ${JSON.stringify(p,null,4)}
`);if(f){let u=Pe(i.schema[y.path]).map(g=>`${g}`.toLowerCase());if(ce.default.set(i.schema,y.path,u),(0,Zt.default)(u,h).length)m.push(y.path);else if(p!==!0&&p!==!1&&!u.includes((0,_.default)(p).toLowerCase())||(p===!0||p===!1)&&!u.includes(String(p))&&!u.includes("boolean"))if(Array.isArray(p)&&i.acceptArrays){for(let g=0,w=p.length;g<w;g++)if(!u.includes((0,_.default)(p[g]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path}.${g}, the ${g}th element (equal to ${JSON.stringify(p[g],null,0)}) is of a type ${(0,_.default)(p[g]).toLowerCase()}, but only the following are allowed by the ${i.optsVarName}.schema: ${u.join(", ")}`)}else throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} was customised to ${(0,_.default)(p)!=="string"?'"':""}${JSON.stringify(p,null,0)}${(0,_.default)(p)!=="string"?'"':""} (type: ${(0,_.default)(p).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(u,null,0)})`)}else if(t&&c(t)&&s){let u=ce.default.get(t,y.path);if(i.acceptArrays&&Array.isArray(p)&&!i.acceptArraysIgnore.includes(o)){if(!p.every(w=>(0,_.default)(w).toLowerCase()===(0,_.default)(t[o]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} was customised to be array, but not all of its elements are ${(0,_.default)(t[o]).toLowerCase()}-type`)}else if((0,_.default)(p)!==(0,_.default)(u))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} was customised to ${(0,_.default)(p).toLowerCase()==="string"?"":'"'}${JSON.stringify(p,null,0)}${(0,_.default)(p).toLowerCase()==="string"?"":'"'} which is not ${(0,_.default)(u).toLowerCase()} but ${(0,_.default)(p).toLowerCase()}`)}return p})}function co(e,t,r){ao(e,t,r)}return cr(uo);})();
`);if(f){let l=Pe(i.schema[y.path]).map(g=>`${g}`.toLowerCase());if(ce.default.set(i.schema,y.path,l),(0,Zt.default)(l,h).length)m.push(y.path);else if(p!==!0&&p!==!1&&!l.includes((0,_.default)(p).toLowerCase())||(p===!0||p===!1)&&!l.includes(String(p))&&!l.includes("boolean"))if(Array.isArray(p)&&i.acceptArrays){for(let g=0,O=p.length;g<O;g++)if(!l.includes((0,_.default)(p[g]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path}.${g}, the ${g}th element (equal to ${JSON.stringify(p[g],null,0)}) is of a type ${(0,_.default)(p[g]).toLowerCase()}, but only the following are allowed by the ${i.optsVarName}.schema: ${l.join(", ")}`)}else throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} was customised to ${(0,_.default)(p)!=="string"?'"':""}${JSON.stringify(p,null,0)}${(0,_.default)(p)!=="string"?'"':""} (type: ${(0,_.default)(p).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(l,null,0)})`)}else if(t&&c(t)&&s){let l=ce.default.get(t,y.path);if(i.acceptArrays&&Array.isArray(p)&&!i.acceptArraysIgnore.includes(o)){if(!p.every(O=>(0,_.default)(O).toLowerCase()===(0,_.default)(t[o]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} was customised to be array, but not all of its elements are ${(0,_.default)(t[o]).toLowerCase()}-type`)}else if((0,_.default)(p)!==(0,_.default)(l))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} was customised to ${(0,_.default)(p).toLowerCase()==="string"?"":'"'}${JSON.stringify(p,null,0)}${(0,_.default)(p).toLowerCase()==="string"?"":'"'} which is not ${(0,_.default)(l).toLowerCase()} but ${(0,_.default)(p).toLowerCase()}`)}return p})}function co(e,t,r){ao(e,t,r)}return cr(lo);})();
/**
* @name arrayiffy-if-string
* @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
* @version 4.0.12
* @version 4.0.13
* @author Roy Revelt, Codsen Ltd

@@ -38,3 +38,3 @@ * @license MIT

* @fileoverview Utility library to traverse AST
* @version 3.0.12
* @version 3.0.13
* @author Roy Revelt, Codsen Ltd

@@ -47,3 +47,3 @@ * @license MIT

* @fileoverview Utility library of AST helper functions
* @version 2.0.12
* @version 2.0.13
* @author Roy Revelt, Codsen Ltd

@@ -50,0 +50,0 @@ * @license MIT

@@ -7,4 +7,4 @@ // Quick Take

assert.throws(() => {
checkTypesMini(
assert.throws(
() => {
checkTypesMini(

@@ -23,5 +23,8 @@ {

}
),
/not boolean but string/g
);
});
);
},
(err) => {
assert(/not boolean but string/.test(err));
return true;
}
);
{
"name": "check-types-mini",
"version": "7.1.2",
"version": "7.1.3",
"description": "Validate options object",

@@ -72,4 +72,4 @@ "keywords": [

"dependencies": {
"arrayiffy-if-string": "^4.0.12",
"ast-monkey-traverse": "^3.0.12",
"arrayiffy-if-string": "^4.0.13",
"ast-monkey-traverse": "^3.0.13",
"lodash.intersection": "^4.4.0",

@@ -76,0 +76,0 @@ "lodash.pullall": "^4.2.0",

@@ -42,4 +42,4 @@ # check-types-mini

assert.throws(() => {
checkTypesMini(
assert.throws(
() => {
checkTypesMini(

@@ -58,6 +58,9 @@ {

}
),
/not boolean but string/g
);
});
);
},
(err) => {
assert(/not boolean but string/.test(err));
return true;
}
);
```

@@ -64,0 +67,0 @@

@@ -22,5 +22,5 @@ declare const version: string;

ref: Obj | null,
originalOptions?: Partial<Opts>
opts?: Partial<Opts>
): void;
export { checkTypesMini, defaults, version };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc