partial.lenses
Advanced tools
Comparing version 13.15.0 to 13.16.0
@@ -1645,2 +1645,8 @@ 'use strict'; | ||
var getter = function getter(get) { | ||
return function (x, i, F, xi2yF) { | ||
return xi2yF(get(x, i), i); | ||
}; | ||
}; | ||
var setter = /*#__PURE__*/lens(id); | ||
@@ -2127,2 +2133,3 @@ | ||
exports.lens = lens; | ||
exports.getter = getter; | ||
exports.setter = setter; | ||
@@ -2129,0 +2136,0 @@ exports.foldTraversalLens = foldTraversalLens; |
@@ -1641,2 +1641,8 @@ import { defineNameU, isString, isFunction, isArray, freeze, isObject, acyclicEqualsU, array0, object0, sndU, always, curry, curryN, assocPartialU, dissocPartialU, isNumber, constructorOf, toObject, applyU, isDefined, keys, hasU, arityN, id, assign } from 'infestines'; | ||
var getter = function getter(get) { | ||
return function (x, i, F, xi2yF) { | ||
return xi2yF(get(x, i), i); | ||
}; | ||
}; | ||
var setter = /*#__PURE__*/lens(id$1); | ||
@@ -2033,2 +2039,2 @@ | ||
export { seemsArrayLike, Identity, IdentityAsync, Constant, toFunction, assign$1 as assign, modify, modifyAsync, remove, set, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, iftes, orElse, chain, choice, unless, when, optional, zero, mapIx, setIx, tieIx, joinIx, skipIx, log, getLog, 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, 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$1 as replace, getInverse, iso, array, inverse, complement, identity, is, indexed, reverse, singleton, disjoint, keyed, uri, uriComponent, json, dropPrefix, dropSuffix, replaces, split, uncouple, add$1 as add, divide, multiply$1 as multiply, negate$1 as negate, subtract, pointer }; | ||
export { seemsArrayLike, Identity, IdentityAsync, Constant, toFunction, assign$1 as assign, modify, modifyAsync, remove, set, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, iftes, orElse, chain, choice, unless, when, optional, zero, mapIx, setIx, tieIx, joinIx, skipIx, log, getLog, 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, 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, getter, 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$1 as replace, getInverse, iso, array, inverse, complement, identity, is, indexed, reverse, singleton, disjoint, keyed, uri, uriComponent, json, dropPrefix, dropSuffix, replaces, split, uncouple, add$1 as add, divide, multiply$1 as multiply, negate$1 as negate, subtract, pointer }; |
@@ -1641,2 +1641,8 @@ (function (global, factory) { | ||
var getter = function getter(get) { | ||
return function (x, i, F, xi2yF) { | ||
return xi2yF(get(x, i), i); | ||
}; | ||
}; | ||
var setter = /*#__PURE__*/lens(id); | ||
@@ -2123,2 +2129,3 @@ | ||
exports.lens = lens; | ||
exports.getter = getter; | ||
exports.setter = setter; | ||
@@ -2125,0 +2132,0 @@ exports.foldTraversalLens = foldTraversalLens; |
@@ -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 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,r,t,u){var e=n.map,i=n.ap,o=n.of(V),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=V(u),v=0;v<c;++v)o=i(e(a,o),r(t[v],v));return e(Y,o)}function a(n,r){var t=r.length-n;if(t<2)return t?Gn(r[n]):An;for(var e=Gn(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=an(Gn(r[n+t]),i);var o=Gn(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function o(n,r,t,u){for(var e,i=n.length;t<i;++t)switch(typeof(e=n[t])){case"string":r=tn(u.v=e,r);break;case"number":r=on(u.v=e,r);break;case"object":r=o(e,r,0,u);break;default:r=e(r,u.v,_n,u)}return r}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=tn(e,t);break;case"number":t=on(e,t);break;default:t=a(f,n)(t,n[f-1],Jn,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])?un(i,t,c[o]):cn(i,t,c[o]);return t}function v(n,r,t,u,e){var i=t.of;return i?i(n):t.map(b.always(n),u(e,r))}function t(r,n){return 1<arguments.length?dn(r,n):function(n){return dn(r,n)}}function c(r,n,t,u){var e=Fn(r)?r.length:0;return t.map(function(n){return cn(e,n,r)},u(void 0,e))}function f(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=Fn(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 cn(i,n,e)},u(e[i],i))}}function r(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return xt(t)}function s(r,n){return 1<arguments.length?vn(r,n,void 0):function(n){return vn(r,n,void 0)}}var l=function(n,r){return n+r},d=function(n,r){return n*r},p=b.curry(l),h=b.curry(d),y=b.curry(function(n,r){return r/n}),g=function(n){return-n},m=function(n,r){return n<r},j=function(n,r){return r<n},A=b.curry(function(n,r){return r instanceof n}),O=Object.create,x=function(n){return b.assign(O(null),n)},w=b.freeze(x(b.object0)),I=b.curry(function(n,r,t){return t.replace(n,r)}),U=function(n){return n},k=function(n){return n},S=function(n){return n},E=function(n,r){return b.isString(n)?new RegExp(I(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},N=function(n,r){return null!=r&&b.isFunction(r.then)?r.then(n):n(r)},R=function(n){return void 0!==n?String(n):""},q=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},M=function(r){return function(n){return[n,r]}},P=function(r){return function(n){return void 0!==n?n:r}},z=P(0),C=function(n){return void 0!==n?!n:n},D=function(n){return void 0!==n?[n]:n},L=function(r,t){return S(function(n){return r(n)?t(n):void 0})},W=function(n){return!(n instanceof Object)||b.isArray(n)},$=U(function(n){if(Fn(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),B=U(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}),F=function(n,r){return Fn(r)?B(n,r,void 0):void 0},J=U(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),T={map:b.sndU,of:function(){},ap:function(n,r){return void 0!==n?n:r}},_=function(n,r){return{map:b.sndU,ap:n,of:b.always(r)}},G=_(l,0),H=function(o){return b.curry(function(u,n,r){var e=void 0,i=void 0;return K(T,function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},K=function(n,r,t,u){return Gn(t)(u,void 0,n,r)},Q=function(e,n){return b.curryN(4,S(function(t,u){return u=n(u),function(n,r){return e(K(u,t,n,r))}}))},V=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},X=function(n,r){for(;V!==n;)r.push(n[0]),n=n[1];return r},Y=U(function(n){return X(n,[]).reverse()}),Z={map:function(n,r){var t=r.p,u=r.c;return{m:"%O <= "+r.m,p:[n(t[0]),t],c:u}}},nn=function(n){return{m:"%O",p:[n,V],c:n}},rn=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))}}},tn=function(n,r){return r instanceof Object?r[n]:void 0},un=U(function(n,r,t){return void 0!==r?b.assocPartialU(n,r,t):b.dissocPartialU(n,t)||b.object0}),en=rn(tn,un),on=function(n,r){return Fn(r)?r[n]:void 0},cn=U(function(n,r,t){Fn(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 J(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}),fn=rn(on,cn),an=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},vn=U(function(n,r,t){switch(typeof n){case"string":return un(n,r,t);case"number":return cn(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,Jn,b.always(r)):t}}),sn=U(function(n,r,t){switch(typeof n){case"string":return un(n,r(tn(n,t),n),t);case"number":return cn(n,r(on(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,Jn,r):(r(n(t,void 0),void 0),t)}}),ln=function(n,r,t){return u=Gn(n)(t,void 0,Tn,r),Promise.resolve(u);var u},dn=U(function(n,r){switch(typeof n){case"string":return tn(n,r);case"number":return on(n,r);case"object":for(var t,u=0,e=n.length;u<e;++u)switch(typeof(t=n[u])){case"string":r=tn(t,r);break;case"number":r=on(t,r);break;default:return o(n,r,u,((i=function n(r,t){return n.v=t,r}).v=n[u-1],i))}return r;default:return n(r,void 0,_n,U)}var i}),pn=function(e,i){return S(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))})},hn=function(e,i){return S(function(n,r,t,u){return t.map(i,u(e(n),r))})},yn=function(n,r){return hn(L(b.isString,n),L(b.isString,r))},gn=function(n,r){return hn(L(b.isNumber,n),L(b.isNumber,r))},mn=U(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?mn(e,r):dn(e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),bn=U(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?bn(i,e,t):vn(i,e,t)}return t}),jn=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},An=function(n,r,t,u){return u(n,r)},On=U(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}}),xn=U(function(n,r,t,u,e,i){var o=void 0,c=!0,f={};for(var a in r){o=1;var v=t[a],s=r[a](v,a,e,i);void 0!==s?(f[a]=s,c&&(c=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):c=!1}var l=o;for(var d in t)if(void 0===(l&&r[d])){o=1;var p=t[d],h=n(p,d,e,i);void 0!==h?(f[d]=h,c&&(c=p===h&&(0!==p||1/p==1/h)||p!=p&&h!=h)):c=!1}return o?c&&t===u?u:f:u}),wn=function(g,m){return function(n,r,t,u){var e=n instanceof Object?jn(n):b.object0;if(Jn===t)return xn(g,m,e,n,t,u);if(T!==t){var i=t.map,o=t.ap,c=t.of,f=c(M),a=[];for(var v in m)a.push(v),f=o(i(M,f),m[v](e[v],v,t,u));var s=!!a.length||void 0;for(var l in e)void 0===(s&&m[l])&&(a.push(l),f=o(i(M,f),g(e[l],l,t,u)));return a.length?i(On(a),f):c(n)}for(var d in m){var p=m[d](e[d],d,t,u);if(void 0!==p)return p}for(var h in e)if(void 0===m[h]){var y=g(e[h],h,t,u);if(void 0!==y)return y}}},In=function(n,r,t){return b.acyclicEqualsU(t,n)?r:t},Un=U(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)}),kn=function(n){return n[0]},Sn=function(n){return n.index},En=function(n){return Sn(n)+n[0].length},Nn=U(function(n,r){var t=r.lastIndex;r.lastIndex=En(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),Rn=function(t){return function(r){return function(n){return[t,n,r]}}},qn=hn(L(A(Object),U(function(n){n=jn(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),L(b.isArray,U(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}))),Mn=U(function(n,r){if(r instanceof Object){var t={};for(var u in r=jn(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Pn=U(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=jn(n)){var u=n[t];if(u instanceof Object)for(var e in u=jn(u))i(e)===t&&(r[e]=u[e])}return r}}}),zn=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},Cn=function(e,i){return i=Gn(i),e=Gn(e),function(n,r,t,u){return(_r(i,n)?i:e)(n,r,t,u)}},Dn=function(n,r,t,u){return t===Jn?B(u,n,void 0):t===T?e(u,n):i(t,u,n,void 0)},Ln=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))}},Wn=function(n,r){return[r,jt(n)]},$n=b.always(v),Bn=function(t,u,e){return function(n,r){return t(n,r)?u:e(n,r)}},Fn=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},Jn=U({map:b.applyU,of:U,ap:b.applyU,chain:b.applyU}),Tn=U({map:N,ap:function(n,r){return N(function(r){return N(function(n){return n(r)},n)},r)},of:U,chain:N}),_n=U({map:b.sndU}),Gn=U(function(n){switch(typeof n){case"string":return en(n);case"number":return fn(n);case"object":return a(0,n);default:return 4===n.length?n:(e=n,S(function(n,r,t,u){return t.map(b.always(n),u(e(n,r),r))}))}var e}),Hn=b.curry(function(n,r,t){return vn([n,Ot(r)],r,t)}),Kn=b.curry(sn),Qn=b.curry(ln),Vn=b.curry(function(n,r){return vn(n,void 0,r)}),Xn=b.curry(vn),Yn=b.curry(K),Zn=function(e){return S(function(n,r,t,u){return Gn(e(n,r))(n,r,t,u)})},nr=U(function(){for(var n=arguments.length,r=ar;n--;){var t=arguments[n];r=t.length<2?Gn(t[0]):zn(Gn(t[1]),r)(t[0])}return r}),rr=U(function(e){e=Gn(e);for(var i=$n,n=arguments.length;--n;){var r=arguments[n];i=1===r.length?b.always(Gn(r[0])):Bn(r[0],Gn(r[1]),i)}return function(n,r,t,u){return e(n,r,_n,i)(n,r,t,u)}}),tr=b.curry(function(n,r,t){return zn(Gn(r),Gn(t))(n)}),ur=U(function(n,r){for(var t=arguments.length,u=1&t?Gn(arguments[--t]):ar;0<=(t-=2);)u=zn(Gn(arguments[t+1]),u)(arguments[t]);return u}),er=b.curry(Cn),ir=b.curry(function(t,n){return[n,Zn(function(n,r){return void 0!==n?t(n,r):ar})]}),or=zn(v,An),cr=zn(An,v),fr=cr(b.isDefined),ar=function(n,r,t,u){return v(n,r,t,u)},vr=b.curry(function(e,i){return i=Gn(i),S(function(n,t,r,u){return i(n,t,r,function(n,r){return u(n,e(r,t))})})}),sr=k(vr(function(n,r){return void 0!==r?void 0!==n?[r,n]:r:n})),lr=k(vr(b.sndU)),dr=b.curry(function(n,r){var t=K(Z,nn,n,r),u=t.c;return console.log.apply(console,X(t.p,[t.m])),u}),pr=b.curry(function(n,r){return sn(n,U,r)}),hr=b.curry(function(n,r){return ln(n,U,r)}),yr=U(function(){var n=arguments.length,r=ar;if(n)for(r=Gn(arguments[--n]);n;)r=Ln(Gn(arguments[--n]),r);return r}),gr=function(e){return function(n,r,t,u){return v(e,r,t,u,e)}},mr=gr(),br=U(b.curryN(2,function(r){return r=Gn(r),function(n){return function n(r,t){var u=O(null);for(var e in t){var i=t[e];u[e]=b.isObject(i)?n(r,i):Gn(i)}return wn(r,u)}(r,n)}})),jr=br(ar),Ar=U(function(n,r,t,u){return Fn(n)?Dn(n,0,t,u):t.of(n)}),Or=k(Gn([qn,Ar])),xr=k(Gn([qn,Ar,0])),wr=U(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,T===t?function(n,r,t){for(;t=Nn(t,r);){var u=n(kn(t),Sn(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=[];Rn!==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,Sn(i));var o=u[e+1];void 0!==o&&(r+=o),t=En(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(Rn);i=Nn(i,e);)o=r(r(n(Rn,t(i)),o),u(kn(i),Sn(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],Sn(o)))}var c;return v(r,void 0,t,u)}}),Ir=U(k(wn(An,w))),Ur=U(function(n,r,t,u){return b.isArray(n)?Dn(n,0,t,u):b.isObject(n)?Ir(n,r,t,u):t.of(n)}),kr=U(function(n,r,u,e){return function n(r,t){return b.isArray(r)?Dn(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}),Sr=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):Ur(r,t,u,n)}(n,r)}},Er=Sr(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),Nr=b.curry(function(t,n,r){return!K(T,function(n,r){if(!t(n,r))return!0},n,r)}),Rr=Nr(U),qr=b.curry(function(t,n,r){return!!K(T,function(n,r){if(t(n,r))return!0},n,r)}),Mr=(0,b.curry)(function(u,n,r){var e=[];return K(T,function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),Pr=Mr(U),zr=Q(U,function(n){return _(n.concat,n.empty())}),Cr=zr(U),Dr=b.curry(function(t,n,r){return K(G,function(n,r){return t(n,r)?1:0},n,r)}),Lr=Dr(b.isDefined),Wr=b.curry(function(e,n,r){var i=new Map;return K(T,function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),$r=Wr(U),Br=b.curry(function(t,u,n,r){return K(T,function(n,r){u=t(u,n,r)},n,r),u}),Fr=b.curry(function(n,r,t,u){var e=[],i=[];K(T,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}),Jr=b.curry(function(t,n,r){return K(T,function(n,r){t(n,r)},n,r)}),Tr=b.curry(function(n,t,r,u){var e=n();return K(T,function(n,r){t(e,n,r)},r,u),e}),_r=b.curry(function(n,r){return void 0!==K(T,U,n,r)}),Gr=b.curry(function(n,r){return!K(T,b.always(!0),n,r)}),Hr=Q(R,U(function(t){return _(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),Kr=Hr(U),Qr=H(j),Vr=Qr(U),Xr=b.curry(function(u,n,r){var e=0,i=0;return K(T,function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),Yr=Xr(U),Zr=H(m),nt=Zr(U),rt=b.curry(function(t,n,r){return!K(T,function(n,r){if(t(n,r))return!0},n,r)}),tt=qr(U),ut=Yn(_(d,1)),et=ut(P(1)),it=Yn(T),ot=it(U),ct=Yn(G),ft=ct(z),at=b.curry(pn),vt=at(U),st=b.curry(function(n,r){return pn(n(r),Xn(r))}),lt=U(function(e){var i=P(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}}),dt=U(function(n){return wt(n,void 0)}),pt=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},ht=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},yt=U(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return Fn(n)&&Un(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:J(J(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),gt=U,mt=Zn(function(n){return Fn(n)&&n.length?n.length-1:0}),bt=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=Fn(u),i=e&&u.length,o=q(0,i,0,f),c=q(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return J(J(J(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?J(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),jt=function(n){return b.isObject(n)?xt(Kn(Ir,Wn,n)):n},At=U,Ot=function(n){return r.apply(null,b.keys(n))},xt=U(function(e){return function(r,n,t,u){return t.map(function(n){return bn(e,n,r)},u(mn(e,r),n))}}),wt=b.curry(function(e,i){function o(n){return In(i,e,n)}return function(n,r,t,u){return t.map(o,u(In(e,i,n),r))}}),It=b.curry(hn),Ut=hn(C,C),kt=hn(L(Fn,U(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),L(b.isArray,U(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}))),St=hn($,$),Et=U(function(n,r,t,u){return t.map(D,u((n instanceof Object||b.isString(n))&&1===n.length?n[0]:void 0,r))}),Nt=yn(decodeURI,encodeURI),Rt=yn(decodeURIComponent,encodeURIComponent),qt=U(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return hn(L(b.isString,function(n){return JSON.parse(n,t)}),L(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),Mt=b.curry(function(n,r){return yn(I(E(n,"g"),r),I(E(r,"g"),n))}),Pt=U(function(r){var t=1<arguments.length?arguments[1]:r;return hn(L(b.isString,function(n){return n.split(t)}),L(b.isArray,function(n){return n.join(r)}))}),zt=U(function(u){var t=E(1<arguments.length?arguments[1]:u,"");return hn(L(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Sn(r)),n.slice(En(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),Ct=gn(g,g);n.seemsArrayLike=Fn,n.Identity=Jn,n.IdentityAsync=Tn,n.Constant=_n,n.toFunction=Gn,n.assign=Hn,n.modify=Kn,n.modifyAsync=Qn,n.remove=Vn,n.set=Xn,n.traverse=Yn,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:An;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[kr],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],kr);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=Gn(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?Cn(t.reduceRight(Cn),n):n},n.choose=Zn,n.cond=nr,n.condOf=rr,n.ifElse=tr,n.iftes=ur,n.orElse=er,n.chain=ir,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(Cn,ar)},n.unless=or,n.when=cr,n.optional=fr,n.zero=ar,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=vr,n.joinIx=sr,n.skipIx=lr,n.log=function(){var n=b.curry(function(n,r){return console.log.apply(console,J([],0,arguments,0,arguments.length).concat([n,r])),r});return hn(n("get"),n("set"))},n.getLog=dr,n.transform=pr,n.transformAsync=hr,n.seq=yr,n.assignOp=function(n){return[Ot(n),gr(n)]},n.modifyOp=function(e){return function(n,r,t,u){return v(n=e(n,r),r,t,u,n)}},n.setOp=gr,n.removeOp=mr,n.branchOr=br,n.branch=jr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=An;return jr(r)},n.elems=Ar,n.elemsTotal=function(n,r,t,u){return Fn(n)?t===Jn?B(u,n,B):t===T?e(u,n):i(t,u,n,i):t.of(n)},n.entries=Or,n.keys=xr,n.matches=wr,n.values=Ir,n.children=Ur,n.flatten=kr,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=Gn(arguments[r]);n.push(Sr(_r(u)),u)}return n},n.satisfying=Sr,n.leafs=Er,n.all=Nr,n.and=Rr,n.any=qr,n.collectAs=Mr,n.collect=Pr,n.concatAs=zr,n.concat=Cr,n.countIf=Dr,n.count=Lr,n.countsAs=Wr,n.counts=$r,n.foldl=Br,n.foldr=Fr,n.forEach=Jr,n.forEachWith=Tr,n.isDefined=_r,n.isEmpty=Gr,n.joinAs=Hr,n.join=Kr,n.maximumBy=Qr,n.maximum=Vr,n.meanAs=Xr,n.mean=Yr,n.minimumBy=Zr,n.minimum=nt,n.none=rt,n.or=tt,n.productAs=ut,n.product=et,n.selectAs=it,n.select=ot,n.sumAs=ct,n.sum=ft,n.get=t,n.lens=at,n.setter=vt,n.foldTraversalLens=st,n.defaults=function(e){function i(n){return In(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=lt,n.normalize=function(n){return[pt(n),ht(n)]},n.required=dt,n.reread=pt,n.rewrite=ht,n.append=c,n.filter=yt,n.find=f,n.findWith=function(n){var r=Gn(n),t=_r(r);return[1<arguments.length?f(t,arguments[1]):f(t),r]},n.first=0,n.index=gt,n.last=mt,n.prefix=function(n){return bt(0,n)},n.slice=bt,n.suffix=function(n){return bt(0===n?1/0:n?-n:0,void 0)},n.pickIn=jt,n.prop=At,n.props=r,n.propsOf=Ot,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=xt,n.replace=wt,n.getInverse=s,n.iso=It,n.array=function(n){var r=s(n),e=t(n),i=function(n){return F(r,n)};return function(n,r,t,u){return t.map(i,u(F(e,n),r))}},n.inverse=function(e){return function(n,r,t,u){return t.map(function(n){return dn(e,n)},u(vn(e,n,void 0),r))}},n.complement=Ut,n.identity=An,n.is=function(r){return hn(function(n){return b.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.indexed=kt,n.reverse=St,n.singleton=Et,n.disjoint=function(i){return function(n,r,t,u){var e=Pn(i);return t.map(e,u(Mn(i,n),r))}},n.keyed=qn,n.uri=Nt,n.uriComponent=Rt,n.json=qt,n.dropPrefix=function(r){return yn(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return yn(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=Mt,n.split=Pt,n.uncouple=zt,n.add=function(n){return gn(p(n),p(-n))},n.divide=function(n){return gn(y(n),h(n))},n.multiply=function(n){return gn(h(n),y(n))},n.negate=Ct,n.subtract=function(n){return gn(p(-n),p(n))},n.pointer=function(n){"#"===n[0]&&(n=dn(Rt,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)?tr(W,Number(e),e):"-"===e?tr(W,c,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 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,r,t,u){var e=n.map,i=n.ap,o=n.of(V),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=V(u),v=0;v<c;++v)o=i(e(a,o),r(t[v],v));return e(Y,o)}function a(n,r){var t=r.length-n;if(t<2)return t?Gn(r[n]):An;for(var e=Gn(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=an(Gn(r[n+t]),i);var o=Gn(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function o(n,r,t,u){for(var e,i=n.length;t<i;++t)switch(typeof(e=n[t])){case"string":r=tn(u.v=e,r);break;case"number":r=on(u.v=e,r);break;case"object":r=o(e,r,0,u);break;default:r=e(r,u.v,_n,u)}return r}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=tn(e,t);break;case"number":t=on(e,t);break;default:t=a(f,n)(t,n[f-1],Jn,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])?un(i,t,c[o]):cn(i,t,c[o]);return t}function v(n,r,t,u,e){var i=t.of;return i?i(n):t.map(b.always(n),u(e,r))}function t(r,n){return 1<arguments.length?dn(r,n):function(n){return dn(r,n)}}function c(r,n,t,u){var e=Fn(r)?r.length:0;return t.map(function(n){return cn(e,n,r)},u(void 0,e))}function f(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=Fn(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 cn(i,n,e)},u(e[i],i))}}function r(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return xt(t)}function s(r,n){return 1<arguments.length?vn(r,n,void 0):function(n){return vn(r,n,void 0)}}var l=function(n,r){return n+r},d=function(n,r){return n*r},p=b.curry(l),h=b.curry(d),y=b.curry(function(n,r){return r/n}),g=function(n){return-n},m=function(n,r){return n<r},j=function(n,r){return r<n},A=b.curry(function(n,r){return r instanceof n}),O=Object.create,x=function(n){return b.assign(O(null),n)},w=b.freeze(x(b.object0)),I=b.curry(function(n,r,t){return t.replace(n,r)}),U=function(n){return n},k=function(n){return n},S=function(n){return n},E=function(n,r){return b.isString(n)?new RegExp(I(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},N=function(n,r){return null!=r&&b.isFunction(r.then)?r.then(n):n(r)},R=function(n){return void 0!==n?String(n):""},q=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},M=function(r){return function(n){return[n,r]}},P=function(r){return function(n){return void 0!==n?n:r}},z=P(0),C=function(n){return void 0!==n?!n:n},D=function(n){return void 0!==n?[n]:n},L=function(r,t){return S(function(n){return r(n)?t(n):void 0})},W=function(n){return!(n instanceof Object)||b.isArray(n)},$=U(function(n){if(Fn(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),B=U(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}),F=function(n,r){return Fn(r)?B(n,r,void 0):void 0},J=U(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),T={map:b.sndU,of:function(){},ap:function(n,r){return void 0!==n?n:r}},_=function(n,r){return{map:b.sndU,ap:n,of:b.always(r)}},G=_(l,0),H=function(o){return b.curry(function(u,n,r){var e=void 0,i=void 0;return K(T,function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},K=function(n,r,t,u){return Gn(t)(u,void 0,n,r)},Q=function(e,n){return b.curryN(4,S(function(t,u){return u=n(u),function(n,r){return e(K(u,t,n,r))}}))},V=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},X=function(n,r){for(;V!==n;)r.push(n[0]),n=n[1];return r},Y=U(function(n){return X(n,[]).reverse()}),Z={map:function(n,r){var t=r.p,u=r.c;return{m:"%O <= "+r.m,p:[n(t[0]),t],c:u}}},nn=function(n){return{m:"%O",p:[n,V],c:n}},rn=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))}}},tn=function(n,r){return r instanceof Object?r[n]:void 0},un=U(function(n,r,t){return void 0!==r?b.assocPartialU(n,r,t):b.dissocPartialU(n,t)||b.object0}),en=rn(tn,un),on=function(n,r){return Fn(r)?r[n]:void 0},cn=U(function(n,r,t){Fn(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 J(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}),fn=rn(on,cn),an=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},vn=U(function(n,r,t){switch(typeof n){case"string":return un(n,r,t);case"number":return cn(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,Jn,b.always(r)):t}}),sn=U(function(n,r,t){switch(typeof n){case"string":return un(n,r(tn(n,t),n),t);case"number":return cn(n,r(on(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,Jn,r):(r(n(t,void 0),void 0),t)}}),ln=function(n,r,t){return u=Gn(n)(t,void 0,Tn,r),Promise.resolve(u);var u},dn=U(function(n,r){switch(typeof n){case"string":return tn(n,r);case"number":return on(n,r);case"object":for(var t,u=0,e=n.length;u<e;++u)switch(typeof(t=n[u])){case"string":r=tn(t,r);break;case"number":r=on(t,r);break;default:return o(n,r,u,((i=function n(r,t){return n.v=t,r}).v=n[u-1],i))}return r;default:return n(r,void 0,_n,U)}var i}),pn=function(e,i){return S(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))})},hn=function(e,i){return S(function(n,r,t,u){return t.map(i,u(e(n),r))})},yn=function(n,r){return hn(L(b.isString,n),L(b.isString,r))},gn=function(n,r){return hn(L(b.isNumber,n),L(b.isNumber,r))},mn=U(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?mn(e,r):dn(e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),bn=U(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?bn(i,e,t):vn(i,e,t)}return t}),jn=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},An=function(n,r,t,u){return u(n,r)},On=U(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}}),xn=U(function(n,r,t,u,e,i){var o=void 0,c=!0,f={};for(var a in r){o=1;var v=t[a],s=r[a](v,a,e,i);void 0!==s?(f[a]=s,c&&(c=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):c=!1}var l=o;for(var d in t)if(void 0===(l&&r[d])){o=1;var p=t[d],h=n(p,d,e,i);void 0!==h?(f[d]=h,c&&(c=p===h&&(0!==p||1/p==1/h)||p!=p&&h!=h)):c=!1}return o?c&&t===u?u:f:u}),wn=function(g,m){return function(n,r,t,u){var e=n instanceof Object?jn(n):b.object0;if(Jn===t)return xn(g,m,e,n,t,u);if(T!==t){var i=t.map,o=t.ap,c=t.of,f=c(M),a=[];for(var v in m)a.push(v),f=o(i(M,f),m[v](e[v],v,t,u));var s=!!a.length||void 0;for(var l in e)void 0===(s&&m[l])&&(a.push(l),f=o(i(M,f),g(e[l],l,t,u)));return a.length?i(On(a),f):c(n)}for(var d in m){var p=m[d](e[d],d,t,u);if(void 0!==p)return p}for(var h in e)if(void 0===m[h]){var y=g(e[h],h,t,u);if(void 0!==y)return y}}},In=function(n,r,t){return b.acyclicEqualsU(t,n)?r:t},Un=U(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)}),kn=function(n){return n[0]},Sn=function(n){return n.index},En=function(n){return Sn(n)+n[0].length},Nn=U(function(n,r){var t=r.lastIndex;r.lastIndex=En(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),Rn=function(t){return function(r){return function(n){return[t,n,r]}}},qn=hn(L(A(Object),U(function(n){n=jn(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),L(b.isArray,U(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}))),Mn=U(function(n,r){if(r instanceof Object){var t={};for(var u in r=jn(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Pn=U(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=jn(n)){var u=n[t];if(u instanceof Object)for(var e in u=jn(u))i(e)===t&&(r[e]=u[e])}return r}}}),zn=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},Cn=function(e,i){return i=Gn(i),e=Gn(e),function(n,r,t,u){return(_r(i,n)?i:e)(n,r,t,u)}},Dn=function(n,r,t,u){return t===Jn?B(u,n,void 0):t===T?e(u,n):i(t,u,n,void 0)},Ln=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))}},Wn=function(n,r){return[r,jt(n)]},$n=b.always(v),Bn=function(t,u,e){return function(n,r){return t(n,r)?u:e(n,r)}},Fn=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},Jn=U({map:b.applyU,of:U,ap:b.applyU,chain:b.applyU}),Tn=U({map:N,ap:function(n,r){return N(function(r){return N(function(n){return n(r)},n)},r)},of:U,chain:N}),_n=U({map:b.sndU}),Gn=U(function(n){switch(typeof n){case"string":return en(n);case"number":return fn(n);case"object":return a(0,n);default:return 4===n.length?n:(e=n,S(function(n,r,t,u){return t.map(b.always(n),u(e(n,r),r))}))}var e}),Hn=b.curry(function(n,r,t){return vn([n,Ot(r)],r,t)}),Kn=b.curry(sn),Qn=b.curry(ln),Vn=b.curry(function(n,r){return vn(n,void 0,r)}),Xn=b.curry(vn),Yn=b.curry(K),Zn=function(e){return S(function(n,r,t,u){return Gn(e(n,r))(n,r,t,u)})},nr=U(function(){for(var n=arguments.length,r=ar;n--;){var t=arguments[n];r=t.length<2?Gn(t[0]):zn(Gn(t[1]),r)(t[0])}return r}),rr=U(function(e){e=Gn(e);for(var i=$n,n=arguments.length;--n;){var r=arguments[n];i=1===r.length?b.always(Gn(r[0])):Bn(r[0],Gn(r[1]),i)}return function(n,r,t,u){return e(n,r,_n,i)(n,r,t,u)}}),tr=b.curry(function(n,r,t){return zn(Gn(r),Gn(t))(n)}),ur=U(function(n,r){for(var t=arguments.length,u=1&t?Gn(arguments[--t]):ar;0<=(t-=2);)u=zn(Gn(arguments[t+1]),u)(arguments[t]);return u}),er=b.curry(Cn),ir=b.curry(function(t,n){return[n,Zn(function(n,r){return void 0!==n?t(n,r):ar})]}),or=zn(v,An),cr=zn(An,v),fr=cr(b.isDefined),ar=function(n,r,t,u){return v(n,r,t,u)},vr=b.curry(function(e,i){return i=Gn(i),S(function(n,t,r,u){return i(n,t,r,function(n,r){return u(n,e(r,t))})})}),sr=k(vr(function(n,r){return void 0!==r?void 0!==n?[r,n]:r:n})),lr=k(vr(b.sndU)),dr=b.curry(function(n,r){var t=K(Z,nn,n,r),u=t.c;return console.log.apply(console,X(t.p,[t.m])),u}),pr=b.curry(function(n,r){return sn(n,U,r)}),hr=b.curry(function(n,r){return ln(n,U,r)}),yr=U(function(){var n=arguments.length,r=ar;if(n)for(r=Gn(arguments[--n]);n;)r=Ln(Gn(arguments[--n]),r);return r}),gr=function(e){return function(n,r,t,u){return v(e,r,t,u,e)}},mr=gr(),br=U(b.curryN(2,function(r){return r=Gn(r),function(n){return function n(r,t){var u=O(null);for(var e in t){var i=t[e];u[e]=b.isObject(i)?n(r,i):Gn(i)}return wn(r,u)}(r,n)}})),jr=br(ar),Ar=U(function(n,r,t,u){return Fn(n)?Dn(n,0,t,u):t.of(n)}),Or=k(Gn([qn,Ar])),xr=k(Gn([qn,Ar,0])),wr=U(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,T===t?function(n,r,t){for(;t=Nn(t,r);){var u=n(kn(t),Sn(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=[];Rn!==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,Sn(i));var o=u[e+1];void 0!==o&&(r+=o),t=En(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(Rn);i=Nn(i,e);)o=r(r(n(Rn,t(i)),o),u(kn(i),Sn(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],Sn(o)))}var c;return v(r,void 0,t,u)}}),Ir=U(k(wn(An,w))),Ur=U(function(n,r,t,u){return b.isArray(n)?Dn(n,0,t,u):b.isObject(n)?Ir(n,r,t,u):t.of(n)}),kr=U(function(n,r,u,e){return function n(r,t){return b.isArray(r)?Dn(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}),Sr=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):Ur(r,t,u,n)}(n,r)}},Er=Sr(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),Nr=b.curry(function(t,n,r){return!K(T,function(n,r){if(!t(n,r))return!0},n,r)}),Rr=Nr(U),qr=b.curry(function(t,n,r){return!!K(T,function(n,r){if(t(n,r))return!0},n,r)}),Mr=(0,b.curry)(function(u,n,r){var e=[];return K(T,function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),Pr=Mr(U),zr=Q(U,function(n){return _(n.concat,n.empty())}),Cr=zr(U),Dr=b.curry(function(t,n,r){return K(G,function(n,r){return t(n,r)?1:0},n,r)}),Lr=Dr(b.isDefined),Wr=b.curry(function(e,n,r){var i=new Map;return K(T,function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),$r=Wr(U),Br=b.curry(function(t,u,n,r){return K(T,function(n,r){u=t(u,n,r)},n,r),u}),Fr=b.curry(function(n,r,t,u){var e=[],i=[];K(T,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}),Jr=b.curry(function(t,n,r){return K(T,function(n,r){t(n,r)},n,r)}),Tr=b.curry(function(n,t,r,u){var e=n();return K(T,function(n,r){t(e,n,r)},r,u),e}),_r=b.curry(function(n,r){return void 0!==K(T,U,n,r)}),Gr=b.curry(function(n,r){return!K(T,b.always(!0),n,r)}),Hr=Q(R,U(function(t){return _(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),Kr=Hr(U),Qr=H(j),Vr=Qr(U),Xr=b.curry(function(u,n,r){var e=0,i=0;return K(T,function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),Yr=Xr(U),Zr=H(m),nt=Zr(U),rt=b.curry(function(t,n,r){return!K(T,function(n,r){if(t(n,r))return!0},n,r)}),tt=qr(U),ut=Yn(_(d,1)),et=ut(P(1)),it=Yn(T),ot=it(U),ct=Yn(G),ft=ct(z),at=b.curry(pn),vt=at(U),st=b.curry(function(n,r){return pn(n(r),Xn(r))}),lt=U(function(e){var i=P(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}}),dt=U(function(n){return wt(n,void 0)}),pt=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},ht=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},yt=U(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return Fn(n)&&Un(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:J(J(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),gt=U,mt=Zn(function(n){return Fn(n)&&n.length?n.length-1:0}),bt=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=Fn(u),i=e&&u.length,o=q(0,i,0,f),c=q(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return J(J(J(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?J(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),jt=function(n){return b.isObject(n)?xt(Kn(Ir,Wn,n)):n},At=U,Ot=function(n){return r.apply(null,b.keys(n))},xt=U(function(e){return function(r,n,t,u){return t.map(function(n){return bn(e,n,r)},u(mn(e,r),n))}}),wt=b.curry(function(e,i){function o(n){return In(i,e,n)}return function(n,r,t,u){return t.map(o,u(In(e,i,n),r))}}),It=b.curry(hn),Ut=hn(C,C),kt=hn(L(Fn,U(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),L(b.isArray,U(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}))),St=hn($,$),Et=U(function(n,r,t,u){return t.map(D,u((n instanceof Object||b.isString(n))&&1===n.length?n[0]:void 0,r))}),Nt=yn(decodeURI,encodeURI),Rt=yn(decodeURIComponent,encodeURIComponent),qt=U(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return hn(L(b.isString,function(n){return JSON.parse(n,t)}),L(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),Mt=b.curry(function(n,r){return yn(I(E(n,"g"),r),I(E(r,"g"),n))}),Pt=U(function(r){var t=1<arguments.length?arguments[1]:r;return hn(L(b.isString,function(n){return n.split(t)}),L(b.isArray,function(n){return n.join(r)}))}),zt=U(function(u){var t=E(1<arguments.length?arguments[1]:u,"");return hn(L(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Sn(r)),n.slice(En(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),Ct=gn(g,g);n.seemsArrayLike=Fn,n.Identity=Jn,n.IdentityAsync=Tn,n.Constant=_n,n.toFunction=Gn,n.assign=Hn,n.modify=Kn,n.modifyAsync=Qn,n.remove=Vn,n.set=Xn,n.traverse=Yn,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:An;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[kr],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],kr);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=Gn(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?Cn(t.reduceRight(Cn),n):n},n.choose=Zn,n.cond=nr,n.condOf=rr,n.ifElse=tr,n.iftes=ur,n.orElse=er,n.chain=ir,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(Cn,ar)},n.unless=or,n.when=cr,n.optional=fr,n.zero=ar,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=vr,n.joinIx=sr,n.skipIx=lr,n.log=function(){var n=b.curry(function(n,r){return console.log.apply(console,J([],0,arguments,0,arguments.length).concat([n,r])),r});return hn(n("get"),n("set"))},n.getLog=dr,n.transform=pr,n.transformAsync=hr,n.seq=yr,n.assignOp=function(n){return[Ot(n),gr(n)]},n.modifyOp=function(e){return function(n,r,t,u){return v(n=e(n,r),r,t,u,n)}},n.setOp=gr,n.removeOp=mr,n.branchOr=br,n.branch=jr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=An;return jr(r)},n.elems=Ar,n.elemsTotal=function(n,r,t,u){return Fn(n)?t===Jn?B(u,n,B):t===T?e(u,n):i(t,u,n,i):t.of(n)},n.entries=Or,n.keys=xr,n.matches=wr,n.values=Ir,n.children=Ur,n.flatten=kr,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=Gn(arguments[r]);n.push(Sr(_r(u)),u)}return n},n.satisfying=Sr,n.leafs=Er,n.all=Nr,n.and=Rr,n.any=qr,n.collectAs=Mr,n.collect=Pr,n.concatAs=zr,n.concat=Cr,n.countIf=Dr,n.count=Lr,n.countsAs=Wr,n.counts=$r,n.foldl=Br,n.foldr=Fr,n.forEach=Jr,n.forEachWith=Tr,n.isDefined=_r,n.isEmpty=Gr,n.joinAs=Hr,n.join=Kr,n.maximumBy=Qr,n.maximum=Vr,n.meanAs=Xr,n.mean=Yr,n.minimumBy=Zr,n.minimum=nt,n.none=rt,n.or=tt,n.productAs=ut,n.product=et,n.selectAs=it,n.select=ot,n.sumAs=ct,n.sum=ft,n.get=t,n.lens=at,n.getter=function(e){return function(n,r,t,u){return u(e(n,r),r)}},n.setter=vt,n.foldTraversalLens=st,n.defaults=function(e){function i(n){return In(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=lt,n.normalize=function(n){return[pt(n),ht(n)]},n.required=dt,n.reread=pt,n.rewrite=ht,n.append=c,n.filter=yt,n.find=f,n.findWith=function(n){var r=Gn(n),t=_r(r);return[1<arguments.length?f(t,arguments[1]):f(t),r]},n.first=0,n.index=gt,n.last=mt,n.prefix=function(n){return bt(0,n)},n.slice=bt,n.suffix=function(n){return bt(0===n?1/0:n?-n:0,void 0)},n.pickIn=jt,n.prop=At,n.props=r,n.propsOf=Ot,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=xt,n.replace=wt,n.getInverse=s,n.iso=It,n.array=function(n){var r=s(n),e=t(n),i=function(n){return F(r,n)};return function(n,r,t,u){return t.map(i,u(F(e,n),r))}},n.inverse=function(e){return function(n,r,t,u){return t.map(function(n){return dn(e,n)},u(vn(e,n,void 0),r))}},n.complement=Ut,n.identity=An,n.is=function(r){return hn(function(n){return b.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.indexed=kt,n.reverse=St,n.singleton=Et,n.disjoint=function(i){return function(n,r,t,u){var e=Pn(i);return t.map(e,u(Mn(i,n),r))}},n.keyed=qn,n.uri=Nt,n.uriComponent=Rt,n.json=qt,n.dropPrefix=function(r){return yn(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return yn(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=Mt,n.split=Pt,n.uncouple=zt,n.add=function(n){return gn(p(n),p(-n))},n.divide=function(n){return gn(y(n),h(n))},n.multiply=function(n){return gn(h(n),y(n))},n.negate=Ct,n.subtract=function(n){return gn(p(-n),p(n))},n.pointer=function(n){"#"===n[0]&&(n=dn(Rt,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)?tr(W,Number(e),e):"-"===e?tr(W,c,e):e.replace("~1","/").replace("~0","~")}return r.length=t-1,r},Object.defineProperty(n,"__esModule",{value:!0})}); |
{ | ||
"name": "partial.lenses", | ||
"version": "13.15.0", | ||
"version": "13.16.0", | ||
"description": "Partial lenses is a comprehensive, high-performance optics library for JavaScript", | ||
@@ -5,0 +5,0 @@ "module": "dist/partial.lenses.es.js", |
@@ -1498,2 +1498,4 @@ import * as I from './ext/infestines' | ||
export const getter = get => (x, i, F, xi2yF) => xi2yF(get(x, i), i) | ||
export const setter = lens(id) | ||
@@ -1500,0 +1502,0 @@ |
Sorry, the diff of this file is too big to display
520593
7135
5374