New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

partial.lenses

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partial.lenses - npm Package Compare versions

Comparing version 13.6.2 to 13.7.0

2

CHANGELOG.md

@@ -6,3 +6,3 @@ # Partial Lenses Changelog

Fixed a bug in `L.filter`, which didn't correctly handle the case of writing an
empty array correctly in case the focus wasn't an array-like object.
empty array in case the focus wasn't an array-like object.

@@ -9,0 +9,0 @@ ## 13.6.1

@@ -248,6 +248,2 @@ 'use strict';

var Ident = { map: I.applyU, of: I.id, ap: I.applyU, chain: I.applyU };
var Const = { map: I.sndU };
var ConcatOf = function ConcatOf(ap, empty) {

@@ -499,3 +495,3 @@ return { map: I.sndU, ap: ap, of: I.always(empty) };

default:
return o.length === 4 ? o(s, void 0, Ident, I.always(x)) : s;
return o.length === 4 ? o(s, void 0, Identity, I.always(x)) : s;
}

@@ -513,3 +509,3 @@ });

default:
return o.length === 4 ? o(s, void 0, Ident, xi2x) : (xi2x(o(s, void 0), void 0), s);
return o.length === 4 ? o(s, void 0, Identity, xi2x) : (xi2x(o(s, void 0), void 0), s);
}

@@ -539,3 +535,3 @@ });

default:
s = o(s, ix.v, Const, ix);
s = o(s, ix.v, Constant, ix);
}

@@ -565,3 +561,3 @@ }return s;

default:
return l(s, void 0, Const, I.id);
return l(s, void 0, Constant, I.id);
}

@@ -583,3 +579,3 @@ });

default:
x = composed(i, os)(x, os[i - 1], Ident, xi2y || I.always(y));
x = composed(i, os)(x, os[i - 1], Identity, xi2y || I.always(y));
n = i;

@@ -680,3 +676,3 @@ break;

if (Ident === A) {
if (Identity === A) {
var written = void 0;

@@ -934,2 +930,13 @@ var r = {};

var Identity = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.id : I.freeze)({
map: I.applyU,
of: I.id,
ap: I.applyU,
chain: I.applyU
});
var Constant = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.id : I.freeze)({
map: I.sndU
});
var toFunction = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.id : par(0, ef(reqOptic)))(function (o) {

@@ -1058,3 +1065,3 @@ switch (typeof o) {

return function (x, i, C, xi2yC) {
return of(x, i, Const, op)(x, i, C, xi2yC);
return of(x, i, Constant, op)(x, i, C, xi2yC);
};

@@ -1183,3 +1190,3 @@ });

if (seemsArrayLike(xs)) {
return A === Ident ? mapPartialIndexU(xi2yA, xs) : A === Select ? selectInArrayLike(xi2yA, xs) : traversePartialIndex(A, xi2yA, xs);
return A === Identity ? mapPartialIndexU(xi2yA, xs) : A === Select ? selectInArrayLike(xi2yA, xs) : traversePartialIndex(A, xi2yA, xs);
} else {

@@ -1718,2 +1725,4 @@ return A.of(xs);

exports.seemsArrayLike = seemsArrayLike;
exports.Identity = Identity;
exports.Constant = Constant;
exports.toFunction = toFunction;

@@ -1720,0 +1729,0 @@ exports.assign = assign;

@@ -1,2 +0,2 @@

import { isArray, freeze, isObject, id, acyclicEqualsU, array0, object0, sndU, applyU, always, curry, isFunction, isString, curryN, assocPartialU, dissocPartialU, constructorOf, toObject, isDefined, keys, hasU, assign, arityN } from 'infestines';
import { isArray, freeze, isObject, id, acyclicEqualsU, array0, object0, sndU, always, curry, isFunction, isString, curryN, assocPartialU, dissocPartialU, constructorOf, toObject, applyU, isDefined, keys, hasU, assign, arityN } from 'infestines';

@@ -244,6 +244,2 @@ var ltU = function ltU(x, y) {

var Ident = { map: applyU, of: id, ap: applyU, chain: applyU };
var Const = { map: sndU };
var ConcatOf = function ConcatOf(ap, empty) {

@@ -495,3 +491,3 @@ return { map: sndU, ap: ap, of: always(empty) };

default:
return o.length === 4 ? o(s, void 0, Ident, always(x)) : s;
return o.length === 4 ? o(s, void 0, Identity, always(x)) : s;
}

@@ -509,3 +505,3 @@ });

default:
return o.length === 4 ? o(s, void 0, Ident, xi2x) : (xi2x(o(s, void 0), void 0), s);
return o.length === 4 ? o(s, void 0, Identity, xi2x) : (xi2x(o(s, void 0), void 0), s);
}

@@ -535,3 +531,3 @@ });

default:
s = o(s, ix.v, Const, ix);
s = o(s, ix.v, Constant, ix);
}

@@ -561,3 +557,3 @@ }return s;

default:
return l(s, void 0, Const, id);
return l(s, void 0, Constant, id);
}

@@ -579,3 +575,3 @@ });

default:
x = composed(i, os)(x, os[i - 1], Ident, xi2y || always(y));
x = composed(i, os)(x, os[i - 1], Identity, xi2y || always(y));
n = i;

@@ -676,3 +672,3 @@ break;

