partial.lenses
Advanced tools
Comparing version 14.9.0 to 14.9.1
@@ -1,1 +0,1 @@ | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],r):r(n.L={},n.I)}(this,function(n,b){"use strict";function r(n){switch(typeof n){case"boolean":case"number":case"string":return!0;default:return!1}}function e(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}function i(n){if(!this)return V(new i(n));this.map=n}function o(n,r,t,u){var e=n.map,i=n.ap,o=n.of(On),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=On(u),v=0;v<c;++v)o=i(e(a,o),r(t[v],v));return e(wn,o)}function a(n,r){var t=r.length-n;if(t<2)return t?Pr(r[n]):Hn;for(var e=Pr(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=zn(Pr(r[n+t]),i);var o=Pr(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function u(n,r,t,u){for(var e,i,o=n.length,c=Array(o),f=0;f<o;++f)switch(c[f]=t,typeof(e=n[f])){case"string":t=Sn(e,t);break;case"number":t=Fn(e,t);break;default:t=a(f,n)(t,n[f-1],zr,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])?kn(i,t,c[o]):qn(i,t,c[o]);return t}function t(n){this[Ar]=n,b.freeze(this)}function c(n){for(;R(Ir)<n;)Ir.push(new xr(R(Ir)));return Ir}function h(n,r,t,u){if(void 0!==u){if(r in t)return b.acyclicEqualsU(t[r],u);t[r]=u;var e=n[r];return!e||e(u)}}function f(i,n){if(!jr(n)){if(gt(Ur,ht,i))return b.always(i);if(wr(i)){var r=i[Ar][0][Ar];return function(n){return n[r]}}if(b.isArray(i)){for(var a=[],v=[],s=void 0,t=R(i),u=0;u<t;++u){var e=i[u];Or(e)?s=e[Ar]:(void 0!==s?v:a).push(f(e))}return X(function(n){for(var r=[],t=0,u=a.length;t<u;++t)Fr(r,a[t](n));if(0<=s){var e=n[s];if(e)for(var i=0,o=e.length;i<o;++i)Fr(r,e[i])}for(var c=0,f=v.length;c<f;++c)Fr(r,v[c](n));return r})}var o=i[Ar];return o&&(o=o[0][Ar]),i=Lr(lt,f,i),X(function(n){var r={};for(var t in i)Er(r,t,i[t](n));if(0<=o){var u=n[o];if(u)for(var e in u)Er(r,e,u[e])}return r})}}function v(n,r,t,u){return Mr(n)?hr(n,0,t,u):t.of(n)}function s(n,r,t,u){return b.isArray(n)?hr(n,0,t,u):b.isObject(n)?lt(n,r,t,u):t.of(n)}function l(n,r,u,e){return function n(r,t){return b.isArray(r)?hr(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}function d(r,n){return 1<arguments.length?Dn(P,r,n):function(n){return Dn(P,r,n)}}function y(r,n,t,u){var e=Mr(r)?r.length:0;return t.map(function(n){return qn(e,n,r)},u(void 0,e))}function p(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=Mr(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 qn(i,n,e)},u(e[i],i))}}function g(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return lu(t)}function m(r,n){return 1<arguments.length?Rn(r,n,void 0):function(n){return Rn(r,n,void 0)}}function A(n){var r=0;b.isFunction(n)&&(n=n.apply(null,c(r=n.length)));var t=Array(r),u=n.map(function(n){return function t(c,o){if(gt(Ur,ht,o))return function(n,r){return b.acyclicEqualsU(o,r)};if(wr(o)){var u=o[Ar][0][Ar];return u<0?P:function(n,r){return h(c,u,n,r)}}if(b.isArray(o)){for(var f=[],a=[],v=void 0,s=R(o),n=0;n<s;++n){var r=o[n];Or(r)?c[v=r[Ar]]=Sr:(void 0!==v?a:f).push(t(c,r))}return function(n,r){if(Mr(r)){var t=r.length;if(!(void 0!==v?t<s-1:t!==s)){for(var u=f.length,e=0;e<u;++e)if(!f[e](n,r[e]))return;var i=a.length;t-=i;for(var o=0;o<i;++o)if(!a[o](n,r[t+o]))return;return!(0<=v)||h(c,v,n,tn(Array(t-u),0,r,u,t))}}}}var l=o[Ar];l&&(c[l=l[0][Ar]]=kr),o=Lr(lt,function(n,r){return jr(r)?void 0:t(c,n)},o);var d=St(lt,o);return function(n,r){if(!Ur(r)&&!b.isArray(r)){r=Gn(r);var t=0<=l&&{},u=0;for(var e in r){var i=o[e];if(i){if(!i(n,r[e]))return;u++}else{if(void 0===l)return;t&&(t[e]=r[e])}}return u===d&&(!t||h(c,l,n,V(t)))}}}(t,n)}),e=n.map(f);return Wn(qr(r,u[0],e[1]),qr(r,u[1],e[0]))}var j=function(n,r){return n+r},O=function(n,r){return n*r},x=b.curry(j),w=b.curry(O),I=b.curry(function(n,r){return r/n}),U=function(n){return-n},S=function(n,r){return n<r},k=function(n,r){return r<n},E=b.curry(function(n,r){return r instanceof n}),F=Object.create,q=function(n){return b.assign(F(null),n)},M=b.freeze(q(b.object0)),z=b.curry(function(n,r,t){return t.replace(n,r)}),N=Symbol.iterator,R=function(n){return n.length},P=function(n){return n},C=function(n){return n},D=function(n){return n},L=function(n,r){return b.isString(n)?new RegExp(z(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},T=function(r){return D(function(n){try{return r(n)}catch(n){return n}})},W=function(n,r){return null!=r&&b.isFunction(r.then)?r.then(n):n(r)},$=function(n){return void 0!==n?String(n):""},_=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},B=function(r){return function(n){return[n,r]}},J=function(r){return function(n){return void 0!==n?n:r}},G=J(0),H=b.always(!0),K=function(n){return void 0!==n?!n:n},Q=function(r,t){return D(function(n){return r(n)?t(n):void 0})},V=P,X=P,Y=function(n){return!(n instanceof Object)||b.isArray(n)},Z=P(function(n){if(Mr(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),nn=P(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}),rn=function(n,r){return Mr(r)?nn(n,r,void 0):void 0},tn=P(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),un=b.inherit(function n(r,t,u){if(!this)return V(new n(r,t,u));i.call(this,r),this.of=t,this.ap=u},i),en=b.inherit(function n(r,t,u,e){if(!this)return V(new n(r,t,u,e));un.call(this,r,t,u),this.chain=e},un),on="fantasy-land/",cn=on+"of",fn=on+"chain",an=function(t){return C(function(n,r){return r[t](n)})},vn=an("fantasy-land/map"),sn=an("fantasy-land/ap"),ln=an(fn),dn=i(vn),hn=function(n){return un(vn,n[cn],sn)},yn=function(n){return en(vn,n[cn],sn,ln)},pn=function(n,r){return un(b.sndU,b.always(r),n)},gn=function(n){return pn(n.concat,(0,n.empty)())},mn=pn(j,0),bn=function(o){return b.curry(function(u,n,r){var e=void 0,i=void 0;return Dn(function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},An=function(n,r,t,u){return Pr(t)(u,void 0,n,r)},jn=function(e,n){return b.curryN(4,D(function(t,u){return u=n(u),function(n,r){return e(An(u,t,n,r))}}))},On=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},xn=function(n,r){for(;On!==n;)r.push(n[0]),n=n[1];return r},wn=P(function(n){return xn(n,[]).reverse()}),In=un(function(n,r){var t=r.p,u=r.x,e=r.c;return u=n(u),b.isFunction(u)||(t=[u,t]),{p:t,x:u,c:e}},function(n){return{p:[],x:n,c:void 0}},function(n,r){var t=void 0!==n.c?n:r;return{p:t.p,x:n.x(r.x),c:t.c}}),Un=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))}}},Sn=function(n,r){return r instanceof Object?r[n]:void 0},kn=P(function(n,r,t){return void 0!==r?b.assocPartialU(n,r,t):b.dissocPartialU(n,t)||b.object0}),En=Un(Sn,kn),Fn=function(n,r){return Mr(r)?r[n]:void 0},qn=P(function(n,r,t){Mr(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 tn(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}),Mn=Un(Fn,qn),zn=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},Nn=function(n,r,t){Mr(r)||(r="");var u=0;return Pn(n,function(){return r[u++]},t)},Rn=P(function(n,r,t){switch(typeof n){case"string":return kn(n,r,t);case"number":return qn(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,zr,b.always(r)):t}}),Pn=P(function(n,r,t){switch(typeof n){case"string":return kn(n,r(Sn(n,t),n),t);case"number":return qn(n,r(Fn(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,zr,r):(r(n(t,void 0),void 0),t)}}),Cn=function(n,r,t){return u=Pr(n)(t,void 0,Nr,r),Promise.resolve(u);var u},Dn=P(function(n,r,t){switch(typeof r){case"string":return n(Sn(r,t),r);case"number":return n(Fn(r,t),r);case"object":for(var u,e=r.length,i=0;i<e;++i)switch(typeof(u=r[i])){case"string":t=Sn(u,t);break;case"number":t=Fn(u,t);break;default:return a(i,r)(t,r[i-1],Rr,n)}return n(t,r[e-1]);default:return n!==P&&4!==r.length?n(r(t,void 0),void 0):r(t,void 0,Rr,n)}}),Ln=function(n,r){return Dn(P,n,r)},Tn=function(e,i){return D(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))})},Wn=function(e,i){return D(function(n,r,t,u){return t.map(i,u(e(n),r))})},$n=function(n,r){return Wn(Q(b.isString,n),Q(b.isString,r))},_n=function(n,r){return Wn(Q(b.isNumber,n),Q(b.isNumber,r))},Bn=P(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?Bn(e,r):Dn(P,e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),Jn=P(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?Jn(i,e,t):Rn(i,e,t)}return t}),Gn=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},Hn=function(n,r,t,u){return u(n,r)},Kn=P(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}}),Qn=P(function(n,r,t,u,e,i){var o=void 0,c=!0,f={};for(var a in r){o=1;var v=t[a],s=r[a](v,a,e,i);void 0!==s?(f[a]=s,c&&(c=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):c=!1}var l=o;for(var d in t)if(void 0===(l&&r[d])){o=1;var h=t[d],y=n(h,d,e,i);void 0!==y?(f[d]=y,c&&(c=h===y&&(0!==h||1/h==1/y)||h!=h&&y!=y)):c=!1}return o?c&&t===u?u:f:u}),Vn=function(g,m){return function(n,r,t,u){var e=n instanceof Object?Gn(n):b.object0;if(zr===t)return Qn(g,m,e,n,t,u);if(Rr!==t){var i=t.map,o=t.ap,c=t.of,f=c(B),a=[];for(var v in m)a.push(v),f=o(i(B,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(B,f),g(e[l],l,t,u)));return a.length?i(Kn(a),f):c(n)}for(var d in m){var h=m[d](e[d],d,t,u);if(void 0!==h)return h}for(var y in e)if(void 0===m[y]){var p=g(e[y],y,t,u);if(void 0!==p)return p}}},Xn=function(n,r,t){return b.acyclicEqualsU(t,n)?r:t},Yn=P(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)}),Zn=function(n){return n[0]},nr=function(n){return n.index},rr=function(n){return nr(n)+n[0].length},tr=P(function(n,r){var t=r.lastIndex;r.lastIndex=rr(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),ur=function(t){return function(r){return function(n){return[t,n,r]}}},er=Wn(Q(E(Object),P(function(n){n=Gn(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),Q(b.isArray,P(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}))),ir=P(function(n,r){if(r instanceof Object){var t={};for(var u in r=Gn(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),or=P(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=Gn(n)){var u=n[t];if(u instanceof Object)for(var e in u=Gn(u))i(e)===t&&(r[e]=u[e])}return r}}}),cr=function(n,r,t){return void 0!==n(r,t,Rr,P)},fr=function(t){return function(n,r){return cr(t,n,r)}},ar=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},vr=function(e,i){return i=Pr(i),e=Pr(e),function(n,r,t,u){return(cr(i,n,r)?i:e)(n,r,t,u)}},sr=function(i,o){o=Pr(o),i=Pr(i);var c=function(n){n=b.always(n);var r=o(void 0,void 0,zr,n);return void 0===r?i(void 0,void 0,zr,n):r};return function(n,r,t,u){var e=o(n,r,Rr,P);return t.map(c,u(void 0===e?i(n,r,Rr,P):e,r))}},lr=function(u){return D(function(n){for(var r=arguments.length,t=arguments[--r];r;)t=u(t,arguments[--r]);return t})},dr=function(n,r,t,u){return t.of(n)},hr=function(n,r,t,u){return t===zr?nn(u,n,void 0):t===Rr?e(u,n):o(t,u,n,void 0)},yr=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))}},pr=function(n,r){return[r,au(n)]},gr=function(t){return function(n){for(var r=n;void 0!==n;)n=t(r=n);return r}},mr=function(o,c,f){return function(n,r){var t=c.length;if(Mr(n)){Mr(r)||(r="");for(var u=Math.max(t,n.length,r.length),e=Array(u),i=0;i<u;++i)if(void 0===(e[i]=o(i<t?c[i]:f,n[i],r[i])))return;return e}}},br=(0,b.curry)(function(n,r){return Tn(mr(Ln,r,n),mr(Rn,r,n))}),Ar="珳襱댎纚䤤鬖罺좴",jr=function(n){return b.isString(n)&&0===n.indexOf(Ar)},Or=E(t),xr=b.inherit(function(n){this[Ar+n]=this[Ar]=b.freeze([new t(n)]),b.freeze(this)},Object,b.assocPartialU(N,function(){return this[Ar][N]()})),wr=E(xr),Ir=[],Ur=function(n){return null==n||"object"!=typeof n},Sr=function(n){return void 0===n||b.isArray(n)},kr=function(n){return void 0===n||E(Object)},Er=function(n,r,t){void 0!==t&&(n[r]=t)},Fr=function(n,r){void 0!==r&&n.push(r)},qr=function(t,u,e){return function(n){var r=Array(t);if(u(r,n))return e(r)}},Mr=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},zr=en(b.applyU,P,b.applyU,b.applyU),Nr=en(W,P,function(n,r){return W(function(r){return W(function(n){return n(r)},n)},r)},W),Rr=pn(function(n,r){return void 0!==n?n:r}),Pr=P(function(n){switch(typeof n){case"string":return En(n);case"number":return Mn(n);case"object":return a(0,n);default:return 4===n.length?n:(e=n,D(function(n,r,t,u){return t.map(b.always(n),u(e(n,r),r))}))}var e}),Cr=b.curry(function(n,r,t){return Rn([n,su(r)],r,t)}),Dr=b.curry(Nn),Lr=b.curry(Pn),Tr=b.curry(Cn),Wr=b.curry(function(n,r){return Rn(n,void 0,r)}),$r=b.curry(Rn),_r=b.curry(An),Br=lr(vr),Jr=function(e){return D(function(n,r,t,u){return Pr(e(n,r))(n,r,t,u)})},Gr=P(function(){for(var n=arguments.length,r=dr;n--;){var t=arguments[n];r=t.length<2?Pr(t[0]):ar(Pr(t[1]),r)(t[0])}return r}),Hr=P(function(i){i=Pr(i);var o=arguments.length-1;if(!o)return dr;var n=arguments[o];n=1===n.length?(--o,Pr(n[0])):dr;for(var c=Array(o),f=Array(o+1),r=0;r<o;++r){var t=arguments[r+1];c[r]=t[0],f[r]=Pr(t[1])}return f[o]=n,function(n,r,t,u){var e=o;return i(n,r,Rr,function(n,r){for(var t=0;t<e;++t)if(c[t](n,r)){if(0===(e=t))return 0;break}}),f[e](n,r,t,u)}}),Kr=b.curry(function(n,r,t){return ar(Pr(r),Pr(t))(n)}),Qr=b.curry(vr),Vr=b.curry(function(t,n){return[n,Jr(function(n,r){return void 0!==n?t(n,r):dr})]}),Xr=ar(dr,Hn),Yr=ar(Hn,dr),Zr=Yr(b.isDefined),nt=b.curry(function(e,i){return i=Pr(i),D(function(n,t,r,u){return i(n,t,r,function(n,r){return u(n,e(r,t))})})}),rt=C(nt(function(n,r){return void 0!==r?void 0!==n?[r,n]:r:n})),tt=C(nt(b.sndU)),ut=b.curry(function(n,r){return Pn(n,P,r)}),et=b.curry(function(n,r){return Cn(n,P,r)}),it=P(function(){var n=arguments.length,r=dr;if(n)for(r=Pr(arguments[--n]);n;)r=yr(Pr(arguments[--n]),r);return r}),ot=function(e){return function(n,r,t,u){return t.of(e)}},ct=ot(),ft=P(b.curryN(2,function(r){return r=Pr(r),function(n){return function n(r,t){var u=F(null);for(var e in t){var i=t[e];u[e]=b.isObject(i)?n(r,i):Pr(i)}return Vn(r,u)}(r,n)}})),at=ft(dr),vt=C(Pr([er,v])),st=C(Pr([er,v,0])),lt=C(Vn(Hn,M)),dt=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):s(r,t,u,n)}(n,r)}},ht=dt(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),yt=b.curry(function(t,n,r){return!Dn(function(n,r){if(!t(n,r))return!0},n,r)}),pt=yt(P),gt=b.curry(function(t,n,r){var u=!1;return Dn(function(n,r){if(!t(n,r))return u=!1;u=!0},n,r),u}),mt=gt(P),bt=b.curry(function(t,n,r){return!!Dn(function(n,r){if(t(n,r))return!0},n,r)}),At=(0,b.curry)(function(u,n,r){var e=[];return Dn(function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),jt=At(P),Ot=(0,b.curry)(function(t,n,r){var u=[];return Dn(function(n,r){u.push(t(n,r))},n,r),u}),xt=Ot(P),wt=jn(P,gn),It=wt(P),Ut=b.curry(function(t,n,r){return An(mn,function(n,r){return t(n,r)?1:0},n,r)}),St=Ut(b.isDefined),kt=b.curry(function(e,n,r){var i=new Map;return Dn(function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),Et=kt(P),Ft=b.curry(function(t,u,n,r){return Dn(function(n,r){u=t(u,n,r)},n,r),u}),qt=b.curry(function(n,r,t,u){var e=[],i=[];Dn(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}),Mt=b.curry(function(t,n,r){return Dn(function(n,r){t(n,r)},n,r)}),zt=b.curry(function(n,t,r,u){var e=n();return Dn(function(n,r){t(e,n,r)},r,u),e}),Nt=b.curry(Dn),Rt=b.curry(function(n,r){return void 0!==Dn(P,n,r)}),Pt=b.curry(function(n,r){return!Dn(H,n,r)}),Ct=jn($,P(function(t){return pn(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),Dt=Ct(P),Lt=bn(k),Tt=Lt(P),Wt=b.curry(function(u,n,r){var e=0,i=0;return Dn(function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),$t=Wt(P),_t=bn(S),Bt=_t(P),Jt=b.curry(function(t,n,r){return!Dn(function(n,r){if(t(n,r))return!0},n,r)}),Gt=bt(P),Ht=_r(pn(O,1)),Kt=Ht(J(1)),Qt=d,Vt=Nt,Xt=_r(mn),Yt=Xt(G),Zt=b.curry(function(n,r){return Tn(n(r),$r(r))}),nu=b.curry(Tn),ru=nu(P),tu=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},uu=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},eu=C(br(ct)),iu=P(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return Mr(n)&&Yn(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:tn(tn(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),ou=P,cu=Jr(function(n){return Mr(n)&&n.length?n.length-1:0}),fu=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=Mr(u),i=e&&u.length,o=_(0,i,0,f),c=_(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return tn(tn(tn(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?tn(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),au=function(n){return b.isObject(n)?lu(Lr(lt,pr,n)):n},vu=P,su=function(n){return g.apply(null,b.keys(n))},lu=P(function(e){return function(r,n,t,u){return t.map(function(n){return Jn(e,n,r)},u(Bn(e,r),n))}}),du=b.curry(function(e,i){function o(n){return Xn(i,e,n)}return function(n,r,t,u){return t.map(o,u(Xn(e,i,n),r))}}),hu=b.curry(Wn),yu=new xr(-1),pu=lr(sr),gu=b.curry(function(n,r){return Wn(Lr(n,d(r)),Lr(n,m(r)))}),mu=function(n){var r=m(n),e=d(n),i=function(n){return rn(r,n)};return function(n,r,t,u){return t.map(i,u(rn(e,n),r))}},bu=b.curry(function(n,r){return[n,r,Au(n)]}),Au=function(e){return function(n,r,t,u){return t.map(function(n){return Dn(P,e,n)},u(Rn(e,n,void 0),r))}},ju=b.curry(sr),Ou=Wn(K,K),xu=Wn(Q(Mr,P(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),Q(b.isArray,P(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}))),wu=Wn(Z,Z),Iu=A(function(n){return[[n],n]}),Uu=Wn(Q(E(Object),P(function(n){n=Gn(n);var r=[];for(var t in n){var u=n[t];if(b.isArray(u))for(var e=0,i=u.length;e<i;++e)r.push([t,u[e]]);else r.push([t,u])}return r})),Q(b.isArray,P(function(n){for(var r=F(null),t=0,u=n.length;t<u;++t){var e=n[t];if(2===e.length){var i=e[0],o=e[1],c=r[i];void 0===c?r[i]=o:b.isArray(c)?c.push(o):r[i]=[c,o]}}return b.assign({},r)}))),Su=P(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return Wn(Q(b.isString,T(function(n){return JSON.parse(n,t)})),Q(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),ku=$n(T(decodeURI),encodeURI),Eu=Wn(Q(b.isString,T(decodeURIComponent)),Q(r,encodeURIComponent)),Fu=b.curry(function(n,r){return $n(z(L(n,"g"),r),z(L(r,"g"),n))}),qu=P(function(r){var t=1<arguments.length?arguments[1]:r;return Wn(Q(b.isString,function(n){return n.split(t)}),Q(b.isArray,function(n){return n.join(r)}))}),Mu=P(function(u){var t=L(1<arguments.length?arguments[1]:u,"");return Wn(Q(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,nr(r)),n.slice(rr(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),zu=Pr([tu(function(n){return b.isString(n)?n.replace(/\+/g,"%20"):n}),qu("&"),mu([Mu("="),mu(Eu)]),Au(Uu)]),Nu=_n(U,U);n.seemsArrayLike=Mr,n.Identity=zr,n.IdentityAsync=Nr,n.Select=Rr,n.toFunction=Pr,n.assign=Cr,n.disperse=Dr,n.modify=Lr,n.modifyAsync=Tr,n.remove=Wr,n.set=$r,n.traverse=_r,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:Hn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[l],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],l);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=Pr(e(i)))(n,r,t,u)};return i},n.choices=Br,n.choose=Jr,n.cond=Gr,n.condOf=Hr,n.ifElse=Kr,n.orElse=Qr,n.chain=Vr,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(vr,dr)},n.unless=Xr,n.when=Yr,n.optional=Zr,n.zero=dr,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=nt,n.joinIx=rt,n.skipIx=tt,n.getLog=function(n,r){var t=An(In,function(n){return{p:[n,On],x:n,c:n}},n,r),u=t.p,e=t.c;u=xn(u,["%O"]);for(var i=2;i<u.length;++i)u[0]+=" <= %O";return console.log.apply(console,u),e},n.log=function(){var n=b.curry(function(n,r){return console.log.apply(console,tn([],0,arguments,0,arguments.length).concat([n,r])),r});return Wn(n("get"),n("set"))},n.transform=ut,n.transformAsync=et,n.seq=it,n.assignOp=function(n){return[su(n),ot(n)]},n.modifyOp=function(e){return function(n,r,t,u){return t.of(e(n,r))}},n.setOp=ot,n.removeOp=ct,n.branchOr=ft,n.branch=at,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=Hn;return at(r)},n.elems=v,n.elemsTotal=function(n,r,t,u){return Mr(n)?t===zr?nn(u,n,nn):t===Rr?e(u,n):o(t,u,n,o):t.of(n)},n.entries=vt,n.keys=st,n.matches=function(f){return function(r,n,t,u){if(b.isString(r)){var e=t.map;if(f.global){var i=[""];return i.input=r,i.index=0,Rr===t?function(n,r,t){for(;t=tr(t,r);){var u=n(Zn(t),nr(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=[];ur!==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,nr(i));var o=u[e+1];void 0!==o&&(r+=o),t=rr(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(ur);i=tr(i,e);)o=r(r(n(ur,t(i)),o),u(Zn(i),nr(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],nr(o)))}var c;return t.of(r)}},n.values=lt,n.children=s,n.flatten=l,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=Pr(arguments[r]);n.push(dt(fr(u)),u)}return n},n.satisfying=dt,n.leafs=ht,n.all=yt,n.and=pt,n.all1=gt,n.and1=mt,n.any=bt,n.collectAs=At,n.collect=jt,n.collectTotalAs=Ot,n.collectTotal=xt,n.concatAs=wt,n.concat=It,n.countIf=Ut,n.count=St,n.countsAs=kt,n.counts=Et,n.foldl=Ft,n.foldr=qt,n.forEach=Mt,n.forEachWith=zt,n.get=d,n.getAs=Nt,n.isDefined=Rt,n.isEmpty=Pt,n.joinAs=Ct,n.join=Dt,n.maximumBy=Lt,n.maximum=Tt,n.meanAs=Wt,n.mean=$t,n.minimumBy=_t,n.minimum=Bt,n.none=Jt,n.or=Gt,n.productAs=Ht,n.product=Kt,n.select=Qt,n.selectAs=Vt,n.sumAs=Xt,n.sum=Yt,n.foldTraversalLens=Zt,n.getter=function(e){return function(n,r,t,u){return u(e(n,r),r)}},n.lens=nu,n.partsOf=function(e){return function(r,n,t,u){return t.map(function(n){return Nn(e,n,r)},u(xt(e,r),n))}},n.setter=ru,n.defaults=function(e){function i(n){return Xn(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=function(e){var i=J(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.normalize=function(n){return[tu(n),uu(n)]},n.required=function(n){return du(n,void 0)},n.reread=tu,n.rewrite=uu,n.append=y,n.cross=eu,n.filter=iu,n.find=p,n.findWith=function(n){var r=Pr(n),t=fr(r);return[1<arguments.length?p(t,arguments[1]):p(t),r]},n.first=0,n.index=ou,n.last=cu,n.prefix=function(n){return fu(0,n)},n.slice=fu,n.suffix=function(n){return fu(0===n?1/0:n?-n:0,void 0)},n.pickIn=au,n.prop=vu,n.props=g,n.propsOf=su,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=lu,n.replace=du,n.getInverse=m,n.iso=hu,n._=yu,n.mapping=A,n.mappings=function(n){return b.isFunction(n)&&(n=n.apply(null,c(n.length))),pu.apply(null,n.map(A))},n.alternatives=pu,n.applyAt=gu,n.array=mu,n.conjugate=bu,n.inverse=Au,n.iterate=function(n){return Wn(gr(d(n)),gr(m(n)))},n.orAlternatively=ju,n.complement=Ou,n.identity=Hn,n.is=function(r){return Wn(function(n){return b.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.subset=function(n){var r,t=(r=n,function(n){return r(n)?n:void 0});return Wn(t,t)},n.indexed=xu,n.reverse=wu,n.singleton=Iu,n.disjoint=function(i){return function(n,r,t,u){var e=or(i);return t.map(e,u(ir(i,n),r))}},n.keyed=er,n.multikeyed=Uu,n.json=Su,n.uri=ku,n.uriComponent=Eu,n.dropPrefix=function(r){return $n(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return $n(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=Fu,n.split=qu,n.uncouple=Mu,n.querystring=zu,n.add=function(n){return _n(x(n),x(-n))},n.divide=function(n){return _n(I(n),w(n))},n.multiply=function(n){return _n(w(n),I(n))},n.negate=Nu,n.subtract=function(n){return _n(x(-n),x(n))},n.FantasyFunctor=dn,n.fromFantasy=function(n){return n.prototype[fn]?yn(n):n[cn]?hn(n):dn},n.fromFantasyApplicative=hn,n.fromFantasyMonad=yn,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)?Kr(Y,Number(e),e):"-"===e?Kr(Y,y,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,A){"use strict";function r(n){switch(typeof n){case"boolean":case"number":case"string":return!0;default:return!1}}function e(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}function i(n,r,t,u){var e=n.map,i=n.ap,o=n.of(cn),c=t.length;if(e===A.sndU){for(var f=0;f<c;++f)o=i(o,r(t[f],f));return o}for(var a=cn(u),v=0;v<c;++v)o=i(e(a,o),r(t[v],v));return e(an,o)}function a(n,r){var t=r.length-n;if(t<2)return t?Ar(r[n]):Mn;for(var e=Ar(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=mn(Ar(r[n+t]),i);var o=Ar(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function u(n,r,t,u){for(var e,i,o=n.length,c=Array(o),f=0;f<o;++f)switch(c[f]=t,typeof(e=n[f])){case"string":t=ln(e,t);break;case"number":t=pn(e,t);break;default:t=a(f,n)(t,n[f-1],A.Identity,r||A.always(u)),o=f}for(o===n.length&&(t=r?r(t,n[o-1]):u);0<=--o;)t=A.isString(i=n[o])?dn(i,t,c[o]):hn(i,t,c[o]);return t}function t(n){this[ir]=n,A.freeze(this)}function o(n){for(;z(vr)<n;)vr.push(new fr(z(vr)));return vr}function y(n,r,t,u){if(void 0!==u){if(r in t)return A.acyclicEqualsU(t[r],u);t[r]=u;var e=n[r];return!e||e(u)}}function c(i,n){if(!or(n)){if(nt(sr,Xr,i))return A.always(i);if(ar(i)){var r=i[ir][0][ir];return function(n){return n[r]}}if(A.isArray(i)){for(var a=[],v=[],s=void 0,t=z(i),u=0;u<t;++u){var e=i[u];cr(e)?s=e[ir]:(void 0!==s?v:a).push(c(e))}return K(function(n){for(var r=[],t=0,u=a.length;t<u;++t)pr(r,a[t](n));if(0<=s){var e=n[s];if(e)for(var i=0,o=e.length;i<o;++i)pr(r,e[i])}for(var c=0,f=v.length;c<f;++c)pr(r,v[c](n));return r})}var o=i[ir];return o&&(o=o[0][ir]),i=Or(Qr,c,i),K(function(n){var r={};for(var t in i)yr(r,t,i[t](n));if(0<=o){var u=n[o];if(u)for(var e in u)yr(r,e,u[e])}return r})}}function f(n,r,t,u){return gr(n)?Zn(n,0,t,u):t.of(n)}function v(n,r,t,u){return A.isArray(n)?Zn(n,0,t,u):A.isObject(n)?Qr(n,r,t,u):t.of(n)}function s(n,r,u,e){return function n(r,t){return A.isArray(r)?Zn(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}function l(r,n){return 1<arguments.length?xn(N,r,n):function(n){return xn(N,r,n)}}function d(r,n,t,u){var e=gr(r)?r.length:0;return t.map(function(n){return hn(e,n,r)},u(void 0,e))}function p(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=gr(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 hn(i,n,e)},u(e[i],i))}}function h(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return Qt(t)}function g(r,n){return 1<arguments.length?bn(r,n,void 0):function(n){return bn(r,n,void 0)}}function m(n){var r=0;A.isFunction(n)&&(n=n.apply(null,o(r=n.length)));var t=Array(r),u=n.map(function(n){return function t(c,o){if(nt(sr,Xr,o))return function(n,r){return A.acyclicEqualsU(o,r)};if(ar(o)){var u=o[ir][0][ir];return u<0?N:function(n,r){return y(c,u,n,r)}}if(A.isArray(o)){for(var f=[],a=[],v=void 0,s=z(o),n=0;n<s;++n){var r=o[n];cr(r)?c[v=r[ir]]=lr:(void 0!==v?a:f).push(t(c,r))}return function(n,r){if(gr(r)){var t=r.length;if(!(void 0!==v?t<s-1:t!==s)){for(var u=f.length,e=0;e<u;++e)if(!f[e](n,r[e]))return;var i=a.length;t-=i;for(var o=0;o<i;++o)if(!a[o](n,r[t+o]))return;return!(0<=v)||y(c,v,n,Z(Array(t-u),0,r,u,t))}}}}var l=o[ir];l&&(c[l=l[0][ir]]=dr),o=Or(Qr,function(n,r){return or(r)?void 0:t(c,n)},o);var d=vt(Qr,o);return function(n,r){if(!sr(r)&&!A.isArray(r)){r=qn(r);var t=0<=l&&{},u=0;for(var e in r){var i=o[e];if(i){if(!i(n,r[e]))return;u++}else{if(void 0===l)return;t&&(t[e]=r[e])}}return u===d&&(!t||y(c,l,n,H(t)))}}}(t,n)}),e=n.map(c);return Sn(hr(r,u[0],e[1]),hr(r,u[1],e[0]))}var b=function(n,r){return n+r},j=function(n,r){return n*r},O=A.curry(b),x=A.curry(j),I=A.curry(function(n,r){return r/n}),w=function(n){return-n},S=function(n,r){return n<r},U=function(n,r){return r<n},F=A.curry(A.isInstanceOfU),k=function(n){return A.assign(A.create(null),n)},E=A.freeze(k(A.object0)),q=A.curry(function(n,r,t){return t.replace(n,r)}),M=Symbol.iterator,z=function(n){return n.length},N=function(n){return n},R=function(n){return n},P=function(n){return n},C=function(n,r){return A.isString(n)?new RegExp(q(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},D=function(r){return P(function(n){try{return r(n)}catch(n){return n}})},L=function(n){return void 0!==n?String(n):""},T=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},W=function(r){return function(n){return[n,r]}},$=function(r){return function(n){return void 0!==n?n:r}},_=$(0),B=A.always(!0),J=function(n){return void 0!==n?!n:n},G=function(r,t){return P(function(n){return r(n)?t(n):void 0})},H=N,K=N,Q=function(n){return!(n instanceof Object)||A.isArray(n)},V=N(function(n){if(gr(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),X=N(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}),Y=function(n,r){return gr(r)?X(n,r,void 0):void 0},Z=N(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),nn=function(n,r){return A.Applicative(A.sndU,A.always(r),n)},rn=function(n){return nn(n.concat,(0,n.empty)())},tn=nn(b,0),un=function(o){return A.curry(function(u,n,r){var e=void 0,i=void 0;return xn(function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},en=function(n,r,t,u){return Ar(t)(u,void 0,n,r)},on=function(e,n){return A.curryN(4,P(function(t,u){return u=n(u),function(n,r){return e(en(u,t,n,r))}}))},cn=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},fn=function(n,r){for(;cn!==n;)r.push(n[0]),n=n[1];return r},an=N(function(n){return fn(n,[]).reverse()}),vn=A.Applicative(function(n,r){var t=r.p,u=r.x,e=r.c;return u=n(u),A.isFunction(u)||(t=[u,t]),{p:t,x:u,c:e}},function(n){return{p:[],x:n,c:void 0}},function(n,r){var t=void 0!==n.c?n:r;return{p:t.p,x:n.x(r.x),c:t.c}}),sn=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))}}},ln=function(n,r){return r instanceof Object?r[n]:void 0},dn=N(function(n,r,t){return void 0!==r?A.assocPartialU(n,r,t):A.dissocPartialU(n,t)||A.object0}),yn=sn(ln,dn),pn=function(n,r){return gr(r)?r[n]:void 0},hn=N(function(n,r,t){gr(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 Z(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}),gn=sn(pn,hn),mn=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},An=function(n,r,t){gr(r)||(r="");var u=0;return jn(n,function(){return r[u++]},t)},bn=N(function(n,r,t){switch(typeof n){case"string":return dn(n,r,t);case"number":return hn(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,A.Identity,A.always(r)):t}}),jn=N(function(n,r,t){switch(typeof n){case"string":return dn(n,r(ln(n,t),n),t);case"number":return hn(n,r(pn(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,A.Identity,r):(r(n(t,void 0),void 0),t)}}),On=function(n,r,t){return A.resolve(Ar(n)(t,void 0,A.IdentityAsync,r))},xn=N(function(n,r,t){switch(typeof r){case"string":return n(ln(r,t),r);case"number":return n(pn(r,t),r);case"object":for(var u,e=r.length,i=0;i<e;++i)switch(typeof(u=r[i])){case"string":t=ln(u,t);break;case"number":t=pn(u,t);break;default:return a(i,r)(t,r[i-1],mr,n)}return n(t,r[e-1]);default:return n!==N&&4!==r.length?n(r(t,void 0),void 0):r(t,void 0,mr,n)}}),In=function(n,r){return xn(N,n,r)},wn=function(e,i){return P(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))})},Sn=function(e,i){return P(function(n,r,t,u){return t.map(i,u(e(n),r))})},Un=function(n,r){return Sn(G(A.isString,n),G(A.isString,r))},Fn=function(n,r){return Sn(G(A.isNumber,n),G(A.isNumber,r))},kn=N(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=A.isObject(e)?kn(e,r):xn(N,e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),En=N(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=A.isObject(i)?En(i,e,t):bn(i,e,t)}return t}),qn=function(n){return A.constructorOf(n)!==Object?A.toObject(n):n},Mn=function(n,r,t,u){return u(n,r)},zn=N(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}}),Nn=N(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 y=t[d],p=n(y,d,e,i);void 0!==p?(f[d]=p,c&&(c=y===p&&(0!==y||1/y==1/p)||y!=y&&p!=p)):c=!1}return o?c&&t===u?u:f:u}),Rn=function(g,m){return function(n,r,t,u){var e=n instanceof Object?qn(n):A.object0;if(A.Identity===t)return Nn(g,m,e,n,t,u);if(mr!==t){var i=t.map,o=t.ap,c=t.of,f=c(W),a=[];for(var v in m)a.push(v),f=o(i(W,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(W,f),g(e[l],l,t,u)));return a.length?i(zn(a),f):c(n)}for(var d in m){var y=m[d](e[d],d,t,u);if(void 0!==y)return y}for(var p in e)if(void 0===m[p]){var h=g(e[p],p,t,u);if(void 0!==h)return h}}},Pn=function(n,r,t){return A.acyclicEqualsU(t,n)?r:t},Cn=N(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)}),Dn=function(n){return n[0]},Ln=function(n){return n.index},Tn=function(n){return Ln(n)+n[0].length},Wn=N(function(n,r){var t=r.lastIndex;r.lastIndex=Tn(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),$n=function(t){return function(r){return function(n){return[t,n,r]}}},_n=Sn(G(F(Object),N(function(n){n=qn(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),G(A.isArray,N(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}))),Bn=N(function(n,r){if(r instanceof Object){var t={};for(var u in r=qn(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Jn=N(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=qn(n)){var u=n[t];if(u instanceof Object)for(var e in u=qn(u))i(e)===t&&(r[e]=u[e])}return r}}}),Gn=function(n,r,t){return void 0!==n(r,t,mr,N)},Hn=function(t){return function(n,r){return Gn(t,n,r)}},Kn=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},Qn=function(e,i){return i=Ar(i),e=Ar(e),function(n,r,t,u){return(Gn(i,n,r)?i:e)(n,r,t,u)}},Vn=function(i,o){o=Ar(o),i=Ar(i);var c=function(n){n=A.always(n);var r=o(void 0,void 0,A.Identity,n);return void 0===r?i(void 0,void 0,A.Identity,n):r};return function(n,r,t,u){var e=o(n,r,mr,N);return t.map(c,u(void 0===e?i(n,r,mr,N):e,r))}},Xn=function(u){return P(function(n){for(var r=arguments.length,t=arguments[--r];r;)t=u(t,arguments[--r]);return t})},Yn=function(n,r,t,u){return t.of(n)},Zn=function(n,r,t,u){return t===A.Identity?X(u,n,void 0):t===mr?e(u,n):i(t,u,n,void 0)},nr=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))}},rr=function(n,r){return[r,Gt(n)]},tr=function(t){return function(n){for(var r=n;void 0!==n;)n=t(r=n);return r}},ur=function(o,c,f){return function(n,r){var t=c.length;if(gr(n)){gr(r)||(r="");for(var u=Math.max(t,n.length,r.length),e=Array(u),i=0;i<u;++i)if(void 0===(e[i]=o(i<t?c[i]:f,n[i],r[i])))return;return e}}},er=(0,A.curry)(function(n,r){return wn(ur(In,r,n),ur(bn,r,n))}),ir="珳襱댎纚䤤鬖罺좴",or=function(n){return A.isString(n)&&0===n.indexOf(ir)},cr=F(t),fr=A.inherit(function(n){this[ir+n]=this[ir]=A.freeze([new t(n)]),A.freeze(this)},Object,A.assocPartialU(M,function(){return this[ir][M]()})),ar=F(fr),vr=[],sr=function(n){return null==n||"object"!=typeof n},lr=function(n){return void 0===n||A.isArray(n)},dr=function(n){return void 0===n||F(Object)},yr=function(n,r,t){void 0!==t&&(n[r]=t)},pr=function(n,r){void 0!==r&&n.push(r)},hr=function(t,u,e){return function(n){var r=Array(t);if(u(r,n))return e(r)}},gr=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||A.isString(n)},mr=nn(function(n,r){return void 0!==n?n:r}),Ar=N(function(n){switch(typeof n){case"string":return yn(n);case"number":return gn(n);case"object":return a(0,n);default:return 4===n.length?n:(e=n,P(function(n,r,t,u){return t.map(A.always(n),u(e(n,r),r))}))}var e}),br=A.curry(function(n,r,t){return bn([n,Kt(r)],r,t)}),jr=A.curry(An),Or=A.curry(jn),xr=A.curry(On),Ir=A.curry(function(n,r){return bn(n,void 0,r)}),wr=A.curry(bn),Sr=A.curry(en),Ur=Xn(Qn),Fr=function(e){return P(function(n,r,t,u){return Ar(e(n,r))(n,r,t,u)})},kr=N(function(){for(var n=arguments.length,r=Yn;n--;){var t=arguments[n];r=t.length<2?Ar(t[0]):Kn(Ar(t[1]),r)(t[0])}return r}),Er=N(function(i){i=Ar(i);var o=arguments.length-1;if(!o)return Yn;var n=arguments[o];n=1===n.length?(--o,Ar(n[0])):Yn;for(var c=Array(o),f=Array(o+1),r=0;r<o;++r){var t=arguments[r+1];c[r]=t[0],f[r]=Ar(t[1])}return f[o]=n,function(n,r,t,u){var e=o;return i(n,r,mr,function(n,r){for(var t=0;t<e;++t)if(c[t](n,r)){if(0===(e=t))return 0;break}}),f[e](n,r,t,u)}}),qr=A.curry(function(n,r,t){return Kn(Ar(r),Ar(t))(n)}),Mr=A.curry(Qn),zr=A.curry(function(t,n){return[n,Fr(function(n,r){return void 0!==n?t(n,r):Yn})]}),Nr=Kn(Yn,Mn),Rr=Kn(Mn,Yn),Pr=Rr(A.isDefined),Cr=A.curry(function(e,i){return i=Ar(i),P(function(n,t,r,u){return i(n,t,r,function(n,r){return u(n,e(r,t))})})}),Dr=R(Cr(function(n,r){return void 0!==r?void 0!==n?[r,n]:r:n})),Lr=R(Cr(A.sndU)),Tr=A.curry(function(n,r){return jn(n,N,r)}),Wr=A.curry(function(n,r){return On(n,N,r)}),$r=N(function(){var n=arguments.length,r=Yn;if(n)for(r=Ar(arguments[--n]);n;)r=nr(Ar(arguments[--n]),r);return r}),_r=function(e){return function(n,r,t,u){return t.of(e)}},Br=_r(),Jr=N(A.curryN(2,function(r){return r=Ar(r),function(n){return function n(r,t){var u=A.create(null);for(var e in t){var i=t[e];u[e]=A.isObject(i)?n(r,i):Ar(i)}return Rn(r,u)}(r,n)}})),Gr=Jr(Yn),Hr=R(Ar([_n,f])),Kr=R(Ar([_n,f,0])),Qr=R(Rn(Mn,E)),Vr=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):v(r,t,u,n)}(n,r)}},Xr=Vr(function(n){return void 0!==n&&!A.isArray(n)&&!A.isObject(n)}),Yr=A.curry(function(t,n,r){return!xn(function(n,r){if(!t(n,r))return!0},n,r)}),Zr=Yr(N),nt=A.curry(function(t,n,r){var u=!1;return xn(function(n,r){if(!t(n,r))return u=!1;u=!0},n,r),u}),rt=nt(N),tt=A.curry(function(t,n,r){return!!xn(function(n,r){if(t(n,r))return!0},n,r)}),ut=(0,A.curry)(function(u,n,r){var e=[];return xn(function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),et=ut(N),it=(0,A.curry)(function(t,n,r){var u=[];return xn(function(n,r){u.push(t(n,r))},n,r),u}),ot=it(N),ct=on(N,rn),ft=ct(N),at=A.curry(function(t,n,r){return en(tn,function(n,r){return t(n,r)?1:0},n,r)}),vt=at(A.isDefined),st=A.curry(function(e,n,r){var i=new Map;return xn(function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),lt=st(N),dt=A.curry(function(t,u,n,r){return xn(function(n,r){u=t(u,n,r)},n,r),u}),yt=A.curry(function(n,r,t,u){var e=[],i=[];xn(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}),pt=A.curry(function(t,n,r){return xn(function(n,r){t(n,r)},n,r)}),ht=A.curry(function(n,t,r,u){var e=n();return xn(function(n,r){t(e,n,r)},r,u),e}),gt=A.curry(xn),mt=A.curry(function(n,r){return void 0!==xn(N,n,r)}),At=A.curry(function(n,r){return!xn(B,n,r)}),bt=on(L,N(function(t){return nn(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),jt=bt(N),Ot=un(U),xt=Ot(N),It=A.curry(function(u,n,r){var e=0,i=0;return xn(function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),wt=It(N),St=un(S),Ut=St(N),Ft=A.curry(function(t,n,r){return!xn(function(n,r){if(t(n,r))return!0},n,r)}),kt=tt(N),Et=Sr(nn(j,1)),qt=Et($(1)),Mt=l,zt=gt,Nt=Sr(tn),Rt=Nt(_),Pt=A.curry(function(n,r){return wn(n(r),wr(r))}),Ct=A.curry(wn),Dt=Ct(N),Lt=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},Tt=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},Wt=R(er(Br)),$t=N(function(o){return function(n,r,t,u){var e=void 0,i=A.array0;return gr(n)&&Cn(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:Z(Z(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),_t=N,Bt=Fr(function(n){return gr(n)&&n.length?n.length-1:0}),Jt=(0,A.curry)(function(f,a){return function(u,n,r,t){var e=gr(u),i=e&&u.length,o=T(0,i,0,f),c=T(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return Z(Z(Z(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?Z(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),Gt=function(n){return A.isObject(n)?Qt(Or(Qr,rr,n)):n},Ht=N,Kt=function(n){return h.apply(null,A.keys(n))},Qt=N(function(e){return function(r,n,t,u){return t.map(function(n){return En(e,n,r)},u(kn(e,r),n))}}),Vt=A.curry(function(e,i){function o(n){return Pn(i,e,n)}return function(n,r,t,u){return t.map(o,u(Pn(e,i,n),r))}}),Xt=A.curry(Sn),Yt=new fr(-1),Zt=Xn(Vn),nu=A.curry(function(n,r){return Sn(Or(n,l(r)),Or(n,g(r)))}),ru=A.curry(function(n,r){return[n,r,tu(n)]}),tu=function(e){return function(n,r,t,u){return t.map(function(n){return xn(N,e,n)},u(bn(e,n,void 0),r))}},uu=A.curry(Vn),eu=Sn(J,J),iu=function(n){var r=g(n),e=l(n),i=function(n){return Y(r,n)};return function(n,r,t,u){return t.map(i,u(Y(e,n),r))}},ou=Sn(G(gr,N(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),G(A.isArray,N(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}))),cu=Sn(V,V),fu=m(function(n){return[[n],n]}),au=Sn(G(F(Object),N(function(n){n=qn(n);var r=[];for(var t in n){var u=n[t];if(A.isArray(u))for(var e=0,i=u.length;e<i;++e)r.push([t,u[e]]);else r.push([t,u])}return r})),G(A.isArray,N(function(n){for(var r=A.create(null),t=0,u=n.length;t<u;++t){var e=n[t];if(2===e.length){var i=e[0],o=e[1],c=r[i];void 0===c?r[i]=o:A.isArray(c)?c.push(o):r[i]=[c,o]}}return A.assign({},r)}))),vu=N(function(n){var r=n||A.object0,t=r.reviver,u=r.replacer,e=r.space;return Sn(G(A.isString,D(function(n){return JSON.parse(n,t)})),G(A.isDefined,function(n){return JSON.stringify(n,u,e)}))}),su=Un(D(decodeURI),encodeURI),lu=Sn(G(A.isString,D(decodeURIComponent)),G(r,encodeURIComponent)),du=A.curry(function(n,r){return Un(q(C(n,"g"),r),q(C(r,"g"),n))}),yu=N(function(r){var t=1<arguments.length?arguments[1]:r;return Sn(G(A.isString,function(n){return n.split(t)}),G(A.isArray,function(n){return n.join(r)}))}),pu=N(function(u){var t=C(1<arguments.length?arguments[1]:u,"");return Sn(G(A.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Ln(r)),n.slice(Tn(r))]:[n,""]}),function(n){if(A.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),hu=Ar([Lt(function(n){return A.isString(n)?n.replace(/\+/g,"%20"):n}),yu("&"),iu([pu("="),iu(lu)]),tu(au)]),gu=Fn(w,w);n.Identity=A.Identity,n.IdentityAsync=A.IdentityAsync,n.FantasyFunctor=A.FantasyFunctor,n.fromFantasy=A.fromFantasy,n.fromFantasyApplicative=A.fromFantasyApplicative,n.fromFantasyMonad=A.fromFantasyMonad,n.seemsArrayLike=gr,n.Select=mr,n.toFunction=Ar,n.assign=br,n.disperse=jr,n.modify=Or,n.modifyAsync=xr,n.remove=Ir,n.set=wr,n.traverse=Sr,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:Mn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[s],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],s);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=Ar(e(i)))(n,r,t,u)};return i},n.choices=Ur,n.choose=Fr,n.cond=kr,n.condOf=Er,n.ifElse=qr,n.orElse=Mr,n.chain=zr,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(Qn,Yn)},n.unless=Nr,n.when=Rr,n.optional=Pr,n.zero=Yn,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=Cr,n.joinIx=Dr,n.skipIx=Lr,n.getLog=function(n,r){var t=en(vn,function(n){return{p:[n,cn],x:n,c:n}},n,r),u=t.p,e=t.c;u=fn(u,["%O"]);for(var i=2;i<u.length;++i)u[0]+=" <= %O";return console.log.apply(console,u),e},n.log=function(){var n=A.curry(function(n,r){return console.log.apply(console,Z([],0,arguments,0,arguments.length).concat([n,r])),r});return Sn(n("get"),n("set"))},n.transform=Tr,n.transformAsync=Wr,n.seq=$r,n.assignOp=function(n){return[Kt(n),_r(n)]},n.modifyOp=function(e){return function(n,r,t,u){return t.of(e(n,r))}},n.setOp=_r,n.removeOp=Br,n.branchOr=Jr,n.branch=Gr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=Mn;return Gr(r)},n.elems=f,n.elemsTotal=function(n,r,t,u){return gr(n)?t===A.Identity?X(u,n,X):t===mr?e(u,n):i(t,u,n,i):t.of(n)},n.entries=Hr,n.keys=Kr,n.matches=function(f){return function(r,n,t,u){if(A.isString(r)){var e=t.map;if(f.global){var i=[""];return i.input=r,i.index=0,mr===t?function(n,r,t){for(;t=Wn(t,r);){var u=n(Dn(t),Ln(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=[];$n!==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,Ln(i));var o=u[e+1];void 0!==o&&(r+=o),t=Tn(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t($n);i=Wn(i,e);)o=r(r(n($n,t(i)),o),u(Dn(i),Ln(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],Ln(o)))}var c;return t.of(r)}},n.values=Qr,n.children=v,n.flatten=s,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=Ar(arguments[r]);n.push(Vr(Hn(u)),u)}return n},n.satisfying=Vr,n.leafs=Xr,n.all=Yr,n.and=Zr,n.all1=nt,n.and1=rt,n.any=tt,n.collectAs=ut,n.collect=et,n.collectTotalAs=it,n.collectTotal=ot,n.concatAs=ct,n.concat=ft,n.countIf=at,n.count=vt,n.countsAs=st,n.counts=lt,n.foldl=dt,n.foldr=yt,n.forEach=pt,n.forEachWith=ht,n.get=l,n.getAs=gt,n.isDefined=mt,n.isEmpty=At,n.joinAs=bt,n.join=jt,n.maximumBy=Ot,n.maximum=xt,n.meanAs=It,n.mean=wt,n.minimumBy=St,n.minimum=Ut,n.none=Ft,n.or=kt,n.productAs=Et,n.product=qt,n.select=Mt,n.selectAs=zt,n.sumAs=Nt,n.sum=Rt,n.foldTraversalLens=Pt,n.getter=function(e){return function(n,r,t,u){return u(e(n,r),r)}},n.lens=Ct,n.partsOf=function(e){return function(r,n,t,u){return t.map(function(n){return An(e,n,r)},u(ot(e,r),n))}},n.setter=Dt,n.defaults=function(e){function i(n){return Pn(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=function(e){var i=$(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.normalize=function(n){return[Lt(n),Tt(n)]},n.required=function(n){return Vt(n,void 0)},n.reread=Lt,n.rewrite=Tt,n.append=d,n.cross=Wt,n.filter=$t,n.find=p,n.findWith=function(n){var r=Ar(n),t=Hn(r);return[1<arguments.length?p(t,arguments[1]):p(t),r]},n.first=0,n.index=_t,n.last=Bt,n.prefix=function(n){return Jt(0,n)},n.slice=Jt,n.suffix=function(n){return Jt(0===n?1/0:n?-n:0,void 0)},n.pickIn=Gt,n.prop=Ht,n.props=h,n.propsOf=Kt,n.removable=function(){function e(n){if(!(n instanceof Object))return n;for(var r=0,t=u.length;r<t;++r)if(A.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=Qt,n.replace=Vt,n.getInverse=g,n.iso=Xt,n._=Yt,n.mapping=m,n.mappings=function(n){return A.isFunction(n)&&(n=n.apply(null,o(n.length))),Zt.apply(null,n.map(m))},n.alternatives=Zt,n.applyAt=nu,n.conjugate=ru,n.inverse=tu,n.iterate=function(n){return Sn(tr(l(n)),tr(g(n)))},n.orAlternatively=uu,n.complement=eu,n.identity=Mn,n.is=function(r){return Sn(function(n){return A.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.subset=function(n){var r,t=(r=n,function(n){return r(n)?n:void 0});return Sn(t,t)},n.array=iu,n.indexed=ou,n.reverse=cu,n.singleton=fu,n.disjoint=function(i){return function(n,r,t,u){var e=Jn(i);return t.map(e,u(Bn(i,n),r))}},n.keyed=_n,n.multikeyed=au,n.json=vu,n.uri=su,n.uriComponent=lu,n.dropPrefix=function(r){return Un(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return Un(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=du,n.split=yu,n.uncouple=pu,n.querystring=hu,n.add=function(n){return Fn(O(n),O(-n))},n.divide=function(n){return Fn(I(n),x(n))},n.multiply=function(n){return Fn(x(n),I(n))},n.negate=gu,n.subtract=function(n){return Fn(O(-n),O(n))},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)?qr(Q,Number(e),e):"-"===e?qr(Q,d,e):e.replace("~1","/").replace("~0","~")}return r.length=t-1,r},Object.defineProperty(n,"__esModule",{value:!0})}); |
{ | ||
"name": "partial.lenses", | ||
"version": "14.9.0", | ||
"version": "14.9.1", | ||
"description": "Partial lenses is a comprehensive, high-performance optics library for JavaScript", | ||
@@ -41,3 +41,3 @@ "module": "dist/partial.lenses.es.js", | ||
"dependencies": { | ||
"infestines": "^0.4.10" | ||
"infestines": "^0.4.11" | ||
}, | ||
@@ -47,3 +47,3 @@ "devDependencies": { | ||
"babel-eslint": "^8.2.6", | ||
"babel-plugin-annotate-pure-calls": "^0.3.0", | ||
"babel-plugin-annotate-pure-calls": "^0.4.0", | ||
"babel-plugin-check-es2015-constants": "^6.22.0", | ||
@@ -75,3 +75,3 @@ "babel-plugin-transform-async-to-generator": "^6.24.1", | ||
"concurrently": "^4.0.1", | ||
"eslint": "^5.6.0", | ||
"eslint": "^5.6.1", | ||
"klipse-github-docs-generator": "^0.3.7", | ||
@@ -78,0 +78,0 @@ "livereload": "^0.7.0", |
@@ -18,6 +18,5 @@ import * as I from 'infestines' | ||
export const isInstanceOf = I.curry((Class, x) => x instanceof Class) | ||
export const isInstanceOf = I.curry(I.isInstanceOfU) | ||
export const create = Object.create | ||
export const protoless = o => I.assign(create(null), o) | ||
export const protoless = o => I.assign(I.create(null), o) | ||
export const protoless0 = I.freeze(protoless(I.object0)) | ||
@@ -24,0 +23,0 @@ |
@@ -9,6 +9,3 @@ import * as I from './ext/infestines' | ||
const setName = | ||
process.env.NODE_ENV === 'production' | ||
? x => x | ||
: (to, name) => I.defineNameU(to, name) | ||
const setName = process.env.NODE_ENV === 'production' ? x => x : I.defineNameU | ||
@@ -38,9 +35,2 @@ const copyName = | ||
const returnAsync = x => Promise.resolve(x) | ||
const chainAsync = (xyP, xP) => | ||
null != xP && I.isFunction(xP.then) ? xP.then(xyP) : xyP(xP) | ||
// | ||
const toStringPartial = x => (void 0 !== x ? String(x) : '') | ||
@@ -158,50 +148,4 @@ | ||
function Functor(map) { | ||
if (!this) return freezeInDev(new Functor(map)) | ||
this.map = map | ||
} | ||
const ConstantWith = (ap, empty) => I.Applicative(I.sndU, I.always(empty), ap) | ||
const Applicative = I.inherit(function Applicative(map, of, ap) { | ||
if (!this) return freezeInDev(new Applicative(map, of, ap)) | ||
Functor.call(this, map) | ||
this.of = of | ||
this.ap = ap | ||
}, Functor) | ||
const Monad = I.inherit(function Monad(map, of, ap, chain) { | ||
if (!this) return freezeInDev(new Monad(map, of, ap, chain)) | ||
Applicative.call(this, map, of, ap) | ||
this.chain = chain | ||
}, Applicative) | ||
// | ||
const fantasyLand = 'fantasy-land/' | ||
const fantasyLandOf = fantasyLand + 'of' | ||
const fantasyLandMap = fantasyLand + 'map' | ||
const fantasyLandAp = fantasyLand + 'ap' | ||
const fantasyLandChain = fantasyLand + 'chain' | ||
const fantasyBop = m => setName((f, x) => x[m](f), m) | ||
const fantasyMap = fantasyBop(fantasyLandMap) | ||
const fantasyAp = fantasyBop(fantasyLandAp) | ||
const fantasyChain = fantasyBop(fantasyLandChain) | ||
const FantasyFunctor = Functor(fantasyMap) | ||
const fromFantasyApplicative = Type => | ||
Applicative(fantasyMap, Type[fantasyLandOf], fantasyAp) | ||
const fromFantasyMonad = Type => | ||
Monad(fantasyMap, Type[fantasyLandOf], fantasyAp, fantasyChain) | ||
const fromFantasy = Type => | ||
Type.prototype[fantasyLandChain] | ||
? fromFantasyMonad(Type) | ||
: Type[fantasyLandOf] | ||
? fromFantasyApplicative(Type) | ||
: FantasyFunctor | ||
// | ||
const ConstantWith = (ap, empty) => Applicative(I.sndU, I.always(empty), ap) | ||
const ConstantOf = ({concat, empty}) => ConstantWith(concat, empty()) | ||
@@ -360,3 +304,3 @@ | ||
const SelectLog = Applicative( | ||
const SelectLog = I.Applicative( | ||
(f, {p, x, c}) => { | ||
@@ -454,3 +398,3 @@ x = f(x) | ||
default: | ||
return o.length === 4 ? o(s, void 0, Identity, I.always(x)) : s | ||
return o.length === 4 ? o(s, void 0, I.Identity, I.always(x)) : s | ||
} | ||
@@ -471,3 +415,3 @@ }) | ||
return o.length === 4 | ||
? o(s, void 0, Identity, xi2x) | ||
? o(s, void 0, I.Identity, xi2x) | ||
: (xi2x(o(s, void 0), void 0), s) | ||
@@ -478,3 +422,3 @@ } | ||
const modifyAsyncU = (o, f, s) => | ||
returnAsync(toFunction(o)(s, void 0, IdentityAsync, f)) | ||
I.resolve(toFunction(o)(s, void 0, I.IdentityAsync, f)) | ||
@@ -526,3 +470,3 @@ const getAsU = (process.env.NODE_ENV === 'production' | ||
default: | ||
x = composed(i, os)(x, os[i - 1], Identity, xi2y || I.always(y)) | ||
x = composed(i, os)(x, os[i - 1], I.Identity, xi2y || I.always(y)) | ||
n = i | ||
@@ -666,3 +610,3 @@ break | ||
if (Identity === A) { | ||
if (I.Identity === A) { | ||
return branchOr1LevelIdentity(otherwise, k2o, xO, x, A, xi2yA) | ||
@@ -904,4 +848,4 @@ } else if (Select === A) { | ||
y = I.always(y) | ||
const yP = prim(void 0, void 0, Identity, y) | ||
return void 0 === yP ? back(void 0, void 0, Identity, y) : yP | ||
const yP = prim(void 0, void 0, I.Identity, y) | ||
return void 0 === yP ? back(void 0, void 0, I.Identity, y) : yP | ||
} | ||
@@ -929,3 +873,3 @@ return function orAlternatively(x, i, F, xi2yF) { | ||
const elemsI = (xs, _i, A, xi2yA) => | ||
A === Identity | ||
A === I.Identity | ||
? mapPartialIndexU(xi2yA, xs, void 0) | ||
@@ -947,11 +891,14 @@ : A === Select | ||
const iteratePartial = aa => a => { | ||
let r = a | ||
while (a !== undefined) { | ||
r = a | ||
a = aa(a) | ||
const iteratePartial = aa => | ||
function iterate(a) { | ||
let r = a | ||
while (a !== undefined) { | ||
r = a | ||
a = aa(a) | ||
} | ||
return r | ||
} | ||
return r | ||
} | ||
// | ||
const crossPartial = (op, ls, or) => (xs, ss) => { | ||
@@ -1218,11 +1165,4 @@ const n = ls.length | ||
export const Identity = Monad(I.applyU, id, I.applyU, I.applyU) | ||
export {Identity, IdentityAsync} from './ext/infestines' | ||
export const IdentityAsync = Monad( | ||
chainAsync, | ||
id, | ||
(xyP, xP) => chainAsync(xP => chainAsync(xyP => xyP(xP), xyP), xP), | ||
chainAsync | ||
) | ||
export const Select = ConstantWith((l, r) => (void 0 !== l ? l : r)) | ||
@@ -1509,3 +1449,3 @@ | ||
seemsArrayLike(xs) | ||
? A === Identity | ||
? A === I.Identity | ||
? mapPartialIndexU(xi2yA, xs, mapPartialIndexU) | ||
@@ -2069,9 +2009,2 @@ : A === Select | ||
export const array = elem => { | ||
const fwd = getInverse(elem) | ||
const bwd = get(elem) | ||
const mapFwd = x => mapIfArrayLike(fwd, x) | ||
return (x, i, F, xi2yF) => F.map(mapFwd, xi2yF(mapIfArrayLike(bwd, x), i)) | ||
} | ||
export const conjugate = I.curry(function conjugate(outer, inner) { | ||
@@ -2110,2 +2043,9 @@ return [outer, inner, inverse(outer)] | ||
export const array = elem => { | ||
const fwd = getInverse(elem) | ||
const bwd = get(elem) | ||
const mapFwd = x => mapIfArrayLike(fwd, x) | ||
return (x, i, F, xi2yF) => F.map(mapFwd, xi2yF(mapIfArrayLike(bwd, x), i)) | ||
} | ||
export const indexed = isoU( | ||
@@ -2151,2 +2091,4 @@ expect( | ||
// Object isomorphisms | ||
export const disjoint = groupOf => | ||
@@ -2304,3 +2246,8 @@ function disjoint(x, i, F, xi2yF) { | ||
export {FantasyFunctor, fromFantasy, fromFantasyApplicative, fromFantasyMonad} | ||
export { | ||
FantasyFunctor, | ||
fromFantasy, | ||
fromFantasyApplicative, | ||
fromFantasyMonad | ||
} from './ext/infestines' | ||
@@ -2307,0 +2254,0 @@ export const pointer = s => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
590196
8466
Updatedinfestines@^0.4.11