(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 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 compose(...fns){return e1=>{const f1=fns.slice();while(f1.length>0){e1=f1.pop()(e1);}return e1;};}function concat(x,y){if(y===void 0){return g1=>concat(x,g1);}return typeof x==='string'?`${x}${y}`:[...x,...y];}function type(a){const h1=typeof a;if(a===null){return'Null';}else if(a===void 0){return'Undefined';}else if(h1==='boolean'){return'Boolean';}else if(h1==='number'){return'Number';}else if(h1==='string'){return'String';}else if(Array.isArray(a)){return'Array';}else if(a instanceof RegExp){return'RegExp';}const i1=a.toString();if(i1.startsWith('async')){return'Async';}else if(i1==='[object Promise]'){return'Promise';}else if(i1.includes('function')||i1.includes('=>')){return'Function';}return'Object';}function equals(a,b){if(arguments.length===1){return j1=>equals(a,j1);}if(a===b){return!0;}const k1=type(a);if(k1!==type(b)){return!1;}if(k1==='Array'){const l1=Array.from(a),m1=Array.from(b);if(l1.toString()!==m1.toString()){return!1;}let n1=!0;l1.forEach((o1,p1)=>{if(n1){if(o1!==m1[p1]&&!equals(o1,m1[p1])){n1=!1;}}});return n1;}if(k1==='Object'){const q1=Object.keys(a);if(q1.length!==Object.keys(b).length){return!1;}let r1=!0;q1.forEach(s1=>{if(r1){const t1=a[s1],u1=b[s1];if(t1!==u1&&!equals(t1,u1)){r1=!1;}}});return r1;}return!1;}function contains(x,v1){if(v1===void 0){return w1=>contains(x,w1);}let x1=-1,y1=!1;while(++x1(o=>o.length>=f.length?f(...o):curry(f,o))([...a,...p]);}var dec=x=>x-1;function defaultTo(z1,A1){if(arguments.length===1){return B1=>defaultTo(z1,B1);}return A1===void 0||A1===null||Number.isNaN(A1)===!0?z1:A1;}function omit(C1,D1){if(arguments.length===1){return E1=>omit(C1,E1);}if(D1===null||D1===void 0){return void 0;}const F1=typeof C1==='string'?C1=C1.split(','):C1,G1={};for(const H1 in D1){if(!F1.includes(H1)){G1[H1]=D1[H1];}}return G1;}function dissoc(I1,J1){if(arguments.length===1){return K1=>dissoc(I1,K1);}if(J1===null||J1===void 0){return void 0;}const L1={};for(const M1 in J1){if(M1!==`${I1}`){L1[M1]=J1[M1];}}return L1;}function divide(x,y){if(y===void 0){return N1=>divide(x,N1);}return x/y;}function drop(O1,x){if(x===void 0){return P1=>drop(O1,P1);}return x.slice(O1);}function dropLast(Q1,x){if(x===void 0){return R1=>dropLast(Q1,R1);}return x.slice(0,-Q1);}function either(x,y){if(y===void 0){return S1=>either(x,S1);}return T1=>x(T1)||y(T1);}function endsWith(x,y){if(y===void 0){return U1=>endsWith(x,U1);}return y.endsWith(x);}var inc=x=>x+1;function find(fn,W1){if(W1===void 0){return X1=>find(fn,X1);}return W1.find(fn);}function findIndex(fn,Z1){if(Z1===void 0){return a2=>findIndex(fn,a2);}const b2=Z1.length;let c2=-1;while(++c2{if(input.length===1){return g2=>fn(g2,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 j2=>tap(fn,j2);}fn(x);return x;}function mapObject(fn,l2){const m2={};for(const n2 in l2){m2[n2]=fn(l2[n2],n2);}return m2;}function map(fn,p2){if(p2===void 0){return q2=>map(fn,q2);}if(p2.length===void 0){return mapObject(fn,p2);}let r2=-1;const s2=p2.length,t2=Array(s2);while(++r2forEach(fn,w2);}return map(tap(fn),v2);}function has(x2,y2){if(y2===void 0){return z2=>has(x2,z2);}return y2[x2]!==void 0;}function head(a){if(typeof a==='string'){return a[0]||'';}return a[0];}function ifElse(A2,B2,C2){if(B2===void 0){return(D2,E2)=>ifElse(A2,D2,E2);}else if(C2===void 0){return F2=>ifElse(A2,B2,F2);}return G2=>{const H2=typeof A2==='boolean'?A2:A2(G2);if(H2===!0){return B2(G2);}return C2(G2);};}function is(I2,x){if(x===void 0){return J2=>is(I2,J2);}return x instanceof I2||x.constructor===I2;}function isNil(x){return x===void 0||x===null;}function includes(x,y){if(y===void 0){return K2=>includes(x,K2);}return y.includes(x);}function indexOf(x,L2){if(L2===void 0){return M2=>indexOf(x,M2);}let N2=-1;const O2=L2.length;while(++N2T2?T2:R2;if(R2<0){R2+=T2;}T2=Q2>R2?0:R2-Q2>>>0;Q2>>>=0;const U2=Array(T2);while(++S2join(V2,X2);}return W2.join(V2);}function lastIndexOf(x,Y2){if(Y2===void 0){return Z2=>lastIndexOf(x,Z2);}let a3=-1;Y2.map((b3,c3)=>{if(equals(b3,x)){a3=c3;}});return a3;}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(d3,x){if(x===void 0){return e3=>match(d3,e3);}const f3=x.match(d3);return f3===null?[]:f3;}function merge(g3,h3){if(h3===void 0){return i3=>merge(g3,i3);}return Object.assign({},g3,h3);}function modulo(x,y){if(y===void 0){return j3=>modulo(x,j3);}return x%y;}function multiply(x,y){if(y===void 0){return k3=>multiply(x,k3);}return x*y;}function none(fn,m3){if(m3===void 0){return n3=>none(fn,m3);}return m3.filter(fn).length===0;}function partialCurry(fn,p3={}){return q3=>{if(type(fn)==='Async'||type(fn)==='Promise'){return new Promise((r3,s3)=>{fn(merge(q3,p3)).then(r3).catch(s3);});}return fn(merge(q3,p3));};}function path(t3,u3){if(arguments.length===1){return v3=>path(t3,v3);}if(u3===null||u3===void 0){return void 0;}let w3=u3,x3=0;const y3=typeof t3==='string'?t3=t3.split('.'):t3;while(x3pick(D3,F3);}if(E3===null||E3===void 0){return void 0;}const G3=typeof D3==='string'?D3.split(','):D3,H3={};let I3=0;while(I3pickAll(J3,L3);}if(K3===null||K3===void 0){return void 0;}const M3=typeof J3==='string'?J3.split(','):J3,N3={};let O3=0;while(O3pluck(P3,R3);}const S3=[];map(T3=>{if(!(T3[P3]===void 0)){S3.push(T3[P3]);}},Q3);return S3;}function prepend(x,U3){if(U3===void 0){return V3=>prepend(x,V3);}if(typeof U3==='string'){return`${x}${U3}`;}const W3=U3.concat();W3.unshift(x);return W3;}function prop(X3,Y3){if(Y3===void 0){return Z3=>prop(X3,Z3);}return Y3[X3];}function propEq(a4,x,b4){if(x===void 0){return(c4,d4)=>propEq(a4,c4,d4);}else if(b4===void 0){return e4=>propEq(a4,x,e4);}return b4[a4]===x;}function range(f4,g4){if(g4===void 0){return h4=>range(f4,h4);}const i4=[];for(let i=f4;ireduce(fn,m4,n4);}else if(l4===void 0){return o4=>reduce(fn,k4,o4);}return l4.reduce(fn,k4);}function reject(fn,q4){if(q4===void 0){return r4=>reject(fn,r4);}return filter(x=>!fn(x),q4);}function repeat(x,s4){if(s4===void 0){return t4=>repeat(x,t4);}const u4=Array(s4);return u4.fill(x);}function replace(v4,w4,x4){if(w4===void 0){return(y4,z4)=>replace(v4,y4,z4);}else if(x4===void 0){return A4=>replace(v4,w4,A4);}return x4.replace(v4,w4);}function reverse(B4){const C4=B4.concat();return C4.reverse();}function sort(fn,E4){if(E4===void 0){return F4=>sort(fn,F4);}const G4=E4.concat();return G4.sort(fn);}function sortBy(fn,I4){if(I4===void 0){return J4=>sortBy(fn,J4);}const K4=I4.concat();return K4.sort((a,b)=>{const L4=fn(a),M4=fn(b);return L4M4?1:0;});}function split(N4,O4){if(O4===void 0){return P4=>split(N4,P4);}return O4.split(N4);}function splitEvery(Q4,x){if(x===void 0){return R4=>splitEvery(Q4,R4);}const S4=Q4>1?Q4:1,T4=[];let U4=0;while(U4startsWith(x,V4);}return y.startsWith(x);}function subtract(x,y){if(y===void 0){return W4=>subtract(x,W4);}return x-y;}function tail(X4){return drop(1,X4);}function take(Y4,x){if(x===void 0){return Z4=>take(Y4,Z4);}if(typeof x==='string'){return x.slice(0,Y4);}return baseSlice(x,0,Y4);}function takeLast(a5,x){if(x===void 0){return b5=>takeLast(a5,b5);}const c5=x.length;let d5=a5>c5?c5:a5;if(typeof x==='string'){return x.slice(c5-d5);}d5=c5-d5;return baseSlice(x,d5,c5);}function test(e5,f5){if(f5===void 0){return g5=>test(e5,g5);}return f5.search(e5)!==-1;}function times(fn,i5){if(i5===void 0){return j5=>times(fn,j5);}return map(fn,range(0,i5));}function toLower(x){return x.toLowerCase();}function toUpper(x){return x.toUpperCase();}function toString(x){return x.toString();}function uniq(k5){let l5=-1;const m5=[];while(++l5uniqWith(fn,q5);}let r5=-1;const s5=[];while(++r5fn(t5,v5),s5);if(!u5){s5.push(t5);}}return s5;}function update(w5,x5,y5){if(x5===void 0){return(z5,A5)=>update(w5,z5,A5);}else if(y5===void 0){return B5=>update(w5,x5,B5);}const C5=y5.concat();return C5.fill(x5,w5,w5+1);}function values(D5){const E5=[];for(const F5 in D5){E5.push(D5[F5]);}return E5;}function without(G5,H5){return reduce((I5,J5)=>!contains(J5,G5)?I5.concat(J5):I5,[],H5);}const always=x=>()=>x,complement=fn=>L5=>!fn(L5),F=()=>!1,identity=x=>x,not=x=>!x,T=()=>!0,trim=x=>x.trim();e.always=always;e.complement=complement;e.F=F;e.identity=identity;e.not=not;e.T=T;e.trim=trim;e.add=add;e.addIndex=addIndex;e.adjust=adjust;e.all=all;e.allPass=allPass;e.anyPass=anyPass;e.any=any;e.append=append;e.both=both;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.filter=filter;e.find=find;e.findIndex=findIndex;e.flatten=flatten;e.flip=flip;e.forEach=forEach;e.has=has;e.head=head;e.ifElse=ifElse;e.is=is;e.isNil=isNil;e.includes=includes;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.omit=omit;e.partialCurry=partialCurry;e.path=path;e.pathOr=C3;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.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.type=type;e.uniq=uniq;e.uniqWith=uniqWith;e.update=update;e.values=values;e.without=without;Object.defineProperty(e,'__esModule',{value:!0});});