partial.lenses
Advanced tools
Comparing version 14.6.0 to 14.7.0
@@ -1104,2 +1104,27 @@ 'use strict'; | ||
var orAlternativelyU = function orAlternatively(back, prim) { | ||
prim = toFunction(prim); | ||
back = toFunction(back); | ||
var fwd = function fwd(y) { | ||
y = I.always(y); | ||
var yP = prim(void 0, void 0, Identity, y); | ||
return void 0 === yP ? back(void 0, void 0, Identity, y) : yP; | ||
}; | ||
return function orAlternatively(x, i, F, xi2yF) { | ||
var xP = prim(x, i, Select, id); | ||
return F.map(fwd, xi2yF(void 0 === xP ? back(x, i, Select, id) : xP, i)); | ||
}; | ||
}; | ||
var makeSemi = function makeSemi(op) { | ||
return copyName(function (_) { | ||
var n = arguments.length; | ||
var r = arguments[--n]; | ||
while (n) { | ||
r = op(r, arguments[--n]); | ||
} | ||
return r; | ||
}, op); | ||
}; | ||
var zero = function zero(x, _i, C, _xi2yC) { | ||
@@ -1261,10 +1286,4 @@ return C.of(x); | ||
var choices = function choices(o) { | ||
for (var _len = arguments.length, os = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
os[_key - 1] = arguments[_key]; | ||
} | ||
var choices = /*#__PURE__*/makeSemi(orElseU); | ||
return os.length ? orElseU(os.reduceRight(orElseU), o) : o; | ||
}; | ||
var choose = function choose(xiM2o) { | ||
@@ -1280,4 +1299,4 @@ return copyName(function (x, i, C, xi2yC) { | ||
for (var _len2 = arguments.length, cs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
cs[_key2] = arguments[_key2]; | ||
for (var _len = arguments.length, cs = Array(_len), _key = 0; _key < _len; _key++) { | ||
cs[_key] = arguments[_key]; | ||
} | ||
@@ -1303,4 +1322,4 @@ | ||
for (var _len3 = arguments.length, cs = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { | ||
cs[_key3 - 1] = arguments[_key3]; | ||
for (var _len2 = arguments.length, cs = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
cs[_key2 - 1] = arguments[_key2]; | ||
} | ||
@@ -1364,4 +1383,4 @@ | ||
var choice = function choice() { | ||
for (var _len4 = arguments.length, os = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
os[_key4] = arguments[_key4]; | ||
for (var _len3 = arguments.length, os = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
os[_key3] = arguments[_key3]; | ||
} | ||
@@ -1917,4 +1936,4 @@ | ||
function removable() { | ||
for (var _len5 = arguments.length, ps = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
ps[_key5] = arguments[_key5]; | ||
for (var _len4 = arguments.length, ps = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
ps[_key4] = arguments[_key4]; | ||
} | ||
@@ -1974,2 +1993,4 @@ | ||
var alternatives = /*#__PURE__*/makeSemi(orAlternativelyU); | ||
var array = function array(elem) { | ||
@@ -1998,2 +2019,4 @@ var fwd = getInverse(elem); | ||
var orAlternatively = /*#__PURE__*/I.curry(orAlternativelyU); | ||
// Basic isomorphisms | ||
@@ -2319,5 +2342,7 @@ | ||
exports.iso = iso; | ||
exports.alternatives = alternatives; | ||
exports.array = array; | ||
exports.inverse = inverse; | ||
exports.iterate = iterate; | ||
exports.orAlternatively = orAlternatively; | ||
exports.complement = complement; | ||
@@ -2324,0 +2349,0 @@ exports.identity = identity; |
@@ -1100,2 +1100,27 @@ import { defineNameU, isString, isFunction, always, freeze, isArray, isObject, inherit, sndU, curry, curryN, assocPartialU, dissocPartialU, object0, isNumber, constructorOf, toObject, acyclicEqualsU, applyU, isDefined, array0, keys, hasU, assign, arityN, id } from 'infestines'; | ||
var orAlternativelyU = function orAlternatively(back, prim) { | ||
prim = toFunction(prim); | ||
back = toFunction(back); | ||
var fwd = function fwd(y) { | ||
y = always(y); | ||
var yP = prim(void 0, void 0, Identity, y); | ||
return void 0 === yP ? back(void 0, void 0, Identity, y) : yP; | ||
}; | ||
return function orAlternatively(x, i, F, xi2yF) { | ||
var xP = prim(x, i, Select, id$1); | ||
return F.map(fwd, xi2yF(void 0 === xP ? back(x, i, Select, id$1) : xP, i)); | ||
}; | ||
}; | ||
var makeSemi = function makeSemi(op) { | ||
return copyName(function (_) { | ||
var n = arguments.length; | ||
var r = arguments[--n]; | ||
while (n) { | ||
r = op(r, arguments[--n]); | ||
} | ||
return r; | ||
}, op); | ||
}; | ||
var zero = function zero(x, _i, C, _xi2yC) { | ||
@@ -1257,10 +1282,4 @@ return C.of(x); | ||
var choices = function choices(o) { | ||
for (var _len = arguments.length, os = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
os[_key - 1] = arguments[_key]; | ||
} | ||
var choices = /*#__PURE__*/makeSemi(orElseU); | ||
return os.length ? orElseU(os.reduceRight(orElseU), o) : o; | ||
}; | ||
var choose = function choose(xiM2o) { | ||
@@ -1276,4 +1295,4 @@ return copyName(function (x, i, C, xi2yC) { | ||
for (var _len2 = arguments.length, cs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
cs[_key2] = arguments[_key2]; | ||
for (var _len = arguments.length, cs = Array(_len), _key = 0; _key < _len; _key++) { | ||
cs[_key] = arguments[_key]; | ||
} | ||
@@ -1299,4 +1318,4 @@ | ||
for (var _len3 = arguments.length, cs = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { | ||
cs[_key3 - 1] = arguments[_key3]; | ||
for (var _len2 = arguments.length, cs = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
cs[_key2 - 1] = arguments[_key2]; | ||
} | ||
@@ -1360,4 +1379,4 @@ | ||
var choice = function choice() { | ||
for (var _len4 = arguments.length, os = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
os[_key4] = arguments[_key4]; | ||
for (var _len3 = arguments.length, os = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
os[_key3] = arguments[_key3]; | ||
} | ||
@@ -1913,4 +1932,4 @@ | ||
function removable() { | ||
for (var _len5 = arguments.length, ps = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
ps[_key5] = arguments[_key5]; | ||
for (var _len4 = arguments.length, ps = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
ps[_key4] = arguments[_key4]; | ||
} | ||
@@ -1970,2 +1989,4 @@ | ||
var alternatives = /*#__PURE__*/makeSemi(orAlternativelyU); | ||
var array = function array(elem) { | ||
@@ -1994,2 +2015,4 @@ var fwd = getInverse(elem); | ||
var orAlternatively = /*#__PURE__*/curry(orAlternativelyU); | ||
// Basic isomorphisms | ||
@@ -2189,2 +2212,2 @@ | ||
export { seemsArrayLike, Identity, IdentityAsync, Select, toFunction, assign$1 as assign, disperse, modify, modifyAsync, remove, set, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, orElse, chain, choice, unless, when, optional, zero, mapIx, setIx, tieIx, joinIx, skipIx, getLog, log, transform, transformAsync, seq, assignOp, modifyOp, setOp, removeOp, branchOr, branch, branches, elems, elemsTotal, entries, keys$1 as keys, matches, values, children, flatten, query, satisfying, leafs, all, and$1 as and, all1, and1, any, collectAs, collect, collectTotalAs, collectTotal, concatAs, concat, countIf, count, countsAs, counts, foldl, foldr, forEach, forEachWith, get, getAs, isDefined$1 as isDefined, isEmpty, joinAs, join, maximumBy, maximum, meanAs, mean, minimumBy, minimum, none, or$1 as or, productAs, product, select, selectAs, sumAs, sum, foldTraversalLens, getter, lens, partsOf, setter, defaults, define, normalize, required, reread, rewrite, append, cross, filter, find, findWith, first, index, last, prefix, slice, suffix, pickIn, prop, props, propsOf, removable, valueOr, pick, replace$1 as replace, getInverse, iso, array, inverse, iterate, complement, identity, is, subset, indexed, reverse, singleton, disjoint, keyed, multikeyed, json, uri, uriComponent, dropPrefix, dropSuffix, replaces, split, uncouple, querystring, add$1 as add, divide, multiply$1 as multiply, negate$1 as negate, subtract, FantasyFunctor, fromFantasy, fromFantasyApplicative, fromFantasyMonad, pointer }; | ||
export { seemsArrayLike, Identity, IdentityAsync, Select, toFunction, assign$1 as assign, disperse, modify, modifyAsync, remove, set, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, orElse, chain, choice, unless, when, optional, zero, mapIx, setIx, tieIx, joinIx, skipIx, getLog, log, transform, transformAsync, seq, assignOp, modifyOp, setOp, removeOp, branchOr, branch, branches, elems, elemsTotal, entries, keys$1 as keys, matches, values, children, flatten, query, satisfying, leafs, all, and$1 as and, all1, and1, any, collectAs, collect, collectTotalAs, collectTotal, concatAs, concat, countIf, count, countsAs, counts, foldl, foldr, forEach, forEachWith, get, getAs, isDefined$1 as isDefined, isEmpty, joinAs, join, maximumBy, maximum, meanAs, mean, minimumBy, minimum, none, or$1 as or, productAs, product, select, selectAs, sumAs, sum, foldTraversalLens, getter, lens, partsOf, setter, defaults, define, normalize, required, reread, rewrite, append, cross, filter, find, findWith, first, index, last, prefix, slice, suffix, pickIn, prop, props, propsOf, removable, valueOr, pick, replace$1 as replace, getInverse, iso, alternatives, array, inverse, iterate, orAlternatively, complement, identity, is, subset, indexed, reverse, singleton, disjoint, keyed, multikeyed, json, uri, uriComponent, dropPrefix, dropSuffix, replaces, split, uncouple, querystring, add$1 as add, divide, multiply$1 as multiply, negate$1 as negate, subtract, FantasyFunctor, fromFantasy, fromFantasyApplicative, fromFantasyMonad, pointer }; |
@@ -1100,2 +1100,27 @@ (function (global, factory) { | ||
var orAlternativelyU = function orAlternatively(back, prim) { | ||
prim = toFunction(prim); | ||
back = toFunction(back); | ||
var fwd = function fwd(y) { | ||
y = I.always(y); | ||
var yP = prim(void 0, void 0, Identity, y); | ||
return void 0 === yP ? back(void 0, void 0, Identity, y) : yP; | ||
}; | ||
return function orAlternatively(x, i, F, xi2yF) { | ||
var xP = prim(x, i, Select, id); | ||
return F.map(fwd, xi2yF(void 0 === xP ? back(x, i, Select, id) : xP, i)); | ||
}; | ||
}; | ||
var makeSemi = function makeSemi(op) { | ||
return copyName(function (_) { | ||
var n = arguments.length; | ||
var r = arguments[--n]; | ||
while (n) { | ||
r = op(r, arguments[--n]); | ||
} | ||
return r; | ||
}, op); | ||
}; | ||
var zero = function zero(x, _i, C, _xi2yC) { | ||
@@ -1257,10 +1282,4 @@ return C.of(x); | ||
var choices = function choices(o) { | ||
for (var _len = arguments.length, os = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
os[_key - 1] = arguments[_key]; | ||
} | ||
var choices = /*#__PURE__*/makeSemi(orElseU); | ||
return os.length ? orElseU(os.reduceRight(orElseU), o) : o; | ||
}; | ||
var choose = function choose(xiM2o) { | ||
@@ -1276,4 +1295,4 @@ return copyName(function (x, i, C, xi2yC) { | ||
for (var _len2 = arguments.length, cs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
cs[_key2] = arguments[_key2]; | ||
for (var _len = arguments.length, cs = Array(_len), _key = 0; _key < _len; _key++) { | ||
cs[_key] = arguments[_key]; | ||
} | ||
@@ -1299,4 +1318,4 @@ | ||
for (var _len3 = arguments.length, cs = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { | ||
cs[_key3 - 1] = arguments[_key3]; | ||
for (var _len2 = arguments.length, cs = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
cs[_key2 - 1] = arguments[_key2]; | ||
} | ||
@@ -1360,4 +1379,4 @@ | ||
var choice = function choice() { | ||
for (var _len4 = arguments.length, os = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
os[_key4] = arguments[_key4]; | ||
for (var _len3 = arguments.length, os = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
os[_key3] = arguments[_key3]; | ||
} | ||
@@ -1913,4 +1932,4 @@ | ||
function removable() { | ||
for (var _len5 = arguments.length, ps = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
ps[_key5] = arguments[_key5]; | ||
for (var _len4 = arguments.length, ps = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
ps[_key4] = arguments[_key4]; | ||
} | ||
@@ -1970,2 +1989,4 @@ | ||
var alternatives = /*#__PURE__*/makeSemi(orAlternativelyU); | ||
var array = function array(elem) { | ||
@@ -1994,2 +2015,4 @@ var fwd = getInverse(elem); | ||
var orAlternatively = /*#__PURE__*/I.curry(orAlternativelyU); | ||
// Basic isomorphisms | ||
@@ -2315,5 +2338,7 @@ | ||
exports.iso = iso; | ||
exports.alternatives = alternatives; | ||
exports.array = array; | ||
exports.inverse = inverse; | ||
exports.iterate = iterate; | ||
exports.orAlternatively = orAlternatively; | ||
exports.complement = complement; | ||
@@ -2320,0 +2345,0 @@ exports.identity = identity; |
@@ -1,1 +0,1 @@ | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],r):r(n.L={},n.I)}(this,function(n,b){"use strict";function r(n){switch(typeof n){case"boolean":case"number":case"string":return!0;default:return!1}}function e(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}function i(n){if(!this)return J(new i(n));this.map=n}function o(n,r,t,u){var e=n.map,i=n.ap,o=n.of(yn),c=t.length;if(e===b.sndU){for(var f=0;f<c;++f)o=i(o,r(t[f],f));return o}for(var a=yn(u),s=0;s<c;++s)o=i(e(a,o),r(t[s],s));return e(gn,o)}function a(n,r){var t=r.length-n;if(t<2)return t?yr(r[n]):Tn;for(var e=yr(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=Sn(yr(r[n+t]),i);var o=yr(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function u(n,r,t,u){for(var e,i,o=n.length,c=Array(o),f=0;f<o;++f)switch(c[f]=t,typeof(e=n[f])){case"string":t=An(e,t);break;case"number":t=On(e,t);break;default:t=a(f,n)(t,n[f-1],lr,r||b.always(u)),o=f}for(o===n.length&&(t=r?r(t,n[o-1]):u);0<=--o;)t=b.isString(i=n[o])?jn(i,t,c[o]):wn(i,t,c[o]);return t}function t(n,r,t,u){return vr(n)?ir(n,0,t,u):t.of(n)}function c(n,r,t,u){return b.isArray(n)?ir(n,0,t,u):b.isObject(n)?Jr(n,r,t,u):t.of(n)}function f(n,r,u,e){return function n(r,t){return b.isArray(r)?ir(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}function s(r,n){return 1<arguments.length?Mn(E,r,n):function(n){return Mn(E,r,n)}}function v(r,n,t,u){var e=vr(r)?r.length:0;return t.map(function(n){return wn(e,n,r)},u(void 0,e))}function l(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=vr(n)?n:"",i=c.hint=function(n,r,t){var u=n.hint,e=t.length;e<=u&&(u=e-1),u<0&&(u=0);for(var i=u-1;0<=i&&u<e;++u,--i){if(r(t[u],u,n))return u;if(r(t[i],i,n))return i}for(;u<e;++u)if(r(t[u],u,n))return u;for(;0<=i;--i)if(r(t[i],i,n))return i;return e}(c,o,e);return t.map(function(n){return wn(i,n,e)},u(e[i],i))}}function d(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return Jt(t)}function h(r,n){return 1<arguments.length?kn(r,n,void 0):function(n){return kn(r,n,void 0)}}var y=function(n,r){return n+r},p=function(n,r){return n*r},g=b.curry(y),m=b.curry(p),A=b.curry(function(n,r){return r/n}),j=function(n){return-n},x=function(n,r){return n<r},O=function(n,r){return r<n},w=b.curry(function(n,r){return r instanceof n}),I=Object.create,S=function(n){return b.assign(I(null),n)},U=b.freeze(S(b.object0)),k=b.curry(function(n,r,t){return t.replace(n,r)}),E=function(n){return n},F=function(n){return n},M=function(n){return n},R=function(n,r){return b.isString(n)?new RegExp(k(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},q=function(r){return M(function(n){try{return r(n)}catch(n){return n}})},N=function(n,r){return null!=r&&b.isFunction(r.then)?r.then(n):n(r)},P=function(n){return void 0!==n?String(n):""},z=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},C=function(r){return function(n){return[n,r]}},D=function(r){return function(n){return void 0!==n?n:r}},L=D(0),T=b.always(!0),W=function(n){return void 0!==n?!n:n},$=function(n){return void 0!==n?[n]:n},B=function(r,t){return M(function(n){return r(n)?t(n):void 0})},J=E,_=function(n){return!(n instanceof Object)||b.isArray(n)},G=E(function(n){if(vr(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),H=E(function(n,r,t){for(var u=r.length,e=Array(u),i=0,o=!0,c=0;c<u;++c){var f=r[c],a=n(f,c);t!==a&&(e[i++]=a,o&&(o=f===a&&(0!==f||1/f==1/a)||f!=f&&a!=a))}return i!==u?(e.length=i,e):o?r:e}),K=function(n,r){return vr(r)?H(n,r,void 0):void 0},Q=E(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),V=b.inherit(function n(r,t,u){if(!this)return J(new n(r,t,u));i.call(this,r),this.of=t,this.ap=u},i),X=b.inherit(function n(r,t,u,e){if(!this)return J(new n(r,t,u,e));V.call(this,r,t,u),this.chain=e},V),Y="fantasy-land/",Z=Y+"of",nn=Y+"chain",rn=function(t){return F(function(n,r){return r[t](n)})},tn=rn("fantasy-land/map"),un=rn("fantasy-land/ap"),en=rn(nn),on=i(tn),cn=function(n){return V(tn,n[Z],un)},fn=function(n){return X(tn,n[Z],un,en)},an=function(n,r){return V(b.sndU,b.always(r),n)},sn=function(n){return an(n.concat,(0,n.empty)())},vn=an(y,0),ln=function(o){return b.curry(function(u,n,r){var e=void 0,i=void 0;return Mn(function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},dn=function(n,r,t,u){return yr(t)(u,void 0,n,r)},hn=function(e,n){return b.curryN(4,M(function(t,u){return u=n(u),function(n,r){return e(dn(u,t,n,r))}}))},yn=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},pn=function(n,r){for(;yn!==n;)r.push(n[0]),n=n[1];return r},gn=E(function(n){return pn(n,[]).reverse()}),mn=V(function(n,r){var t=r.p,u=r.x,e=r.c;return u=n(u),b.isFunction(u)||(t=[u,t]),{p:t,x:u,c:e}},function(n){return{p:[],x:n,c:void 0}},function(n,r){var t=void 0!==n.c?n:r;return{p:t.p,x:n.x(r.x),c:t.c}}),bn=function(i,o){return function(e){return function(r,n,t,u){return t.map(function(n){return o(e,n,r)},u(i(e,r),e))}}},An=function(n,r){return r instanceof Object?r[n]:void 0},jn=E(function(n,r,t){return void 0!==r?b.assocPartialU(n,r,t):b.dissocPartialU(n,t)||b.object0}),xn=bn(An,jn),On=function(n,r){return vr(r)?r[n]:void 0},wn=E(function(n,r,t){vr(t)||(t="");var u=t.length;if(void 0!==r){for(var e=Math.max(n+1,u),i=Array(e),o=0;o<e;++o)i[o]=t[o];return i[n]=r,i}if(u<=n)return Q(Array(u),0,t,0,u);for(var c=Array(u-1),f=0;f<n;++f)c[f]=t[f];for(var a=n+1;a<u;++a)c[a-1]=t[a];return c}),In=bn(On,wn),Sn=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},Un=function(n,r,t){vr(r)||(r="");var u=0;return En(n,function(){return r[u++]},t)},kn=E(function(n,r,t){switch(typeof n){case"string":return jn(n,r,t);case"number":return wn(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,lr,b.always(r)):t}}),En=E(function(n,r,t){switch(typeof n){case"string":return jn(n,r(An(n,t),n),t);case"number":return wn(n,r(On(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,lr,r):(r(n(t,void 0),void 0),t)}}),Fn=function(n,r,t){return u=yr(n)(t,void 0,dr,r),Promise.resolve(u);var u},Mn=E(function(n,r,t){switch(typeof r){case"string":return n(An(r,t),r);case"number":return n(On(r,t),r);case"object":for(var u,e=r.length,i=0;i<e;++i)switch(typeof(u=r[i])){case"string":t=An(u,t);break;case"number":t=On(u,t);break;default:return a(i,r)(t,r[i-1],hr,n)}return n(t,r[e-1]);default:return n!==E&&4!==r.length?n(r(t,void 0),void 0):r(t,void 0,hr,n)}}),Rn=function(n,r){return Mn(E,n,r)},qn=function(e,i){return M(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))})},Nn=function(e,i){return M(function(n,r,t,u){return t.map(i,u(e(n),r))})},Pn=function(n,r){return Nn(B(b.isString,n),B(b.isString,r))},zn=function(n,r){return Nn(B(b.isNumber,n),B(b.isNumber,r))},Cn=E(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?Cn(e,r):Mn(E,e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),Dn=E(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?Dn(i,e,t):kn(i,e,t)}return t}),Ln=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},Tn=function(n,r,t,u){return u(n,r)},Wn=E(function(e){return function(n){for(var r={},t=e.length;t--;){var u=n[0];void 0!==u&&(r[e[t]]=u),n=n[1]}return r}}),$n=E(function(n,r,t,u,e,i){var o=void 0,c=!0,f={};for(var a in r){o=1;var s=t[a],v=r[a](s,a,e,i);void 0!==v?(f[a]=v,c&&(c=s===v&&(0!==s||1/s==1/v)||s!=s&&v!=v)):c=!1}var l=o;for(var d in t)if(void 0===(l&&r[d])){o=1;var h=t[d],y=n(h,d,e,i);void 0!==y?(f[d]=y,c&&(c=h===y&&(0!==h||1/h==1/y)||h!=h&&y!=y)):c=!1}return o?c&&t===u?u:f:u}),Bn=function(g,m){return function(n,r,t,u){var e=n instanceof Object?Ln(n):b.object0;if(lr===t)return $n(g,m,e,n,t,u);if(hr!==t){var i=t.map,o=t.ap,c=t.of,f=c(C),a=[];for(var s in m)a.push(s),f=o(i(C,f),m[s](e[s],s,t,u));var v=!!a.length||void 0;for(var l in e)void 0===(v&&m[l])&&(a.push(l),f=o(i(C,f),g(e[l],l,t,u)));return a.length?i(Wn(a),f):c(n)}for(var d in m){var h=m[d](e[d],d,t,u);if(void 0!==h)return h}for(var y in e)if(void 0===m[y]){var p=g(e[y],y,t,u);if(void 0!==p)return p}}},Jn=function(n,r,t){return b.acyclicEqualsU(t,n)?r:t},_n=E(function(n,r,t,u){for(var e,i=0,o=r.length;i<o;++i)(n(e=r[i],i)?t:u).push(e)}),Gn=function(n){return n[0]},Hn=function(n){return n.index},Kn=function(n){return Hn(n)+n[0].length},Qn=E(function(n,r){var t=r.lastIndex;r.lastIndex=Kn(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),Vn=function(t){return function(r){return function(n){return[t,n,r]}}},Xn=Nn(B(w(Object),E(function(n){n=Ln(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),B(b.isArray,E(function(n){for(var r={},t=0,u=n.length;t<u;++t){var e=n[t];2===e.length&&(r[e[0]]=e[1])}return r}))),Yn=E(function(n,r){if(r instanceof Object){var t={};for(var u in r=Ln(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Zn=E(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=Ln(n)){var u=n[t];if(u instanceof Object)for(var e in u=Ln(u))i(e)===t&&(r[e]=u[e])}return r}}}),nr=function(n,r,t){return void 0!==n(r,t,hr,E)},rr=function(t){return function(n,r){return nr(t,n,r)}},tr=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},ur=function(e,i){return i=yr(i),e=yr(e),function(n,r,t,u){return(nr(i,n,r)?i:e)(n,r,t,u)}},er=function(n,r,t,u){return t.of(n)},ir=function(n,r,t,u){return t===lr?H(u,n,void 0):t===hr?e(u,n):o(t,u,n,void 0)},or=function(e,i){return function(n,r,t,u){return t.chain(function(n){return i(n,r,t,u)},e(n,r,t,u))}},cr=function(n,r){return[r,Wt(n)]},fr=function(t){return function(n){for(var r=n;void 0!==n;)n=t(r=n);return r}},ar=function(o,c,f){return function(n,r){var t=c.length;if(vr(n)){vr(r)||(r="");for(var u=Math.max(t,n.length,r.length),e=Array(u),i=0;i<u;++i)if(void 0===(e[i]=o(i<t?c[i]:f,n[i],r[i])))return;return e}}},sr=(0,b.curry)(function(n,r){return qn(ar(Rn,r,n),ar(kn,r,n))}),vr=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},lr=X(b.applyU,E,b.applyU,b.applyU),dr=X(N,E,function(n,r){return N(function(r){return N(function(n){return n(r)},n)},r)},N),hr=an(function(n,r){return void 0!==n?n:r}),yr=E(function(n){switch(typeof n){case"string":return xn(n);case"number":return In(n);case"object":return a(0,n);default:return 4===n.length?n:(e=n,M(function(n,r,t,u){return t.map(b.always(n),u(e(n,r),r))}))}var e}),pr=b.curry(function(n,r,t){return kn([n,Bt(r)],r,t)}),gr=b.curry(Un),mr=b.curry(En),br=b.curry(Fn),Ar=b.curry(function(n,r){return kn(n,void 0,r)}),jr=b.curry(kn),xr=b.curry(dn),Or=function(e){return M(function(n,r,t,u){return yr(e(n,r))(n,r,t,u)})},wr=E(function(){for(var n=arguments.length,r=er;n--;){var t=arguments[n];r=t.length<2?yr(t[0]):tr(yr(t[1]),r)(t[0])}return r}),Ir=E(function(i){i=yr(i);var o=arguments.length-1;if(!o)return er;var n=arguments[o];1===n.length?(--o,n=yr(n[0])):n=er;for(var c=Array(o),f=Array(o+1),r=0;r<o;++r){var t=arguments[r+1];c[r]=t[0],f[r]=yr(t[1])}return f[o]=n,function(n,r,t,u){var e=o;return i(n,r,hr,function(n,r){for(var t=0;t<e;++t)if(c[t](n,r)){if(0===(e=t))return 0;break}}),f[e](n,r,t,u)}}),Sr=b.curry(function(n,r,t){return tr(yr(r),yr(t))(n)}),Ur=b.curry(ur),kr=b.curry(function(t,n){return[n,Or(function(n,r){return void 0!==n?t(n,r):er})]}),Er=tr(er,Tn),Fr=tr(Tn,er),Mr=Fr(b.isDefined),Rr=b.curry(function(e,i){return i=yr(i),M(function(n,t,r,u){return i(n,t,r,function(n,r){return u(n,e(r,t))})})}),qr=F(Rr(function(n,r){return void 0!==r?void 0!==n?[r,n]:r:n})),Nr=F(Rr(b.sndU)),Pr=b.curry(function(n,r){return En(n,E,r)}),zr=b.curry(function(n,r){return Fn(n,E,r)}),Cr=E(function(){var n=arguments.length,r=er;if(n)for(r=yr(arguments[--n]);n;)r=or(yr(arguments[--n]),r);return r}),Dr=function(e){return function(n,r,t,u){return t.of(e)}},Lr=Dr(),Tr=E(b.curryN(2,function(r){return r=yr(r),function(n){return function n(r,t){var u=I(null);for(var e in t){var i=t[e];u[e]=b.isObject(i)?n(r,i):yr(i)}return Bn(r,u)}(r,n)}})),Wr=Tr(er),$r=F(yr([Xn,t])),Br=F(yr([Xn,t,0])),Jr=F(Bn(Tn,U)),_r=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):c(r,t,u,n)}(n,r)}},Gr=_r(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),Hr=b.curry(function(t,n,r){return!Mn(function(n,r){if(!t(n,r))return!0},n,r)}),Kr=Hr(E),Qr=b.curry(function(t,n,r){var u=!1;return Mn(function(n,r){if(!t(n,r))return u=!1;u=!0},n,r),u}),Vr=Qr(E),Xr=b.curry(function(t,n,r){return!!Mn(function(n,r){if(t(n,r))return!0},n,r)}),Yr=(0,b.curry)(function(u,n,r){var e=[];return Mn(function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),Zr=Yr(E),nt=(0,b.curry)(function(t,n,r){var u=[];return Mn(function(n,r){u.push(t(n,r))},n,r),u}),rt=nt(E),tt=hn(E,sn),ut=tt(E),et=b.curry(function(t,n,r){return dn(vn,function(n,r){return t(n,r)?1:0},n,r)}),it=et(b.isDefined),ot=b.curry(function(e,n,r){var i=new Map;return Mn(function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),ct=ot(E),ft=b.curry(function(t,u,n,r){return Mn(function(n,r){u=t(u,n,r)},n,r),u}),at=b.curry(function(n,r,t,u){var e=[],i=[];Mn(function(n,r){i.push(n),e.push(r)},t,u);for(var o=i.length-1;0<=o;--o)r=n(r,i[o],e[o]);return r}),st=b.curry(function(t,n,r){return Mn(function(n,r){t(n,r)},n,r)}),vt=b.curry(function(n,t,r,u){var e=n();return Mn(function(n,r){t(e,n,r)},r,u),e}),lt=b.curry(Mn),dt=b.curry(function(n,r){return void 0!==Mn(E,n,r)}),ht=b.curry(function(n,r){return!Mn(T,n,r)}),yt=hn(P,E(function(t){return an(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),pt=yt(E),gt=ln(O),mt=gt(E),bt=b.curry(function(u,n,r){var e=0,i=0;return Mn(function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),At=bt(E),jt=ln(x),xt=jt(E),Ot=b.curry(function(t,n,r){return!Mn(function(n,r){if(t(n,r))return!0},n,r)}),wt=Xr(E),It=xr(an(p,1)),St=It(D(1)),Ut=s,kt=lt,Et=xr(vn),Ft=Et(L),Mt=b.curry(function(n,r){return qn(n(r),jr(r))}),Rt=b.curry(qn),qt=Rt(E),Nt=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},Pt=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},zt=F(sr(Lr)),Ct=E(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return vr(n)&&_n(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:Q(Q(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),Dt=E,Lt=Or(function(n){return vr(n)&&n.length?n.length-1:0}),Tt=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=vr(u),i=e&&u.length,o=z(0,i,0,f),c=z(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return Q(Q(Q(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?Q(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),Wt=function(n){return b.isObject(n)?Jt(mr(Jr,cr,n)):n},$t=E,Bt=function(n){return d.apply(null,b.keys(n))},Jt=E(function(e){return function(r,n,t,u){return t.map(function(n){return Dn(e,n,r)},u(Cn(e,r),n))}}),_t=b.curry(function(e,i){function o(n){return Jn(i,e,n)}return function(n,r,t,u){return t.map(o,u(Jn(e,i,n),r))}}),Gt=b.curry(Nn),Ht=function(n){var r=h(n),e=s(n),i=function(n){return K(r,n)};return function(n,r,t,u){return t.map(i,u(K(e,n),r))}},Kt=function(e){return function(n,r,t,u){return t.map(function(n){return Mn(E,e,n)},u(kn(e,n,void 0),r))}},Qt=Nn(W,W),Vt=Nn(B(vr,E(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),B(b.isArray,E(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u){var e=n[u];2===e.length&&(t[e[0]]=e[1])}r=t.length;for(var i=0,o=0;o<r;++o){var c=t[o];void 0!==c&&(o!==i&&(t[i]=c),++i)}return t.length=i,t}))),Xt=Nn(G,G),Yt=E(function(n,r,t,u){return t.map($,u((n instanceof Object||b.isString(n))&&1===n.length?n[0]:void 0,r))}),Zt=Nn(B(w(Object),E(function(n){n=Ln(n);var r=[];for(var t in n){var u=n[t];if(b.isArray(u))for(var e=0,i=u.length;e<i;++e)r.push([t,u[e]]);else r.push([t,u])}return r})),B(b.isArray,E(function(n){for(var r=I(null),t=0,u=n.length;t<u;++t){var e=n[t];if(2===e.length){var i=e[0],o=e[1],c=r[i];void 0===c?r[i]=o:b.isArray(c)?c.push(o):r[i]=[c,o]}}return b.assign({},r)}))),nu=E(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return Nn(B(b.isString,q(function(n){return JSON.parse(n,t)})),B(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),ru=Pn(q(decodeURI),encodeURI),tu=Nn(B(b.isString,q(decodeURIComponent)),B(r,encodeURIComponent)),uu=b.curry(function(n,r){return Pn(k(R(n,"g"),r),k(R(r,"g"),n))}),eu=E(function(r){var t=1<arguments.length?arguments[1]:r;return Nn(B(b.isString,function(n){return n.split(t)}),B(b.isArray,function(n){return n.join(r)}))}),iu=E(function(u){var t=R(1<arguments.length?arguments[1]:u,"");return Nn(B(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Hn(r)),n.slice(Kn(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),ou=yr([Nt(function(n){return b.isString(n)?n.replace(/\+/g,"%20"):n}),eu("&"),Ht([iu("="),Ht(tu)]),Kt(Zt)]),cu=zn(j,j);n.seemsArrayLike=vr,n.Identity=lr,n.IdentityAsync=dr,n.Select=hr,n.toFunction=yr,n.assign=pr,n.disperse=gr,n.modify=mr,n.modifyAsync=br,n.remove=Ar,n.set=jr,n.traverse=xr,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:Tn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[f],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],f);return n},n.lazy=function(e){function i(n,r,t,u){return o(n,r,t,u)}var o=function(n,r,t,u){return(o=yr(e(i)))(n,r,t,u)};return i},n.choices=function(n){for(var r=arguments.length,t=Array(1<r?r-1:0),u=1;u<r;u++)t[u-1]=arguments[u];return t.length?ur(t.reduceRight(ur),n):n},n.choose=Or,n.cond=wr,n.condOf=Ir,n.ifElse=Sr,n.orElse=Ur,n.chain=kr,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(ur,er)},n.unless=Er,n.when=Fr,n.optional=Mr,n.zero=er,n.mapIx=function(e){return function(n,r,t,u){return u(n,e(r,n))}},n.setIx=function(e){return function(n,r,t,u){return u(n,e)}},n.tieIx=Rr,n.joinIx=qr,n.skipIx=Nr,n.getLog=function(n,r){var t=dn(mn,function(n){return{p:[n,yn],x:n,c:n}},n,r),u=t.p,e=t.c;u=pn(u,["%O"]);for(var i=2;i<u.length;++i)u[0]+=" <= %O";return console.log.apply(console,u),e},n.log=function(){var n=b.curry(function(n,r){return console.log.apply(console,Q([],0,arguments,0,arguments.length).concat([n,r])),r});return Nn(n("get"),n("set"))},n.transform=Pr,n.transformAsync=zr,n.seq=Cr,n.assignOp=function(n){return[Bt(n),Dr(n)]},n.modifyOp=function(e){return function(n,r,t,u){return t.of(e(n,r))}},n.setOp=Dr,n.removeOp=Lr,n.branchOr=Tr,n.branch=Wr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=Tn;return Wr(r)},n.elems=t,n.elemsTotal=function(n,r,t,u){return vr(n)?t===lr?H(u,n,H):t===hr?e(u,n):o(t,u,n,o):t.of(n)},n.entries=$r,n.keys=Br,n.matches=function(f){return function(r,n,t,u){if(b.isString(r)){var e=t.map;if(f.global){var i=[""];return i.input=r,i.index=0,hr===t?function(n,r,t){for(;t=Qn(t,r);){var u=n(Gn(t),Hn(t));if(void 0!==u)return u}}(u,f,i):e((c=r,function(n){for(var r="",t=0,u=function(n){for(var r=[];Vn!==n;)r.push(n[0],n[1]),n=n[2];return r}(n),e=u.length-2;-2!==e;e+=-2){var i=u[e];r+=c.slice(t,Hn(i));var o=u[e+1];void 0!==o&&(r+=o),t=Kn(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(Vn);i=Qn(i,e);)o=r(r(n(Vn,t(i)),o),u(Gn(i),Hn(i)));return o}(e,t.ap,t.of,u,f,i))}var o=r.match(f);if(o)return e(function(n){return r.replace(f,void 0!==n?n:"")},u(o[0],Hn(o)))}var c;return t.of(r)}},n.values=Jr,n.children=c,n.flatten=f,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=yr(arguments[r]);n.push(_r(rr(u)),u)}return n},n.satisfying=_r,n.leafs=Gr,n.all=Hr,n.and=Kr,n.all1=Qr,n.and1=Vr,n.any=Xr,n.collectAs=Yr,n.collect=Zr,n.collectTotalAs=nt,n.collectTotal=rt,n.concatAs=tt,n.concat=ut,n.countIf=et,n.count=it,n.countsAs=ot,n.counts=ct,n.foldl=ft,n.foldr=at,n.forEach=st,n.forEachWith=vt,n.get=s,n.getAs=lt,n.isDefined=dt,n.isEmpty=ht,n.joinAs=yt,n.join=pt,n.maximumBy=gt,n.maximum=mt,n.meanAs=bt,n.mean=At,n.minimumBy=jt,n.minimum=xt,n.none=Ot,n.or=wt,n.productAs=It,n.product=St,n.select=Ut,n.selectAs=kt,n.sumAs=Et,n.sum=Ft,n.foldTraversalLens=Mt,n.getter=function(e){return function(n,r,t,u){return u(e(n,r),r)}},n.lens=Rt,n.partsOf=function(e){return function(r,n,t,u){return t.map(function(n){return Un(e,n,r)},u(rt(e,r),n))}},n.setter=qt,n.defaults=function(e){function i(n){return Jn(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=function(e){var i=D(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.normalize=function(n){return[Nt(n),Pt(n)]},n.required=function(n){return _t(n,void 0)},n.reread=Nt,n.rewrite=Pt,n.append=v,n.cross=zt,n.filter=Ct,n.find=l,n.findWith=function(n){var r=yr(n),t=rr(r);return[1<arguments.length?l(t,arguments[1]):l(t),r]},n.first=0,n.index=Dt,n.last=Lt,n.prefix=function(n){return Tt(0,n)},n.slice=Tt,n.suffix=function(n){return Tt(0===n?1/0:n?-n:0,void 0)},n.pickIn=Wt,n.prop=$t,n.props=d,n.propsOf=Bt,n.removable=function(){function e(n){if(!(n instanceof Object))return n;for(var r=0,t=u.length;r<t;++r)if(b.hasU(u[r],n))return n}for(var n=arguments.length,u=Array(n),r=0;r<n;r++)u[r]=arguments[r];return function(n,r,t,u){return t.map(e,u(n,r))}},n.valueOr=function(e){return function(n,r,t,u){return u(null!=n?n:e,r)}},n.pick=Jt,n.replace=_t,n.getInverse=h,n.iso=Gt,n.array=Ht,n.inverse=Kt,n.iterate=function(n){return Nn(fr(s(n)),fr(h(n)))},n.complement=Qt,n.identity=Tn,n.is=function(r){return Nn(function(n){return b.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.subset=function(n){var r,t=(r=n,function(n){return r(n)?n:void 0});return Nn(t,t)},n.indexed=Vt,n.reverse=Xt,n.singleton=Yt,n.disjoint=function(i){return function(n,r,t,u){var e=Zn(i);return t.map(e,u(Yn(i,n),r))}},n.keyed=Xn,n.multikeyed=Zt,n.json=nu,n.uri=ru,n.uriComponent=tu,n.dropPrefix=function(r){return Pn(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return Pn(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=uu,n.split=eu,n.uncouple=iu,n.querystring=ou,n.add=function(n){return zn(g(n),g(-n))},n.divide=function(n){return zn(A(n),m(n))},n.multiply=function(n){return zn(m(n),A(n))},n.negate=cu,n.subtract=function(n){return zn(g(-n),g(n))},n.FantasyFunctor=on,n.fromFantasy=function(n){return n.prototype[nn]?fn(n):n[Z]?cn(n):on},n.fromFantasyApplicative=cn,n.fromFantasyMonad=fn,n.pointer=function(n){"#"===n[0]&&(n=decodeURIComponent(n));for(var r=n.split("/"),t=r.length,u=1;u<t;++u){var e=r[u];r[u-1]=/^(0|[1-9]\d*)$/.test(e)?Sr(_,Number(e),e):"-"===e?Sr(_,v,e):e.replace("~1","/").replace("~0","~")}return r.length=t-1,r},Object.defineProperty(n,"__esModule",{value:!0})}); | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],r):r(n.L={},n.I)}(this,function(n,b){"use strict";function r(n){switch(typeof n){case"boolean":case"number":case"string":return!0;default:return!1}}function e(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}function i(n){if(!this)return J(new i(n));this.map=n}function o(n,r,t,u){var e=n.map,i=n.ap,o=n.of(yn),c=t.length;if(e===b.sndU){for(var f=0;f<c;++f)o=i(o,r(t[f],f));return o}for(var a=yn(u),v=0;v<c;++v)o=i(e(a,o),r(t[v],v));return e(gn,o)}function a(n,r){var t=r.length-n;if(t<2)return t?gr(r[n]):Tn;for(var e=gr(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=Sn(gr(r[n+t]),i);var o=gr(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function u(n,r,t,u){for(var e,i,o=n.length,c=Array(o),f=0;f<o;++f)switch(c[f]=t,typeof(e=n[f])){case"string":t=An(e,t);break;case"number":t=On(e,t);break;default:t=a(f,n)(t,n[f-1],hr,r||b.always(u)),o=f}for(o===n.length&&(t=r?r(t,n[o-1]):u);0<=--o;)t=b.isString(i=n[o])?jn(i,t,c[o]):wn(i,t,c[o]);return t}function t(n,r,t,u){return dr(n)?cr(n,0,t,u):t.of(n)}function c(n,r,t,u){return b.isArray(n)?cr(n,0,t,u):b.isObject(n)?Hr(n,r,t,u):t.of(n)}function f(n,r,u,e){return function n(r,t){return b.isArray(r)?cr(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}function v(r,n){return 1<arguments.length?Mn(E,r,n):function(n){return Mn(E,r,n)}}function s(r,n,t,u){var e=dr(r)?r.length:0;return t.map(function(n){return wn(e,n,r)},u(void 0,e))}function l(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=dr(n)?n:"",i=c.hint=function(n,r,t){var u=n.hint,e=t.length;e<=u&&(u=e-1),u<0&&(u=0);for(var i=u-1;0<=i&&u<e;++u,--i){if(r(t[u],u,n))return u;if(r(t[i],i,n))return i}for(;u<e;++u)if(r(t[u],u,n))return u;for(;0<=i;--i)if(r(t[i],i,n))return i;return e}(c,o,e);return t.map(function(n){return wn(i,n,e)},u(e[i],i))}}function d(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return Ht(t)}function h(r,n){return 1<arguments.length?kn(r,n,void 0):function(n){return kn(r,n,void 0)}}var y=function(n,r){return n+r},p=function(n,r){return n*r},g=b.curry(y),m=b.curry(p),A=b.curry(function(n,r){return r/n}),j=function(n){return-n},x=function(n,r){return n<r},O=function(n,r){return r<n},w=b.curry(function(n,r){return r instanceof n}),I=Object.create,S=function(n){return b.assign(I(null),n)},U=b.freeze(S(b.object0)),k=b.curry(function(n,r,t){return t.replace(n,r)}),E=function(n){return n},F=function(n){return n},M=function(n){return n},q=function(n,r){return b.isString(n)?new RegExp(k(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},N=function(r){return M(function(n){try{return r(n)}catch(n){return n}})},R=function(n,r){return null!=r&&b.isFunction(r.then)?r.then(n):n(r)},P=function(n){return void 0!==n?String(n):""},z=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},C=function(r){return function(n){return[n,r]}},D=function(r){return function(n){return void 0!==n?n:r}},L=D(0),T=b.always(!0),W=function(n){return void 0!==n?!n:n},$=function(n){return void 0!==n?[n]:n},B=function(r,t){return M(function(n){return r(n)?t(n):void 0})},J=E,_=function(n){return!(n instanceof Object)||b.isArray(n)},G=E(function(n){if(dr(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),H=E(function(n,r,t){for(var u=r.length,e=Array(u),i=0,o=!0,c=0;c<u;++c){var f=r[c],a=n(f,c);t!==a&&(e[i++]=a,o&&(o=f===a&&(0!==f||1/f==1/a)||f!=f&&a!=a))}return i!==u?(e.length=i,e):o?r:e}),K=function(n,r){return dr(r)?H(n,r,void 0):void 0},Q=E(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),V=b.inherit(function n(r,t,u){if(!this)return J(new n(r,t,u));i.call(this,r),this.of=t,this.ap=u},i),X=b.inherit(function n(r,t,u,e){if(!this)return J(new n(r,t,u,e));V.call(this,r,t,u),this.chain=e},V),Y="fantasy-land/",Z=Y+"of",nn=Y+"chain",rn=function(t){return F(function(n,r){return r[t](n)})},tn=rn("fantasy-land/map"),un=rn("fantasy-land/ap"),en=rn(nn),on=i(tn),cn=function(n){return V(tn,n[Z],un)},fn=function(n){return X(tn,n[Z],un,en)},an=function(n,r){return V(b.sndU,b.always(r),n)},vn=function(n){return an(n.concat,(0,n.empty)())},sn=an(y,0),ln=function(o){return b.curry(function(u,n,r){var e=void 0,i=void 0;return Mn(function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},dn=function(n,r,t,u){return gr(t)(u,void 0,n,r)},hn=function(e,n){return b.curryN(4,M(function(t,u){return u=n(u),function(n,r){return e(dn(u,t,n,r))}}))},yn=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},pn=function(n,r){for(;yn!==n;)r.push(n[0]),n=n[1];return r},gn=E(function(n){return pn(n,[]).reverse()}),mn=V(function(n,r){var t=r.p,u=r.x,e=r.c;return u=n(u),b.isFunction(u)||(t=[u,t]),{p:t,x:u,c:e}},function(n){return{p:[],x:n,c:void 0}},function(n,r){var t=void 0!==n.c?n:r;return{p:t.p,x:n.x(r.x),c:t.c}}),bn=function(i,o){return function(e){return function(r,n,t,u){return t.map(function(n){return o(e,n,r)},u(i(e,r),e))}}},An=function(n,r){return r instanceof Object?r[n]:void 0},jn=E(function(n,r,t){return void 0!==r?b.assocPartialU(n,r,t):b.dissocPartialU(n,t)||b.object0}),xn=bn(An,jn),On=function(n,r){return dr(r)?r[n]:void 0},wn=E(function(n,r,t){dr(t)||(t="");var u=t.length;if(void 0!==r){for(var e=Math.max(n+1,u),i=Array(e),o=0;o<e;++o)i[o]=t[o];return i[n]=r,i}if(u<=n)return Q(Array(u),0,t,0,u);for(var c=Array(u-1),f=0;f<n;++f)c[f]=t[f];for(var a=n+1;a<u;++a)c[a-1]=t[a];return c}),In=bn(On,wn),Sn=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},Un=function(n,r,t){dr(r)||(r="");var u=0;return En(n,function(){return r[u++]},t)},kn=E(function(n,r,t){switch(typeof n){case"string":return jn(n,r,t);case"number":return wn(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,hr,b.always(r)):t}}),En=E(function(n,r,t){switch(typeof n){case"string":return jn(n,r(An(n,t),n),t);case"number":return wn(n,r(On(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,hr,r):(r(n(t,void 0),void 0),t)}}),Fn=function(n,r,t){return u=gr(n)(t,void 0,yr,r),Promise.resolve(u);var u},Mn=E(function(n,r,t){switch(typeof r){case"string":return n(An(r,t),r);case"number":return n(On(r,t),r);case"object":for(var u,e=r.length,i=0;i<e;++i)switch(typeof(u=r[i])){case"string":t=An(u,t);break;case"number":t=On(u,t);break;default:return a(i,r)(t,r[i-1],pr,n)}return n(t,r[e-1]);default:return n!==E&&4!==r.length?n(r(t,void 0),void 0):r(t,void 0,pr,n)}}),qn=function(n,r){return Mn(E,n,r)},Nn=function(e,i){return M(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))})},Rn=function(e,i){return M(function(n,r,t,u){return t.map(i,u(e(n),r))})},Pn=function(n,r){return Rn(B(b.isString,n),B(b.isString,r))},zn=function(n,r){return Rn(B(b.isNumber,n),B(b.isNumber,r))},Cn=E(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?Cn(e,r):Mn(E,e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),Dn=E(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?Dn(i,e,t):kn(i,e,t)}return t}),Ln=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},Tn=function(n,r,t,u){return u(n,r)},Wn=E(function(e){return function(n){for(var r={},t=e.length;t--;){var u=n[0];void 0!==u&&(r[e[t]]=u),n=n[1]}return r}}),$n=E(function(n,r,t,u,e,i){var o=void 0,c=!0,f={};for(var a in r){o=1;var v=t[a],s=r[a](v,a,e,i);void 0!==s?(f[a]=s,c&&(c=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):c=!1}var l=o;for(var d in t)if(void 0===(l&&r[d])){o=1;var h=t[d],y=n(h,d,e,i);void 0!==y?(f[d]=y,c&&(c=h===y&&(0!==h||1/h==1/y)||h!=h&&y!=y)):c=!1}return o?c&&t===u?u:f:u}),Bn=function(g,m){return function(n,r,t,u){var e=n instanceof Object?Ln(n):b.object0;if(hr===t)return $n(g,m,e,n,t,u);if(pr!==t){var i=t.map,o=t.ap,c=t.of,f=c(C),a=[];for(var v in m)a.push(v),f=o(i(C,f),m[v](e[v],v,t,u));var s=!!a.length||void 0;for(var l in e)void 0===(s&&m[l])&&(a.push(l),f=o(i(C,f),g(e[l],l,t,u)));return a.length?i(Wn(a),f):c(n)}for(var d in m){var h=m[d](e[d],d,t,u);if(void 0!==h)return h}for(var y in e)if(void 0===m[y]){var p=g(e[y],y,t,u);if(void 0!==p)return p}}},Jn=function(n,r,t){return b.acyclicEqualsU(t,n)?r:t},_n=E(function(n,r,t,u){for(var e,i=0,o=r.length;i<o;++i)(n(e=r[i],i)?t:u).push(e)}),Gn=function(n){return n[0]},Hn=function(n){return n.index},Kn=function(n){return Hn(n)+n[0].length},Qn=E(function(n,r){var t=r.lastIndex;r.lastIndex=Kn(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),Vn=function(t){return function(r){return function(n){return[t,n,r]}}},Xn=Rn(B(w(Object),E(function(n){n=Ln(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),B(b.isArray,E(function(n){for(var r={},t=0,u=n.length;t<u;++t){var e=n[t];2===e.length&&(r[e[0]]=e[1])}return r}))),Yn=E(function(n,r){if(r instanceof Object){var t={};for(var u in r=Ln(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Zn=E(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=Ln(n)){var u=n[t];if(u instanceof Object)for(var e in u=Ln(u))i(e)===t&&(r[e]=u[e])}return r}}}),nr=function(n,r,t){return void 0!==n(r,t,pr,E)},rr=function(t){return function(n,r){return nr(t,n,r)}},tr=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},ur=function(e,i){return i=gr(i),e=gr(e),function(n,r,t,u){return(nr(i,n,r)?i:e)(n,r,t,u)}},er=function(i,o){o=gr(o),i=gr(i);var c=function(n){n=b.always(n);var r=o(void 0,void 0,hr,n);return void 0===r?i(void 0,void 0,hr,n):r};return function(n,r,t,u){var e=o(n,r,pr,E);return t.map(c,u(void 0===e?i(n,r,pr,E):e,r))}},ir=function(u){return M(function(n){for(var r=arguments.length,t=arguments[--r];r;)t=u(t,arguments[--r]);return t})},or=function(n,r,t,u){return t.of(n)},cr=function(n,r,t,u){return t===hr?H(u,n,void 0):t===pr?e(u,n):o(t,u,n,void 0)},fr=function(e,i){return function(n,r,t,u){return t.chain(function(n){return i(n,r,t,u)},e(n,r,t,u))}},ar=function(n,r){return[r,Jt(n)]},vr=function(t){return function(n){for(var r=n;void 0!==n;)n=t(r=n);return r}},sr=function(o,c,f){return function(n,r){var t=c.length;if(dr(n)){dr(r)||(r="");for(var u=Math.max(t,n.length,r.length),e=Array(u),i=0;i<u;++i)if(void 0===(e[i]=o(i<t?c[i]:f,n[i],r[i])))return;return e}}},lr=(0,b.curry)(function(n,r){return Nn(sr(qn,r,n),sr(kn,r,n))}),dr=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},hr=X(b.applyU,E,b.applyU,b.applyU),yr=X(R,E,function(n,r){return R(function(r){return R(function(n){return n(r)},n)},r)},R),pr=an(function(n,r){return void 0!==n?n:r}),gr=E(function(n){switch(typeof n){case"string":return xn(n);case"number":return In(n);case"object":return a(0,n);default:return 4===n.length?n:(e=n,M(function(n,r,t,u){return t.map(b.always(n),u(e(n,r),r))}))}var e}),mr=b.curry(function(n,r,t){return kn([n,Gt(r)],r,t)}),br=b.curry(Un),Ar=b.curry(En),jr=b.curry(Fn),xr=b.curry(function(n,r){return kn(n,void 0,r)}),Or=b.curry(kn),wr=b.curry(dn),Ir=ir(ur),Sr=function(e){return M(function(n,r,t,u){return gr(e(n,r))(n,r,t,u)})},Ur=E(function(){for(var n=arguments.length,r=or;n--;){var t=arguments[n];r=t.length<2?gr(t[0]):tr(gr(t[1]),r)(t[0])}return r}),kr=E(function(i){i=gr(i);var o=arguments.length-1;if(!o)return or;var n=arguments[o];n=1===n.length?(--o,gr(n[0])):or;for(var c=Array(o),f=Array(o+1),r=0;r<o;++r){var t=arguments[r+1];c[r]=t[0],f[r]=gr(t[1])}return f[o]=n,function(n,r,t,u){var e=o;return i(n,r,pr,function(n,r){for(var t=0;t<e;++t)if(c[t](n,r)){if(0===(e=t))return 0;break}}),f[e](n,r,t,u)}}),Er=b.curry(function(n,r,t){return tr(gr(r),gr(t))(n)}),Fr=b.curry(ur),Mr=b.curry(function(t,n){return[n,Sr(function(n,r){return void 0!==n?t(n,r):or})]}),qr=tr(or,Tn),Nr=tr(Tn,or),Rr=Nr(b.isDefined),Pr=b.curry(function(e,i){return i=gr(i),M(function(n,t,r,u){return i(n,t,r,function(n,r){return u(n,e(r,t))})})}),zr=F(Pr(function(n,r){return void 0!==r?void 0!==n?[r,n]:r:n})),Cr=F(Pr(b.sndU)),Dr=b.curry(function(n,r){return En(n,E,r)}),Lr=b.curry(function(n,r){return Fn(n,E,r)}),Tr=E(function(){var n=arguments.length,r=or;if(n)for(r=gr(arguments[--n]);n;)r=fr(gr(arguments[--n]),r);return r}),Wr=function(e){return function(n,r,t,u){return t.of(e)}},$r=Wr(),Br=E(b.curryN(2,function(r){return r=gr(r),function(n){return function n(r,t){var u=I(null);for(var e in t){var i=t[e];u[e]=b.isObject(i)?n(r,i):gr(i)}return Bn(r,u)}(r,n)}})),Jr=Br(or),_r=F(gr([Xn,t])),Gr=F(gr([Xn,t,0])),Hr=F(Bn(Tn,U)),Kr=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):c(r,t,u,n)}(n,r)}},Qr=Kr(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),Vr=b.curry(function(t,n,r){return!Mn(function(n,r){if(!t(n,r))return!0},n,r)}),Xr=Vr(E),Yr=b.curry(function(t,n,r){var u=!1;return Mn(function(n,r){if(!t(n,r))return u=!1;u=!0},n,r),u}),Zr=Yr(E),nt=b.curry(function(t,n,r){return!!Mn(function(n,r){if(t(n,r))return!0},n,r)}),rt=(0,b.curry)(function(u,n,r){var e=[];return Mn(function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),tt=rt(E),ut=(0,b.curry)(function(t,n,r){var u=[];return Mn(function(n,r){u.push(t(n,r))},n,r),u}),et=ut(E),it=hn(E,vn),ot=it(E),ct=b.curry(function(t,n,r){return dn(sn,function(n,r){return t(n,r)?1:0},n,r)}),ft=ct(b.isDefined),at=b.curry(function(e,n,r){var i=new Map;return Mn(function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),vt=at(E),st=b.curry(function(t,u,n,r){return Mn(function(n,r){u=t(u,n,r)},n,r),u}),lt=b.curry(function(n,r,t,u){var e=[],i=[];Mn(function(n,r){i.push(n),e.push(r)},t,u);for(var o=i.length-1;0<=o;--o)r=n(r,i[o],e[o]);return r}),dt=b.curry(function(t,n,r){return Mn(function(n,r){t(n,r)},n,r)}),ht=b.curry(function(n,t,r,u){var e=n();return Mn(function(n,r){t(e,n,r)},r,u),e}),yt=b.curry(Mn),pt=b.curry(function(n,r){return void 0!==Mn(E,n,r)}),gt=b.curry(function(n,r){return!Mn(T,n,r)}),mt=hn(P,E(function(t){return an(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),bt=mt(E),At=ln(O),jt=At(E),xt=b.curry(function(u,n,r){var e=0,i=0;return Mn(function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),Ot=xt(E),wt=ln(x),It=wt(E),St=b.curry(function(t,n,r){return!Mn(function(n,r){if(t(n,r))return!0},n,r)}),Ut=nt(E),kt=wr(an(p,1)),Et=kt(D(1)),Ft=v,Mt=yt,qt=wr(sn),Nt=qt(L),Rt=b.curry(function(n,r){return Nn(n(r),Or(r))}),Pt=b.curry(Nn),zt=Pt(E),Ct=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},Dt=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},Lt=F(lr($r)),Tt=E(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return dr(n)&&_n(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:Q(Q(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),Wt=E,$t=Sr(function(n){return dr(n)&&n.length?n.length-1:0}),Bt=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=dr(u),i=e&&u.length,o=z(0,i,0,f),c=z(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return Q(Q(Q(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?Q(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),Jt=function(n){return b.isObject(n)?Ht(Ar(Hr,ar,n)):n},_t=E,Gt=function(n){return d.apply(null,b.keys(n))},Ht=E(function(e){return function(r,n,t,u){return t.map(function(n){return Dn(e,n,r)},u(Cn(e,r),n))}}),Kt=b.curry(function(e,i){function o(n){return Jn(i,e,n)}return function(n,r,t,u){return t.map(o,u(Jn(e,i,n),r))}}),Qt=b.curry(Rn),Vt=ir(er),Xt=function(n){var r=h(n),e=v(n),i=function(n){return K(r,n)};return function(n,r,t,u){return t.map(i,u(K(e,n),r))}},Yt=function(e){return function(n,r,t,u){return t.map(function(n){return Mn(E,e,n)},u(kn(e,n,void 0),r))}},Zt=b.curry(er),nu=Rn(W,W),ru=Rn(B(dr,E(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),B(b.isArray,E(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u){var e=n[u];2===e.length&&(t[e[0]]=e[1])}r=t.length;for(var i=0,o=0;o<r;++o){var c=t[o];void 0!==c&&(o!==i&&(t[i]=c),++i)}return t.length=i,t}))),tu=Rn(G,G),uu=E(function(n,r,t,u){return t.map($,u((n instanceof Object||b.isString(n))&&1===n.length?n[0]:void 0,r))}),eu=Rn(B(w(Object),E(function(n){n=Ln(n);var r=[];for(var t in n){var u=n[t];if(b.isArray(u))for(var e=0,i=u.length;e<i;++e)r.push([t,u[e]]);else r.push([t,u])}return r})),B(b.isArray,E(function(n){for(var r=I(null),t=0,u=n.length;t<u;++t){var e=n[t];if(2===e.length){var i=e[0],o=e[1],c=r[i];void 0===c?r[i]=o:b.isArray(c)?c.push(o):r[i]=[c,o]}}return b.assign({},r)}))),iu=E(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return Rn(B(b.isString,N(function(n){return JSON.parse(n,t)})),B(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),ou=Pn(N(decodeURI),encodeURI),cu=Rn(B(b.isString,N(decodeURIComponent)),B(r,encodeURIComponent)),fu=b.curry(function(n,r){return Pn(k(q(n,"g"),r),k(q(r,"g"),n))}),au=E(function(r){var t=1<arguments.length?arguments[1]:r;return Rn(B(b.isString,function(n){return n.split(t)}),B(b.isArray,function(n){return n.join(r)}))}),vu=E(function(u){var t=q(1<arguments.length?arguments[1]:u,"");return Rn(B(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Hn(r)),n.slice(Kn(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),su=gr([Ct(function(n){return b.isString(n)?n.replace(/\+/g,"%20"):n}),au("&"),Xt([vu("="),Xt(cu)]),Yt(eu)]),lu=zn(j,j);n.seemsArrayLike=dr,n.Identity=hr,n.IdentityAsync=yr,n.Select=pr,n.toFunction=gr,n.assign=mr,n.disperse=br,n.modify=Ar,n.modifyAsync=jr,n.remove=xr,n.set=Or,n.traverse=wr,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:Tn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[f],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],f);return n},n.lazy=function(e){function i(n,r,t,u){return o(n,r,t,u)}var o=function(n,r,t,u){return(o=gr(e(i)))(n,r,t,u)};return i},n.choices=Ir,n.choose=Sr,n.cond=Ur,n.condOf=kr,n.ifElse=Er,n.orElse=Fr,n.chain=Mr,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(ur,or)},n.unless=qr,n.when=Nr,n.optional=Rr,n.zero=or,n.mapIx=function(e){return function(n,r,t,u){return u(n,e(r,n))}},n.setIx=function(e){return function(n,r,t,u){return u(n,e)}},n.tieIx=Pr,n.joinIx=zr,n.skipIx=Cr,n.getLog=function(n,r){var t=dn(mn,function(n){return{p:[n,yn],x:n,c:n}},n,r),u=t.p,e=t.c;u=pn(u,["%O"]);for(var i=2;i<u.length;++i)u[0]+=" <= %O";return console.log.apply(console,u),e},n.log=function(){var n=b.curry(function(n,r){return console.log.apply(console,Q([],0,arguments,0,arguments.length).concat([n,r])),r});return Rn(n("get"),n("set"))},n.transform=Dr,n.transformAsync=Lr,n.seq=Tr,n.assignOp=function(n){return[Gt(n),Wr(n)]},n.modifyOp=function(e){return function(n,r,t,u){return t.of(e(n,r))}},n.setOp=Wr,n.removeOp=$r,n.branchOr=Br,n.branch=Jr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=Tn;return Jr(r)},n.elems=t,n.elemsTotal=function(n,r,t,u){return dr(n)?t===hr?H(u,n,H):t===pr?e(u,n):o(t,u,n,o):t.of(n)},n.entries=_r,n.keys=Gr,n.matches=function(f){return function(r,n,t,u){if(b.isString(r)){var e=t.map;if(f.global){var i=[""];return i.input=r,i.index=0,pr===t?function(n,r,t){for(;t=Qn(t,r);){var u=n(Gn(t),Hn(t));if(void 0!==u)return u}}(u,f,i):e((c=r,function(n){for(var r="",t=0,u=function(n){for(var r=[];Vn!==n;)r.push(n[0],n[1]),n=n[2];return r}(n),e=u.length-2;-2!==e;e+=-2){var i=u[e];r+=c.slice(t,Hn(i));var o=u[e+1];void 0!==o&&(r+=o),t=Kn(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(Vn);i=Qn(i,e);)o=r(r(n(Vn,t(i)),o),u(Gn(i),Hn(i)));return o}(e,t.ap,t.of,u,f,i))}var o=r.match(f);if(o)return e(function(n){return r.replace(f,void 0!==n?n:"")},u(o[0],Hn(o)))}var c;return t.of(r)}},n.values=Hr,n.children=c,n.flatten=f,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=gr(arguments[r]);n.push(Kr(rr(u)),u)}return n},n.satisfying=Kr,n.leafs=Qr,n.all=Vr,n.and=Xr,n.all1=Yr,n.and1=Zr,n.any=nt,n.collectAs=rt,n.collect=tt,n.collectTotalAs=ut,n.collectTotal=et,n.concatAs=it,n.concat=ot,n.countIf=ct,n.count=ft,n.countsAs=at,n.counts=vt,n.foldl=st,n.foldr=lt,n.forEach=dt,n.forEachWith=ht,n.get=v,n.getAs=yt,n.isDefined=pt,n.isEmpty=gt,n.joinAs=mt,n.join=bt,n.maximumBy=At,n.maximum=jt,n.meanAs=xt,n.mean=Ot,n.minimumBy=wt,n.minimum=It,n.none=St,n.or=Ut,n.productAs=kt,n.product=Et,n.select=Ft,n.selectAs=Mt,n.sumAs=qt,n.sum=Nt,n.foldTraversalLens=Rt,n.getter=function(e){return function(n,r,t,u){return u(e(n,r),r)}},n.lens=Pt,n.partsOf=function(e){return function(r,n,t,u){return t.map(function(n){return Un(e,n,r)},u(et(e,r),n))}},n.setter=zt,n.defaults=function(e){function i(n){return Jn(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=function(e){var i=D(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.normalize=function(n){return[Ct(n),Dt(n)]},n.required=function(n){return Kt(n,void 0)},n.reread=Ct,n.rewrite=Dt,n.append=s,n.cross=Lt,n.filter=Tt,n.find=l,n.findWith=function(n){var r=gr(n),t=rr(r);return[1<arguments.length?l(t,arguments[1]):l(t),r]},n.first=0,n.index=Wt,n.last=$t,n.prefix=function(n){return Bt(0,n)},n.slice=Bt,n.suffix=function(n){return Bt(0===n?1/0:n?-n:0,void 0)},n.pickIn=Jt,n.prop=_t,n.props=d,n.propsOf=Gt,n.removable=function(){function e(n){if(!(n instanceof Object))return n;for(var r=0,t=u.length;r<t;++r)if(b.hasU(u[r],n))return n}for(var n=arguments.length,u=Array(n),r=0;r<n;r++)u[r]=arguments[r];return function(n,r,t,u){return t.map(e,u(n,r))}},n.valueOr=function(e){return function(n,r,t,u){return u(null!=n?n:e,r)}},n.pick=Ht,n.replace=Kt,n.getInverse=h,n.iso=Qt,n.alternatives=Vt,n.array=Xt,n.inverse=Yt,n.iterate=function(n){return Rn(vr(v(n)),vr(h(n)))},n.orAlternatively=Zt,n.complement=nu,n.identity=Tn,n.is=function(r){return Rn(function(n){return b.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.subset=function(n){var r,t=(r=n,function(n){return r(n)?n:void 0});return Rn(t,t)},n.indexed=ru,n.reverse=tu,n.singleton=uu,n.disjoint=function(i){return function(n,r,t,u){var e=Zn(i);return t.map(e,u(Yn(i,n),r))}},n.keyed=Xn,n.multikeyed=eu,n.json=iu,n.uri=ou,n.uriComponent=cu,n.dropPrefix=function(r){return Pn(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return Pn(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=fu,n.split=au,n.uncouple=vu,n.querystring=su,n.add=function(n){return zn(g(n),g(-n))},n.divide=function(n){return zn(A(n),m(n))},n.multiply=function(n){return zn(m(n),A(n))},n.negate=lu,n.subtract=function(n){return zn(g(-n),g(n))},n.FantasyFunctor=on,n.fromFantasy=function(n){return n.prototype[nn]?fn(n):n[Z]?cn(n):on},n.fromFantasyApplicative=cn,n.fromFantasyMonad=fn,n.pointer=function(n){"#"===n[0]&&(n=decodeURIComponent(n));for(var r=n.split("/"),t=r.length,u=1;u<t;++u){var e=r[u];r[u-1]=/^(0|[1-9]\d*)$/.test(e)?Er(_,Number(e),e):"-"===e?Er(_,s,e):e.replace("~1","/").replace("~0","~")}return r.length=t-1,r},Object.defineProperty(n,"__esModule",{value:!0})}); |
{ | ||
"name": "partial.lenses", | ||
"version": "14.6.0", | ||
"version": "14.7.0", | ||
"description": "Partial lenses is a comprehensive, high-performance optics library for JavaScript", | ||
@@ -70,6 +70,6 @@ "module": "dist/partial.lenses.es.js", | ||
"benchmark": "^2.1.4", | ||
"codecov": "^3.0.4", | ||
"codecov": "^3.1.0", | ||
"concurrently": "^4.0.1", | ||
"eslint": "^5.4.0", | ||
"klipse-github-docs-generator": "^0.3.6", | ||
"eslint": "^5.6.0", | ||
"klipse-github-docs-generator": "^0.3.7", | ||
"livereload": "^0.7.0", | ||
@@ -79,7 +79,7 @@ "mocha": "^5.2.0", | ||
"ramda": "^0.25.0", | ||
"rollup": "^0.65.0", | ||
"rollup": "^0.66.0", | ||
"rollup-plugin-babel": "^3.0.7", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-plugin-node-resolve": "^3.4.0", | ||
"rollup-plugin-replace": "^2.0.0", | ||
"rollup-plugin-uglify": "^5.0.2", | ||
"rollup-plugin-uglify": "^6.0.0", | ||
"sprintf-js": "^1.1.1", | ||
@@ -86,0 +86,0 @@ "watch-run": "^1.2.5" |
@@ -886,2 +886,26 @@ import * as I from './ext/infestines' | ||
const orAlternativelyU = function orAlternatively(back, prim) { | ||
prim = toFunction(prim) | ||
back = toFunction(back) | ||
const fwd = y => { | ||
y = I.always(y) | ||
const yP = prim(void 0, void 0, Identity, y) | ||
return void 0 === yP ? back(void 0, void 0, Identity, y) : yP | ||
} | ||
return function orAlternatively(x, i, F, xi2yF) { | ||
const xP = prim(x, i, Select, id) | ||
return F.map(fwd, xi2yF(void 0 === xP ? back(x, i, Select, id) : xP, i)) | ||
} | ||
} | ||
const makeSemi = op => | ||
copyName(function(_) { | ||
let n = arguments.length | ||
let r = arguments[--n] | ||
while (n) { | ||
r = op(r, arguments[--n]) | ||
} | ||
return r | ||
}, op) | ||
const zero = (x, _i, C, _xi2yC) => C.of(x) | ||
@@ -1029,4 +1053,3 @@ | ||
export const choices = (o, ...os) => | ||
os.length ? orElseU(os.reduceRight(orElseU), o) : o | ||
export const choices = makeSemi(orElseU) | ||
@@ -1776,2 +1799,4 @@ export const choose = xiM2o => | ||
export const alternatives = makeSemi(orAlternativelyU) | ||
export const array = elem => { | ||
@@ -1790,2 +1815,4 @@ const fwd = getInverse(elem) | ||
export const orAlternatively = I.curry(orAlternativelyU) | ||
// Basic isomorphisms | ||
@@ -1792,0 +1819,0 @@ |
Sorry, the diff of this file is too big to display
562539
7710
5773