(function(c,d){typeof exports==='object'&&typeof module!=='undefined'?d(exports):typeof define==='function'&&define.amd?define(['exports'],d):d(c.R={});})(this,function(e){'use strict';function add(x,y){if(y===void 0){return g=>add(x,g);}return x+y;}function addIndex(h){return function(j,...rest){let k=0;const newFn=(...args)=>j.apply(null,[...args,k++]);return h.apply(null,[newFn,...rest]);};}function adjust(l,m,n){if(m===void 0){return(q,r)=>adjust(l,q,r);}else if(n===void 0){return s=>adjust(l,m,s);}const t=n.concat();return t.map((u,v)=>{if(v===m){return l(n[m]);}return u;});}function filterObject(w,z){const A={};for(const B in z){if(w(z[B],B)){A[B]=z[B];}}return A;}function filter(C,D){if(D===void 0){return E=>filter(C,E);}if(D.length===void 0){return filterObject(C,D);}let G=-1,H=0;const I=D.length,J=[];while(++Gall(L,N);}return filter(L,M).length===M.length;}function any(O,P){if(P===void 0){return Q=>any(O,Q);}let R=0;while(R
allPass(S,U);}return!any(V=>!V(x),S);}function anyPass(W,x){if(arguments.length===1){return X=>anyPass(W,X);}return any(Y=>Y(x))(W);}function always(x){return()=>x;}function append(x,Z){if(Z===void 0){return a1=>append(x,a1);}if(typeof Z==='string'){return`${Z}${x}`;}const b1=Z.concat();b1.push(x);return b1;}function both(x,y){if(y===void 0){return c1=>both(x,c1);}return d1=>x(d1)&&y(d1);}function complement(fn){return f1=>!fn(f1);}function compose(...fns){return(...args)=>{const g1=fns.slice();if(g1.length>0){const fn=g1.pop();let i1=fn(...args);while(g1.length>0){i1=g1.pop()(i1);}return i1;}return void 0;};}function concat(x,y){if(y===void 0){return j1=>concat(x,j1);}return typeof x==='string'?`${x}${y}`:[...x,...y];}function type(a){const k1=typeof a;if(a===null){return'Null';}else if(a===void 0){return'Undefined';}else if(k1==='boolean'){return'Boolean';}else if(k1==='number'){return'Number';}else if(k1==='string'){return'String';}else if(Array.isArray(a)){return'Array';}else if(a instanceof RegExp){return'RegExp';}const l1=a.toString();if(l1.startsWith('async')){return'Async';}else if(l1==='[object Promise]'){return'Promise';}else if(l1.includes('function')||l1.includes('=>')){return'Function';}return'Object';}function equals(a,b){if(arguments.length===1){return m1=>equals(a,m1);}if(a===b){return!0;}const n1=type(a);if(n1!==type(b)){return!1;}if(n1==='Array'){const o1=Array.from(a),p1=Array.from(b);if(o1.toString()!==p1.toString()){return!1;}let q1=!0;o1.forEach((r1,s1)=>{if(q1){if(r1!==p1[s1]&&!equals(r1,p1[s1])){q1=!1;}}});return q1;}if(n1==='Object'){const t1=Object.keys(a);if(t1.length!==Object.keys(b).length){return!1;}let u1=!0;t1.forEach(v1=>{if(u1){const w1=a[v1],x1=b[v1];if(w1!==x1&&!equals(w1,x1)){u1=!1;}}});return u1;}return!1;}function contains(x,y1){if(y1===void 0){return z1=>contains(x,z1);}let A1=-1,B1=!1;while(++A1(o=>o.length>=f.length?f(...o):curry(f,o))([...a,...p]);}var dec=x=>x-1;function defaultTo(C1,D1){if(arguments.length===1){return E1=>defaultTo(C1,E1);}return D1===void 0||D1===null||Number.isNaN(D1)===!0?C1:D1;}function omit(F1,G1){if(arguments.length===1){return H1=>omit(F1,H1);}if(G1===null||G1===void 0){return void 0;}const I1=typeof F1==='string'?F1=F1.split(','):F1,J1={};for(const K1 in G1){if(!I1.includes(K1)){J1[K1]=G1[K1];}}return J1;}function dissoc(L1,M1){if(arguments.length===1){return N1=>dissoc(L1,N1);}if(M1===null||M1===void 0){return void 0;}const O1={};for(const P1 in M1){if(P1!==`${L1}`){O1[P1]=M1[P1];}}return O1;}function divide(x,y){if(y===void 0){return Q1=>divide(x,Q1);}return x/y;}function drop(R1,x){if(x===void 0){return S1=>drop(R1,S1);}return x.slice(R1);}function dropLast(T1,x){if(x===void 0){return U1=>dropLast(T1,U1);}return x.slice(0,-T1);}function either(x,y){if(y===void 0){return V1=>either(x,V1);}return W1=>x(W1)||y(W1);}function endsWith(x,y){if(y===void 0){return X1=>endsWith(x,X1);}return y.endsWith(x);}var inc=x=>x+1;function F(){return!1;}function find(fn,Z1){if(Z1===void 0){return a2=>find(fn,a2);}return Z1.find(fn);}function findIndex(fn,c2){if(c2===void 0){return d2=>findIndex(fn,d2);}const e2=c2.length;let f2=-1;while(++f2{if(input.length===1){return j2=>fn(j2,input[0]);}else if(input.length===2){return fn(input[1],input[0]);}return void 0;};}function flip(fn,...input){return flipExport(fn);}function tap(fn,x){if(x===void 0){return m2=>tap(fn,m2);}fn(x);return x;}function mapObject(fn,o2){const p2={};for(const q2 in o2){p2[q2]=fn(o2[q2],q2);}return p2;}function map(fn,s2){if(s2===void 0){return t2=>map(fn,t2);}if(s2.length===void 0){return mapObject(fn,s2);}let u2=-1;const v2=s2.length,w2=Array(v2);while(++u2forEach(fn,z2);}return map(tap(fn),y2);}function has(A2,B2){if(B2===void 0){return C2=>has(A2,C2);}return B2[A2]!==void 0;}function head(a){if(typeof a==='string'){return a[0]||'';}return a[0];}function identity(x){return x;}function ifElse(D2,E2,F2){if(E2===void 0){return(G2,H2)=>ifElse(D2,G2,H2);}else if(F2===void 0){return I2=>ifElse(D2,E2,I2);}return J2=>{const K2=typeof D2==='boolean'?D2:D2(J2);if(K2===!0){return E2(J2);}return F2(J2);};}function is(L2,x){if(x===void 0){return M2=>is(L2,M2);}return x instanceof L2||x.constructor===L2;}function isNil(x){return x===void 0||x===null;}function includes(x,y){if(y===void 0){return N2=>includes(x,N2);}return y.includes(x);}function indexBy(fn,P2){if(P2===void 0){return Q2=>indexBy(fn,Q2);}const R2={};for(let i=0;iindexOf(x,U2);}let V2=-1;const W2=T2.length;while(++V2b3?b3:Z2;if(Z2<0){Z2+=b3;}b3=Y2>Z2?0:Z2-Y2>>>0;Y2>>>=0;const c3=Array(b3);while(++a3join(d3,f3);}return e3.join(d3);}function lastIndexOf(x,g3){if(g3===void 0){return h3=>lastIndexOf(x,h3);}let i3=-1;g3.map((j3,k3)=>{if(equals(j3,x)){i3=k3;}});return i3;}function last(a){if(typeof a==='string'){return a[a.length-1]||'';}return a[a.length-1];}function length(x){return x.length;}function match(l3,x){if(x===void 0){return m3=>match(l3,m3);}const n3=x.match(l3);return n3===null?[]:n3;}function merge(o3,p3){if(p3===void 0){return q3=>merge(o3,q3);}return Object.assign({},o3,p3);}function modulo(x,y){if(y===void 0){return r3=>modulo(x,r3);}return x%y;}function multiply(x,y){if(y===void 0){return s3=>multiply(x,s3);}return x*y;}function none(fn,u3){if(u3===void 0){return v3=>none(fn,v3);}return u3.filter(fn).length===0;}function not(x){return!x;}function partialCurry(fn,x3={}){return y3=>{if(type(fn)==='Async'||type(fn)==='Promise'){return new Promise((z3,A3)=>{fn(merge(y3,x3)).then(z3).catch(A3);});}return fn(merge(y3,x3));};}function path(B3,C3){if(arguments.length===1){return D3=>path(B3,D3);}if(C3===null||C3===void 0){return void 0;}let E3=C3,F3=0;const G3=typeof B3==='string'?B3=B3.split('.'):B3;while(F3pick(L3,N3);}if(M3===null||M3===void 0){return void 0;}const O3=typeof L3==='string'?L3.split(','):L3,P3={};let Q3=0;while(Q3pickAll(R3,T3);}if(S3===null||S3===void 0){return void 0;}const U3=typeof R3==='string'?R3.split(','):R3,V3={};let W3=0;while(W3pluck(X3,Z3);}const a4=[];map(b4=>{if(!(b4[X3]===void 0)){a4.push(b4[X3]);}},Y3);return a4;}function prepend(x,c4){if(c4===void 0){return d4=>prepend(x,d4);}if(typeof c4==='string'){return`${x}${c4}`;}const e4=c4.concat();e4.unshift(x);return e4;}function prop(f4,g4){if(g4===void 0){return h4=>prop(f4,h4);}return g4[f4];}function propEq(i4,x,j4){if(x===void 0){return(k4,l4)=>propEq(i4,k4,l4);}else if(j4===void 0){return m4=>propEq(i4,x,m4);}return j4[i4]===x;}function range(n4,o4){if(o4===void 0){return p4=>range(n4,p4);}const q4=[];for(let i=n4;ireduce(fn,u4,v4);}else if(t4===void 0){return w4=>reduce(fn,s4,w4);}return t4.reduce(fn,s4);}function reject(fn,y4){if(y4===void 0){return z4=>reject(fn,z4);}return filter(x=>!fn(x),y4);}function repeat(x,A4){if(A4===void 0){return B4=>repeat(x,B4);}const C4=Array(A4);return C4.fill(x);}function replace(D4,E4,F4){if(E4===void 0){return(G4,H4)=>replace(D4,G4,H4);}else if(F4===void 0){return I4=>replace(D4,E4,I4);}return F4.replace(D4,E4);}function reverse(J4){const K4=J4.concat();return K4.reverse();}function sort(fn,M4){if(M4===void 0){return N4=>sort(fn,N4);}const O4=M4.concat();return O4.sort(fn);}function sortBy(fn,Q4){if(Q4===void 0){return R4=>sortBy(fn,R4);}const S4=Q4.concat();return S4.sort((a,b)=>{const T4=fn(a),U4=fn(b);return T4U4?1:0;});}function split(V4,W4){if(W4===void 0){return X4=>split(V4,X4);}return W4.split(V4);}function splitEvery(Y4,x){if(x===void 0){return Z4=>splitEvery(Y4,Z4);}const a5=Y4>1?Y4:1,b5=[];let c5=0;while(c5startsWith(x,d5);}return y.startsWith(x);}function subtract(x,y){if(y===void 0){return e5=>subtract(x,e5);}return x-y;}function T(){return!0;}function tail(f5){return drop(1,f5);}function take(g5,x){if(x===void 0){return h5=>take(g5,h5);}if(typeof x==='string'){return x.slice(0,g5);}return baseSlice(x,0,g5);}function takeLast(i5,x){if(x===void 0){return j5=>takeLast(i5,j5);}const k5=x.length;let l5=i5>k5?k5:i5;if(typeof x==='string'){return x.slice(k5-l5);}l5=k5-l5;return baseSlice(x,l5,k5);}function test(m5,n5){if(n5===void 0){return o5=>test(m5,o5);}return n5.search(m5)!==-1;}function times(fn,q5){if(q5===void 0){return r5=>times(fn,r5);}return map(fn,range(0,q5));}function toLower(x){return x.toLowerCase();}function toUpper(x){return x.toUpperCase();}function toString(x){return x.toString();}function trim(s5){return s5.trim();}function uniq(t5){let u5=-1;const v5=[];while(++u5uniqWith(fn,z5);}let A5=-1;const B5=[];while(++A5fn(C5,E5),B5);if(!D5){B5.push(C5);}}return B5;}function update(F5,G5,H5){if(G5===void 0){return(I5,J5)=>update(F5,I5,J5);}else if(H5===void 0){return K5=>update(F5,G5,K5);}const L5=H5.concat();return L5.fill(G5,F5,F5+1);}function values(M5){const N5=[];for(const O5 in M5){N5.push(M5[O5]);}return N5;}function without(P5,Q5){return reduce((R5,S5)=>!contains(S5,P5)?R5.concat(S5):R5,[],Q5);}e.add=add;e.addIndex=addIndex;e.adjust=adjust;e.all=all;e.allPass=allPass;e.anyPass=anyPass;e.always=always;e.any=any;e.append=append;e.both=both;e.complement=complement;e.compose=compose;e.concat=concat;e.contains=contains;e.curry=curry;e.dec=dec;e.defaultTo=defaultTo;e.dissoc=dissoc;e.divide=divide;e.drop=drop;e.dropLast=dropLast;e.either=either;e.endsWith=endsWith;e.inc=inc;e.equals=equals;e.F=F;e.filter=filter;e.find=find;e.findIndex=findIndex;e.flatten=flatten;e.flip=flip;e.forEach=forEach;e.has=has;e.head=head;e.identity=identity;e.ifElse=ifElse;e.is=is;e.isNil=isNil;e.includes=includes;e.indexBy=indexBy;e.indexOf=indexOf;e.init=init;e.join=join;e.lastIndexOf=lastIndexOf;e.last=last;e.length=length;e.map=map;e.match=match;e.merge=merge;e.modulo=modulo;e.multiply=multiply;e.none=none;e.not=not;e.omit=omit;e.partialCurry=partialCurry;e.path=path;e.pathOr=K3;e.pick=pick;e.pickAll=pickAll;e.pipe=pipe;e.pluck=pluck;e.prepend=prepend;e.prop=prop;e.propEq=propEq;e.range=range;e.reduce=reduce;e.reject=reject;e.repeat=repeat;e.replace=replace;e.reverse=reverse;e.sort=sort;e.sortBy=sortBy;e.split=split;e.splitEvery=splitEvery;e.startsWith=startsWith;e.subtract=subtract;e.T=T;e.tap=tap;e.tail=tail;e.take=take;e.takeLast=takeLast;e.test=test;e.times=times;e.toLower=toLower;e.toUpper=toUpper;e.toString=toString;e.trim=trim;e.type=type;e.uniq=uniq;e.uniqWith=uniqWith;e.update=update;e.values=values;e.without=without;Object.defineProperty(e,'__esModule',{value:!0});});