check-types-mini
Advanced tools
Comparing version 7.0.2 to 7.0.3
@@ -6,2 +6,16 @@ # Change Log | ||
## 7.0.3 (2021-11-02) | ||
### Bug Fixes | ||
- bump TS and separate ESLint plugins away from this monorepo ([b1ebce1](https://github.com/codsen/codsen/commit/b1ebce1637d8c41c2d848fc24b0ba4058865bd5d)) | ||
### Features | ||
- migrate to ES Modules ([c579dff](https://github.com/codsen/codsen/commit/c579dff3b23205e383035ca10ddcec671e35d0fe)) | ||
### BREAKING CHANGES | ||
- programs now are in ES Modules and won't work with Common JS require() | ||
## 7.0.1 (2021-09-13) | ||
@@ -8,0 +22,0 @@ |
/** | ||
* @name check-types-mini | ||
* @fileoverview Validate options object | ||
* @version 7.0.2 | ||
* @version 7.0.3 | ||
* @author Roy Revelt, Codsen Ltd | ||
@@ -16,3 +16,3 @@ * @license MIT | ||
import objectPath from 'object-path'; | ||
import matcher from 'matcher'; | ||
import { isMatch } from 'matcher'; | ||
@@ -40,3 +40,3 @@ const defaults = { | ||
} | ||
return Array.from(originalInput).filter(originalVal => !toBeRemoved.some(remVal => matcher.isMatch(originalVal, remVal, { | ||
return Array.from(originalInput).filter(originalVal => !toBeRemoved.some(remVal => isMatch(originalVal, remVal, { | ||
caseSensitive: true | ||
@@ -124,6 +124,6 @@ }))); | ||
} | ||
if (objKey && opts.ignoreKeys.some(oneOfKeysToIgnore => matcher.isMatch(objKey, oneOfKeysToIgnore))) { | ||
if (objKey && opts.ignoreKeys.some(oneOfKeysToIgnore => isMatch(objKey, oneOfKeysToIgnore))) { | ||
return current; | ||
} | ||
if (opts.ignorePaths.some(oneOfPathsToIgnore => matcher.isMatch(innerObj.path, oneOfPathsToIgnore))) { | ||
if (opts.ignorePaths.some(oneOfPathsToIgnore => isMatch(innerObj.path, oneOfPathsToIgnore))) { | ||
return current; | ||
@@ -130,0 +130,0 @@ } |
/** | ||
* @name check-types-mini | ||
* @fileoverview Validate options object | ||
* @version 7.0.2 | ||
* @version 7.0.3 | ||
* @author Roy Revelt, Codsen Ltd | ||
@@ -10,7 +10,7 @@ * @license MIT | ||
!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]",T="[object Uint8ClampedArray]",k="[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[T]=M[k]=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 Tt(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){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 T:case k: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 kt);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},Tt.prototype.clear=function(){this.__data__={hash:new At,map:new(yt||St),string:new At}},Tt.prototype.delete=function(t){return Ct(this,t).delete(t)},Tt.prototype.get=function(t){return Ct(this,t).get(t)},Tt.prototype.has=function(t){return Ct(this,t).has(t)},Tt.prototype.set=function(t,e){return Ct(this,t).set(t,e),this},kt.prototype.clear=function(){this.__data__=new St},kt.prototype.delete=function(t){return this.__data__.delete(t)},kt.prototype.get=function(t){return this.__data__.get(t)},kt.prototype.has=function(t){return this.__data__.has(t)},kt.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 Tt(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}; | ||
!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}; | ||
/** | ||
* @name ast-monkey-util | ||
* @fileoverview Utility library of AST helper functions | ||
* @version 2.0.2 | ||
* @version 2.0.3 | ||
* @author Roy Revelt, Codsen Ltd | ||
@@ -23,14 +23,14 @@ * @license MIT | ||
* @fileoverview Utility library to traverse AST | ||
* @version 3.0.2 | ||
* @version 3.0.3 | ||
* @author Roy Revelt, Codsen Ltd | ||
* @license MIT | ||
* {@link https://codsen.com/os/ast-monkey-traverse/} | ||
*/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,T="object"==typeof e&&e&&e.Object===Object&&e||S||Function("return this")();function k(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=T["__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(T,"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,k(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; | ||
*/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; | ||
/** | ||
* @name arrayiffy-if-string | ||
* @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else. | ||
* @version 4.0.2 | ||
* @version 4.0.3 | ||
* @author Roy Revelt, Codsen Ltd | ||
* @license MIT | ||
* {@link https://codsen.com/os/arrayiffy-if-string/} | ||
*/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,lt={exports:{}};const yt=t=>{if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},ht=new Map;function gt(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}))}function dt(t,e){e={caseSensitive:!1,...e};const r=t+JSON.stringify(e);if(ht.has(r))return ht.get(r);const n="!"===t[0];n&&(t=t.slice(1)),t=yt(t).replace(/\\\*/g,"[\\s\\S]*");const o=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return o.negated=n,ht.set(r,o),o}lt.exports=(t,e,r)=>{if(t=gt(t,"inputs"),0===(e=gt(e,"patterns")).length)return[];const n="!"===e[0][0];e=e.map((t=>dt(t,r)));const o=[];for(const r of t){let t=n;for(const n of e)n.test(r)&&(t=!n.negated);t&&o.push(r)}return o},lt.exports.isMatch=(t,e,r)=>(t=gt(t,"inputs"),0!==(e=gt(e,"patterns")).length&&t.some((t=>e.every((e=>{const n=dt(e,r),o=n.test(t);return n.negated?!o:o})))));var bt=lt.exports;const vt={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=>bt.isMatch(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={...vt,...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=>bt.isMatch(l,t))))return s;if(f.ignorePaths.some((t=>bt.isMatch(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})})); | ||
*/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})})); |
{ | ||
"name": "check-types-mini", | ||
"version": "7.0.2", | ||
"version": "7.0.3", | ||
"description": "Validate options object", | ||
@@ -39,7 +39,9 @@ "keywords": [ | ||
"build": "rollup -c", | ||
"esbuild": "node '../../scripts/esbuild.js'", | ||
"esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'", | ||
"ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov", | ||
"clean_cov": "../../scripts/leaveCoverageTotalOnly.js", | ||
"clean_types": "../../scripts/cleanTypes.js", | ||
"dev": "rollup -c --dev", | ||
"devunittest": "npm run dev && tap --only -R 'base'", | ||
"esbuild": "node '../../scripts/esbuild.js'", | ||
"esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'", | ||
"format": "npm run lect && npm run prettier && npm run lint", | ||
@@ -52,9 +54,7 @@ "lect": "lect", | ||
"tap": "tap", | ||
"tsc": "tsc", | ||
"pretest": "npm run build", | ||
"test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format", | ||
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier", | ||
"unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf", | ||
"clean_cov": "../../scripts/leaveCoverageTotalOnly.js", | ||
"clean_types": "../../scripts/cleanTypes.js" | ||
"tsc": "tsc", | ||
"unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf" | ||
}, | ||
@@ -89,41 +89,41 @@ "tap": { | ||
"dependencies": { | ||
"@babel/runtime": "^7.15.4", | ||
"arrayiffy-if-string": "^4.0.2", | ||
"ast-monkey-traverse": "^3.0.2", | ||
"@babel/runtime": "^7.16.0", | ||
"arrayiffy-if-string": "^4.0.3", | ||
"ast-monkey-traverse": "^3.0.3", | ||
"lodash.intersection": "^4.4.0", | ||
"lodash.pullall": "^4.2.0", | ||
"matcher": "^4.0.0", | ||
"object-path": "^0.11.7", | ||
"matcher": "^5.0.0", | ||
"object-path": "^0.11.8", | ||
"type-detect": "^4.0.8" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.15.4", | ||
"@babel/core": "^7.15.5", | ||
"@babel/node": "^7.15.4", | ||
"@babel/plugin-external-helpers": "^7.14.5", | ||
"@babel/plugin-proposal-class-properties": "^7.14.5", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.15.6", | ||
"@babel/plugin-proposal-optional-chaining": "^7.14.5", | ||
"@babel/plugin-transform-runtime": "^7.15.0", | ||
"@babel/preset-env": "^7.15.6", | ||
"@babel/preset-typescript": "^7.15.0", | ||
"@babel/register": "^7.15.3", | ||
"@babel/cli": "^7.16.0", | ||
"@babel/core": "^7.16.0", | ||
"@babel/node": "^7.16.0", | ||
"@babel/plugin-external-helpers": "^7.16.0", | ||
"@babel/plugin-proposal-class-properties": "^7.16.0", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.16.0", | ||
"@babel/plugin-proposal-optional-chaining": "^7.16.0", | ||
"@babel/plugin-transform-runtime": "^7.16.0", | ||
"@babel/preset-env": "^7.16.0", | ||
"@babel/preset-typescript": "^7.16.0", | ||
"@babel/register": "^7.16.0", | ||
"@istanbuljs/esm-loader-hook": "^0.1.2", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^20.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.0.6", | ||
"@rollup/plugin-strip": "^2.1.0", | ||
"@rollup/plugin-typescript": "^8.2.5", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@types/lodash.intersection": "^4.4.6", | ||
"@types/lodash.pullall": "^4.2.6", | ||
"@types/node": "^16.9.1", | ||
"@types/node": "^16.11.6", | ||
"@types/tap": "^15.0.5", | ||
"@typescript-eslint/eslint-plugin": "^4.31.0", | ||
"@typescript-eslint/parser": "^4.31.0", | ||
"core-js": "^3.17.3", | ||
"@typescript-eslint/eslint-plugin": "^5.2.0", | ||
"@typescript-eslint/parser": "^5.2.0", | ||
"core-js": "^3.19.0", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^7.32.0", | ||
"lect": "^0.18.2", | ||
"rollup": "^2.56.3", | ||
"eslint": "^8.1.0", | ||
"lect": "^0.18.3", | ||
"rollup": "^2.59.0", | ||
"rollup-plugin-ascii": "^0.0.3", | ||
@@ -134,5 +134,5 @@ "rollup-plugin-banner": "^0.2.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"tap": "^15.0.9", | ||
"tap": "^15.0.10", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.4.3" | ||
"typescript": "^4.4.4" | ||
}, | ||
@@ -139,0 +139,0 @@ "engines": { |
59250
+ Addedescape-string-regexp@5.0.0(transitive)
+ Addedmatcher@5.0.0(transitive)
- Removedescape-string-regexp@4.0.0(transitive)
- Removedmatcher@4.0.0(transitive)
Updated@babel/runtime@^7.16.0
Updatedarrayiffy-if-string@^4.0.3
Updatedast-monkey-traverse@^3.0.3
Updatedmatcher@^5.0.0
Updatedobject-path@^0.11.8