UNPKG

34.5 kBJavaScriptView Raw
1module.exports=function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r.w={},r(r.s=4)}([function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=r(7),o=r(6),s=r(25);t.validatorSymbol=Symbol("validators");t.Predicate=class{constructor(e,t={validators:[]}){this.context=t,this.addValidator({message:t=>`Expected argument to be of type \`${e}\` but received type \`${n.default(t)}\``,validator:t=>n.default[e](t)})}[o.testSymbol](e,t){for(const{validator:r,message:a}of this.context.validators){const n=r(e);if("boolean"!=typeof n||!n)throw new i.ArgumentError(a(e,n),t)}}get[t.validatorSymbol](){return this.context.validators}get not(){return s.not(this)}is(e){return this.addValidator({message:(e,t)=>t||`Expected \`${e}\` to pass custom validation function`,validator:t=>e(t)})}addValidator(e){return this.context.validators.push(e),this}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=((e,t,r=5)=>{const a=[];for(const n of t)if(!e.has(n)&&(a.push(n),a.length===r))return a;return 0===a.length||a})},function(e,t,r){(function(e){var r=200,a="__lodash_hash_undefined__",n=1,i=2,o=9007199254740991,s="[object Arguments]",u="[object Array]",d="[object AsyncFunction]",l="[object Boolean]",c="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",h="[object Map]",y="[object Number]",m="[object Null]",v="[object Object]",_="[object Proxy]",b="[object RegExp]",O="[object Set]",x="[object String]",E="[object Symbol]",j="[object Undefined]",$="[object ArrayBuffer]",P="[object DataView]",w=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[s]=S[u]=S[$]=S[l]=S[P]=S[c]=S[f]=S[p]=S[h]=S[y]=S[v]=S[b]=S[O]=S[x]=S["[object WeakMap]"]=!1;var V="object"==typeof global&&global&&global.Object===Object&&global,M="object"==typeof self&&self&&self.Object===Object&&self,z=V||M||Function("return this")(),k="object"==typeof t&&t&&!t.nodeType&&t,N=k&&"object"==typeof e&&e&&!e.nodeType&&e,J=N&&N.exports===k,T=J&&V.process,I=function(){try{return T&&T.binding&&T.binding("util")}catch(e){}}(),U=I&&I.isTypedArray;function W(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e,a){r[++t]=[a,e]}),r}function D(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var q,F,L,R=Array.prototype,C=Function.prototype,K=Object.prototype,G=z["__core-js_shared__"],H=C.toString,Q=K.hasOwnProperty,X=(q=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Y=K.toString,Z=RegExp("^"+H.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=J?z.Buffer:void 0,te=z.Symbol,re=z.Uint8Array,ae=K.propertyIsEnumerable,ne=R.splice,ie=te?te.toStringTag:void 0,oe=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,ue=(F=Object.keys,L=Object,function(e){return F(L(e))}),de=Ie(z,"DataView"),le=Ie(z,"Map"),ce=Ie(z,"Promise"),fe=Ie(z,"Set"),pe=Ie(z,"WeakMap"),ge=Ie(Object,"create"),he=De(de),ye=De(le),me=De(ce),ve=De(fe),_e=De(pe),be=te?te.prototype:void 0,Oe=be?be.valueOf:void 0;function xe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function Ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function je(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function $e(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new je;++t<r;)this.add(e[t])}function Pe(e){var t=this.__data__=new Ee(e);this.size=t.size}function we(e,t){var r=Le(e),a=!r&&Fe(e),n=!r&&!a&&Re(e),i=!r&&!a&&!n&&Qe(e),o=r||a||n||i,s=o?function(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}(e.length,String):[],u=s.length;for(var d in e)!t&&!Q.call(e,d)||o&&("length"==d||n&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Be(d,u))||s.push(d);return s}function Ae(e,t){for(var r=e.length;r--;)if(qe(e[r][0],t))return r;return-1}function Se(e){return null==e?void 0===e?j:m:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),r=e[ie];try{e[ie]=void 0;var a=!0}catch(e){}var n=Y.call(e);a&&(t?e[ie]=r:delete e[ie]);return n}(e):function(e){return Y.call(e)}(e)}function Ve(e){return He(e)&&Se(e)==s}function Me(e,t,r,a,o){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!=e&&t!=t:function(e,t,r,a,o,d){var p=Le(e),g=Le(t),m=p?u:We(e),_=g?u:We(t),j=(m=m==s?v:m)==v,w=(_=_==s?v:_)==v,A=m==_;if(A&&Re(e)){if(!Re(t))return!1;p=!0,j=!1}if(A&&!j)return d||(d=new Pe),p||Qe(e)?Ne(e,t,r,a,o,d):function(e,t,r,a,o,s,u){switch(r){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case l:case c:case y:return qe(+e,+t);case f:return e.name==t.name&&e.message==t.message;case b:case x:return e==t+"";case h:var d=B;case O:var p=a&n;if(d||(d=D),e.size!=t.size&&!p)return!1;var g=u.get(e);if(g)return g==t;a|=i,u.set(e,t);var m=Ne(d(e),d(t),a,o,s,u);return u.delete(e),m;case E:if(Oe)return Oe.call(e)==Oe.call(t)}return!1}(e,t,m,r,a,o,d);if(!(r&n)){var S=j&&Q.call(e,"__wrapped__"),V=w&&Q.call(t,"__wrapped__");if(S||V){var M=S?e.value():e,z=V?t.value():t;return d||(d=new Pe),o(M,z,r,a,d)}}if(!A)return!1;return d||(d=new Pe),function(e,t,r,a,i,o){var s=r&n,u=Je(e),d=u.length,l=Je(t).length;if(d!=l&&!s)return!1;for(var c=d;c--;){var f=u[c];if(!(s?f in t:Q.call(t,f)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var g=!0;o.set(e,t),o.set(t,e);for(var h=s;++c<d;){f=u[c];var y=e[f],m=t[f];if(a)var v=s?a(m,y,f,t,e,o):a(y,m,f,e,t,o);if(!(void 0===v?y===m||i(y,m,r,a,o):v)){g=!1;break}h||(h="constructor"==f)}if(g&&!h){var _=e.constructor,b=t.constructor;_!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(g=!1)}return o.delete(e),o.delete(t),g}(e,t,r,a,o,d)}(e,t,r,a,Me,o))}function ze(e){return!(!Ge(e)||X&&X in e)&&(Ce(e)?Z:w).test(De(e))}function ke(e){if(r=(t=e)&&t.constructor,a="function"==typeof r&&r.prototype||K,t!==a)return ue(e);var t,r,a,n=[];for(var i in Object(e))Q.call(e,i)&&"constructor"!=i&&n.push(i);return n}function Ne(e,t,r,a,o,s){var u=r&n,d=e.length,l=t.length;if(d!=l&&!(u&&l>d))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var f=-1,p=!0,g=r&i?new $e:void 0;for(s.set(e,t),s.set(t,e);++f<d;){var h=e[f],y=t[f];if(a)var m=u?a(y,h,f,t,e,s):a(h,y,f,e,t,s);if(void 0!==m){if(m)continue;p=!1;break}if(g){if(!W(t,function(e,t){if(n=t,!g.has(n)&&(h===e||o(h,e,r,a,s)))return g.push(t);var n})){p=!1;break}}else if(h!==y&&!o(h,y,r,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Je(e){return function(e,t,r){var a=t(e);return Le(e)?a:function(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}(a,r(e))}(e,Xe,Ue)}function Te(e,t){var r,a,n=e.__data__;return("string"==(a=typeof(r=t))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==r:null===r)?n["string"==typeof t?"string":"hash"]:n.map}function Ie(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ze(r)?r:void 0}xe.prototype.clear=function(){this.__data__=ge?ge(null):{},this.size=0},xe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xe.prototype.get=function(e){var t=this.__data__;if(ge){var r=t[e];return r===a?void 0:r}return Q.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return ge?void 0!==t[e]:Q.call(t,e)},xe.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ge&&void 0===t?a:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,r=Ae(t,e);return!(r<0||(r==t.length-1?t.pop():ne.call(t,r,1),--this.size,0))},Ee.prototype.get=function(e){var t=this.__data__,r=Ae(t,e);return r<0?void 0:t[r][1]},Ee.prototype.has=function(e){return Ae(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var r=this.__data__,a=Ae(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this},je.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(le||Ee),string:new xe}},je.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},je.prototype.get=function(e){return Te(this,e).get(e)},je.prototype.has=function(e){return Te(this,e).has(e)},je.prototype.set=function(e,t){var r=Te(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this},$e.prototype.add=$e.prototype.push=function(e){return this.__data__.set(e,a),this},$e.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Pe.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var a=this.__data__;if(a instanceof Ee){var n=a.__data__;if(!le||n.length<r-1)return n.push([e,t]),this.size=++a.size,this;a=this.__data__=new je(n)}return a.set(e,t),this.size=a.size,this};var Ue=oe?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,a=null==e?0:e.length,n=0,i=[];++r<a;){var o=e[r];t(o,r,e)&&(i[n++]=o)}return i}(oe(e),function(t){return ae.call(e,t)}))}:function(){return[]},We=Se;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function De(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qe(e,t){return e===t||e!=e&&t!=t}(de&&We(new de(new ArrayBuffer(1)))!=P||le&&We(new le)!=h||ce&&"[object Promise]"!=We(ce.resolve())||fe&&We(new fe)!=O||pe&&"[object WeakMap]"!=We(new pe))&&(We=function(e){var t=Se(e),r=t==v?e.constructor:void 0,a=r?De(r):"";if(a)switch(a){case he:return P;case ye:return h;case me:return"[object Promise]";case ve:return O;case _e:return"[object WeakMap]"}return t});var Fe=Ve(function(){return arguments}())?Ve:function(e){return He(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},Le=Array.isArray;var Re=se||function(){return!1};function Ce(e){if(!Ge(e))return!1;var t=Se(e);return t==p||t==g||t==d||t==_}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Ge(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var Qe=U?function(e){return function(t){return e(t)}}(U):function(e){return He(e)&&Ke(e.length)&&!!S[Se(e)]};function Xe(e){return null!=(t=e)&&Ke(t.length)&&!Ce(t)?we(e):ke(e);var t}e.exports=function(e,t){return Me(e,t)}}).call(this,r(18)(e))},function(e,t,r){"use strict";var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(26)),i=Object.prototype.toString,o=e=>t=>typeof t===e,s=e=>{const t=i.call(e).slice(8,-1);return t||null},u=e=>t=>s(t)===e;function d(e){if(null===e)return"null";if(!0===e||!1===e)return"boolean";const t=typeof e;if("undefined"===t)return"undefined";if("string"===t)return"string";if("number"===t)return"number";if("symbol"===t)return"symbol";if(d.function_(e))return"Function";if(Array.isArray(e))return"Array";if(Buffer.isBuffer(e))return"Buffer";const r=s(e);if(r)return r;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}!function(e){const t=e=>"object"==typeof e;e.undefined=o("undefined"),e.string=o("string"),e.number=o("number"),e.function_=o("function"),e.null_=(e=>null===e),e.class_=(t=>e.function_(t)&&t.toString().startsWith("class ")),e.boolean=(e=>!0===e||!1===e),e.symbol=o("symbol"),e.array=Array.isArray,e.buffer=Buffer.isBuffer,e.nullOrUndefined=(t=>e.null_(t)||e.undefined(t)),e.object=(r=>!e.nullOrUndefined(r)&&(e.function_(r)||t(r))),e.iterable=(t=>!e.nullOrUndefined(t)&&e.function_(t[Symbol.iterator])),e.generator=(t=>e.iterable(t)&&e.function_(t.next)&&e.function_(t.throw)),e.nativePromise=u("Promise");e.promise=(r=>e.nativePromise(r)||(r=>!e.null_(r)&&t(r)&&e.function_(r.then)&&e.function_(r.catch))(r));const r=e=>u(e);e.generatorFunction=r("GeneratorFunction"),e.asyncFunction=r("AsyncFunction"),e.boundFunction=(t=>e.function_(t)&&!t.hasOwnProperty("prototype")),e.regExp=u("RegExp"),e.date=u("Date"),e.error=u("Error"),e.map=u("Map"),e.set=u("Set"),e.weakMap=u("WeakMap"),e.weakSet=u("WeakSet"),e.int8Array=u("Int8Array"),e.uint8Array=u("Uint8Array"),e.uint8ClampedArray=u("Uint8ClampedArray"),e.int16Array=u("Int16Array"),e.uint16Array=u("Uint16Array"),e.int32Array=u("Int32Array"),e.uint32Array=u("Uint32Array"),e.float32Array=u("Float32Array"),e.float64Array=u("Float64Array"),e.arrayBuffer=u("ArrayBuffer"),e.sharedArrayBuffer=u("SharedArrayBuffer"),e.dataView=u("DataView"),e.directInstanceOf=((e,t)=>Object.getPrototypeOf(e)===t.prototype),e.truthy=(e=>Boolean(e)),e.falsy=(e=>!e),e.nan=(e=>Number.isNaN(e));const a=new Set(["undefined","string","number","boolean","symbol"]);e.primitive=(t=>e.null_(t)||a.has(typeof t)),e.integer=(e=>Number.isInteger(e)),e.safeInteger=(e=>Number.isSafeInteger(e)),e.plainObject=(e=>{let t;return"Object"===s(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))});const i=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"]);e.typedArray=(e=>{const t=s(e);return null!==t&&i.has(t)});e.arrayLike=(t=>!e.nullOrUndefined(t)&&!e.function_(t)&&(t=>e.safeInteger(t)&&t>-1)(t.length)),e.inRange=((t,r)=>{if(e.number(r))return t>=Math.min(0,r)&&t<=Math.max(r,0);if(e.array(r)&&2===r.length)return t>=Math.min(...r)&&t<=Math.max(...r);throw new TypeError(`Invalid range: ${n.inspect(r)}`)});const d=["innerHTML","ownerDocument","style","attributes","nodeValue"];e.domElement=(t=>e.object(t)&&1===t.nodeType&&e.string(t.nodeName)&&!e.plainObject(t)&&d.every(e=>e in t)),e.nodeStream=(r=>!e.nullOrUndefined(r)&&t(r)&&e.function_(r.pipe)),e.infinite=(e=>e===1/0||e===-1/0);const l=t=>r=>e.integer(r)&&Math.abs(r%2)===t;e.even=l(0),e.odd=l(1);e.empty=(t=>e.falsy(t)||(t=>(e.string(t)||e.array(t))&&0===t.length)(t)||(t=>!e.map(t)&&!e.set(t)&&e.object(t)&&0===Object.keys(t).length)(t)||(t=>(e.map(t)||e.set(t))&&0===t.size)(t)),e.emptyOrWhitespace=(t=>e.empty(t)||(t=>e.string(t)&&!1===/\S/.test(t))(t));const c=(t,r,a)=>{if(!1===e.function_(r))throw new TypeError(`Invalid predicate: ${n.inspect(r)}`);if(0===a.length)throw new TypeError("Invalid number of values");return t.call(a,r)};e.any=((e,...t)=>c(Array.prototype.some,e,t)),e.all=((e,...t)=>c(Array.prototype.every,e,t))}(d||(d={})),Object.defineProperties(d,{class:{value:d.class_},function:{value:d.function_},null:{value:d.null_}}),t.default=d,e.exports=d,e.exports.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0),n=r(24),i=r(6),o=r(23),s=r(21),u=r(20),d=r(19),l=r(17),c=r(13),f=r(12),p=r(11),g=r(10),h=r(9),y=r(8),m=(e,t)=>t[i.testSymbol](e,m);Object.defineProperties(m,{create:{value:e=>t=>m(t,e)},any:{value:(...e)=>new n.AnyPredicate(e)},string:{get:()=>new o.StringPredicate},number:{get:()=>new s.NumberPredicate},boolean:{get:()=>new u.BooleanPredicate},undefined:{get:()=>new a.Predicate("undefined")},null:{get:()=>new a.Predicate("null")},nullOrUndefined:{get:()=>new a.Predicate("nullOrUndefined")},nan:{get:()=>new a.Predicate("nan")},symbol:{get:()=>new a.Predicate("symbol")},array:{get:()=>new d.ArrayPredicate},object:{get:()=>new l.ObjectPredicate},date:{get:()=>new c.DatePredicate},error:{get:()=>new f.ErrorPredicate},map:{get:()=>new p.MapPredicate},weakMap:{get:()=>new g.WeakMapPredicate},set:{get:()=>new h.SetPredicate},weakSet:{get:()=>new y.WeakSetPredicate},function:{get:()=>new a.Predicate("function")},buffer:{get:()=>new a.Predicate("buffer")},regExp:{get:()=>new a.Predicate("regExp")},promise:{get:()=>new a.Predicate("promise")},typedArray:{get:()=>new a.Predicate("typedArray")},int8Array:{get:()=>new a.Predicate("int8Array")},uint8Array:{get:()=>new a.Predicate("uint8Array")},uint8ClampedArray:{get:()=>new a.Predicate("uint8ClampedArray")},int16Array:{get:()=>new a.Predicate("int16Array")},uint16Array:{get:()=>new a.Predicate("uint16Array")},int32Array:{get:()=>new a.Predicate("int32Array")},uint32Array:{get:()=>new a.Predicate("uint32Array")},float32Array:{get:()=>new a.Predicate("float32Array")},float64Array:{get:()=>new a.Predicate("float64Array")},arrayBuffer:{get:()=>new a.Predicate("arrayBuffer")},dataView:{get:()=>new a.Predicate("dataView")},iterable:{get:()=>new a.Predicate("iterable")}}),t.default=m},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(4));t.default=((e,t)=>{try{for(const r of e)n.default(r,t);return!0}catch(e){return e.message}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testSymbol=Symbol("test")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ArgumentError=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,t),this.name="ArgumentError"}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),i=a(r(1));t.WeakSetPredicate=class extends n.Predicate{constructor(e){super("weakSet",e)}has(...e){return this.addValidator({message:(e,t)=>`Expected WeakSet to have items \`${JSON.stringify(t)}\``,validator:t=>i.default(t,e)})}hasAny(...e){return this.addValidator({message:()=>`Expected WeakSet to have any item of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(2),i=r(0),o=a(r(1)),s=a(r(5));t.SetPredicate=class extends i.Predicate{constructor(e){super("set",e)}size(e){return this.addValidator({message:t=>`Expected Set to have size \`${e}\`, got \`${t.size}\``,validator:t=>t.size===e})}minSize(e){return this.addValidator({message:t=>`Expected Set to have a minimum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size>=e})}maxSize(e){return this.addValidator({message:t=>`Expected Set to have a maximum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size<=e})}has(...e){return this.addValidator({message:(e,t)=>`Expected Set to have items \`${JSON.stringify(t)}\``,validator:t=>o.default(t,e)})}hasAny(...e){return this.addValidator({message:()=>`Expected Set to have any item of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}ofType(e){return this.addValidator({message:(e,t)=>t,validator:t=>s.default(t,e)})}get empty(){return this.addValidator({message:e=>`Expected Set to be empty, got \`${JSON.stringify(Array.from(e))}\``,validator:e=>0===e.size})}get nonEmpty(){return this.addValidator({message:()=>"Expected Set to not be empty",validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:t=>`Expected Set to be deeply equal to \`${JSON.stringify(Array.from(e))}\`, got \`${JSON.stringify(Array.from(t))}\``,validator:t=>n(t,e)})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),i=a(r(1));t.WeakMapPredicate=class extends n.Predicate{constructor(e){super("weakMap",e)}hasKeys(...e){return this.addValidator({message:(e,t)=>`Expected WeakMap to have keys \`${JSON.stringify(t)}\``,validator:t=>i.default(t,e)})}hasAnyKeys(...e){return this.addValidator({message:()=>`Expected WeakMap to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(2),i=r(0),o=a(r(1)),s=a(r(5));t.MapPredicate=class extends i.Predicate{constructor(e){super("map",e)}size(e){return this.addValidator({message:t=>`Expected Map to have size \`${e}\`, got \`${t.size}\``,validator:t=>t.size===e})}minSize(e){return this.addValidator({message:t=>`Expected Map to have a minimum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size>=e})}maxSize(e){return this.addValidator({message:t=>`Expected Map to have a maximum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size<=e})}hasKeys(...e){return this.addValidator({message:(e,t)=>`Expected Map to have keys \`${JSON.stringify(t)}\``,validator:t=>o.default(t,e)})}hasAnyKeys(...e){return this.addValidator({message:()=>`Expected Map to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}hasValues(...e){return this.addValidator({message:(e,t)=>`Expected Map to have values \`${JSON.stringify(t)}\``,validator:t=>o.default(new Set(t.values()),e)})}hasAnyValues(...e){return this.addValidator({message:()=>`Expected Map to have any value of \`${JSON.stringify(e)}\``,validator:t=>{const r=new Set(t.values());return e.some(e=>r.has(e))}})}keysOfType(e){return this.addValidator({message:(e,t)=>t,validator:t=>s.default(t.keys(),e)})}valuesOfType(e){return this.addValidator({message:(e,t)=>t,validator:t=>s.default(t.values(),e)})}get empty(){return this.addValidator({message:e=>`Expected Map to be empty, got \`${JSON.stringify(Array.from(e))}\``,validator:e=>0===e.size})}get nonEmpty(){return this.addValidator({message:()=>"Expected Map to not be empty",validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:t=>`Expected Map to be deeply equal to \`${JSON.stringify(Array.from(e))}\`, got \`${JSON.stringify(Array.from(t))}\``,validator:t=>n(t,e)})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.ErrorPredicate=class extends a.Predicate{constructor(e){super("error",e)}name(e){return this.addValidator({message:t=>`Expected error to have name \`${e}\`, got \`${t.name}\``,validator:t=>t.name===e})}message(e){return this.addValidator({message:t=>`Expected error message to be \`${e}\`, got \`${t.message}\``,validator:t=>t.message===e})}messageIncludes(e){return this.addValidator({message:t=>`Expected error message to include \`${e}\`, got \`${t.message}\``,validator:t=>t.message.includes(e)})}hasKeys(...e){return this.addValidator({message:()=>`Expected error message to have keys \`${e.join("`, `")}\``,validator:t=>e.every(e=>t.hasOwnProperty(e))})}instanceOf(e){return this.addValidator({message:t=>`Expected \`${t.name}\` to be of type \`${e.name}\``,validator:t=>t instanceof e})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.DatePredicate=class extends a.Predicate{constructor(e){super("date",e)}before(e){return this.addValidator({message:t=>`Expected ${t.toISOString()} to be before ${e.toISOString()}`,validator:t=>t.getTime()<e.getTime()})}after(e){return this.addValidator({message:t=>`Expected ${t.toISOString()} to be after ${e.toISOString()}`,validator:t=>t.getTime()>e.getTime()})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=a(r(4)),o=(e,t)=>n.default.plainObject(e)?Object.keys(e).every(r=>o(e[r],t)):(i.default(e,t),!0);t.default=((e,t)=>{try{return o(e,t)}catch(e){return e.message}})},function(e,t,r){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},function(e,t,r){"use strict";const a=r(15);function n(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let a=t[e];for(;"\\"===a[a.length-1]&&void 0!==t[e+1];)a=a.slice(0,-1)+".",a+=t[++e];r.push(a)}return r}e.exports={get(e,t,r){if(!a(e)||"string"!=typeof t)return void 0===r?e:r;const i=n(t);for(let t=0;t<i.length;t++){if(!Object.prototype.propertyIsEnumerable.call(e,i[t]))return r;if(void 0===(e=e[i[t]])||null===e){if(t!==i.length-1)return r;break}}return e},set(e,t,r){if(!a(e)||"string"!=typeof t)return e;const i=e,o=n(t);for(let t=0;t<o.length;t++){const n=o[t];a(e[n])||(e[n]={}),t===o.length-1&&(e[n]=r),e=e[n]}return i},delete(e,t){if(!a(e)||"string"!=typeof t)return;const r=n(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return void delete e[n];if(e=e[n],!a(e))return}},has(e,t){if(!a(e)||"string"!=typeof t)return!1;const r=n(t);for(let t=0;t<r.length;t++){if(!a(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const i=a(r(3)),o=n(r(16)),s=r(2),u=r(0),d=a(r(1)),l=a(r(5)),c=a(r(14));t.ObjectPredicate=class extends u.Predicate{constructor(e){super("object",e)}get plain(){return this.addValidator({message:()=>"Expected object to be a plain object",validator:e=>i.default.plainObject(e)})}get empty(){return this.addValidator({message:e=>`Expected object to be empty, got \`${JSON.stringify(e)}\``,validator:e=>0===Object.keys(e).length})}get nonEmpty(){return this.addValidator({message:()=>"Expected object to not be empty",validator:e=>Object.keys(e).length>0})}valuesOfType(e){return this.addValidator({message:(e,t)=>t,validator:t=>{const r=Object.keys(t).map(e=>t[e]);return l.default(r,e)}})}deepValuesOfType(e){return this.addValidator({message:(e,t)=>t,validator:t=>c.default(t,e)})}deepEqual(e){return this.addValidator({message:t=>`Expected object to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>s(t,e)})}instanceOf(e){return this.addValidator({message:t=>{let r=t.constructor.name;return r&&"Object"!==r||(r=JSON.stringify(t)),`Expected \`${r}\` to be of type \`${e.name}\``},validator:t=>t instanceof e})}hasKeys(...e){return this.addValidator({message:(e,t)=>`Expected object to have keys \`${JSON.stringify(t)}\``,validator:t=>d.default({has:e=>o.has(t,e)},e)})}hasAnyKeys(...e){return this.addValidator({message:()=>`Expected object to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>o.has(t,e))})}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(2),i=a(r(4)),o=r(0);t.ArrayPredicate=class extends o.Predicate{constructor(e){super("array",e)}length(e){return this.addValidator({message:t=>`Expected array to have length \`${e}\`, got \`${t.length}\``,validator:t=>t.length===e})}minLength(e){return this.addValidator({message:t=>`Expected array to have a minimum length of \`${e}\`, got \`${t.length}\``,validator:t=>t.length>=e})}maxLength(e){return this.addValidator({message:t=>`Expected array to have a maximum length of \`${e}\`, got \`${t.length}\``,validator:t=>t.length<=e})}startsWith(e){return this.addValidator({message:t=>`Expected array to start with \`${e}\`, got \`${t[0]}\``,validator:t=>t[0]===e})}endsWith(e){return this.addValidator({message:t=>`Expected array to end with \`${e}\`, got \`${t[t.length-1]}\``,validator:t=>t[t.length-1]===e})}includes(...e){return this.addValidator({message:t=>`Expected array to include all elements of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>e.every(e=>-1!==t.indexOf(e))})}includesAny(...e){return this.addValidator({message:t=>`Expected array to include any element of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>e.some(e=>-1!==t.indexOf(e))})}get empty(){return this.addValidator({message:e=>`Expected array to be empty, got \`${JSON.stringify(e)}\``,validator:e=>0===e.length})}get nonEmpty(){return this.addValidator({message:()=>"Expected array to not be empty",validator:e=>e.length>0})}deepEqual(e){return this.addValidator({message:t=>`Expected array to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>n(t,e)})}ofType(e){let t;return this.addValidator({message:()=>t,validator:r=>{try{for(const t of r)i.default(t,e);return!0}catch(e){return t=e.message,!1}}})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.BooleanPredicate=class extends a.Predicate{constructor(e){super("boolean",e)}get true(){return this.addValidator({message:e=>`Expected ${e} to be true`,validator:e=>!0===e})}get false(){return this.addValidator({message:e=>`Expected ${e} to be false`,validator:e=>!1===e})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=r(0);t.NumberPredicate=class extends i.Predicate{constructor(e){super("number",e)}inRange(e,t){return this.addValidator({message:r=>`Expected ${r} to be in range [${e}..${t}]`,validator:r=>n.default.inRange(r,[e,t])})}greaterThan(e){return this.addValidator({message:t=>`Expected ${t} to be greater than ${e}`,validator:t=>t>e})}greaterThanOrEqual(e){return this.addValidator({message:t=>`Expected ${t} to be greater than or equal to ${e}`,validator:t=>t>=e})}lessThan(e){return this.addValidator({message:t=>`Expected ${t} to be less than ${e}`,validator:t=>t<e})}lessThanOrEqual(e){return this.addValidator({message:t=>`Expected ${t} to be less than or equal to ${e}`,validator:t=>t<=e})}equal(e){return this.addValidator({message:t=>`Expected ${t} to be equal to ${e}`,validator:t=>t===e})}get integer(){return this.addValidator({message:e=>`Expected ${e} to be an integer`,validator:e=>n.default.integer(e)})}get finite(){return this.addValidator({message:e=>`Expected ${e} to be finite`,validator:e=>!n.default.infinite(e)})}get infinite(){return this.addValidator({message:e=>`Expected ${e} to be infinite`,validator:e=>n.default.infinite(e)})}get positive(){return this.addValidator({message:e=>`Expected ${e} to be positive`,validator:e=>e>0})}get negative(){return this.addValidator({message:e=>`Expected ${e} to be negative`,validator:e=>e<0})}}},function(e,t,r){"use strict";e.exports=function(e){return!isNaN(Date.parse(e))}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(22)),i=r(0);t.StringPredicate=class extends i.Predicate{constructor(e){super("string",e)}length(e){return this.addValidator({message:t=>`Expected string to have length \`${e}\`, got \`${t}\``,validator:t=>t.length===e})}minLength(e){return this.addValidator({message:t=>`Expected string to have a minimum length of \`${e}\`, got \`${t}\``,validator:t=>t.length>=e})}maxLength(e){return this.addValidator({message:t=>`Expected string to have a maximum length of \`${e}\`, got \`${t}\``,validator:t=>t.length<=e})}matches(e){return this.addValidator({message:t=>`Expected string to match \`${e}\`, got \`${t}\``,validator:t=>e.test(t)})}startsWith(e){return this.addValidator({message:t=>`Expected string to start with \`${e}\`, got \`${t}\``,validator:t=>t.startsWith(e)})}endsWith(e){return this.addValidator({message:t=>`Expected string to end with \`${e}\`, got \`${t}\``,validator:t=>t.endsWith(e)})}includes(e){return this.addValidator({message:t=>`Expected string to include \`${e}\`, got \`${t}\``,validator:t=>t.includes(e)})}get empty(){return this.addValidator({message:e=>`Expected string to be empty, got \`${e}\``,validator:e=>""===e})}get nonEmpty(){return this.addValidator({message:()=>"Expected string to not be empty",validator:e=>""!==e})}equals(e){return this.addValidator({message:t=>`Expected string to be equal to \`${e}\`, got \`${t}\``,validator:t=>t===e})}get alphanumeric(){return this.addValidator({message:e=>`Expected string to be alphanumeric, got \`${e}\``,validator:e=>/^[a-z\d]+$/i.test(e)})}get numeric(){return this.addValidator({message:e=>`Expected string to be numeric, got \`${e}\``,validator:e=>/^\d+$/i.test(e)})}get date(){return this.addValidator({message:e=>`Expected string to be a date, got \`${e}\``,validator:e=>n.default(e)})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(7),n=r(6);t.AnyPredicate=class{constructor(e){this.predicates=e}[n.testSymbol](e,t){const r=["Any predicate failed with the following errors:"];for(const a of this.predicates)try{return void t(e,a)}catch(e){r.push(`- ${e.message}`)}throw new a.ArgumentError(r.join("\n"),t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.not=(e=>(e.addValidator=(t=>{const r=t.validator,n=t.message;return t.message=(e=>`[NOT] ${n(e)}`),t.validator=(e=>!r(e)),e[a.validatorSymbol].push(t),e}),e))},function(e,t){e.exports=require("util")}]);const __export__=module.exports.default;module.exports=__export__,module.exports.default=__export__;
2//# sourceMappingURL=index.js.map
\No newline at end of file