if (Ident === A) {
if (Identity === A) {
var written = void 0;

@@ -930,2 +926,13 @@ var r = {};

var Identity = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : freeze)({
map: applyU,
of: id,
ap: applyU,
chain: applyU
});
var Constant = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : freeze)({
map: sndU
});
var toFunction = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : par(0, ef(reqOptic)))(function (o) {

@@ -1054,3 +1061,3 @@ switch (typeof o) {

return function (x, i, C, xi2yC) {
return of(x, i, Const, op)(x, i, C, xi2yC);
return of(x, i, Constant, op)(x, i, C, xi2yC);
};

@@ -1179,3 +1186,3 @@ });

if (seemsArrayLike(xs)) {
return A === Ident ? mapPartialIndexU(xi2yA, xs) : A === Select ? selectInArrayLike(xi2yA, xs) : traversePartialIndex(A, xi2yA, xs);
return A === Identity ? mapPartialIndexU(xi2yA, xs) : A === Select ? selectInArrayLike(xi2yA, xs) : traversePartialIndex(A, xi2yA, xs);
} else {

@@ -1713,2 +1720,2 @@ return A.of(xs);

export { seemsArrayLike, toFunction, assign$1 as assign, modify, remove, set, transform, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, iftes, orElse, chain, choice, unless, when, optional, zero, assignOp, modifyOp, setOp, removeOp, log, seq, branchOr, branch, branches, elems, entries, keys$1 as keys, matches, values, children, query, satisfying, flatten, leafs, all, and$1 as and, any, collectAs, collect, concatAs, concat, countIf, count, countsAs, counts, foldl, foldr, forEach, forEachWith, isDefined$1 as isDefined, isEmpty, joinAs, join, maximumBy, maximum, meanAs, mean, minimumBy, minimum, none, or$1 as or, productAs, product, selectAs, select, sumAs, sum, get, lens, setter, foldTraversalLens, defaults, define, normalize, required, reread, rewrite, append, filter, find, findWith, first, index, last, prefix, slice, suffix, pickIn, prop, props, propsOf, removable, valueOr, pick, replace, getInverse, iso, array, inverse, complement, identity, indexed, is, keyed, reverse, singleton, uri, uriComponent, json, pointer };
export { seemsArrayLike, Identity, Constant, toFunction, assign$1 as assign, modify, remove, set, transform, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, iftes, orElse, chain, choice, unless, when, optional, zero, assignOp, modifyOp, setOp, removeOp, log, seq, branchOr, branch, branches, elems, entries, keys$1 as keys, matches, values, children, query, satisfying, flatten, leafs, all, and$1 as and, any, collectAs, collect, concatAs, concat, countIf, count, countsAs, counts, foldl, foldr, forEach, forEachWith, isDefined$1 as isDefined, isEmpty, joinAs, join, maximumBy, maximum, meanAs, mean, minimumBy, minimum, none, or$1 as or, productAs, product, selectAs, select, sumAs, sum, get, lens, setter, foldTraversalLens, defaults, define, normalize, required, reread, rewrite, append, filter, find, findWith, first, index, last, prefix, slice, suffix, pickIn, prop, props, propsOf, removable, valueOr, pick, replace, getInverse, iso, array, inverse, complement, identity, indexed, is, keyed, reverse, singleton, uri, uriComponent, json, pointer };

@@ -248,6 +248,2 @@ (function (global, factory) {

var Ident = { map: I.applyU, of: I.id, ap: I.applyU, chain: I.applyU };
var Const = { map: I.sndU };
var ConcatOf = function ConcatOf(ap, empty) {

@@ -499,3 +495,3 @@ return { map: I.sndU, ap: ap, of: I.always(empty) };

default:
return o.length === 4 ? o(s, void 0, Ident, I.always(x)) : s;
return o.length === 4 ? o(s, void 0, Identity, I.always(x)) : s;
}

@@ -513,3 +509,3 @@ });

default:
return o.length === 4 ? o(s, void 0, Ident, xi2x) : (xi2x(o(s, void 0), void 0), s);
return o.length === 4 ? o(s, void 0, Identity, xi2x) : (xi2x(o(s, void 0), void 0), s);
}

@@ -539,3 +535,3 @@ });

default:
s = o(s, ix.v, Const, ix);
s = o(s, ix.v, Constant, ix);
}

@@ -565,3 +561,3 @@ }return s;

default:
return l(s, void 0, Const, I.id);
return l(s, void 0, Constant, I.id);
}

@@ -583,3 +579,3 @@ });

default:
x = composed(i, os)(x, os[i - 1], Ident, xi2y || I.always(y));
x = composed(i, os)(x, os[i - 1], Identity, xi2y || I.always(y));
n = i;

@@ -680,3 +676,3 @@ break;

