partial.lenses
Advanced tools
Comparing version 14.5.0 to 14.6.0
@@ -635,2 +635,10 @@ 'use strict'; | ||
var disperseU = function disperse(traversal, values, data) { | ||
if (!seemsArrayLike(values)) values = ''; | ||
var i = 0; | ||
return modifyU(traversal, function () { | ||
return values[i++]; | ||
}, data); | ||
}; | ||
var setU = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : par(0, ef(reqOptic)))(function set(o, x, s) { | ||
@@ -1204,2 +1212,4 @@ switch (typeof o) { | ||
var disperse = /*#__PURE__*/I.curry(disperseU); | ||
var modify = /*#__PURE__*/I.curry(modifyU); | ||
@@ -1599,2 +1609,12 @@ | ||
var collectTotalAs = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.curry : res(I.freeze))(function collectTotalAs(xi2y, t, s) { | ||
var results = []; | ||
getAsU(function (x, i) { | ||
results.push(xi2y(x, i)); | ||
}, t, s); | ||
return results; | ||
}); | ||
var collectTotal = /*#__PURE__*/collectTotalAs(id); | ||
var concatAs = /*#__PURE__*/mkTraverse(id, ConstantOf); | ||
@@ -1732,3 +1752,5 @@ | ||
var lens = /*#__PURE__*/I.curry(lensU); | ||
var foldTraversalLens = /*#__PURE__*/I.curry(function foldTraversalLens(fold, traversal) { | ||
return lensU(fold(traversal), set(traversal)); | ||
}); | ||
@@ -1741,8 +1763,14 @@ var getter = function getter(get) { | ||
var lens = /*#__PURE__*/I.curry(lensU); | ||
var partsOf = function partsOf(t) { | ||
return function (x, i, F, xi2yF) { | ||
return F.map(function (y) { | ||
return disperseU(t, y, x); | ||
}, xi2yF(collectTotal(t, x), i)); | ||
}; | ||
}; | ||
var setter = /*#__PURE__*/lens(id); | ||
var foldTraversalLens = /*#__PURE__*/I.curry(function foldTraversalLens(fold, traversal) { | ||
return lensU(fold(traversal), set(traversal)); | ||
}); | ||
// Enforcing invariants | ||
@@ -2168,2 +2196,3 @@ | ||
exports.assign = assign; | ||
exports.disperse = disperse; | ||
exports.modify = modify; | ||
@@ -2224,2 +2253,4 @@ exports.modifyAsync = modifyAsync; | ||
exports.collect = collect; | ||
exports.collectTotalAs = collectTotalAs; | ||
exports.collectTotal = collectTotal; | ||
exports.concatAs = concatAs; | ||
@@ -2255,6 +2286,7 @@ exports.concat = concat; | ||
exports.sum = sum; | ||
exports.foldTraversalLens = foldTraversalLens; | ||
exports.getter = getter; | ||
exports.lens = lens; | ||
exports.getter = getter; | ||
exports.partsOf = partsOf; | ||
exports.setter = setter; | ||
exports.foldTraversalLens = foldTraversalLens; | ||
exports.defaults = defaults; | ||
@@ -2261,0 +2293,0 @@ exports.define = define; |
@@ -631,2 +631,10 @@ 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 disperseU = function disperse(traversal, values, data) { | ||
if (!seemsArrayLike(values)) values = ''; | ||
var i = 0; | ||
return modifyU(traversal, function () { | ||
return values[i++]; | ||
}, data); | ||
}; | ||
var setU = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id$1 : par(0, ef(reqOptic)))(function set(o, x, s) { | ||
@@ -1200,2 +1208,4 @@ switch (typeof o) { | ||
var disperse = /*#__PURE__*/curry(disperseU); | ||
var modify = /*#__PURE__*/curry(modifyU); | ||
@@ -1595,2 +1605,12 @@ | ||
var collectTotalAs = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? curry : res(freeze))(function collectTotalAs(xi2y, t, s) { | ||
var results = []; | ||
getAsU(function (x, i) { | ||
results.push(xi2y(x, i)); | ||
}, t, s); | ||
return results; | ||
}); | ||
var collectTotal = /*#__PURE__*/collectTotalAs(id$1); | ||
var concatAs = /*#__PURE__*/mkTraverse(id$1, ConstantOf); | ||
@@ -1728,3 +1748,5 @@ | ||
var lens = /*#__PURE__*/curry(lensU); | ||
var foldTraversalLens = /*#__PURE__*/curry(function foldTraversalLens(fold, traversal) { | ||
return lensU(fold(traversal), set(traversal)); | ||
}); | ||
@@ -1737,8 +1759,14 @@ var getter = function getter(get) { | ||
var lens = /*#__PURE__*/curry(lensU); | ||
var partsOf = function partsOf(t) { | ||
return function (x, i, F, xi2yF) { | ||
return F.map(function (y) { | ||
return disperseU(t, y, x); | ||
}, xi2yF(collectTotal(t, x), i)); | ||
}; | ||
}; | ||
var setter = /*#__PURE__*/lens(id$1); | ||
var foldTraversalLens = /*#__PURE__*/curry(function foldTraversalLens(fold, traversal) { | ||
return lensU(fold(traversal), set(traversal)); | ||
}); | ||
// Enforcing invariants | ||
@@ -2158,2 +2186,2 @@ | ||
export { seemsArrayLike, Identity, IdentityAsync, Select, toFunction, assign$1 as assign, 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, 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, lens, getter, setter, foldTraversalLens, 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, 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 }; |
@@ -631,2 +631,10 @@ (function (global, factory) { | ||
var disperseU = function disperse(traversal, values, data) { | ||
if (!seemsArrayLike(values)) values = ''; | ||
var i = 0; | ||
return modifyU(traversal, function () { | ||
return values[i++]; | ||
}, data); | ||
}; | ||
var setU = /*#__PURE__*/(par(0, ef(reqOptic)))(function set(o, x, s) { | ||
@@ -1200,2 +1208,4 @@ switch (typeof o) { | ||
var disperse = /*#__PURE__*/I.curry(disperseU); | ||
var modify = /*#__PURE__*/I.curry(modifyU); | ||
@@ -1595,2 +1605,12 @@ | ||
var collectTotalAs = /*#__PURE__*/(res(I.freeze))(function collectTotalAs(xi2y, t, s) { | ||
var results = []; | ||
getAsU(function (x, i) { | ||
results.push(xi2y(x, i)); | ||
}, t, s); | ||
return results; | ||
}); | ||
var collectTotal = /*#__PURE__*/collectTotalAs(id); | ||
var concatAs = /*#__PURE__*/mkTraverse(id, ConstantOf); | ||
@@ -1728,3 +1748,5 @@ | ||
var lens = /*#__PURE__*/I.curry(lensU); | ||
var foldTraversalLens = /*#__PURE__*/I.curry(function foldTraversalLens(fold, traversal) { | ||
return lensU(fold(traversal), set(traversal)); | ||
}); | ||
@@ -1737,8 +1759,14 @@ var getter = function getter(get) { | ||
var lens = /*#__PURE__*/I.curry(lensU); | ||
var partsOf = function partsOf(t) { | ||
return function (x, i, F, xi2yF) { | ||
return F.map(function (y) { | ||
return disperseU(t, y, x); | ||
}, xi2yF(collectTotal(t, x), i)); | ||
}; | ||
}; | ||
var setter = /*#__PURE__*/lens(id); | ||
var foldTraversalLens = /*#__PURE__*/I.curry(function foldTraversalLens(fold, traversal) { | ||
return lensU(fold(traversal), set(traversal)); | ||
}); | ||
// Enforcing invariants | ||
@@ -2164,2 +2192,3 @@ | ||
exports.assign = assign; | ||
exports.disperse = disperse; | ||
exports.modify = modify; | ||
@@ -2220,2 +2249,4 @@ exports.modifyAsync = modifyAsync; | ||
exports.collect = collect; | ||
exports.collectTotalAs = collectTotalAs; | ||
exports.collectTotal = collectTotal; | ||
exports.concatAs = concatAs; | ||
@@ -2251,6 +2282,7 @@ exports.concat = concat; | ||
exports.sum = sum; | ||
exports.foldTraversalLens = foldTraversalLens; | ||
exports.getter = getter; | ||
exports.lens = lens; | ||
exports.getter = getter; | ||
exports.partsOf = partsOf; | ||
exports.setter = setter; | ||
exports.foldTraversalLens = foldTraversalLens; | ||
exports.defaults = defaults; | ||
@@ -2257,0 +2289,0 @@ exports.define = define; |
@@ -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 T(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?hr(r[n]):Ln;for(var e=hr(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=Sn(hr(r[n+t]),i);var o=hr(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],vr,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 sr(n)?er(n,0,t,u):t.of(n)}function c(n,r,t,u){return b.isArray(n)?er(n,0,t,u):b.isObject(n)?Br(n,r,t,u):t.of(n)}function f(n,r,u,e){return function n(r,t){return b.isArray(r)?er(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}function s(r,n){return 1<arguments.length?Fn(E,r,n):function(n){return Fn(E,r,n)}}function v(r,n,t,u){var e=sr(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=sr(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 Wt(t)}function h(r,n){return 1<arguments.length?Un(r,n,void 0):function(n){return Un(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),W=b.always(!0),$=function(n){return void 0!==n?!n:n},B=function(n){return void 0!==n?[n]:n},J=function(r,t){return M(function(n){return r(n)?t(n):void 0})},T=E,_=function(n){return!(n instanceof Object)||b.isArray(n)},G=E(function(n){if(sr(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 sr(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 T(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 T(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 Fn(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 hr(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 sr(r)?r[n]:void 0},wn=E(function(n,r,t){sr(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=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,vr,b.always(r)):t}}),kn=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,vr,r):(r(n(t,void 0),void 0),t)}}),En=function(n,r,t){return u=hr(n)(t,void 0,lr,r),Promise.resolve(u);var u},Fn=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],dr,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,dr,n)}}),Mn=function(n,r){return Fn(E,n,r)},Rn=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))})},qn=function(e,i){return M(function(n,r,t,u){return t.map(i,u(e(n),r))})},Nn=function(n,r){return qn(J(b.isString,n),J(b.isString,r))},Pn=function(n,r){return qn(J(b.isNumber,n),J(b.isNumber,r))},zn=E(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?zn(e,r):Fn(E,e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),Cn=E(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?Cn(i,e,t):Un(i,e,t)}return t}),Dn=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},Ln=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?Dn(n):b.object0;if(vr===t)return $n(g,m,e,n,t,u);if(dr!==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},Tn=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)}),_n=function(n){return n[0]},Gn=function(n){return n.index},Hn=function(n){return Gn(n)+n[0].length},Kn=E(function(n,r){var t=r.lastIndex;r.lastIndex=Hn(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),Qn=function(t){return function(r){return function(n){return[t,n,r]}}},Vn=qn(J(w(Object),E(function(n){n=Dn(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),J(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}))),Xn=E(function(n,r){if(r instanceof Object){var t={};for(var u in r=Dn(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Yn=E(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=Dn(n)){var u=n[t];if(u instanceof Object)for(var e in u=Dn(u))i(e)===t&&(r[e]=u[e])}return r}}}),Zn=function(n,r,t){return void 0!==n(r,t,dr,E)},nr=function(t){return function(n,r){return Zn(t,n,r)}},rr=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},tr=function(e,i){return i=hr(i),e=hr(e),function(n,r,t,u){return(Zn(i,n,r)?i:e)(n,r,t,u)}},ur=function(n,r,t,u){return t.of(n)},er=function(n,r,t,u){return t===vr?H(u,n,void 0):t===dr?e(u,n):o(t,u,n,void 0)},ir=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))}},or=function(n,r){return[r,Ct(n)]},cr=function(t){return function(n){for(var r=n;void 0!==n;)n=t(r=n);return r}},fr=function(o,c,f){return function(n,r){var t=c.length;if(sr(n)){sr(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}}},ar=(0,b.curry)(function(n,r){return Rn(fr(Mn,r,n),fr(Un,r,n))}),sr=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},vr=X(b.applyU,E,b.applyU,b.applyU),lr=X(N,E,function(n,r){return N(function(r){return N(function(n){return n(r)},n)},r)},N),dr=an(function(n,r){return void 0!==n?n:r}),hr=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}),yr=b.curry(function(n,r,t){return Un([n,Lt(r)],r,t)}),pr=b.curry(kn),gr=b.curry(En),mr=b.curry(function(n,r){return Un(n,void 0,r)}),br=b.curry(Un),Ar=b.curry(dn),jr=function(e){return M(function(n,r,t,u){return hr(e(n,r))(n,r,t,u)})},xr=E(function(){for(var n=arguments.length,r=ur;n--;){var t=arguments[n];r=t.length<2?hr(t[0]):rr(hr(t[1]),r)(t[0])}return r}),Or=E(function(i){i=hr(i);var o=arguments.length-1;if(!o)return ur;var n=arguments[o];1===n.length?(--o,n=hr(n[0])):n=ur;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]=hr(t[1])}return f[o]=n,function(n,r,t,u){var e=o;return i(n,r,dr,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)}}),wr=b.curry(function(n,r,t){return rr(hr(r),hr(t))(n)}),Ir=b.curry(tr),Sr=b.curry(function(t,n){return[n,jr(function(n,r){return void 0!==n?t(n,r):ur})]}),Ur=rr(ur,Ln),kr=rr(Ln,ur),Er=kr(b.isDefined),Fr=b.curry(function(e,i){return i=hr(i),M(function(n,t,r,u){return i(n,t,r,function(n,r){return u(n,e(r,t))})})}),Mr=F(Fr(function(n,r){return void 0!==r?void 0!==n?[r,n]:r:n})),Rr=F(Fr(b.sndU)),qr=b.curry(function(n,r){return kn(n,E,r)}),Nr=b.curry(function(n,r){return En(n,E,r)}),Pr=E(function(){var n=arguments.length,r=ur;if(n)for(r=hr(arguments[--n]);n;)r=ir(hr(arguments[--n]),r);return r}),zr=function(e){return function(n,r,t,u){return t.of(e)}},Cr=zr(),Dr=E(b.curryN(2,function(r){return r=hr(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):hr(i)}return Bn(r,u)}(r,n)}})),Lr=Dr(ur),Wr=F(hr([Vn,t])),$r=F(hr([Vn,t,0])),Br=F(Bn(Ln,U)),Jr=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)}},Tr=Jr(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),_r=b.curry(function(t,n,r){return!Fn(function(n,r){if(!t(n,r))return!0},n,r)}),Gr=_r(E),Hr=b.curry(function(t,n,r){var u=!1;return Fn(function(n,r){if(!t(n,r))return u=!1;u=!0},n,r),u}),Kr=Hr(E),Qr=b.curry(function(t,n,r){return!!Fn(function(n,r){if(t(n,r))return!0},n,r)}),Vr=(0,b.curry)(function(u,n,r){var e=[];return Fn(function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),Xr=Vr(E),Yr=hn(E,sn),Zr=Yr(E),nt=b.curry(function(t,n,r){return dn(vn,function(n,r){return t(n,r)?1:0},n,r)}),rt=nt(b.isDefined),tt=b.curry(function(e,n,r){var i=new Map;return Fn(function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),ut=tt(E),et=b.curry(function(t,u,n,r){return Fn(function(n,r){u=t(u,n,r)},n,r),u}),it=b.curry(function(n,r,t,u){var e=[],i=[];Fn(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}),ot=b.curry(function(t,n,r){return Fn(function(n,r){t(n,r)},n,r)}),ct=b.curry(function(n,t,r,u){var e=n();return Fn(function(n,r){t(e,n,r)},r,u),e}),ft=b.curry(Fn),at=b.curry(function(n,r){return void 0!==Fn(E,n,r)}),st=b.curry(function(n,r){return!Fn(W,n,r)}),vt=hn(P,E(function(t){return an(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),lt=vt(E),dt=ln(O),ht=dt(E),yt=b.curry(function(u,n,r){var e=0,i=0;return Fn(function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),pt=yt(E),gt=ln(x),mt=gt(E),bt=b.curry(function(t,n,r){return!Fn(function(n,r){if(t(n,r))return!0},n,r)}),At=Qr(E),jt=Ar(an(p,1)),xt=jt(D(1)),Ot=s,wt=ft,It=Ar(vn),St=It(L),Ut=b.curry(Rn),kt=Ut(E),Et=b.curry(function(n,r){return Rn(n(r),br(r))}),Ft=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},Mt=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},Rt=F(ar(Cr)),qt=E(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return sr(n)&&Tn(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))}}),Nt=E,Pt=jr(function(n){return sr(n)&&n.length?n.length-1:0}),zt=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=sr(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))}}),Ct=function(n){return b.isObject(n)?Wt(pr(Br,or,n)):n},Dt=E,Lt=function(n){return d.apply(null,b.keys(n))},Wt=E(function(e){return function(r,n,t,u){return t.map(function(n){return Cn(e,n,r)},u(zn(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))}}),Bt=b.curry(qn),Jt=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))}},Tt=function(e){return function(n,r,t,u){return t.map(function(n){return Fn(E,e,n)},u(Un(e,n,void 0),r))}},_t=qn($,$),Gt=qn(J(sr,E(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),J(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}))),Ht=qn(G,G),Kt=E(function(n,r,t,u){return t.map(B,u((n instanceof Object||b.isString(n))&&1===n.length?n[0]:void 0,r))}),Qt=qn(J(w(Object),E(function(n){n=Dn(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})),J(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)}))),Vt=E(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return qn(J(b.isString,q(function(n){return JSON.parse(n,t)})),J(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),Xt=Nn(q(decodeURI),encodeURI),Yt=qn(J(b.isString,q(decodeURIComponent)),J(r,encodeURIComponent)),Zt=b.curry(function(n,r){return Nn(k(R(n,"g"),r),k(R(r,"g"),n))}),nu=E(function(r){var t=1<arguments.length?arguments[1]:r;return qn(J(b.isString,function(n){return n.split(t)}),J(b.isArray,function(n){return n.join(r)}))}),ru=E(function(u){var t=R(1<arguments.length?arguments[1]:u,"");return qn(J(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Gn(r)),n.slice(Hn(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),tu=hr([Ft(function(n){return b.isString(n)?n.replace(/\+/g,"%20"):n}),nu("&"),Jt([ru("="),Jt(Yt)]),Tt(Qt)]),uu=Pn(j,j);n.seemsArrayLike=sr,n.Identity=vr,n.IdentityAsync=lr,n.Select=dr,n.toFunction=hr,n.assign=yr,n.modify=pr,n.modifyAsync=gr,n.remove=mr,n.set=br,n.traverse=Ar,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:Ln;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=hr(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?tr(t.reduceRight(tr),n):n},n.choose=jr,n.cond=xr,n.condOf=Or,n.ifElse=wr,n.orElse=Ir,n.chain=Sr,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(tr,ur)},n.unless=Ur,n.when=kr,n.optional=Er,n.zero=ur,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=Fr,n.joinIx=Mr,n.skipIx=Rr,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 qn(n("get"),n("set"))},n.transform=qr,n.transformAsync=Nr,n.seq=Pr,n.assignOp=function(n){return[Lt(n),zr(n)]},n.modifyOp=function(e){return function(n,r,t,u){return t.of(e(n,r))}},n.setOp=zr,n.removeOp=Cr,n.branchOr=Dr,n.branch=Lr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=Ln;return Lr(r)},n.elems=t,n.elemsTotal=function(n,r,t,u){return sr(n)?t===vr?H(u,n,H):t===dr?e(u,n):o(t,u,n,o):t.of(n)},n.entries=Wr,n.keys=$r,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,dr===t?function(n,r,t){for(;t=Kn(t,r);){var u=n(_n(t),Gn(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=[];Qn!==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,Gn(i));var o=u[e+1];void 0!==o&&(r+=o),t=Hn(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(Qn);i=Kn(i,e);)o=r(r(n(Qn,t(i)),o),u(_n(i),Gn(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],Gn(o)))}var c;return t.of(r)}},n.values=Br,n.children=c,n.flatten=f,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=hr(arguments[r]);n.push(Jr(nr(u)),u)}return n},n.satisfying=Jr,n.leafs=Tr,n.all=_r,n.and=Gr,n.all1=Hr,n.and1=Kr,n.any=Qr,n.collectAs=Vr,n.collect=Xr,n.concatAs=Yr,n.concat=Zr,n.countIf=nt,n.count=rt,n.countsAs=tt,n.counts=ut,n.foldl=et,n.foldr=it,n.forEach=ot,n.forEachWith=ct,n.get=s,n.getAs=ft,n.isDefined=at,n.isEmpty=st,n.joinAs=vt,n.join=lt,n.maximumBy=dt,n.maximum=ht,n.meanAs=yt,n.mean=pt,n.minimumBy=gt,n.minimum=mt,n.none=bt,n.or=At,n.productAs=jt,n.product=xt,n.select=Ot,n.selectAs=wt,n.sumAs=It,n.sum=St,n.lens=Ut,n.getter=function(e){return function(n,r,t,u){return u(e(n,r),r)}},n.setter=kt,n.foldTraversalLens=Et,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[Ft(n),Mt(n)]},n.required=function(n){return $t(n,void 0)},n.reread=Ft,n.rewrite=Mt,n.append=v,n.cross=Rt,n.filter=qt,n.find=l,n.findWith=function(n){var r=hr(n),t=nr(r);return[1<arguments.length?l(t,arguments[1]):l(t),r]},n.first=0,n.index=Nt,n.last=Pt,n.prefix=function(n){return zt(0,n)},n.slice=zt,n.suffix=function(n){return zt(0===n?1/0:n?-n:0,void 0)},n.pickIn=Ct,n.prop=Dt,n.props=d,n.propsOf=Lt,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=Wt,n.replace=$t,n.getInverse=h,n.iso=Bt,n.array=Jt,n.inverse=Tt,n.iterate=function(n){return qn(cr(s(n)),cr(h(n)))},n.complement=_t,n.identity=Ln,n.is=function(r){return qn(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 qn(t,t)},n.indexed=Gt,n.reverse=Ht,n.singleton=Kt,n.disjoint=function(i){return function(n,r,t,u){var e=Yn(i);return t.map(e,u(Xn(i,n),r))}},n.keyed=Vn,n.multikeyed=Qt,n.json=Vt,n.uri=Xt,n.uriComponent=Yt,n.dropPrefix=function(r){return Nn(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return Nn(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=Zt,n.split=nu,n.uncouple=ru,n.querystring=tu,n.add=function(n){return Pn(g(n),g(-n))},n.divide=function(n){return Pn(A(n),m(n))},n.multiply=function(n){return Pn(m(n),A(n))},n.negate=uu,n.subtract=function(n){return Pn(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)?wr(_,Number(e),e):"-"===e?wr(_,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),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})}); |
{ | ||
"name": "partial.lenses", | ||
"version": "14.5.0", | ||
"version": "14.6.0", | ||
"description": "Partial lenses is a comprehensive, high-performance optics library for JavaScript", | ||
@@ -82,3 +82,3 @@ "module": "dist/partial.lenses.es.js", | ||
"rollup-plugin-replace": "^2.0.0", | ||
"rollup-plugin-uglify": "^4.0.0", | ||
"rollup-plugin-uglify": "^5.0.2", | ||
"sprintf-js": "^1.1.1", | ||
@@ -85,0 +85,0 @@ "watch-run": "^1.2.5" |
@@ -429,2 +429,8 @@ import * as I from './ext/infestines' | ||
const disperseU = function disperse(traversal, values, data) { | ||
if (!seemsArrayLike(values)) values = '' | ||
let i = 0 | ||
return modifyU(traversal, () => values[i++], data) | ||
} | ||
const setU = (process.env.NODE_ENV === 'production' | ||
@@ -977,2 +983,4 @@ ? id | ||
export const disperse = I.curry(disperseU) | ||
export const modify = I.curry(modifyU) | ||
@@ -1364,2 +1372,18 @@ | ||
export const collectTotalAs = (process.env.NODE_ENV === 'production' | ||
? I.curry | ||
: C.res(I.freeze))(function collectTotalAs(xi2y, t, s) { | ||
const results = [] | ||
getAsU( | ||
(x, i) => { | ||
results.push(xi2y(x, i)) | ||
}, | ||
t, | ||
s | ||
) | ||
return results | ||
}) | ||
export const collectTotal = collectTotalAs(id) | ||
export const concatAs = mkTraverse(id, ConstantOf) | ||
@@ -1540,8 +1564,2 @@ | ||
export const lens = I.curry(lensU) | ||
export const getter = get => (x, i, F, xi2yF) => xi2yF(get(x, i), i) | ||
export const setter = lens(id) | ||
export const foldTraversalLens = I.curry(function foldTraversalLens( | ||
@@ -1554,2 +1572,11 @@ fold, | ||
export const getter = get => (x, i, F, xi2yF) => xi2yF(get(x, i), i) | ||
export const lens = I.curry(lensU) | ||
export const partsOf = t => (x, i, F, xi2yF) => | ||
F.map(y => disperseU(t, y, x), xi2yF(collectTotal(t, x), i)) | ||
export const setter = lens(id) | ||
// Enforcing invariants | ||
@@ -1556,0 +1583,0 @@ |
Sorry, the diff of this file is too big to display
557345
7622
5724
138