check-types-mini 7.0.4 → 7.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,26 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## 7.0.3 (2021-11-02)
7
-
8
- ### Bug Fixes
9
-
10
- - bump TS and separate ESLint plugins away from this monorepo ([b1ebce1](https://github.com/codsen/codsen/commit/b1ebce1637d8c41c2d848fc24b0ba4058865bd5d))
11
-
12
- ### Features
13
-
14
- - migrate to ES Modules ([c579dff](https://github.com/codsen/codsen/commit/c579dff3b23205e383035ca10ddcec671e35d0fe))
15
-
16
- ### BREAKING CHANGES
17
-
18
- - programs now are in ES Modules and won't work with Common JS require()
19
-
20
- ## 7.0.1 (2021-09-13)
21
-
22
- ### Bug Fixes
23
-
24
- - bump TS and separate ESLint plugins away from this monorepo ([2e07d42](https://github.com/codsen/codsen/commit/2e07d424222b6ffedf5fb45c83ad453627ec2904))
25
-
26
6
  ## 7.0.0 (2021-09-09)
27
7
 
28
8
  ### Features
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-%YEAR% Roy Revelt and other contributors
3
+ Copyright (c) 2010-2021 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -38,6 +38,7 @@ If you need a legacy version which works with `require`, use version 6.1.0
38
38
 
39
39
  ```js
40
40
  import { strict as assert } from "assert";
41
+
41
42
  import { checkTypesMini } from "check-types-mini";
42
43
 
43
44
  assert.throws(() => {
@@ -63,7 +64,7 @@ assert.throws(() => {
63
64
 
64
65
  ## Documentation
65
66
 
66
- Please [visit codsen.com](https://codsen.com/os/check-types-mini/) for a full description of the API and examples.
67
+ Please [visit codsen.com](https://codsen.com/os/check-types-mini/) for a full description of the API.
67
68
 
68
69
  ## Contributing
69
70
 
@@ -75,4 +76,6 @@ MIT License
75
76
 
76
77
  Copyright (c) 2010-2021 Roy Revelt and other contributors
77
78
 
79
+
78
80
  <img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
81
+
@@ -1,180 +1,24 @@
1
1
  /**
2
2
  * @name check-types-mini
3
3
  * @fileoverview Validate options object
4
- * @version 7.0.4
4
+ * @version 7.0.10
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/check-types-mini/}
8
8
  */
9
9
 
10
- import typ from 'type-detect';
11
- import pullAll from 'lodash.pullall';
12
- import { traverse } from 'ast-monkey-traverse';
13
- import intersection from 'lodash.intersection';
14
- import { arrayiffy } from 'arrayiffy-if-string';
15
- import objectPath from 'object-path';
16
- import { isMatch } from 'matcher';
10
+ import a from"type-detect";import g from"lodash.pullall";import{traverse as V}from"ast-monkey-traverse";import j from"lodash.intersection";import{arrayiffy as A}from"arrayiffy-if-string";import S from"object-path";import{isMatch as N}from"matcher";var d={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function T(i,r,y){function b(s){return s!=null}function $(s){return a(s)==="Object"}function p(s,l){return typeof l=="string"&&(l=A(l)),Array.from(s).filter(n=>!l.some(t=>N(n,t,{caseSensitive:!0})))}let D=Object.prototype.hasOwnProperty,w=["any","anything","every","everything","all","whatever","whatevs"];if(!b(i))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let e={...d,...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={};V(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(b(r)||(r={}),e.enforceStrictKeyset)if(b(e.schema)&&Object.keys(e.schema).length>0){if(r&&p(g(Object.keys(i),Object.keys(r).concat(Object.keys(e.schema))),e.ignoreKeys).length){let s=g(Object.keys(i),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>0){if(p(g(Object.keys(i),Object.keys(r)),e.ignoreKeys).length!==0){let s=g(Object.keys(i),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(p(g(Object.keys(r),Object.keys(i)),e.ignoreKeys).length!==0){let s=g(Object.keys(r),Object.keys(i));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 u=[];V(i,(s,l,n)=>{let t=l,h=s;if(n.parentType==="array"&&(h=void 0,t=s),Array.isArray(u)&&u.length&&u.some(o=>n.path.startsWith(o))||h&&e.ignoreKeys.some(o=>N(h,o))||e.ignorePaths.some(o=>N(n.path,o)))return t;let m=!(!$(t)&&!Array.isArray(t)&&Array.isArray(n.parent)),f=!1;$(e.schema)&&D.call(e.schema,n.path)&&(f=!0);let O=!1;if($(r)&&S.has(r,n.path)&&(O=!0),e.enforceStrictKeyset&&m&&!f&&!O)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).
17
11
 
18
- const defaults = {
19
- ignoreKeys: [],
20
- ignorePaths: [],
21
- acceptArrays: false,
22
- acceptArraysIgnore: [],
23
- enforceStrictKeyset: true,
24
- schema: {},
25
- msg: "check-types-mini",
26
- optsVarName: "opts"
27
- };
28
- function internalApi(obj, ref, originalOptions) {
29
- function existy(something) {
30
- return something != null;
31
- }
32
- function isObj(something) {
33
- return typ(something) === "Object";
34
- }
35
- function pullAllWithGlob(originalInput, toBeRemoved) {
36
- if (typeof toBeRemoved === "string") {
37
- toBeRemoved = arrayiffy(toBeRemoved);
38
- }
39
- return Array.from(originalInput).filter(originalVal => !toBeRemoved.some(remVal => isMatch(originalVal, remVal, {
40
- caseSensitive: true
41
- })));
42
- }
43
- const hasKey = Object.prototype.hasOwnProperty;
44
- const NAMESFORANYTYPE = ["any", "anything", "every", "everything", "all", "whatever", "whatevs"];
45
- if (!existy(obj)) {
46
- throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");
47
- }
48
- const opts = { ...defaults,
49
- ...originalOptions
50
- };
51
- if (typeof opts.ignoreKeys === "string") {
52
- opts.ignoreKeys = [opts.ignoreKeys];
53
- }
54
- if (typeof opts.ignorePaths === "string") {
55
- opts.ignorePaths = [opts.ignorePaths];
56
- }
57
- if (typeof opts.acceptArraysIgnore === "string") {
58
- opts.acceptArraysIgnore = [opts.acceptArraysIgnore];
59
- }
60
- opts.msg = `${opts.msg}`.trim();
61
- if (opts.msg[opts.msg.length - 1] === ":") {
62
- opts.msg = opts.msg.slice(0, opts.msg.length - 1).trim();
63
- }
64
- if (isObj(opts.schema)) {
65
- Object.keys(opts.schema).forEach(oneKey => {
66
- if (isObj(opts.schema[oneKey])) {
67
- const tempObj = {};
68
- traverse(opts.schema[oneKey], (key, val, innerObj) => {
69
- const current = val !== undefined ? val : key;
70
- if (!Array.isArray(current) && !isObj(current)) {
71
- tempObj[`${oneKey}.${innerObj.path}`] = current;
72
- }
73
- return current;
74
- });
75
- delete opts.schema[oneKey];
76
- opts.schema = { ...opts.schema,
77
- ...tempObj
78
- };
79
- }
80
- });
81
- Object.keys(opts.schema).forEach(oneKey => {
82
- if (!Array.isArray(opts.schema[oneKey])) {
83
- opts.schema[oneKey] = [opts.schema[oneKey]];
84
- }
85
- opts.schema[oneKey] = opts.schema[oneKey].map(el => `${el}`.toLowerCase().trim());
86
- });
87
- } else if (opts.schema != null) {
88
- throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(opts.schema, null, 0)} which is not object but ${typeof opts.schema}`);
89
- }
90
- if (!existy(ref)) {
91
- ref = {};
92
- }
93
- if (opts.enforceStrictKeyset) {
94
- if (existy(opts.schema) && Object.keys(opts.schema).length > 0) {
95
- if (ref && pullAllWithGlob(pullAll(Object.keys(obj), Object.keys(ref).concat(Object.keys(opts.schema))), opts.ignoreKeys).length) {
96
- const keys = pullAll(Object.keys(obj), Object.keys(ref).concat(Object.keys(opts.schema)));
97
- throw new TypeError(`${opts.msg}: ${opts.optsVarName}.enforceStrictKeyset is on and the following key${keys.length > 1 ? "s" : ""} ${keys.length > 1 ? "are" : "is"} not covered by schema and/or reference objects: ${keys.join(", ")}`);
98
- }
99
- } else if (isObj(ref) && Object.keys(ref).length > 0) {
100
- if (pullAllWithGlob(pullAll(Object.keys(obj), Object.keys(ref)), opts.ignoreKeys).length !== 0) {
101
- const keys = pullAll(Object.keys(obj), Object.keys(ref));
102
- throw new TypeError(`${opts.msg}: The input object has key${keys.length > 1 ? "s" : ""} which ${keys.length > 1 ? "are" : "is"} not covered by the reference object: ${keys.join(", ")}`);
103
- } else if (pullAllWithGlob(pullAll(Object.keys(ref), Object.keys(obj)), opts.ignoreKeys).length !== 0) {
104
- const keys = pullAll(Object.keys(ref), Object.keys(obj));
105
- throw new TypeError(`${opts.msg}: The reference object has key${keys.length > 1 ? "s" : ""} which ${keys.length > 1 ? "are" : "is"} not present in the input object: ${keys.join(", ")}`);
106
- }
107
- } else {
108
- throw new TypeError(`${opts.msg}: Both ${opts.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via opts.enforceStrictKeyset!`);
109
- }
110
- }
111
- const ignoredPathsArr = [];
112
- traverse(obj, (key, val, innerObj) => {
113
- let current = val;
114
- let objKey = key;
115
- if (innerObj.parentType === "array") {
116
- objKey = undefined;
117
- current = key;
118
- }
119
- if (Array.isArray(ignoredPathsArr) && ignoredPathsArr.length && ignoredPathsArr.some(path => innerObj.path.startsWith(path))) {
120
- return current;
121
- }
122
- if (objKey && opts.ignoreKeys.some(oneOfKeysToIgnore => isMatch(objKey, oneOfKeysToIgnore))) {
123
- return current;
124
- }
125
- if (opts.ignorePaths.some(oneOfPathsToIgnore => isMatch(innerObj.path, oneOfPathsToIgnore))) {
126
- return current;
127
- }
128
- const isNotAnArrayChild = !(!isObj(current) && !Array.isArray(current) && Array.isArray(innerObj.parent));
129
- let optsSchemaHasThisPathDefined = false;
130
- if (isObj(opts.schema) && hasKey.call(opts.schema, innerObj.path)) {
131
- optsSchemaHasThisPathDefined = true;
132
- }
133
- let refHasThisPathDefined = false;
134
- if (isObj(ref) && objectPath.has(ref, innerObj.path)) {
135
- refHasThisPathDefined = true;
136
- }
137
- if (opts.enforceStrictKeyset && isNotAnArrayChild && !optsSchemaHasThisPathDefined && !refHasThisPathDefined) {
138
- throw new TypeError(`${opts.msg}: ${opts.optsVarName}.${innerObj.path} is neither covered by reference object (second input argument), nor ${opts.optsVarName}.schema! To stop this error, turn off ${opts.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${opts.optsVarName}.schema).\n\nDebug info:\n
139
- obj = ${JSON.stringify(obj, null, 4)}\n
140
- ref = ${JSON.stringify(ref, null, 4)}\n
141
- innerObj = ${JSON.stringify(innerObj, null, 4)}\n
142
- opts = ${JSON.stringify(opts, null, 4)}\n
143
- current = ${JSON.stringify(current, null, 4)}\n\n`);
144
- } else if (optsSchemaHasThisPathDefined) {
145
- const currentKeysSchema = arrayiffy(opts.schema[innerObj.path]).map(el => `${el}`.toLowerCase());
146
- objectPath.set(opts.schema, innerObj.path, currentKeysSchema);
147
- if (!intersection(currentKeysSchema, NAMESFORANYTYPE).length) {
148
- if (current !== true && current !== false && !currentKeysSchema.includes(typ(current).toLowerCase()) || (current === true || current === false) && !currentKeysSchema.includes(String(current)) && !currentKeysSchema.includes("boolean")) {
149
- if (Array.isArray(current) && opts.acceptArrays) {
150
- for (let i = 0, len = current.length; i < len; i++) {
151
- if (!currentKeysSchema.includes(typ(current[i]).toLowerCase())) {
152
- throw new TypeError(`${opts.msg}: ${opts.optsVarName}.${innerObj.path}.${i}, the ${i}th element (equal to ${JSON.stringify(current[i], null, 0)}) is of a type ${typ(current[i]).toLowerCase()}, but only the following are allowed by the ${opts.optsVarName}.schema: ${currentKeysSchema.join(", ")}`);
153
- }
154
- }
155
- } else {
156
- throw new TypeError(`${opts.msg}: ${opts.optsVarName}.${innerObj.path} was customised to ${typ(current) !== "string" ? '"' : ""}${JSON.stringify(current, null, 0)}${typ(current) !== "string" ? '"' : ""} (type: ${typ(current).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(currentKeysSchema, null, 0)})`);
157
- }
158
- }
159
- } else {
160
- ignoredPathsArr.push(innerObj.path);
161
- }
162
- } else if (ref && isObj(ref) && refHasThisPathDefined) {
163
- const compareTo = objectPath.get(ref, innerObj.path);
164
- if (opts.acceptArrays && Array.isArray(current) && !opts.acceptArraysIgnore.includes(key)) {
165
- const allMatch = current.every(el => typ(el).toLowerCase() === typ(ref[key]).toLowerCase());
166
- if (!allMatch) {
167
- throw new TypeError(`${opts.msg}: ${opts.optsVarName}.${innerObj.path} was customised to be array, but not all of its elements are ${typ(ref[key]).toLowerCase()}-type`);
168
- }
169
- } else if (typ(current) !== typ(compareTo)) {
170
- throw new TypeError(`${opts.msg}: ${opts.optsVarName}.${innerObj.path} was customised to ${typ(current).toLowerCase() === "string" ? "" : '"'}${JSON.stringify(current, null, 0)}${typ(current).toLowerCase() === "string" ? "" : '"'} which is not ${typ(compareTo).toLowerCase()} but ${typ(current).toLowerCase()}`);
171
- }
172
- } else ;
173
- return current;
174
- });
175
- }
176
- function checkTypesMini(obj, ref, originalOptions) {
177
- return internalApi(obj, ref, originalOptions);
178
- }
12
+ Debug info:
179
13
 
180
- export { checkTypesMini };
14
+ obj = ${JSON.stringify(i,null,4)}
15
+
16
+ ref = ${JSON.stringify(r,null,4)}
17
+
18
+ innerObj = ${JSON.stringify(n,null,4)}
19
+
20
+ opts = ${JSON.stringify(e,null,4)}
21
+
22
+ current = ${JSON.stringify(t,null,4)}
23
+
24
+ `);if(f){let o=A(e.schema[n.path]).map(c=>`${c}`.toLowerCase());if(S.set(e.schema,n.path,o),j(o,w).length)u.push(n.path);else if(t!==!0&&t!==!1&&!o.includes(a(t).toLowerCase())||(t===!0||t===!1)&&!o.includes(String(t))&&!o.includes("boolean"))if(Array.isArray(t)&&e.acceptArrays){for(let c=0,E=t.length;c<E;c++)if(!o.includes(a(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 ${a(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 ${a(t)!=="string"?'"':""}${JSON.stringify(t,null,0)}${a(t)!=="string"?'"':""} (type: ${a(t).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(o,null,0)})`)}else if(r&&$(r)&&O){let o=S.get(r,n.path);if(e.acceptArrays&&Array.isArray(t)&&!e.acceptArraysIgnore.includes(s)){if(!t.every(E=>a(E).toLowerCase()===a(r[s]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to be array, but not all of its elements are ${a(r[s]).toLowerCase()}-type`)}else if(a(t)!==a(o))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${a(t).toLowerCase()==="string"?"":'"'}${JSON.stringify(t,null,0)}${a(t).toLowerCase()==="string"?"":'"'} which is not ${a(o).toLowerCase()} but ${a(t).toLowerCase()}`)}return t})}function H(i,r,y){T(i,r,y)}export{H as checkTypesMini};
@@ -1,34 +1,48 @@
1
1
  /**
2
2
  * @name check-types-mini
3
3
  * @fileoverview Validate options object
4
- * @version 7.0.4
4
+ * @version 7.0.10
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/check-types-mini/}
8
8
  */
9
9
 
10
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).checkTypesMini={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={exports:{}};!function(t,r){t.exports=function(){var t="function"==typeof Promise,r="object"==typeof self?self:e,n="undefined"!=typeof Symbol,o="undefined"!=typeof Map,i="undefined"!=typeof Set,a="undefined"!=typeof WeakMap,c="undefined"!=typeof WeakSet,u="undefined"!=typeof DataView,s=n&&void 0!==Symbol.iterator,f=n&&void 0!==Symbol.toStringTag,p=i&&"function"==typeof Set.prototype.entries,l=o&&"function"==typeof Map.prototype.entries,y=p&&Object.getPrototypeOf((new Set).entries()),h=l&&Object.getPrototypeOf((new Map).entries()),g=s&&"function"==typeof Array.prototype[Symbol.iterator],d=g&&Object.getPrototypeOf([][Symbol.iterator]()),b=s&&"function"==typeof String.prototype[Symbol.iterator],v=b&&Object.getPrototypeOf(""[Symbol.iterator]()),_=8,m=-1;function w(e){var n=typeof e;if("object"!==n)return n;if(null===e)return"null";if(e===r)return"global";if(Array.isArray(e)&&(!1===f||!(Symbol.toStringTag in e)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&e===window.location)return"Location";if("object"==typeof window.document&&e===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&e===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&e===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&e instanceof window.HTMLElement){if("BLOCKQUOTE"===e.tagName)return"HTMLQuoteElement";if("TD"===e.tagName)return"HTMLTableDataCellElement";if("TH"===e.tagName)return"HTMLTableHeaderCellElement"}}var s=f&&e[Symbol.toStringTag];if("string"==typeof s)return s;var p=Object.getPrototypeOf(e);return p===RegExp.prototype?"RegExp":p===Date.prototype?"Date":t&&p===Promise.prototype?"Promise":i&&p===Set.prototype?"Set":o&&p===Map.prototype?"Map":c&&p===WeakSet.prototype?"WeakSet":a&&p===WeakMap.prototype?"WeakMap":u&&p===DataView.prototype?"DataView":o&&p===h?"Map Iterator":i&&p===y?"Set Iterator":g&&p===d?"Array Iterator":b&&p===v?"String Iterator":null===p?"Object":Object.prototype.toString.call(e).slice(_,m)}return w}()}(r);var n=r.exports;function o(t,e,r){if(e!=e)return function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,a,r);for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function i(t,e,r,n){for(var o=r-1,i=t.length;++o<i;)if(n(t[o],e))return o;return-1}function a(t){return t!=t}var c=Array.prototype.splice;function u(t,e,r,n){var a,u=n?i:o,s=-1,f=e.length,p=t;for(t===e&&(e=function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(e)),r&&(p=function(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}(t,(a=r,function(t){return a(t)})));++s<f;)for(var l=0,y=e[s],h=r?r(y):y;(l=u(p,h,l,n))>-1;)p!==t&&c.call(p,l,1),c.call(t,l,1);return t}var s=function(t,e){return t&&t.length&&e&&e.length?u(t,e):t},f={exports:{}};!function(t,r){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",c="[object Date]",u="[object Function]",s="[object GeneratorFunction]",f="[object Map]",p="[object Number]",l="[object Object]",y="[object Promise]",h="[object RegExp]",g="[object Set]",d="[object String]",b="[object Symbol]",v="[object WeakMap]",_="[object ArrayBuffer]",m="[object DataView]",w="[object Float32Array]",j="[object Float64Array]",O="[object Int8Array]",$="[object Int16Array]",A="[object Int32Array]",S="[object Uint8Array]",k="[object Uint8ClampedArray]",T="[object Uint16Array]",E="[object Uint32Array]",x=/\w*$/,P=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,M={};M[i]=M["[object Array]"]=M[_]=M[m]=M[a]=M[c]=M[w]=M[j]=M[O]=M[$]=M[A]=M[f]=M[p]=M[l]=M[h]=M[g]=M[d]=M[b]=M[S]=M[k]=M[T]=M[E]=!0,M["[object Error]"]=M[u]=M[v]=!1;var I="object"==typeof self&&self&&self.Object===Object&&self,L="object"==typeof e&&e&&e.Object===Object&&e||I||Function("return this")(),C=r&&!r.nodeType&&r,K=C&&t&&!t.nodeType&&t,V=K&&K.exports===C;function D(t,e){return t.set(e[0],e[1]),t}function F(t,e){return t.add(e),t}function J(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function W(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function H(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function R(t,e){return function(r){return t(e(r))}}function B(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var U,q=Array.prototype,z=Function.prototype,G=Object.prototype,Q=L["__core-js_shared__"],X=(U=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"",Y=z.toString,Z=G.hasOwnProperty,tt=G.toString,et=RegExp("^"+Y.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=V?L.Buffer:void 0,nt=L.Symbol,ot=L.Uint8Array,it=R(Object.getPrototypeOf,Object),at=Object.create,ct=G.propertyIsEnumerable,ut=q.splice,st=Object.getOwnPropertySymbols,ft=rt?rt.isBuffer:void 0,pt=R(Object.keys,Object),lt=Kt(L,"DataView"),yt=Kt(L,"Map"),ht=Kt(L,"Promise"),gt=Kt(L,"Set"),dt=Kt(L,"WeakMap"),bt=Kt(Object,"create"),vt=Wt(lt),_t=Wt(yt),mt=Wt(ht),wt=Wt(gt),jt=Wt(dt),Ot=nt?nt.prototype:void 0,$t=Ot?Ot.valueOf:void 0;function At(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function St(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function kt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Tt(t){this.__data__=new St(t)}function Et(t,e){var r=Rt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Bt(t)}(t)&&Z.call(t,"callee")&&(!ct.call(t,"callee")||tt.call(t)==i)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var a in t)!e&&!Z.call(t,a)||o&&("length"==a||Ft(a,n))||r.push(a);return r}function xt(t,e,r){var n=t[e];Z.call(t,e)&&Ht(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Pt(t,e){for(var r=t.length;r--;)if(Ht(t[r][0],e))return r;return-1}function Nt(t,e,r,n,o,y,v){var P;if(n&&(P=y?n(t,o,y,v):n(t)),void 0!==P)return P;if(!zt(t))return t;var N=Rt(t);if(N){if(P=function(t){var e=t.length,r=t.constructor(e);e&&"string"==typeof t[0]&&Z.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!e)return function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(t,P)}else{var I=Dt(t),L=I==u||I==s;if(Ut(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(I==l||I==i||L&&!y){if(W(t))return y?t:{};if(P=function(t){return"function"!=typeof t.constructor||Jt(t)?{}:(e=it(t),zt(e)?at(e):{});var e}(L?{}:t),!e)return function(t,e){return Lt(t,Vt(t),e)}(t,function(t,e){return t&&Lt(e,Gt(e),t)}(P,t))}else{if(!M[I])return y?t:{};P=function(t,e,r,n){var o=t.constructor;switch(e){case _:return It(t);case a:case c:return new o(+t);case m:return function(t,e){var r=e?It(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case w:case j:case O:case $:case A:case S:case k:case T:case E:return function(t,e){var r=e?It(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case f:return function(t,e,r){return J(e?r(H(t),!0):H(t),D,new t.constructor)}(t,n,r);case p:case d:return new o(t);case h:return function(t){var e=new t.constructor(t.source,x.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return function(t,e,r){return J(e?r(B(t),!0):B(t),F,new t.constructor)}(t,n,r);case b:return i=t,$t?Object($t.call(i)):{}}var i}(t,I,Nt,e)}}v||(v=new Tt);var C=v.get(t);if(C)return C;if(v.set(t,P),!N)var K=r?function(t){return function(t,e,r){var n=e(t);return Rt(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,Gt,Vt)}(t):Gt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r,t););}(K||t,(function(o,i){K&&(o=t[i=o]),xt(P,i,Nt(o,e,r,n,i,t,v))})),P}function Mt(t){return!(!zt(t)||(e=t,X&&X in e))&&(qt(t)||W(t)?et:P).test(Wt(t));var e}function It(t){var e=new t.constructor(t.byteLength);return new ot(e).set(new ot(t)),e}function Lt(t,e,r,n){r||(r={});for(var o=-1,i=e.length;++o<i;){var a=e[o],c=n?n(r[a],t[a],a,r,t):void 0;xt(r,a,void 0===c?t[a]:c)}return r}function Ct(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Kt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Mt(r)?r:void 0}At.prototype.clear=function(){this.__data__=bt?bt(null):{}},At.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},At.prototype.get=function(t){var e=this.__data__;if(bt){var r=e[t];return r===n?void 0:r}return Z.call(e,t)?e[t]:void 0},At.prototype.has=function(t){var e=this.__data__;return bt?void 0!==e[t]:Z.call(e,t)},At.prototype.set=function(t,e){return this.__data__[t]=bt&&void 0===e?n:e,this},St.prototype.clear=function(){this.__data__=[]},St.prototype.delete=function(t){var e=this.__data__,r=Pt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ut.call(e,r,1),!0)},St.prototype.get=function(t){var e=this.__data__,r=Pt(e,t);return r<0?void 0:e[r][1]},St.prototype.has=function(t){return Pt(this.__data__,t)>-1},St.prototype.set=function(t,e){var r=this.__data__,n=Pt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},kt.prototype.clear=function(){this.__data__={hash:new At,map:new(yt||St),string:new At}},kt.prototype.delete=function(t){return Ct(this,t).delete(t)},kt.prototype.get=function(t){return Ct(this,t).get(t)},kt.prototype.has=function(t){return Ct(this,t).has(t)},kt.prototype.set=function(t,e){return Ct(this,t).set(t,e),this},Tt.prototype.clear=function(){this.__data__=new St},Tt.prototype.delete=function(t){return this.__data__.delete(t)},Tt.prototype.get=function(t){return this.__data__.get(t)},Tt.prototype.has=function(t){return this.__data__.has(t)},Tt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof St){var n=r.__data__;if(!yt||n.length<199)return n.push([t,e]),this;r=this.__data__=new kt(n)}return r.set(t,e),this};var Vt=st?R(st,Object):function(){return[]},Dt=function(t){return tt.call(t)};function Ft(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||N.test(t))&&t>-1&&t%1==0&&t<e}function Jt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||G)}function Wt(t){if(null!=t){try{return Y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ht(t,e){return t===e||t!=t&&e!=e}(lt&&Dt(new lt(new ArrayBuffer(1)))!=m||yt&&Dt(new yt)!=f||ht&&Dt(ht.resolve())!=y||gt&&Dt(new gt)!=g||dt&&Dt(new dt)!=v)&&(Dt=function(t){var e=tt.call(t),r=e==l?t.constructor:void 0,n=r?Wt(r):void 0;if(n)switch(n){case vt:return m;case _t:return f;case mt:return y;case wt:return g;case jt:return v}return e});var Rt=Array.isArray;function Bt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}(t.length)&&!qt(t)}var Ut=ft||function(){return!1};function qt(t){var e=zt(t)?tt.call(t):"";return e==u||e==s}function zt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Gt(t){return Bt(t)?Et(t):function(t){if(!Jt(t))return pt(t);var e=[];for(var r in Object(t))Z.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Nt(t,!0,!0)}}(f,f.exports);var p=f.exports;var l,y,h=Object.prototype,g=Function.prototype.toString,d=h.hasOwnProperty,b=g.call(Object),v=h.toString,_=(l=Object.getPrototypeOf,y=Object,function(t){return l(y(t))});var m=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=v.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=_(t);if(null===e)return!0;var r=d.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&g.call(r)==b};
10
+ var checkTypesMini=(()=>{var zt=Object.create;var F=Object.defineProperty,en=Object.defineProperties,tn=Object.getOwnPropertyDescriptor,nn=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,on=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable;var Le=(e,t,n)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||(t={}))Me.call(t,n)&&Le(e,n,t[n]);if(Ve)for(var n of Ve(t))sn.call(t,n)&&Le(e,n,t[n]);return e},R=(e,t)=>en(e,nn(t)),Ke=e=>F(e,"__esModule",{value:!0});var D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),an=(e,t)=>{for(var n in t)F(e,n,{get:t[n],enumerable:!0})},He=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of rn(t))!Me.call(e,c)&&(n||c!=="default")&&F(e,c,{get:()=>t[c],enumerable:!(r=tn(t,c))||r.enumerable});return e},V=(e,t)=>He(Ke(F(e!=null?zt(on(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),cn=(e=>(t,n)=>e&&e.get(t)||(n=He(Ke({}),t,1),e&&e.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var Je=D((ue,le)=>{(function(e,t){typeof ue=="object"&&typeof le!="undefined"?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,n=typeof Symbol!="undefined",r=typeof Map!="undefined",c=typeof Set!="undefined",l=typeof WeakMap!="undefined",d=typeof WeakSet!="undefined",g=typeof DataView!="undefined",i=n&&typeof Symbol.iterator!="undefined",m=n&&typeof Symbol.toStringTag!="undefined",o=c&&typeof Set.prototype.entries=="function",a=r&&typeof Map.prototype.entries=="function",y=o&&Object.getPrototypeOf(new Set().entries()),h=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,p=-1;function w(O){var Ie=typeof O;if(Ie!=="object")return Ie;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 De=m&&O[Symbol.toStringTag];if(typeof De=="string")return De;var v=Object.getPrototypeOf(O);return v===RegExp.prototype?"RegExp":v===Date.prototype?"Date":e&&v===Promise.prototype?"Promise":c&&v===Set.prototype?"Set":r&&v===Map.prototype?"Map":d&&v===WeakSet.prototype?"WeakSet":l&&v===WeakMap.prototype?"WeakMap":g&&v===DataView.prototype?"DataView":r&&v===h?"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,p)}return w})});var Re=D((uo,Fe)=>{function un(e,t){for(var n=-1,r=e?e.length:0,c=Array(r);++n<r;)c[n]=t(e[n],n,e);return c}function ln(e,t,n,r){for(var c=e.length,l=n+(r?1:-1);r?l--:++l<c;)if(t(e[l],l,e))return l;return-1}function fn(e,t,n){if(t!==t)return ln(e,gn,n);for(var r=n-1,c=e.length;++r<c;)if(e[r]===t)return r;return-1}function hn(e,t,n,r){for(var c=n-1,l=e.length;++c<l;)if(r(e[c],t))return c;return-1}function gn(e){return e!==e}function pn(e){return function(t){return e(t)}}var yn=Array.prototype,ke=yn.splice;function dn(e,t,n,r){var c=r?hn:fn,l=-1,d=t.length,g=e;for(e===t&&(t=mn(t)),n&&(g=un(e,pn(n)));++l<d;)for(var i=0,m=t[l],o=n?n(m):m;(i=c(g,o,i,r))>-1;)g!==e&&ke.call(g,i,1),ke.call(e,i,1);return e}function mn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function bn(e,t){return e&&e.length&&t&&t.length?dn(e,t):e}Fe.exports=bn});var Nt=D((W,H)=>{var $n=200,Ge="__lodash_hash_undefined__",Ue=9007199254740991,fe="[object Arguments]",wn="[object Array]",We="[object Boolean]",Be="[object Date]",On="[object Error]",he="[object Function]",Ye="[object GeneratorFunction]",Y="[object Map]",qe="[object Number]",ge="[object Object]",Qe="[object Promise]",Xe="[object RegExp]",q="[object Set]",Ze="[object String]",ze="[object Symbol]",pe="[object WeakMap]",et="[object ArrayBuffer]",Q="[object DataView]",tt="[object Float32Array]",nt="[object Float64Array]",rt="[object Int8Array]",it="[object Int16Array]",ot="[object Int32Array]",st="[object Uint8Array]",at="[object Uint8ClampedArray]",ct="[object Uint16Array]",ut="[object Uint32Array]",_n=/[\\^$.*+?()[\]{}|]/g,Sn=/\w*$/,vn=/^\[object .+?Constructor\]$/,En=/^(?:0|[1-9]\d*)$/,b={};b[fe]=b[wn]=b[et]=b[Q]=b[We]=b[Be]=b[tt]=b[nt]=b[rt]=b[it]=b[ot]=b[Y]=b[qe]=b[ge]=b[Xe]=b[q]=b[Ze]=b[ze]=b[st]=b[at]=b[ct]=b[ut]=!0;b[On]=b[he]=b[pe]=!1;var An=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,A=An||Tn||Function("return this")(),lt=typeof W=="object"&&W&&!W.nodeType&&W,ft=lt&&typeof H=="object"&&H&&!H.nodeType&&H,xn=ft&&ft.exports===lt;function jn(e,t){return e.set(t[0],t[1]),e}function Pn(e,t){return e.add(t),e}function Nn(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function Cn(e,t){for(var n=-1,r=t.length,c=e.length;++n<r;)e[c+n]=t[n];return e}function ht(e,t,n,r){var c=-1,l=e?e.length:0;for(r&&l&&(n=e[++c]);++c<l;)n=t(n,e[c],c,e);return n}function In(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Dn(e,t){return e==null?void 0:e[t]}function gt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function pt(e){var t=-1,n=Array(e.size);return e.forEach(function(r,c){n[++t]=[c,r]}),n}function ye(e,t){return function(n){return e(t(n))}}function yt(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Vn=Array.prototype,Mn=Function.prototype,X=Object.prototype,de=A["__core-js_shared__"],dt=function(){var e=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),mt=Mn.toString,x=X.hasOwnProperty,Z=X.toString,Ln=RegExp("^"+mt.call(x).replace(_n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bt=xn?A.Buffer:void 0,$t=A.Symbol,wt=A.Uint8Array,Kn=ye(Object.getPrototypeOf,Object),Hn=Object.create,Jn=X.propertyIsEnumerable,kn=Vn.splice,Ot=Object.getOwnPropertySymbols,Fn=bt?bt.isBuffer:void 0,Rn=ye(Object.keys,Object),me=K(A,"DataView"),G=K(A,"Map"),be=K(A,"Promise"),$e=K(A,"Set"),we=K(A,"WeakMap"),U=K(Object,"create"),Gn=N(me),Un=N(G),Wn=N(be),Bn=N($e),Yn=N(we),_t=$t?$t.prototype:void 0,St=_t?_t.valueOf:void 0;function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(){this.__data__=U?U(null):{}}function Qn(e){return this.has(e)&&delete this.__data__[e]}function Xn(e){var t=this.__data__;if(U){var n=t[e];return n===Ge?void 0:n}return x.call(t,e)?t[e]:void 0}function Zn(e){var t=this.__data__;return U?t[e]!==void 0:x.call(t,e)}function zn(e,t){var n=this.__data__;return n[e]=U&&t===void 0?Ge:t,this}j.prototype.clear=qn;j.prototype.delete=Qn;j.prototype.get=Xn;j.prototype.has=Zn;j.prototype.set=zn;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function er(){this.__data__=[]}function tr(e){var t=this.__data__,n=z(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():kn.call(t,n,1),!0}function nr(e){var t=this.__data__,n=z(t,e);return n<0?void 0:t[n][1]}function rr(e){return z(this.__data__,e)>-1}function ir(e,t){var n=this.__data__,r=z(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}T.prototype.clear=er;T.prototype.delete=tr;T.prototype.get=nr;T.prototype.has=rr;T.prototype.set=ir;function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function or(){this.__data__={hash:new j,map:new(G||T),string:new j}}function sr(e){return ee(this,e).delete(e)}function ar(e){return ee(this,e).get(e)}function cr(e){return ee(this,e).has(e)}function ur(e,t){return ee(this,e).set(e,t),this}M.prototype.clear=or;M.prototype.delete=sr;M.prototype.get=ar;M.prototype.has=cr;M.prototype.set=ur;function L(e){this.__data__=new T(e)}function lr(){this.__data__=new T}function fr(e){return this.__data__.delete(e)}function hr(e){return this.__data__.get(e)}function gr(e){return this.__data__.has(e)}function pr(e,t){var n=this.__data__;if(n instanceof T){var r=n.__data__;if(!G||r.length<$n-1)return r.push([e,t]),this;n=this.__data__=new M(r)}return n.set(e,t),this}L.prototype.clear=lr;L.prototype.delete=fr;L.prototype.get=hr;L.prototype.has=gr;L.prototype.set=pr;function yr(e,t){var n=Se(e)||Hr(e)?In(e.length,String):[],r=n.length,c=!!r;for(var l in e)(t||x.call(e,l))&&!(c&&(l=="length"||Vr(l,r)))&&n.push(l);return n}function vt(e,t,n){var r=e[t];(!(x.call(e,t)&&xt(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function z(e,t){for(var n=e.length;n--;)if(xt(e[n][0],t))return n;return-1}function dr(e,t){return e&&Et(t,ve(t),e)}function Oe(e,t,n,r,c,l,d){var g;if(r&&(g=l?r(e,c,l,d):r(e)),g!==void 0)return g;if(!te(e))return e;var i=Se(e);if(i){if(g=Cr(e),!t)return jr(e,g)}else{var m=P(e),o=m==he||m==Ye;if(kr(e))return _r(e,t);if(m==ge||m==fe||o&&!l){if(gt(e))return l?e:{};if(g=Ir(o?{}:e),!t)return Pr(e,dr(g,e))}else{if(!b[m])return l?e:{};g=Dr(e,m,Oe,t)}}d||(d=new L);var a=d.get(e);if(a)return a;if(d.set(e,g),!i)var y=n?Nr(e):ve(e);return Nn(y||e,function(h,$){y&&($=h,h=e[$]),vt(g,$,Oe(h,t,n,r,$,e,d))}),g}function mr(e){return te(e)?Hn(e):{}}function br(e,t,n){var r=t(e);return Se(e)?r:Cn(r,n(e))}function $r(e){return Z.call(e)}function wr(e){if(!te(e)||Lr(e))return!1;var t=Pt(e)||gt(e)?Ln:vn;return t.test(N(e))}function Or(e){if(!Tt(e))return Rn(e);var t=[];for(var n in Object(e))x.call(e,n)&&n!="constructor"&&t.push(n);return t}function _r(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function _e(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function Sr(e,t){var n=t?_e(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function vr(e,t,n){var r=t?n(pt(e),!0):pt(e);return ht(r,jn,new e.constructor)}function Er(e){var t=new e.constructor(e.source,Sn.exec(e));return t.lastIndex=e.lastIndex,t}function Ar(e,t,n){var r=t?n(yt(e),!0):yt(e);return ht(r,Pn,new e.constructor)}function Tr(e){return St?Object(St.call(e)):{}}function xr(e,t){var n=t?_e(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function jr(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Et(e,t,n,r){n||(n={});for(var c=-1,l=t.length;++c<l;){var d=t[c],g=r?r(n[d],e[d],d,n,e):void 0;vt(n,d,g===void 0?e[d]:g)}return n}function Pr(e,t){return Et(e,At(e),t)}function Nr(e){return br(e,ve,At)}function ee(e,t){var n=e.__data__;return Mr(t)?n[typeof t=="string"?"string":"hash"]:n.map}function K(e,t){var n=Dn(e,t);return wr(n)?n:void 0}var At=Ot?ye(Ot,Object):Gr,P=$r;(me&&P(new me(new ArrayBuffer(1)))!=Q||G&&P(new G)!=Y||be&&P(be.resolve())!=Qe||$e&&P(new $e)!=q||we&&P(new we)!=pe)&&(P=function(e){var t=Z.call(e),n=t==ge?e.constructor:void 0,r=n?N(n):void 0;if(r)switch(r){case Gn:return Q;case Un:return Y;case Wn:return Qe;case Bn:return q;case Yn:return pe}return t});function Cr(e){var t=e.length,n=e.constructor(t);return t&&typeof e[0]=="string"&&x.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ir(e){return typeof e.constructor=="function"&&!Tt(e)?mr(Kn(e)):{}}function Dr(e,t,n,r){var c=e.constructor;switch(t){case et:return _e(e);case We:case Be:return new c(+e);case Q:return Sr(e,r);case tt:case nt:case rt:case it:case ot:case st:case at:case ct:case ut:return xr(e,r);case Y:return vr(e,r,n);case qe:case Ze:return new c(e);case Xe:return Er(e);case q:return Ar(e,r,n);case ze:return Tr(e)}}function Vr(e,t){return t=t==null?Ue:t,!!t&&(typeof e=="number"||En.test(e))&&e>-1&&e%1==0&&e<t}function Mr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Lr(e){return!!dt&&dt in e}function Tt(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||X;return e===n}function N(e){if(e!=null){try{return mt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Kr(e){return Oe(e,!0,!0)}function xt(e,t){return e===t||e!==e&&t!==t}function Hr(e){return Jr(e)&&x.call(e,"callee")&&(!Jn.call(e,"callee")||Z.call(e)==fe)}var Se=Array.isArray;function jt(e){return e!=null&&Fr(e.length)&&!Pt(e)}function Jr(e){return Rr(e)&&jt(e)}var kr=Fn||Ur;function Pt(e){var t=te(e)?Z.call(e):"";return t==he||t==Ye}function Fr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ue}function te(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Rr(e){return!!e&&typeof e=="object"}function ve(e){return jt(e)?yr(e):Or(e)}function Gr(){return[]}function Ur(){return!1}H.exports=Kr});var Vt=D((lo,Dt)=>{var Wr="[object Object]";function Br(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function Yr(e,t){return function(n){return e(t(n))}}var qr=Function.prototype,Ct=Object.prototype,It=qr.toString,Qr=Ct.hasOwnProperty,Xr=It.call(Object),Zr=Ct.toString,zr=Yr(Object.getPrototypeOf,Object);function ei(e){return!!e&&typeof e=="object"}function ti(e){if(!ei(e)||Zr.call(e)!=Wr||Br(e))return!1;var t=zr(e);if(t===null)return!0;var n=Qr.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&It.call(n)==Xr}Dt.exports=ti});var Yt=D((po,Bt)=>{var Te="__lodash_hash_undefined__",ri=9007199254740991,ii="[object Function]",oi="[object GeneratorFunction]",si=/[\\^$.*+?()[\]{}|]/g,ai=/^\[object .+?Constructor\]$/,ci=typeof global=="object"&&global&&global.Object===Object&&global,ui=typeof self=="object"&&self&&self.Object===Object&&self,Lt=ci||ui||Function("return this")();function li(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function fi(e,t){var n=e?e.length:0;return!!n&&pi(e,t,0)>-1}function hi(e,t,n){for(var r=-1,c=e?e.length:0;++r<c;)if(n(t,e[r]))return!0;return!1}function Kt(e,t){for(var n=-1,r=e?e.length:0,c=Array(r);++n<r;)c[n]=t(e[n],n,e);return c}function gi(e,t,n,r){for(var c=e.length,l=n+(r?1:-1);r?l--:++l<c;)if(t(e[l],l,e))return l;return-1}function pi(e,t,n){if(t!==t)return gi(e,yi,n);for(var r=n-1,c=e.length;++r<c;)if(e[r]===t)return r;return-1}function yi(e){return e!==e}function di(e){return function(t){return e(t)}}function Ht(e,t){return e.has(t)}function mi(e,t){return e==null?void 0:e[t]}function bi(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}var $i=Array.prototype,wi=Function.prototype,Jt=Object.prototype,xe=Lt["__core-js_shared__"],kt=function(){var e=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ft=wi.toString,je=Jt.hasOwnProperty,Oi=Jt.toString,_i=RegExp("^"+Ft.call(je).replace(si,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Si=$i.splice,Rt=Math.max,vi=Math.min,Ei=Gt(Lt,"Map"),B=Gt(Object,"create");function C(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ai(){this.__data__=B?B(null):{}}function Ti(e){return this.has(e)&&delete this.__data__[e]}function xi(e){var t=this.__data__;if(B){var n=t[e];return n===Te?void 0:n}return je.call(t,e)?t[e]:void 0}function ji(e){var t=this.__data__;return B?t[e]!==void 0:je.call(t,e)}function Pi(e,t){var n=this.__data__;return n[e]=B&&t===void 0?Te:t,this}C.prototype.clear=Ai;C.prototype.delete=Ti;C.prototype.get=xi;C.prototype.has=ji;C.prototype.set=Pi;function J(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ni(){this.__data__=[]}function Ci(e){var t=this.__data__,n=ie(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Si.call(t,n,1),!0}function Ii(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]}function Di(e){return ie(this.__data__,e)>-1}function Vi(e,t){var n=this.__data__,r=ie(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}J.prototype.clear=Ni;J.prototype.delete=Ci;J.prototype.get=Ii;J.prototype.has=Di;J.prototype.set=Vi;function k(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mi(){this.__data__={hash:new C,map:new(Ei||J),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}k.prototype.clear=Mi;k.prototype.delete=Li;k.prototype.get=Ki;k.prototype.has=Hi;k.prototype.set=Ji;function re(e){var t=-1,n=e?e.length:0;for(this.__data__=new k;++t<n;)this.add(e[t])}function ki(e){return this.__data__.set(e,Te),this}function Fi(e){return this.__data__.has(e)}re.prototype.add=re.prototype.push=ki;re.prototype.has=Fi;function ie(e,t){for(var n=e.length;n--;)if(Xi(e[n][0],t))return n;return-1}function Ri(e,t,n){for(var r=n?hi:fi,c=e[0].length,l=e.length,d=l,g=Array(l),i=1/0,m=[];d--;){var o=e[d];d&&t&&(o=Kt(o,di(t))),i=vi(o.length,i),g[d]=!n&&(t||c>=120&&o.length>=120)?new re(d&&o):void 0}o=e[0];var a=-1,y=g[0];e:for(;++a<c&&m.length<i;){var h=o[a],$=t?t(h):h;if(h=n||h!==0?h:0,!(y?Ht(y,$):r(m,$,n))){for(d=l;--d;){var S=g[d];if(!(S?Ht(S,$):r(e[d],$,n)))continue e}y&&y.push($),m.push(h)}}return m}function Gi(e){if(!Wt(e)||Yi(e))return!1;var t=Ut(e)||bi(e)?_i:ai;return t.test(qi(e))}function Ui(e,t){return t=Rt(t===void 0?e.length-1:t,0),function(){for(var n=arguments,r=-1,c=Rt(n.length-t,0),l=Array(c);++r<c;)l[r]=n[t+r];r=-1;for(var d=Array(t+1);++r<t;)d[r]=n[r];return d[t]=l,li(e,this,d)}}function Wi(e){return zi(e)?e:[]}function oe(e,t){var n=e.__data__;return Bi(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Gt(e,t){var n=mi(e,t);return Gi(n)?n:void 0}function Bi(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yi(e){return!!kt&&kt in e}function qi(e){if(e!=null){try{return Ft.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Qi=Ui(function(e){var t=Kt(e,Wi);return t.length&&t[0]===e[0]?Ri(t):[]});function Xi(e,t){return e===t||e!==e&&t!==t}function Zi(e){return e!=null&&eo(e.length)&&!Ut(e)}function zi(e){return to(e)&&Zi(e)}function Ut(e){var t=Wt(e)?Oi.call(e):"";return t==ii||t==oi}function eo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ri}function Wt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function to(e){return!!e&&typeof e=="object"}Bt.exports=Qi});var Qt=D((qt,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()})(qt,function(){"use strict";var e=Object.prototype.toString;function t(o,a){return o==null?!1:Object.prototype.hasOwnProperty.call(o,a)}function n(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 r(o){return e.call(o)}function c(o){return typeof o=="object"&&r(o)==="[object Object]"}var l=Array.isArray||function(o){return e.call(o)==="[object Array]"};function d(o){return typeof o=="boolean"||r(o)==="[object Boolean]"}function g(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 h(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=h(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 h(f,s)};function S(f,s,u,p){if(typeof s=="number"&&(s=[s]),!s||s.length===0)return f;if(typeof s=="string")return S(f,s.split(".").map(g),u,p);var w=s[0],O=$(f,w);return s.length===1?((O===void 0||!p)&&(f[w]=u),O):(O===void 0&&(typeof s[1]=="number"?f[w]=[]:f[w]={}),S(f[w],s.slice(1),u,p))}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 p=g(s[u]);if(typeof p=="number"&&l(f)&&p<f.length||(o.includeInheritedProps?p in Object(f):t(f,p)))f=f[p];else return!1}return!0},a.ensureExists=function(f,s,u){return S(f,s,u,!0)},a.set=function(f,s,u,p){return S(f,s,u,p)},a.insert=function(f,s,u,p){var w=a.get(f,s);p=~~p,l(w)||(w=[],a.set(f,s,w)),w.splice(p,0,u)},a.empty=function(f,s){if(!n(s)&&f!=null){var u,p;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(p in u)y(u,p)&&delete u[p];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 p,w=0,O=s.length;w<O;w++)if((p=a.get(f,s[w]))!==void 0)return p;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 p=g(s[0]),w=$(f,p);return w===void 0?u:s.length===1?w:a.get(f[p],s.slice(1),u)},a.del=function(s,u){if(typeof u=="number"&&(u=[u]),s==null||n(u))return s;if(typeof u=="string")return a.del(s,u.split("."));var p=g(u[0]);if($(s,p),!y(s,p))return s;if(u.length===1)l(s)?s.splice(p,1):delete s[p];else return a.del(s[p],u.slice(1));return s},a}var m=i();return m.create=i,m.withInheritedProps=i({includeInheritedProps:!0}),m})});var ao={};an(ao,{checkTypesMini:()=>so});var _=V(Je(),1),I=V(Re(),1);var ne=V(Nt(),1),Mt=V(Vt(),1);function ni(e){if(e.includes(".")){let t=e.lastIndexOf(".");if(!e.slice(0,t).includes("."))return e.slice(0,t);for(let n=t-1;n--;)if(e[n]===".")return e.slice(n+1,t)}return null}var Ee=ni;function Ae(e,t){let n={now:!1};function r(c,l,d,g){let i=(0,ne.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&&!g.now;a++){let h=o.path?`${o.path}.${a}`:`${a}`;i[a]!==void 0?(o.parent=(0,ne.default)(i),o.parentType="array",o.parentKey=Ee(h),m=r(l(i[a],void 0,R(E({},o),{path:h}),g),l,R(E({},o),{path:h}),g),Number.isNaN(m)&&a<i.length?(i.splice(a,1),a-=1):i[a]=m):i.splice(a,1)}else if((0,Mt.default)(i))for(let a in i){if(g.now&&a!=null)break;let y=o.path?`${o.path}.${a}`:a;o.depth===0&&a!=null&&(o.topmostKey=a),o.parent=(0,ne.default)(i),o.parentType="object",o.parentKey=Ee(y),m=r(l(a,i[a],R(E({},o),{path:y}),g),l,R(E({},o),{path:y}),g),Number.isNaN(m)?delete i[a]:i[a]=m}return i}return r(e,t,{},n)}var Zt=V(Yt(),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,Xt=(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(n=>{if(typeof n!="string"){if(typeof n=="undefined")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof n}' in the array`)}return!0})},no=(e,t)=>{t=E({caseSensitive:!1},t);let n=e+JSON.stringify(t);if(Ce.has(n))return Ce.get(n);let r=e[0]==="!";r&&(e=e.slice(1)),e=Ne(e).replace(/\\\*/g,"[\\s\\S]*");let c=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return c.negated=r,Ce.set(n,c),c},ro=(e,t,n,r)=>{if(e=Xt(e,"inputs"),t=Xt(t,"patterns"),t.length===0)return[];t=t.map(d=>no(d,n));let{allPatterns:c}=n||{},l=[];for(let d of e){let g,i=[...t].fill(!1);for(let[m,o]of t.entries())if(o.test(d)&&(i[m]=!0,g=!o.negated,!g))break;if(!(g===!1||g===void 0&&t.some(m=>!m.negated)||c&&i.some((m,o)=>!m&&!t[o].negated))&&(l.push(d),r))break}return l};function ae(e,t,n){return ro(e,t,n,!0).length>0}var io={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function oo(e,t,n){function r(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(h=>ae(y,h,{caseSensitive:!0})))}let d=Object.prototype.hasOwnProperty,g=["any","anything","every","everything","all","whatever","whatevs"];if(!r(e))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let i=E(E({},io),n);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,h,$)=>{let S=h!==void 0?h: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(r(t)||(t={}),i.enforceStrictKeyset)if(r(i.schema)&&Object.keys(i.schema).length>0){if(t&&l((0,I.default)(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema))),i.ignoreKeys).length){let o=(0,I.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>0){if(l((0,I.default)(Object.keys(e),Object.keys(t)),i.ignoreKeys).length!==0){let o=(0,I.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,I.default)(Object.keys(t),Object.keys(e)),i.ignoreKeys).length!==0){let o=(0,I.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 h=a,$=o;if(y.parentType==="array"&&($=void 0,h=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 h;let S=!(!c(h)&&!Array.isArray(h)&&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).
11
+
12
+ Debug info:
13
+
14
+ obj = ${JSON.stringify(e,null,4)}
15
+
16
+ ref = ${JSON.stringify(t,null,4)}
17
+
18
+ innerObj = ${JSON.stringify(y,null,4)}
19
+
20
+ opts = ${JSON.stringify(i,null,4)}
21
+
22
+ current = ${JSON.stringify(h,null,4)}
23
+
24
+ `);if(f){let u=Pe(i.schema[y.path]).map(p=>`${p}`.toLowerCase());if(ce.default.set(i.schema,y.path,u),(0,Zt.default)(u,g).length)m.push(y.path);else if(h!==!0&&h!==!1&&!u.includes((0,_.default)(h).toLowerCase())||(h===!0||h===!1)&&!u.includes(String(h))&&!u.includes("boolean"))if(Array.isArray(h)&&i.acceptArrays){for(let p=0,w=h.length;p<w;p++)if(!u.includes((0,_.default)(h[p]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path}.${p}, the ${p}th element (equal to ${JSON.stringify(h[p],null,0)}) is of a type ${(0,_.default)(h[p]).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)(h)!=="string"?'"':""}${JSON.stringify(h,null,0)}${(0,_.default)(h)!=="string"?'"':""} (type: ${(0,_.default)(h).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(h)&&!i.acceptArraysIgnore.includes(o)){if(!h.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)(h)!==(0,_.default)(u))throw new TypeError(`${i.msg}: ${i.optsVarName}.${y.path} was customised to ${(0,_.default)(h).toLowerCase()==="string"?"":'"'}${JSON.stringify(h,null,0)}${(0,_.default)(h).toLowerCase()==="string"?"":'"'} which is not ${(0,_.default)(u).toLowerCase()} but ${(0,_.default)(h).toLowerCase()}`)}return h})}function so(e,t,n){oo(e,t,n)}return cn(ao);})();
11
25
  /**
12
- * @name ast-monkey-util
13
- * @fileoverview Utility library of AST helper functions
14
- * @version 2.0.4
26
+ * @name arrayiffy-if-string
27
+ * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
28
+ * @version 4.0.10
15
29
  * @author Roy Revelt, Codsen Ltd
16
30
  * @license MIT
17
- * {@link https://codsen.com/os/ast-monkey-util/}
18
- */function w(t){if(t.includes(".")){const e=t.lastIndexOf(".");if(!t.slice(0,e).includes("."))return t.slice(0,e);for(let r=e-1;r--;)if("."===t[r])return t.slice(r+1,e)}return null}
31
+ * {@link https://codsen.com/os/arrayiffy-if-string/}
32
+ */
19
33
  /**
20
34
  * @name ast-monkey-traverse
21
35
  * @fileoverview Utility library to traverse AST
22
- * @version 3.0.4
36
+ * @version 3.0.10
23
37
  * @author Roy Revelt, Codsen Ltd
24
38
  * @license MIT
25
39
  * {@link https://codsen.com/os/ast-monkey-traverse/}
26
- */function j(t,e){return function t(e,r,n,o){const i=p(e);let a;const c={depth:-1,path:"",...n};if(c.depth+=1,Array.isArray(i))for(let e=0,n=i.length;e<n&&!o.now;e++){const n=c.path?`${c.path}.${e}`:`${e}`;void 0!==i[e]?(c.parent=p(i),c.parentType="array",c.parentKey=w(n),a=t(r(i[e],void 0,{...c,path:n},o),r,{...c,path:n},o),Number.isNaN(a)&&e<i.length?(i.splice(e,1),e-=1):i[e]=a):i.splice(e,1)}else if(m(i))for(const e in i){if(o.now&&null!=e)break;const n=c.path?`${c.path}.${e}`:e;0===c.depth&&null!=e&&(c.topmostKey=e),c.parent=p(i),c.parentType="object",c.parentKey=w(n),a=t(r(e,i[e],{...c,path:n},o),r,{...c,path:n},o),Number.isNaN(a)?delete i[e]:i[e]=a}return i}(t,e,{},{now:!1})}var O="__lodash_hash_undefined__",$=9007199254740991,A=/^\[object .+?Constructor\]$/,S="object"==typeof self&&self&&self.Object===Object&&self,k="object"==typeof e&&e&&e.Object===Object&&e||S||Function("return this")();function T(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function E(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var o=t.length,i=r+(n?1:-1);for(;n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,N,r);var n=r-1,o=t.length;for(;++n<o;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function x(t,e,r){for(var n=-1,o=t?t.length:0;++n<o;)if(r(e,t[n]))return!0;return!1}function P(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function N(t){return t!=t}function M(t){return function(e){return t(e)}}function I(t,e){return t.has(e)}var L,C=Array.prototype,K=Function.prototype,V=Object.prototype,D=k["__core-js_shared__"],F=(L=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",J=K.toString,W=V.hasOwnProperty,H=V.toString,R=RegExp("^"+J.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=C.splice,U=Math.max,q=Math.min,z=ot(k,"Map"),G=ot(Object,"create");function Q(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function X(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Y(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Z(t){var e=-1,r=t?t.length:0;for(this.__data__=new Y;++e<r;)this.add(t[e])}function tt(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function et(t){if(!ct(t)||function(t){return!!F&&F in t}(t))return!1;var e=at(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?R:A;return e.test(function(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function rt(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=$}(t.length)&&!at(t)}(t)}(t)?t:[]}function nt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function ot(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return et(r)?r:void 0}Q.prototype.clear=function(){this.__data__=G?G(null):{}},Q.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Q.prototype.get=function(t){var e=this.__data__;if(G){var r=e[t];return r===O?void 0:r}return W.call(e,t)?e[t]:void 0},Q.prototype.has=function(t){var e=this.__data__;return G?void 0!==e[t]:W.call(e,t)},Q.prototype.set=function(t,e){return this.__data__[t]=G&&void 0===e?O:e,this},X.prototype.clear=function(){this.__data__=[]},X.prototype.delete=function(t){var e=this.__data__,r=tt(e,t);return!(r<0)&&(r==e.length-1?e.pop():B.call(e,r,1),!0)},X.prototype.get=function(t){var e=this.__data__,r=tt(e,t);return r<0?void 0:e[r][1]},X.prototype.has=function(t){return tt(this.__data__,t)>-1},X.prototype.set=function(t,e){var r=this.__data__,n=tt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Y.prototype.clear=function(){this.__data__={hash:new Q,map:new(z||X),string:new Q}},Y.prototype.delete=function(t){return nt(this,t).delete(t)},Y.prototype.get=function(t){return nt(this,t).get(t)},Y.prototype.has=function(t){return nt(this,t).has(t)},Y.prototype.set=function(t,e){return nt(this,t).set(t,e),this},Z.prototype.add=Z.prototype.push=function(t){return this.__data__.set(t,O),this},Z.prototype.has=function(t){return this.__data__.has(t)};var it=function(t,e){return e=U(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,o=U(r.length-e,0),i=Array(o);++n<o;)i[n]=r[e+n];n=-1;for(var a=Array(e+1);++n<e;)a[n]=r[n];return a[e]=i,T(t,this,a)}}((function(t){var e=P(t,rt);return e.length&&e[0]===t[0]?function(t,e,r){for(var n=r?x:E,o=t[0].length,i=t.length,a=i,c=Array(i),u=1/0,s=[];a--;){var f=t[a];a&&e&&(f=P(f,M(e))),u=q(f.length,u),c[a]=!r&&(e||o>=120&&f.length>=120)?new Z(a&&f):void 0}f=t[0];var p=-1,l=c[0];t:for(;++p<o&&s.length<u;){var y=f[p],h=e?e(y):y;if(y=r||0!==y?y:0,!(l?I(l,h):n(s,h,r))){for(a=i;--a;){var g=c[a];if(!(g?I(g,h):n(t[a],h,r)))continue t}l&&l.push(h),s.push(y)}}return s}(e):[]}));function at(t){var e=ct(t)?H.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function ct(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var ut=it;
40
+ */
27
41
  /**
28
- * @name arrayiffy-if-string
29
- * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
30
- * @version 4.0.4
42
+ * @name ast-monkey-util
43
+ * @fileoverview Utility library of AST helper functions
44
+ * @version 2.0.10
31
45
  * @author Roy Revelt, Codsen Ltd
32
46
  * @license MIT
33
- * {@link https://codsen.com/os/arrayiffy-if-string/}
34
- */function st(t){return"string"==typeof t?t.length?[t]:[]:t}var ft={exports:{}};!function(t){t.exports=function(){var t=Object.prototype.toString;function e(t,e){return null!=t&&Object.prototype.hasOwnProperty.call(t,e)}function r(t){if(!t)return!0;if(i(t)&&0===t.length)return!0;if("string"!=typeof t){for(var r in t)if(e(t,r))return!1;return!0}return!1}function n(e){return t.call(e)}function o(t){return"object"==typeof t&&"[object Object]"===n(t)}var i=Array.isArray||function(e){return"[object Array]"===t.call(e)};function a(t){return"boolean"==typeof t||"[object Boolean]"===n(t)}function c(t){var e=parseInt(t);return e.toString()===t?e:t}function u(t){var n,u,s=function(t){return Object.keys(s).reduce((function(e,r){return"create"===r||"function"==typeof s[r]&&(e[r]=s[r].bind(s,t)),e}),{})};function f(t,e){if(n(t,e))return t[e]}function p(t,e,r,n){if("number"==typeof e&&(e=[e]),!e||0===e.length)return t;if("string"==typeof e)return p(t,e.split(".").map(c),r,n);var o=e[0],i=u(t,o);return 1===e.length?(void 0!==i&&n||(t[o]=r),i):(void 0===i&&(t[o]="number"==typeof e[1]?[]:{}),p(t[o],e.slice(1),r,n))}return n=(t=t||{}).includeInheritedProps?function(){return!0}:function(t,r){return"number"==typeof r&&Array.isArray(t)||e(t,r)},u=t.includeInheritedProps?function(t,e){"string"!=typeof e&&"number"!=typeof e&&(e=String(e));var r=f(t,e);if("__proto__"===e||"prototype"===e||"constructor"===e&&"function"==typeof r)throw new Error("For security reasons, object's magic properties cannot be set");return r}:function(t,e){return f(t,e)},s.has=function(r,n){if("number"==typeof n?n=[n]:"string"==typeof n&&(n=n.split(".")),!n||0===n.length)return!!r;for(var o=0;o<n.length;o++){var a=c(n[o]);if(!("number"==typeof a&&i(r)&&a<r.length||(t.includeInheritedProps?a in Object(r):e(r,a))))return!1;r=r[a]}return!0},s.ensureExists=function(t,e,r){return p(t,e,r,!0)},s.set=function(t,e,r,n){return p(t,e,r,n)},s.insert=function(t,e,r,n){var o=s.get(t,e);n=~~n,i(o)||s.set(t,e,o=[]),o.splice(n,0,r)},s.empty=function(t,e){var c,u;if(!r(e)&&null!=t&&(c=s.get(t,e))){if("string"==typeof c)return s.set(t,e,"");if(a(c))return s.set(t,e,!1);if("number"==typeof c)return s.set(t,e,0);if(i(c))c.length=0;else{if(!o(c))return s.set(t,e,null);for(u in c)n(c,u)&&delete c[u]}}},s.push=function(t,e){var r=s.get(t,e);i(r)||s.set(t,e,r=[]),r.push.apply(r,Array.prototype.slice.call(arguments,2))},s.coalesce=function(t,e,r){for(var n,o=0,i=e.length;o<i;o++)if(void 0!==(n=s.get(t,e[o])))return n;return r},s.get=function(t,e,r){if("number"==typeof e&&(e=[e]),!e||0===e.length)return t;if(null==t)return r;if("string"==typeof e)return s.get(t,e.split("."),r);var n=c(e[0]),o=u(t,n);return void 0===o?r:1===e.length?o:s.get(t[n],e.slice(1),r)},s.del=function(t,e){if("number"==typeof e&&(e=[e]),null==t)return t;if(r(e))return t;if("string"==typeof e)return s.del(t,e.split("."));var o=c(e[0]);return u(t,o),n(t,o)?1!==e.length?s.del(t[o],e.slice(1)):(i(t)?t.splice(o,1):delete t[o],t):t},s}var s=u();return s.create=u,s.withInheritedProps=u({includeInheritedProps:!0}),s}()}(ft);var pt=ft.exports;const lt=new Map,yt=(t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter((t=>{if("string"!=typeof t){if(void 0===t)return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof t}' in the array`)}return!0}))},ht=(t,e)=>{e={caseSensitive:!1,...e};const r=t+JSON.stringify(e);if(lt.has(r))return lt.get(r);const n="!"===t[0];n&&(t=t.slice(1)),t=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t).replace(/\\\*/g,"[\\s\\S]*");const o=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return o.negated=n,lt.set(r,o),o};function gt(t,e,r){return((t,e,r,n)=>{if(t=yt(t,"inputs"),0===(e=yt(e,"patterns")).length)return[];e=e.map((t=>ht(t,r)));const{allPatterns:o}=r||{},i=[];for(const r of t){let t;const a=[...e].fill(!1);for(const[n,o]of e.entries())if(o.test(r)&&(a[n]=!0,t=!o.negated,!t))break;if(!(!1===t||void 0===t&&e.some((t=>!t.negated))||o&&a.some(((t,r)=>!t&&!e[r].negated)))&&(i.push(r),n))break}return i})(t,e,r,!0).length>0}const dt={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};t.checkTypesMini=function(t,e,r){return function(t,e,r){function o(t){return null!=t}function i(t){return"Object"===n(t)}function a(t,e){return"string"==typeof e&&(e=st(e)),Array.from(t).filter((t=>!e.some((e=>gt(t,e,{caseSensitive:!0})))))}const c=Object.prototype.hasOwnProperty,u=["any","anything","every","everything","all","whatever","whatevs"];if(!o(t))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");const f={...dt,...r};if("string"==typeof f.ignoreKeys&&(f.ignoreKeys=[f.ignoreKeys]),"string"==typeof f.ignorePaths&&(f.ignorePaths=[f.ignorePaths]),"string"==typeof f.acceptArraysIgnore&&(f.acceptArraysIgnore=[f.acceptArraysIgnore]),f.msg=`${f.msg}`.trim(),":"===f.msg[f.msg.length-1]&&(f.msg=f.msg.slice(0,f.msg.length-1).trim()),i(f.schema))Object.keys(f.schema).forEach((t=>{if(i(f.schema[t])){const e={};j(f.schema[t],((r,n,o)=>{const a=void 0!==n?n:r;return Array.isArray(a)||i(a)||(e[`${t}.${o.path}`]=a),a})),delete f.schema[t],f.schema={...f.schema,...e}}})),Object.keys(f.schema).forEach((t=>{Array.isArray(f.schema[t])||(f.schema[t]=[f.schema[t]]),f.schema[t]=f.schema[t].map((t=>`${t}`.toLowerCase().trim()))}));else if(null!=f.schema)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(f.schema,null,0)} which is not object but ${typeof f.schema}`);if(o(e)||(e={}),f.enforceStrictKeyset)if(o(f.schema)&&Object.keys(f.schema).length>0){if(e&&a(s(Object.keys(t),Object.keys(e).concat(Object.keys(f.schema))),f.ignoreKeys).length){const r=s(Object.keys(t),Object.keys(e).concat(Object.keys(f.schema)));throw new TypeError(`${f.msg}: ${f.optsVarName}.enforceStrictKeyset is on and the following key${r.length>1?"s":""} ${r.length>1?"are":"is"} not covered by schema and/or reference objects: ${r.join(", ")}`)}}else{if(!(i(e)&&Object.keys(e).length>0))throw new TypeError(`${f.msg}: Both ${f.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via opts.enforceStrictKeyset!`);if(0!==a(s(Object.keys(t),Object.keys(e)),f.ignoreKeys).length){const r=s(Object.keys(t),Object.keys(e));throw new TypeError(`${f.msg}: The input object has key${r.length>1?"s":""} which ${r.length>1?"are":"is"} not covered by the reference object: ${r.join(", ")}`)}if(0!==a(s(Object.keys(e),Object.keys(t)),f.ignoreKeys).length){const r=s(Object.keys(e),Object.keys(t));throw new TypeError(`${f.msg}: The reference object has key${r.length>1?"s":""} which ${r.length>1?"are":"is"} not present in the input object: ${r.join(", ")}`)}}const p=[];j(t,((r,o,a)=>{let s=o,l=r;if("array"===a.parentType&&(l=void 0,s=r),Array.isArray(p)&&p.length&&p.some((t=>a.path.startsWith(t))))return s;if(l&&f.ignoreKeys.some((t=>gt(l,t))))return s;if(f.ignorePaths.some((t=>gt(a.path,t))))return s;const y=!(!i(s)&&!Array.isArray(s)&&Array.isArray(a.parent));let h=!1;i(f.schema)&&c.call(f.schema,a.path)&&(h=!0);let g=!1;if(i(e)&&pt.has(e,a.path)&&(g=!0),f.enforceStrictKeyset&&y&&!h&&!g)throw new TypeError(`${f.msg}: ${f.optsVarName}.${a.path} is neither covered by reference object (second input argument), nor ${f.optsVarName}.schema! To stop this error, turn off ${f.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${f.optsVarName}.schema).\n\nDebug info:\n\nobj = ${JSON.stringify(t,null,4)}\n\nref = ${JSON.stringify(e,null,4)}\n\ninnerObj = ${JSON.stringify(a,null,4)}\n\nopts = ${JSON.stringify(f,null,4)}\n\ncurrent = ${JSON.stringify(s,null,4)}\n\n`);if(h){const t=st(f.schema[a.path]).map((t=>`${t}`.toLowerCase()));if(pt.set(f.schema,a.path,t),ut(t,u).length)p.push(a.path);else if(!0!==s&&!1!==s&&!t.includes(n(s).toLowerCase())||(!0===s||!1===s)&&!t.includes(String(s))&&!t.includes("boolean")){if(!Array.isArray(s)||!f.acceptArrays)throw new TypeError(`${f.msg}: ${f.optsVarName}.${a.path} was customised to ${"string"!==n(s)?'"':""}${JSON.stringify(s,null,0)}${"string"!==n(s)?'"':""} (type: ${n(s).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(t,null,0)})`);for(let e=0,r=s.length;e<r;e++)if(!t.includes(n(s[e]).toLowerCase()))throw new TypeError(`${f.msg}: ${f.optsVarName}.${a.path}.${e}, the ${e}th element (equal to ${JSON.stringify(s[e],null,0)}) is of a type ${n(s[e]).toLowerCase()}, but only the following are allowed by the ${f.optsVarName}.schema: ${t.join(", ")}`)}}else if(e&&i(e)&&g){const t=pt.get(e,a.path);if(f.acceptArrays&&Array.isArray(s)&&!f.acceptArraysIgnore.includes(r)){if(!s.every((t=>n(t).toLowerCase()===n(e[r]).toLowerCase())))throw new TypeError(`${f.msg}: ${f.optsVarName}.${a.path} was customised to be array, but not all of its elements are ${n(e[r]).toLowerCase()}-type`)}else if(n(s)!==n(t))throw new TypeError(`${f.msg}: ${f.optsVarName}.${a.path} was customised to ${"string"===n(s).toLowerCase()?"":'"'}${JSON.stringify(s,null,0)}${"string"===n(s).toLowerCase()?"":'"'} which is not ${n(t).toLowerCase()} but ${n(s).toLowerCase()}`)}return s}))}(t,e,r)},Object.defineProperty(t,"__esModule",{value:!0})}));
47
+ * {@link https://codsen.com/os/ast-monkey-util/}
48
+ */
@@ -1,6 +1,7 @@
1
1
  // Quick Take
2
2
 
3
3
  import { strict as assert } from "assert";
4
+
4
5
  import { checkTypesMini } from "../dist/check-types-mini.esm.js";
5
6
 
6
7
  assert.throws(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "check-types-mini",
3
- "version": "7.0.4",
3
+ "version": "7.0.10",
4
4
  "description": "Validate options object",
5
5
  "keywords": [
6
6
  "compare",
@@ -35,58 +35,39 @@
35
35
  },
36
36
  "types": "types/index.d.ts",
37
37
  "scripts": {
38
- "build": "rollup -c",
39
- "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
40
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
41
- "clean_types": "../../scripts/cleanTypes.js",
42
- "dev": "rollup -c --dev",
43
- "devunittest": "npm run dev && tap --only -R 'base'",
44
- "esbuild": "node '../../scripts/esbuild.js'",
45
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
46
- "format": "npm run lect && npm run prettier && npm run lint",
47
- "lect": "lect",
48
- "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
49
- "perf": "node perf/check",
50
- "prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
51
- "republish": "npm publish || :",
52
- "tap": "tap",
53
- "pretest": "npm run build",
54
- "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
55
- "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
56
- "tsc": "tsc",
57
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
38
+ "build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
39
+ "dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
40
+ "dts": "rollup -c",
41
+ "examples": "node '../../ops/scripts/run-examples.js'",
42
+ "lect": "node '../../ops/lect/lect.js'",
43
+ "letspublish": "yarn publish || :",
44
+ "lint": "eslint . --fix",
45
+ "perf": "node perf/check.js",
46
+ "prepare": "echo 'ready'",
47
+ "pretest": "yarn run lect && yarn run build",
48
+ "test": "c8 yarn run unit && yarn run examples && yarn run lint",
49
+ "unit": "uvu test"
58
50
  },
59
- "tap": {
60
- "check-coverage": false,
61
- "coverage-report": [
62
- "json-summary",
63
- "text"
64
- ],
65
- "node-arg": [
66
- "--no-warnings",
67
- "--experimental-loader",
68
- "@istanbuljs/esm-loader-hook"
51
+ "engines": {
52
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
53
+ },
54
+ "c8": {
55
+ "check-coverage": true,
56
+ "exclude": [
57
+ "**/test/**/*.*"
69
58
  ],
70
- "timeout": 0
59
+ "lines": 100
71
60
  },
72
61
  "lect": {
73
62
  "licence": {
74
63
  "extras": [
75
64
  ""
76
65
  ]
77
- },
78
- "req": "{ checkTypesMini }",
79
- "various": {
80
- "devDependencies": [
81
- "@types/lodash.intersection",
82
- "@types/lodash.pullall"
83
- ]
84
66
  }
85
67
  },
86
68
  "dependencies": {
87
- "@babel/runtime": "^7.16.0",
88
- "arrayiffy-if-string": "^4.0.4",
89
- "ast-monkey-traverse": "^3.0.4",
69
+ "arrayiffy-if-string": "^4.0.10",
70
+ "ast-monkey-traverse": "^3.0.10",
90
71
  "lodash.intersection": "^4.4.0",
91
72
  "lodash.pullall": "^4.2.0",
92
73
  "matcher": "^5.0.0",
@@ -94,45 +75,7 @@
94
75
  "type-detect": "^4.0.8"
95
76
  },
96
77
  "devDependencies": {
97
- "@babel/cli": "^7.16.0",
98
- "@babel/core": "^7.16.0",
99
- "@babel/node": "^7.16.0",
100
- "@babel/plugin-external-helpers": "^7.16.0",
101
- "@babel/plugin-proposal-class-properties": "^7.16.0",
102
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
103
- "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
104
- "@babel/plugin-proposal-optional-chaining": "^7.16.0",
105
- "@babel/plugin-transform-runtime": "^7.16.0",
106
- "@babel/preset-env": "^7.16.0",
107
- "@babel/preset-typescript": "^7.16.0",
108
- "@babel/register": "^7.16.0",
109
- "@istanbuljs/esm-loader-hook": "^0.1.2",
110
- "@rollup/plugin-babel": "^5.3.0",
111
- "@rollup/plugin-commonjs": "^21.0.1",
112
- "@rollup/plugin-node-resolve": "^13.0.6",
113
- "@rollup/plugin-strip": "^2.1.0",
114
- "@rollup/plugin-typescript": "^8.3.0",
115
78
  "@types/lodash.intersection": "^4.4.6",
116
- "@types/lodash.pullall": "^4.2.6",
117
- "@types/node": "^16.11.6",
118
- "@types/tap": "^15.0.5",
119
- "@typescript-eslint/eslint-plugin": "^5.3.0",
120
- "@typescript-eslint/parser": "^5.3.0",
121
- "core-js": "^3.19.1",
122
- "cross-env": "^7.0.3",
123
- "eslint": "^8.1.0",
124
- "lect": "^0.18.4",
125
- "rollup": "^2.59.0",
126
- "rollup-plugin-ascii": "^0.0.3",
127
- "rollup-plugin-banner": "^0.2.1",
128
- "rollup-plugin-cleanup": "^3.2.1",
129
- "rollup-plugin-dts": "^4.0.0",
130
- "rollup-plugin-terser": "^7.0.2",
131
- "tap": "^15.0.10",
132
- "tslib": "^2.3.1",
133
- "typescript": "^4.4.4"
134
- },
135
- "engines": {
136
- "node": ">=12"
79
+ "@types/lodash.pullall": "^4.2.6"
137
80
  }
138
81
  }
package/types/index.d.ts CHANGED
File without changes
package/examples/api.json DELETED
@@ -1 +0,0 @@
1
- {"_quickTake.js":{"title":"Quick Take","content":"import &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B; checkTypesMini &#x7D; from \"check-types-mini\";\n\nassert.throws(() => &#x7B;\n checkTypesMini(\n checkTypesMini(\n &#x7B;\n // object to check\n option1: \"setting1\",\n option2: \"false\",\n option3: false,\n &#x7D;,\n &#x7B;\n // reference defaults object\n option1: \"setting1\",\n option2: false,\n option3: false,\n &#x7D;\n ),\n /not boolean but string/g\n );\n&#x7D;);"}}