if (Ident === A) {
if (Identity === A) {
var written = void 0;

@@ -934,2 +930,13 @@ var r = {};

var Identity = /*#__PURE__*/(I.freeze)({
map: I.applyU,
of: I.id,
ap: I.applyU,
chain: I.applyU
});
var Constant = /*#__PURE__*/(I.freeze)({
map: I.sndU
});
var toFunction = /*#__PURE__*/(par(0, ef(reqOptic)))(function (o) {

@@ -1058,3 +1065,3 @@ switch (typeof o) {

return function (x, i, C, xi2yC) {
return of(x, i, Const, op)(x, i, C, xi2yC);
return of(x, i, Constant, op)(x, i, C, xi2yC);
};

@@ -1183,3 +1190,3 @@ });

if (seemsArrayLike(xs)) {
return A === Ident ? mapPartialIndexU(xi2yA, xs) : A === Select ? selectInArrayLike(xi2yA, xs) : traversePartialIndex(A, xi2yA, xs);
return A === Identity ? mapPartialIndexU(xi2yA, xs) : A === Select ? selectInArrayLike(xi2yA, xs) : traversePartialIndex(A, xi2yA, xs);
} else {

@@ -1718,2 +1725,4 @@ return A.of(xs);

exports.seemsArrayLike = seemsArrayLike;
exports.Identity = Identity;
exports.Constant = Constant;
exports.toFunction = toFunction;

@@ -1720,0 +1729,0 @@ exports.assign = assign;

@@ -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,r){"use strict";function t(n,r){var t=r.length-n;if(t<2)return t?bn(r[n]):nn;for(var u=bn(r[n+--t]),e=function(n,r){return function(t,e){return u(t,e,n,r)}};--t;)e=$(bn(r[n+t]),e);var i=bn(r[n]);return function(n,r,t,u){return i(n,r,t,e(t,u))}}function u(n){var r=function n(r,t){return n.v=t,r};return r.v=n,r}function e(n,r,t,u){for(var i,o=n.length;t<o;++t)switch(typeof(i=n[t])){case"string":r=B(u.v=i,r);break;case"number":r=_(u.v=i,r);break;case"object":r=e(i,r,0,u);break;default:r=i(r,u.v,R,u)}return r}function i(n,u,e,i){for(var o,c,f=n.length,a=Array(f),v=0;v<f;++v)switch(a[v]=e,typeof(o=n[v])){case"string":e=B(o,e);break;case"number":e=_(o,e);break;default:e=t(v,n)(e,n[v-1],E,u||r.always(i)),f=v}for(f===n.length&&(e=u?u(e,n[f-1]):i);0<=--f;)e=r.isString(c=n[f])?J(c,e,a[f]):F(c,e,a[f]);return e}function o(n,t,u,e,i){var o=u.of;return o?o(n):u.map(r.always(n),e(i,t))}function c(n){function r(n,r,u,e){return t(n,r,u,e)}var t=function(u,e,i,o){return(t=bn(n(r)))(u,e,i,o)};return r}function f(n,r){return 1<arguments.length?K(n,r):function(r){return K(n,r)}}function a(n,r,t,u){var e=mn(n)?n.length:0;return t.map(function(r){return F(e,r,n)},u(void 0,e))}function v(n){var r=arguments.length>1?arguments[1]:{hint:0};return function(t,u,e,i){var o=mn(t)?t:"",c=r.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}(r,n,o);return e.map(function(n){return F(c,n,o)},i(o[c],c))}}function s(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return Fr(t)}function d(n,r){return 1<arguments.length?G(n,r,void 0):function(r){return G(n,r,void 0)}}var l=r.curry(function(n,r){return r instanceof n}),h=Object.create,p=r.freeze(function(n){return r.assign(h(null),0)}()),y=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},g=function(n){return function(r){return[r,n]}},m=function(n){return function(r){return void 0!==r?r:n}},b=m(0),A=function(n){return void 0!==n?!n:n},j=function(n){return void 0!==n?[n]:n},O=function(n,r){return function(t){return n(t)?r(t):void 0}},w=function(n){return!(n instanceof Object)||r.isArray(n)},x=r.id(function(n){if(mn(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),U=r.id(function(n,r){for(var t,u=r.length,e=Array(u),i=0,o=0;o<u;++o)void 0!==(t=n(r[o],o))&&(e[i++]=t);return i<u&&(e.length=i),e}),k=function(n,r){return mn(r)?U(n,r):void 0},I=r.id(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),S={map:r.sndU,of:function(){},ap:function(n,r){return void 0!==n?n:r}},E={map:r.applyU,of:r.id,ap:r.applyU,chain:r.applyU},R={map:r.sndU},q=function(n,t){return{map:r.sndU,ap:n,of:r.always(t)}},M=q(function(n,r){return n+r},0),N=function(n){return r.curry(function(r,t,u){var e=void 0,i=void 0;return z(S,function(t,u){var o=r(t,u);void 0===o||void 0!==i&&!n(o,i)||(e=t,i=o)},t,u),e})},z=function(n,r,t,u){return bn(t)(u,void 0,n,r)},C=function(n,t){return r.curryN(4,function(r,u){return u=t(u),function(t,e){return n(z(u,r,t,e))}})},D=function(n){return function(r){return void 0!==r?[r,n]:n}},L=r.id(function(n){for(var r=[];D!==n;)r.push(n[0]),n=n[1];return r.reverse()}),P=function(n,r){return function(t){return function(u,e,i,o){return i.map(function(n){return r(t,n,u)},o(n(t,u),t))}}},B=function(n,r){return r instanceof Object?r[n]:void 0},J=r.id(function(n,t,u){return void 0!==t?r.assocPartialU(n,t,u):r.dissocPartialU(n,u)||r.object0}),W=P(B,J),_=function(n,r){return mn(r)?r[n]:void 0},F=r.id(function(n,r,t){mn(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 I(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}),T=P(_,F),$=function(n,r){return function(t,u){return u=r(t,u),function(r,e){return n(r,e,t,u)}}},G=r.id(function(n,t,u){switch(typeof n){case"string":return J(n,t,u);case"number":return F(n,t,u);case"object":return i(n,0,u,t);default:return 4===n.length?n(u,void 0,E,r.always(t)):u}}),H=r.id(function(n,r,t){switch(typeof n){case"string":return J(n,r(B(n,t),n),t);case"number":return F(n,r(_(n,t),n),t);case"object":return i(n,r,t);default:return 4===n.length?n(t,void 0,E,r):(r(n(t,void 0),void 0),t)}}),K=r.id(function(n,t){switch(typeof n){case"string":return B(n,t);case"number":return _(n,t);case"object":for(var i,o=0,c=n.length;o<c;++o)switch(typeof(i=n[o])){case"string":t=B(i,t);break;case"number":t=_(i,t);break;default:return e(n,t,o,u(n[o-1]))}return t;default:return n(t,void 0,R,r.id)}}),Q=function(n,r){return function(t,u,e,i){return e.map(function(n){return r(n,t,u)},i(n(t,u),u))}},V=function(n,r){return function(t,u,e,i){return e.map(r,i(n(t),u))}},X=r.id(function(n,t){var u=void 0;for(var e in n){var i=n[e],o=r.isObject(i)?X(i,t):K(i,t);void 0!==o&&(u||(u={}),u[e]=o)}return u}),Y=r.id(function(n,t,u){for(var e in n){var i=t&&t[e],o=n[e];u=r.isObject(o)?Y(o,i,u):G(o,i,u)}return u}),Z=function(n){return r.constructorOf(n)!==Object?r.toObject(n):n},nn=function(n,r,t,u){return u(n,r)},rn=r.id(function(n){return function(r){for(var t={},u=n.length;u--;){var e=r[0];void 0!==e&&(t[n[u]]=e),r=r[1]}return t}}),tn=function(n,t){return function(u,e,i,o){var c=u instanceof Object?Z(u):r.object0;if(E===i){var f=void 0,a={};for(var v in t){f=1;var s=t[v](c[v],v,i,o);void 0!==s&&(a[v]=s)}var d=f;for(var l in c)if(void 0===(d&&t[l])){f=1;var h=n(c[l],l,i,o);void 0!==h&&(a[l]=h)}return f?a:u}if(S!==i){var p=i.map,y=i.ap,m=i.of,b=m(g),A=[];for(var j in t)A.push(j),b=y(p(g,b),t[j](c[j],j,i,o));var O=!!A.length||void 0;for(var w in c)void 0===(O&&t[w])&&(A.push(w),b=y(p(g,b),n(c[w],w,i,o)));return A.length?p(rn(A),b):m(u)}for(var x in t){var U=t[x](c[x],x,i,o);if(void 0!==U)return U}for(var k in c)if(void 0===t[k]){var I=n(c[k],k,i,o);if(void 0!==I)return I}}},un=function(n,t,u){return r.acyclicEqualsU(u,n)?t:u},en=r.id(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)}),on=function(n){return n[0]},cn=function(n){return n.index},fn=r.id(function(n,r){var t=r.lastIndex;r.lastIndex=cn(n)+n[0].length;var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),an=function(n){return function(r){return function(t){return[n,t,r]}}},vn=V(O(l(Object),r.id(function(n){n=Z(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),O(r.isArray,r.id(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}))),sn=function(n,r,t){return function(u,e,i,o){return(n(u,e)?r:t)(u,e,i,o)}},dn=function(n,r){return r=bn(r),n=bn(n),function(t,u,e,i){return(sr(r,t)?r:n)(t,u,e,i)}},ln=r.curry(function(n,r){return c(function(t){return En(r,nn,[n,t])})}),hn=function(n,r){return function(t,u,e,i){return e.chain(function(n){return r(n,u,e,i)},n(t,u,e,i))}},pn=function(n,r){return[r,Jr(n)]},yn=r.always(o),gn=function(n,r,t){return function(u,e){return n(u,e)?r:t(u,e)}},mn=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||r.isString(n)},bn=r.id(function(n){switch(typeof n){case"string":return W(n);case"number":return T(n);case"object":return t(0,n);default:return 4===n.length?n:(u=n,function(n,t,e,i){return e.map(r.always(n),i(u(n,t),t))})}var u}),An=r.curry(function(n,r,t){return G([n,_r(r)],r,t)}),jn=r.curry(H),On=r.curry(function(n,r){return G(n,void 0,r)}),wn=r.curry(G),xn=r.curry(function(n,t){return H(n,r.id,t)}),Un=r.curry(z),kn=function(n){return function(r,t,u,e){return bn(n(r,t))(r,t,u,e)}},In=r.id(function(){for(var n=arguments.length,r=Cn;n--;){var t=arguments[n];r=t.length<2?bn(t[0]):sn(t[0],bn(t[1]),r)}return r}),Sn=r.id(function(n){n=bn(n);for(var t=yn,u=arguments.length;--u;){var e=arguments[u];t=1===e.length?r.always(bn(e[0])):gn(e[0],bn(e[1]),t)}return function(r,u,e,i){return n(r,u,R,t)(r,u,e,i)}}),En=r.curry(function(n,r,t){return sn(n,bn(r),bn(t))}),Rn=r.id(function(n,r){for(var t=arguments.length,u=1&t?bn(arguments[--t]):Cn;0<=(t-=2);)u=sn(arguments[t],bn(arguments[t+1]),u);return u}),qn=r.curry(dn),Mn=r.curry(function(n,r){return[r,kn(function(r,t){return void 0!==r?n(r,t):Cn})]}),Nn=function(n){return sn(n,nn,o)},zn=Nn(r.isDefined),Cn=function(n,r,t,u){return o(n,r,t,u)},Dn=function(n){return function(r,t,u,e){return o(n,t,u,e,n)}},Ln=Dn(),Pn=r.id(function(){var n=arguments.length,r=Cn;if(n)for(r=bn(arguments[--n]);n;)r=hn(bn(arguments[--n]),r);return r}),Bn=r.id(r.curryN(2,function(n){return n=bn(n),function(t){return function n(t,u){var e=h(null);for(var i in u){var o=u[i];e[i]=r.isObject(o)?n(t,o):bn(o)}return tn(t,e)}(n,t)}})),Jn=Bn(Cn),Wn=r.id(function(n,t,u,e){return mn(n)?u===E?U(e,n):u===S?function(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}(e,n):function(n,t,u){var e=n.map,i=n.ap,o=n.of(D),c=u.length;if(e===r.sndU){for(var f=0;f<c;++f)o=i(o,t(u[f],f));return o}for(var a=0;a<c;++a)o=i(e(D,o),t(u[a],a));return e(L,o)}(u,e,n):u.of(n)}),_n=bn([vn,Wn]),Fn=bn([vn,Wn,0]),Tn=r.id(function(n){return function(t,u,e,i){if(r.isString(t)){var c=e.map;if(n.global){var f=[""];return f.input=t,f.index=0,S===e?function(n,r,t){for(;t=fn(t,r);){var u=n(on(t),cn(t));if(void 0!==u)return u}}(i,n,f):c((v=t,function(n){for(var r="",t=0,u=function(n){for(var r=[];an!==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],o=cn(i);r+=v.slice(t,o);var c=u[e+1];void 0!==c&&(r+=c),t=o+i[0].length}return r+v.slice(t)}),function(n,r,t,u,e,i){for(var o=t(an);i=fn(i,e);)o=r(r(n(an,t(i)),o),u(on(i),cn(i)));return o}(c,e.ap,e.of,i,n,f))}var a=t.match(n);if(a)return c(function(r){return t.replace(n,void 0!==r?r:"")},i(a[0],cn(a)))}var v;return o(t,void 0,e,i)}}),$n=r.id(tn(nn,p)),Gn=En(r.isArray,Wn,En(r.isObject,$n,Cn)),Hn=ln(Gn),Kn=ln(Wn,function(n){return!r.isArray(n)}),Qn=Hn(function(n){return!r.isArray(n)&&!r.isObject(n)}),Vn=r.curry(function(n,r,t){return!z(S,function(r,t){if(!n(r,t))return!0},r,t)}),Xn=Vn(r.id),Yn=r.curry(function(n,r,t){return!!z(S,function(r,t){if(n(r,t))return!0},r,t)}),Zn=r.curry(function(n,r,t){var u=[];return z(S,function(r,t){var e=n(r,t);void 0!==e&&u.push(e)},r,t),u}),nr=Zn(r.id),rr=C(r.id,function(n){return q(n.concat,n.empty())}),tr=rr(r.id),ur=r.curry(function(n,r,t){return z(M,function(r,t){return n(r,t)?1:0},r,t)}),er=ur(r.isDefined),ir=r.curry(function(n,r,t){var u=new Map;return z(S,function(r,t){var e=n(r,t),i=u.get(e);u.set(e,void 0!==i?i+1:1)},r,t),u}),or=ir(r.id),cr=r.curry(function(n,r,t,u){return z(S,function(t,u){r=n(r,t,u)},t,u),r}),fr=r.curry(function(n,r,t,u){var e=[],i=[];z(S,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}),ar=r.curry(function(n,r,t){return z(S,function(r,t){n(r,t)},r,t)}),vr=r.curry(function(n,r,t,u){var e=n();return z(S,function(n,t){r(e,n,t)},t,u),e}),sr=r.curry(function(n,t){return void 0!==z(S,r.id,n,t)}),dr=r.curry(function(n,t){return!z(S,r.always(!0),n,t)}),lr=C(function(n){return void 0!==n?String(n):""},r.id(function(n){return q(function(r,t){return void 0!==r?void 0!==t?r+n+t:r:t})})),hr=lr(r.id),pr=N(function(n,r){return n>r}),yr=pr(r.id),gr=r.curry(function(n,r,t){var u=0,e=0;return z(S,function(r,t){var i=n(r,t);void 0!==i&&(e+=1,u+=i)},r,t),u/e}),mr=gr(r.id),br=N(function(n,r){return n<r}),Ar=br(r.id),jr=r.curry(function(n,r,t){return!z(S,function(r,t){if(n(r,t))return!0},r,t)}),Or=Yn(r.id),wr=Un(q(function(n,r){return n*r},1)),xr=wr(m(1)),Ur=Un(S),kr=Ur(r.id),Ir=Un(M),Sr=Ir(b),Er=r.curry(Q),Rr=Er(r.id),qr=r.curry(function(n,r){return Q(n(r),wn(r))}),Mr=r.id(function(n){var r=m(n);return function(t,u,e,i){return e.map(r,i(void 0!==t?t:n,u))}}),Nr=r.id(function(n){return Tr(n,void 0)}),zr=function(n){return function(r,t,u,e){return e(void 0!==r?n(r,t):r,t)}},Cr=function(n){return function(r,t,u,e){return u.map(function(r){return void 0!==r?n(r,t):r},e(r,t))}},Dr=r.id(function(n){return function(t,u,e,i){var o=void 0,c=r.array0;return mn(t)&&en(n,t,o=[],c=[]),e.map(function(n){var r=n?n.length:0,t=c.length,u=r+t;return u===t?c:I(I(Array(u),0,n,0,r),r,c,0,t)},i(o,u))}}),Lr=r.id,Pr=kn(function(n){return mn(n)&&n.length?n.length-1:0}),Br=r.curry(function(n,r){return function(t,u,e,i){var o=mn(t),c=o&&t.length,f=y(0,c,0,n),a=y(f,c,c,r);return e.map(function(n){var r=n?n.length:0,u=f+r;return I(I(I(Array(c-a+u),0,t,0,f),f,n,0,r),u,t,a,c)},i(o?I(Array(Math.max(0,a-f)),0,t,f,a):void 0,u))}}),Jr=function(n){return r.isObject(n)?Fr(jn($n,pn,n)):n},Wr=r.id,_r=function(n){return s.apply(null,r.keys(n))},Fr=r.id(function(n){return function(r,t,u,e){return u.map(function(t){return Y(n,t,r)},e(X(n,r),t))}}),Tr=r.curry(function(n,r){function t(t){return un(r,n,t)}return function(u,e,i,o){return i.map(t,o(un(n,r,u),e))}}),$r=r.curry(V),Gr=V(A,A),Hr=V(O(mn,r.id(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),O(r.isArray,r.id(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}))),Kr=V(x,x),Qr=r.id(function(n,t,u,e){return u.map(j,e((n instanceof Object||r.isString(n))&&1===n.length?n[0]:void 0,t))}),Vr=V(O(r.isString,decodeURI),O(r.isString,encodeURI)),Xr=V(O(r.isString,decodeURIComponent),O(r.isString,encodeURIComponent)),Yr=r.id(function(n){var t=n||r.object0,u=t.reviver,e=t.replacer,i=t.space;return V(O(r.isString,function(n){return JSON.parse(n,u)}),O(r.isDefined,function(n){return JSON.stringify(n,e,i)}))});n.seemsArrayLike=mn,n.toFunction=bn,n.assign=An,n.modify=jn,n.remove=On,n.set=wn,n.transform=xn,n.traverse=Un,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:nn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[Kn],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],Kn);return n},n.lazy=c,n.choices=function(n){for(var r=arguments.length,t=Array(r>1?r-1:0),u=1;u<r;u++)t[u-1]=arguments[u];return t.length?dn(t.reduceRight(dn),n):n},n.choose=kn,n.cond=In,n.condOf=Sn,n.ifElse=En,n.iftes=Rn,n.orElse=qn,n.chain=Mn,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(dn,Cn)},n.unless=function(n){return sn(n,o,nn)},n.when=Nn,n.optional=zn,n.zero=Cn,n.assignOp=function(n){return[_r(n),Dn(n)]},n.modifyOp=function(n){return function(r,t,u,e){return o(r=n(r,t),t,u,e,r)}},n.setOp=Dn,n.removeOp=Ln,n.log=function(){var n=arguments,t=r.curry(function(r,t){return console.log.apply(console,I([],0,n,0,n.length).concat([r,t])),t});return V(t("get"),t("set"))},n.seq=Pn,n.branchOr=Bn,n.branch=Jn,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=nn;return Jn(r)},n.elems=Wn,n.entries=_n,n.keys=Fn,n.matches=Tn,n.values=$n,n.children=Gn,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=bn(arguments[r]);n.push(Hn(sr(u)),u)}return n},n.satisfying=Hn,n.flatten=Kn,n.leafs=Qn,n.all=Vn,n.and=Xn,n.any=Yn,n.collectAs=Zn,n.collect=nr,n.concatAs=rr,n.concat=tr,n.countIf=ur,n.count=er,n.countsAs=ir,n.counts=or,n.foldl=cr,n.foldr=fr,n.forEach=ar,n.forEachWith=vr,n.isDefined=sr,n.isEmpty=dr,n.joinAs=lr,n.join=hr,n.maximumBy=pr,n.maximum=yr,n.meanAs=gr,n.mean=mr,n.minimumBy=br,n.minimum=Ar,n.none=jr,n.or=Or,n.productAs=wr,n.product=xr,n.selectAs=Ur,n.select=kr,n.sumAs=Ir,n.sum=Sr,n.get=f,n.lens=Er,n.setter=Rr,n.foldTraversalLens=qr,n.defaults=function(n){function r(r){return un(n,void 0,r)}return function(t,u,e,i){return e.map(r,i(void 0!==t?t:n,u))}},n.define=Mr,n.normalize=function(n){return[zr(n),Cr(n)]},n.required=Nr,n.reread=zr,n.rewrite=Cr,n.append=a,n.filter=Dr,n.find=v,n.findWith=function(n){var r=bn(n),t=sr(r);return[arguments.length>1?v(t,arguments[1]):v(t),r]},n.first=0,n.index=Lr,n.last=Pr,n.prefix=function(n){return Br(0,n)},n.slice=Br,n.suffix=function(n){return Br(0===n?1/0:n?-n:0,void 0)},n.pickIn=Jr,n.prop=Wr,n.props=s,n.propsOf=_r,n.removable=function(){function n(n){if(!(n instanceof Object))return n;for(var t=0,e=u.length;t<e;++t)if(r.hasU(u[t],n))return n}for(var t=arguments.length,u=Array(t),e=0;e<t;e++)u[e]=arguments[e];return function(r,t,u,e){return u.map(n,e(r,t))}},n.valueOr=function(n){return function(r,t,u,e){return e(null!=r?r:n,t)}},n.pick=Fr,n.replace=Tr,n.getInverse=d,n.iso=$r,n.array=function(n){var r=d(n),t=f(n),u=function(n){return k(r,n)};return function(n,r,e,i){return e.map(u,i(k(t,n),r))}},n.inverse=function(n){return function(r,t,u,e){return u.map(function(r){return K(n,r)},e(G(n,r,void 0),t))}},n.complement=Gr,n.identity=nn,n.indexed=Hr,n.is=function(n){return V(function(t){return r.acyclicEqualsU(n,t)},function(r){return!0===r?n:void 0})},n.keyed=vn,n.reverse=Kr,n.singleton=Qr,n.uri=Vr,n.uriComponent=Xr,n.json=Yr,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)?En(w,Number(e),e):"-"===e?En(w,a,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,r){"use strict";function t(n,r){var t=r.length-n;if(t<2)return t?bn(r[n]):Y;for(var u=bn(r[n+--t]),e=function(n,r){return function(t,e){return u(t,e,n,r)}};--t;)e=F(bn(r[n+t]),e);var i=bn(r[n]);return function(n,r,t,u){return i(n,r,t,e(t,u))}}function u(n){var r=function n(r,t){return n.v=t,r};return r.v=n,r}function e(n,r,t,u){for(var i,o=n.length;t<o;++t)switch(typeof(i=n[t])){case"string":r=L(u.v=i,r);break;case"number":r=J(u.v=i,r);break;case"object":r=e(i,r,0,u);break;default:r=i(r,u.v,mn,u)}return r}function i(n,u,e,i){for(var o,c,f=n.length,a=Array(f),v=0;v<f;++v)switch(a[v]=e,typeof(o=n[v])){case"string":e=L(o,e);break;case"number":e=J(o,e);break;default:e=t(v,n)(e,n[v-1],gn,u||r.always(i)),f=v}for(f===n.length&&(e=u?u(e,n[f-1]):i);0<=--f;)e=r.isString(c=n[f])?P(c,e,a[f]):W(c,e,a[f]);return e}function o(n,t,u,e,i){var o=u.of;return o?o(n):u.map(r.always(n),e(i,t))}function c(n){function r(n,r,u,e){return t(n,r,u,e)}var t=function(u,e,i,o){return(t=bn(n(r)))(u,e,i,o)};return r}function f(n,r){return 1<arguments.length?G(n,r):function(r){return G(n,r)}}function a(n,r,t,u){var e=yn(n)?n.length:0;return t.map(function(r){return W(e,r,n)},u(void 0,e))}function v(n){var r=arguments.length>1?arguments[1]:{hint:0};return function(t,u,e,i){var o=yn(t)?t:"",c=r.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}(r,n,o);return e.map(function(n){return W(c,n,o)},i(o[c],c))}}function s(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return Fr(t)}function d(n,r){return 1<arguments.length?T(n,r,void 0):function(r){return T(n,r,void 0)}}var l=r.curry(function(n,r){return r instanceof n}),h=Object.create,p=r.freeze(function(n){return r.assign(h(null),0)}()),y=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},g=function(n){return function(r){return[r,n]}},m=function(n){return function(r){return void 0!==r?r:n}},b=m(0),A=function(n){return void 0!==n?!n:n},j=function(n){return void 0!==n?[n]:n},O=function(n,r){return function(t){return n(t)?r(t):void 0}},w=function(n){return!(n instanceof Object)||r.isArray(n)},x=r.id(function(n){if(yn(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),U=r.id(function(n,r){for(var t,u=r.length,e=Array(u),i=0,o=0;o<u;++o)void 0!==(t=n(r[o],o))&&(e[i++]=t);return i<u&&(e.length=i),e}),k=function(n,r){return yn(r)?U(n,r):void 0},I=r.id(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),S={map:r.sndU,of:function(){},ap:function(n,r){return void 0!==n?n:r}},E=function(n,t){return{map:r.sndU,ap:n,of:r.always(t)}},R=E(function(n,r){return n+r},0),q=function(n){return r.curry(function(r,t,u){var e=void 0,i=void 0;return M(S,function(t,u){var o=r(t,u);void 0===o||void 0!==i&&!n(o,i)||(e=t,i=o)},t,u),e})},M=function(n,r,t,u){return bn(t)(u,void 0,n,r)},C=function(n,t){return r.curryN(4,function(r,u){return u=t(u),function(t,e){return n(M(u,r,t,e))}})},N=function(n){return function(r){return void 0!==r?[r,n]:n}},z=r.id(function(n){for(var r=[];N!==n;)r.push(n[0]),n=n[1];return r.reverse()}),D=function(n,r){return function(t){return function(u,e,i,o){return i.map(function(n){return r(t,n,u)},o(n(t,u),t))}}},L=function(n,r){return r instanceof Object?r[n]:void 0},P=r.id(function(n,t,u){return void 0!==t?r.assocPartialU(n,t,u):r.dissocPartialU(n,u)||r.object0}),B=D(L,P),J=function(n,r){return yn(r)?r[n]:void 0},W=r.id(function(n,r,t){yn(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 I(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}),_=D(J,W),F=function(n,r){return function(t,u){return u=r(t,u),function(r,e){return n(r,e,t,u)}}},T=r.id(function(n,t,u){switch(typeof n){case"string":return P(n,t,u);case"number":return W(n,t,u);case"object":return i(n,0,u,t);default:return 4===n.length?n(u,void 0,gn,r.always(t)):u}}),$=r.id(function(n,r,t){switch(typeof n){case"string":return P(n,r(L(n,t),n),t);case"number":return W(n,r(J(n,t),n),t);case"object":return i(n,r,t);default:return 4===n.length?n(t,void 0,gn,r):(r(n(t,void 0),void 0),t)}}),G=r.id(function(n,t){switch(typeof n){case"string":return L(n,t);case"number":return J(n,t);case"object":for(var i,o=0,c=n.length;o<c;++o)switch(typeof(i=n[o])){case"string":t=L(i,t);break;case"number":t=J(i,t);break;default:return e(n,t,o,u(n[o-1]))}return t;default:return n(t,void 0,mn,r.id)}}),H=function(n,r){return function(t,u,e,i){return e.map(function(n){return r(n,t,u)},i(n(t,u),u))}},K=function(n,r){return function(t,u,e,i){return e.map(r,i(n(t),u))}},Q=r.id(function(n,t){var u=void 0;for(var e in n){var i=n[e],o=r.isObject(i)?Q(i,t):G(i,t);void 0!==o&&(u||(u={}),u[e]=o)}return u}),V=r.id(function(n,t,u){for(var e in n){var i=t&&t[e],o=n[e];u=r.isObject(o)?V(o,i,u):T(o,i,u)}return u}),X=function(n){return r.constructorOf(n)!==Object?r.toObject(n):n},Y=function(n,r,t,u){return u(n,r)},Z=r.id(function(n){return function(r){for(var t={},u=n.length;u--;){var e=r[0];void 0!==e&&(t[n[u]]=e),r=r[1]}return t}}),nn=function(n,t){return function(u,e,i,o){var c=u instanceof Object?X(u):r.object0;if(gn===i){var f=void 0,a={};for(var v in t){f=1;var s=t[v](c[v],v,i,o);void 0!==s&&(a[v]=s)}var d=f;for(var l in c)if(void 0===(d&&t[l])){f=1;var h=n(c[l],l,i,o);void 0!==h&&(a[l]=h)}return f?a:u}if(S!==i){var p=i.map,y=i.ap,m=i.of,b=m(g),A=[];for(var j in t)A.push(j),b=y(p(g,b),t[j](c[j],j,i,o));var O=!!A.length||void 0;for(var w in c)void 0===(O&&t[w])&&(A.push(w),b=y(p(g,b),n(c[w],w,i,o)));return A.length?p(Z(A),b):m(u)}for(var x in t){var U=t[x](c[x],x,i,o);if(void 0!==U)return U}for(var k in c)if(void 0===t[k]){var I=n(c[k],k,i,o);if(void 0!==I)return I}}},rn=function(n,t,u){return r.acyclicEqualsU(u,n)?t:u},tn=r.id(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)}),un=function(n){return n[0]},en=function(n){return n.index},on=r.id(function(n,r){var t=r.lastIndex;r.lastIndex=en(n)+n[0].length;var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),cn=function(n){return function(r){return function(t){return[n,t,r]}}},fn=K(O(l(Object),r.id(function(n){n=X(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),O(r.isArray,r.id(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}))),an=function(n,r,t){return function(u,e,i,o){return(n(u,e)?r:t)(u,e,i,o)}},vn=function(n,r){return r=bn(r),n=bn(n),function(t,u,e,i){return(sr(r,t)?r:n)(t,u,e,i)}},sn=r.curry(function(n,r){return c(function(t){return En(r,Y,[n,t])})}),dn=function(n,r){return function(t,u,e,i){return e.chain(function(n){return r(n,u,e,i)},n(t,u,e,i))}},ln=function(n,r){return[r,Jr(n)]},hn=r.always(o),pn=function(n,r,t){return function(u,e){return n(u,e)?r:t(u,e)}},yn=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||r.isString(n)},gn=r.id({map:r.applyU,of:r.id,ap:r.applyU,chain:r.applyU}),mn=r.id({map:r.sndU}),bn=r.id(function(n){switch(typeof n){case"string":return B(n);case"number":return _(n);case"object":return t(0,n);default:return 4===n.length?n:(u=n,function(n,t,e,i){return e.map(r.always(n),i(u(n,t),t))})}var u}),An=r.curry(function(n,r,t){return T([n,_r(r)],r,t)}),jn=r.curry($),On=r.curry(function(n,r){return T(n,void 0,r)}),wn=r.curry(T),xn=r.curry(function(n,t){return $(n,r.id,t)}),Un=r.curry(M),kn=function(n){return function(r,t,u,e){return bn(n(r,t))(r,t,u,e)}},In=r.id(function(){for(var n=arguments.length,r=zn;n--;){var t=arguments[n];r=t.length<2?bn(t[0]):an(t[0],bn(t[1]),r)}return r}),Sn=r.id(function(n){n=bn(n);for(var t=hn,u=arguments.length;--u;){var e=arguments[u];t=1===e.length?r.always(bn(e[0])):pn(e[0],bn(e[1]),t)}return function(r,u,e,i){return n(r,u,mn,t)(r,u,e,i)}}),En=r.curry(function(n,r,t){return an(n,bn(r),bn(t))}),Rn=r.id(function(n,r){for(var t=arguments.length,u=1&t?bn(arguments[--t]):zn;0<=(t-=2);)u=an(arguments[t],bn(arguments[t+1]),u);return u}),qn=r.curry(vn),Mn=r.curry(function(n,r){return[r,kn(function(r,t){return void 0!==r?n(r,t):zn})]}),Cn=function(n){return an(n,Y,o)},Nn=Cn(r.isDefined),zn=function(n,r,t,u){return o(n,r,t,u)},Dn=function(n){return function(r,t,u,e){return o(n,t,u,e,n)}},Ln=Dn(),Pn=r.id(function(){var n=arguments.length,r=zn;if(n)for(r=bn(arguments[--n]);n;)r=dn(bn(arguments[--n]),r);return r}),Bn=r.id(r.curryN(2,function(n){return n=bn(n),function(t){return function n(t,u){var e=h(null);for(var i in u){var o=u[i];e[i]=r.isObject(o)?n(t,o):bn(o)}return nn(t,e)}(n,t)}})),Jn=Bn(zn),Wn=r.id(function(n,t,u,e){return yn(n)?u===gn?U(e,n):u===S?function(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}(e,n):function(n,t,u){var e=n.map,i=n.ap,o=n.of(N),c=u.length;if(e===r.sndU){for(var f=0;f<c;++f)o=i(o,t(u[f],f));return o}for(var a=0;a<c;++a)o=i(e(N,o),t(u[a],a));return e(z,o)}(u,e,n):u.of(n)}),_n=bn([fn,Wn]),Fn=bn([fn,Wn,0]),Tn=r.id(function(n){return function(t,u,e,i){if(r.isString(t)){var c=e.map;if(n.global){var f=[""];return f.input=t,f.index=0,S===e?function(n,r,t){for(;t=on(t,r);){var u=n(un(t),en(t));if(void 0!==u)return u}}(i,n,f):c((v=t,function(n){for(var r="",t=0,u=function(n){for(var r=[];cn!==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],o=en(i);r+=v.slice(t,o);var c=u[e+1];void 0!==c&&(r+=c),t=o+i[0].length}return r+v.slice(t)}),function(n,r,t,u,e,i){for(var o=t(cn);i=on(i,e);)o=r(r(n(cn,t(i)),o),u(un(i),en(i)));return o}(c,e.ap,e.of,i,n,f))}var a=t.match(n);if(a)return c(function(r){return t.replace(n,void 0!==r?r:"")},i(a[0],en(a)))}var v;return o(t,void 0,e,i)}}),$n=r.id(nn(Y,p)),Gn=En(r.isArray,Wn,En(r.isObject,$n,zn)),Hn=sn(Gn),Kn=sn(Wn,function(n){return!r.isArray(n)}),Qn=Hn(function(n){return!r.isArray(n)&&!r.isObject(n)}),Vn=r.curry(function(n,r,t){return!M(S,function(r,t){if(!n(r,t))return!0},r,t)}),Xn=Vn(r.id),Yn=r.curry(function(n,r,t){return!!M(S,function(r,t){if(n(r,t))return!0},r,t)}),Zn=r.curry(function(n,r,t){var u=[];return M(S,function(r,t){var e=n(r,t);void 0!==e&&u.push(e)},r,t),u}),nr=Zn(r.id),rr=C(r.id,function(n){return E(n.concat,n.empty())}),tr=rr(r.id),ur=r.curry(function(n,r,t){return M(R,function(r,t){return n(r,t)?1:0},r,t)}),er=ur(r.isDefined),ir=r.curry(function(n,r,t){var u=new Map;return M(S,function(r,t){var e=n(r,t),i=u.get(e);u.set(e,void 0!==i?i+1:1)},r,t),u}),or=ir(r.id),cr=r.curry(function(n,r,t,u){return M(S,function(t,u){r=n(r,t,u)},t,u),r}),fr=r.curry(function(n,r,t,u){var e=[],i=[];M(S,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}),ar=r.curry(function(n,r,t){return M(S,function(r,t){n(r,t)},r,t)}),vr=r.curry(function(n,r,t,u){var e=n();return M(S,function(n,t){r(e,n,t)},t,u),e}),sr=r.curry(function(n,t){return void 0!==M(S,r.id,n,t)}),dr=r.curry(function(n,t){return!M(S,r.always(!0),n,t)}),lr=C(function(n){return void 0!==n?String(n):""},r.id(function(n){return E(function(r,t){return void 0!==r?void 0!==t?r+n+t:r:t})})),hr=lr(r.id),pr=q(function(n,r){return n>r}),yr=pr(r.id),gr=r.curry(function(n,r,t){var u=0,e=0;return M(S,function(r,t){var i=n(r,t);void 0!==i&&(e+=1,u+=i)},r,t),u/e}),mr=gr(r.id),br=q(function(n,r){return n<r}),Ar=br(r.id),jr=r.curry(function(n,r,t){return!M(S,function(r,t){if(n(r,t))return!0},r,t)}),Or=Yn(r.id),wr=Un(E(function(n,r){return n*r},1)),xr=wr(m(1)),Ur=Un(S),kr=Ur(r.id),Ir=Un(R),Sr=Ir(b),Er=r.curry(H),Rr=Er(r.id),qr=r.curry(function(n,r){return H(n(r),wn(r))}),Mr=r.id(function(n){var r=m(n);return function(t,u,e,i){return e.map(r,i(void 0!==t?t:n,u))}}),Cr=r.id(function(n){return Tr(n,void 0)}),Nr=function(n){return function(r,t,u,e){return e(void 0!==r?n(r,t):r,t)}},zr=function(n){return function(r,t,u,e){return u.map(function(r){return void 0!==r?n(r,t):r},e(r,t))}},Dr=r.id(function(n){return function(t,u,e,i){var o=void 0,c=r.array0;return yn(t)&&tn(n,t,o=[],c=[]),e.map(function(n){var r=n?n.length:0,t=c.length,u=r+t;return u===t?c:I(I(Array(u),0,n,0,r),r,c,0,t)},i(o,u))}}),Lr=r.id,Pr=kn(function(n){return yn(n)&&n.length?n.length-1:0}),Br=r.curry(function(n,r){return function(t,u,e,i){var o=yn(t),c=o&&t.length,f=y(0,c,0,n),a=y(f,c,c,r);return e.map(function(n){var r=n?n.length:0,u=f+r;return I(I(I(Array(c-a+u),0,t,0,f),f,n,0,r),u,t,a,c)},i(o?I(Array(Math.max(0,a-f)),0,t,f,a):void 0,u))}}),Jr=function(n){return r.isObject(n)?Fr(jn($n,ln,n)):n},Wr=r.id,_r=function(n){return s.apply(null,r.keys(n))},Fr=r.id(function(n){return function(r,t,u,e){return u.map(function(t){return V(n,t,r)},e(Q(n,r),t))}}),Tr=r.curry(function(n,r){function t(t){return rn(r,n,t)}return function(u,e,i,o){return i.map(t,o(rn(n,r,u),e))}}),$r=r.curry(K),Gr=K(A,A),Hr=K(O(yn,r.id(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),O(r.isArray,r.id(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}))),Kr=K(x,x),Qr=r.id(function(n,t,u,e){return u.map(j,e((n instanceof Object||r.isString(n))&&1===n.length?n[0]:void 0,t))}),Vr=K(O(r.isString,decodeURI),O(r.isString,encodeURI)),Xr=K(O(r.isString,decodeURIComponent),O(r.isString,encodeURIComponent)),Yr=r.id(function(n){var t=n||r.object0,u=t.reviver,e=t.replacer,i=t.space;return K(O(r.isString,function(n){return JSON.parse(n,u)}),O(r.isDefined,function(n){return JSON.stringify(n,e,i)}))});n.seemsArrayLike=yn,n.Identity=gn,n.Constant=mn,n.toFunction=bn,n.assign=An,n.modify=jn,n.remove=On,n.set=wn,n.transform=xn,n.traverse=Un,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:Y;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[Kn],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],Kn);return n},n.lazy=c,n.choices=function(n){for(var r=arguments.length,t=Array(r>1?r-1:0),u=1;u<r;u++)t[u-1]=arguments[u];return t.length?vn(t.reduceRight(vn),n):n},n.choose=kn,n.cond=In,n.condOf=Sn,n.ifElse=En,n.iftes=Rn,n.orElse=qn,n.chain=Mn,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(vn,zn)},n.unless=function(n){return an(n,o,Y)},n.when=Cn,n.optional=Nn,n.zero=zn,n.assignOp=function(n){return[_r(n),Dn(n)]},n.modifyOp=function(n){return function(r,t,u,e){return o(r=n(r,t),t,u,e,r)}},n.setOp=Dn,n.removeOp=Ln,n.log=function(){var n=arguments,t=r.curry(function(r,t){return console.log.apply(console,I([],0,n,0,n.length).concat([r,t])),t});return K(t("get"),t("set"))},n.seq=Pn,n.branchOr=Bn,n.branch=Jn,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=Y;return Jn(r)},n.elems=Wn,n.entries=_n,n.keys=Fn,n.matches=Tn,n.values=$n,n.children=Gn,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=bn(arguments[r]);n.push(Hn(sr(u)),u)}return n},n.satisfying=Hn,n.flatten=Kn,n.leafs=Qn,n.all=Vn,n.and=Xn,n.any=Yn,n.collectAs=Zn,n.collect=nr,n.concatAs=rr,n.concat=tr,n.countIf=ur,n.count=er,n.countsAs=ir,n.counts=or,n.foldl=cr,n.foldr=fr,n.forEach=ar,n.forEachWith=vr,n.isDefined=sr,n.isEmpty=dr,n.joinAs=lr,n.join=hr,n.maximumBy=pr,n.maximum=yr,n.meanAs=gr,n.mean=mr,n.minimumBy=br,n.minimum=Ar,n.none=jr,n.or=Or,n.productAs=wr,n.product=xr,n.selectAs=Ur,n.select=kr,n.sumAs=Ir,n.sum=Sr,n.get=f,n.lens=Er,n.setter=Rr,n.foldTraversalLens=qr,n.defaults=function(n){function r(r){return rn(n,void 0,r)}return function(t,u,e,i){return e.map(r,i(void 0!==t?t:n,u))}},n.define=Mr,n.normalize=function(n){return[Nr(n),zr(n)]},n.required=Cr,n.reread=Nr,n.rewrite=zr,n.append=a,n.filter=Dr,n.find=v,n.findWith=function(n){var r=bn(n),t=sr(r);return[arguments.length>1?v(t,arguments[1]):v(t),r]},n.first=0,n.index=Lr,n.last=Pr,n.prefix=function(n){return Br(0,n)},n.slice=Br,n.suffix=function(n){return Br(0===n?1/0:n?-n:0,void 0)},n.pickIn=Jr,n.prop=Wr,n.props=s,n.propsOf=_r,n.removable=function(){function n(n){if(!(n instanceof Object))return n;for(var t=0,e=u.length;t<e;++t)if(r.hasU(u[t],n))return n}for(var t=arguments.length,u=Array(t),e=0;e<t;e++)u[e]=arguments[e];return function(r,t,u,e){return u.map(n,e(r,t))}},n.valueOr=function(n){return function(r,t,u,e){return e(null!=r?r:n,t)}},n.pick=Fr,n.replace=Tr,n.getInverse=d,n.iso=$r,n.array=function(n){var r=d(n),t=f(n),u=function(n){return k(r,n)};return function(n,r,e,i){return e.map(u,i(k(t,n),r))}},n.inverse=function(n){return function(r,t,u,e){return u.map(function(r){return G(n,r)},e(T(n,r,void 0),t))}},n.complement=Gr,n.identity=Y,n.indexed=Hr,n.is=function(n){return K(function(t){return r.acyclicEqualsU(n,t)},function(r){return!0===r?n:void 0})},n.keyed=fn,n.reverse=Kr,n.singleton=Qr,n.uri=Vr,n.uriComponent=Xr,n.json=Yr,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)?En(w,Number(e),e):"-"===e?En(w,a,e):e.replace("~1","/").replace("~0","~")}return r.length=t-1,r},Object.defineProperty(n,"__esModule",{value:!0})});
{
"name": "partial.lenses",
"version": "13.6.2",
"version": "13.7.0",
"description": "Partial lenses is a comprehensive, high-performance optics library for JavaScript",

@@ -5,0 +5,0 @@ "module": "dist/partial.lenses.es.js",

@@ -112,6 +112,2 @@ import * as I from './ext/infestines'

const Ident = {map: I.applyU, of: I.id, ap: I.applyU, chain: I.applyU}
const Const = {map: I.sndU}
const ConcatOf = (ap, empty) => ({map: I.sndU, ap, of: I.always(empty)})

@@ -346,3 +342,3 @@

default:
return o.length === 4 ? o(s, void 0, Ident, I.always(x)) : s
return o.length === 4 ? o(s, void 0, Identity, I.always(x)) : s
}

@@ -363,3 +359,3 @@ })

return o.length === 4
? o(s, void 0, Ident, xi2x)
? o(s, void 0, Identity, xi2x)
: (xi2x(o(s, void 0), void 0), s)

@@ -388,3 +384,3 @@ }

default:
s = o(s, ix.v, Const, ix)
s = o(s, ix.v, Constant, ix)
}

@@ -416,3 +412,3 @@ return s

default:
return l(s, void 0, Const, I.id)
return l(s, void 0, Constant, I.id)
}

@@ -434,3 +430,3 @@ })

default:
x = composed(i, os)(x, os[i - 1], Ident, xi2y || I.always(y))
x = composed(i, os)(x, os[i - 1], Identity, xi2y || I.always(y))
n = i

@@ -521,3 +517,3 @@ break

if (Ident === A) {
if (Identity === A) {
let written = void 0

@@ -750,2 +746,17 @@ const r = {}

export const Identity = (process.env.NODE_ENV === 'production'
? I.id
: I.freeze)({
map: I.applyU,
of: I.id,
ap: I.applyU,
chain: I.applyU
})
export const Constant = (process.env.NODE_ENV === 'production'
? I.id
: I.freeze)({
map: I.sndU
})
export const toFunction = (process.env.NODE_ENV === 'production'

@@ -853,3 +864,3 @@ ? I.id

}
return (x, i, C, xi2yC) => of(x, i, Const, op)(x, i, C, xi2yC)
return (x, i, C, xi2yC) => of(x, i, Constant, op)(x, i, C, xi2yC)
})

@@ -965,3 +976,3 @@

if (seemsArrayLike(xs)) {
return A === Ident
return A === Identity
? mapPartialIndexU(xi2yA, xs)

@@ -968,0 +979,0 @@ : A === Select

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc