1 |
- !function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],n):n(r.L={},r.I)}(this,function(r,g){"use strict";function n(r){switch(typeof r){case"boolean":case"number":case"string":return!0;default:return!1}}function i(r,n){for(var t=0,u=n[w];t<u;++t){var i=r(n[t],t);if(void 0!==i)return i}}function e(r,n,t,u){var i=r.map,e=r.ap,o=r.of(mr),f=t[w];if(i===g.sndU){for(var c=0;c<f;++c)o=e(o,n(t[c],c));return o}for(var a=mr(u),v=0;v<f;++v)o=e(i(a,o),n(t[v],v));return i(Ar,o)}function a(r,n){var t=n[w]-r;if(t<2)return t?$n(n[r]):Br;for(var i=$n(n[r+--t]),e=function(t,u){return function(r,n){return i(r,n,t,u)}};--t;)e=Ur($n(n[r+t]),e);var o=$n(n[r]);return function(r,n,t,u){return o(r,n,t,e(t,u))}}function u(r,n,t,u){for(var i,e,o=r[w],f=Array(o),c=0;c<o;++c)switch(f[c]=t,typeof(i=r[c])){case"string":t=Or(i,t);break;case"number":t=Ir(i,t);break;default:t=a(c,r)(t,r[c-1],g.Identity,n||g.always(u)),o=c}for(o===r[w]&&(t=n?n(t,r[o-1]):u);0<=--o;)t=g.isString(e=r[o])?jr(e,t,f[o]):wr(e,t,f[o]);return t}function t(r){this[wn]=r,g.freeze(this)}function o(r){for(;kn[w]<r;)kn.push(new En(kn[w]));return kn}function y(r,n,t,u){if(void 0!==u){if(n in t)return g.acyclicEqualsU(t[n],u);t[n]=u;var i=r[n];return!i||i(u)}}function l(f,o){if(void 0===o||wt(qn,jt,o))return function(r,n){return g.acyclicEqualsU(o,n)};if(Fn(o)){var t=o[wn][0][wn];return t<0?C:function(r,n){return y(f,t,r,n)}}if(g.isArray(o)){for(var c=[],a=[],v=void 0,s=o[w],r=0;r<s;++r){var n=o[r];Un(n)?f[v=n[wn]]=Mn:(void 0!==v?a:c).push(l(f,n))}return function(r,n){if(Pn(n)){var t=n[w];if(!(void 0!==v?t<s-1:t!==s)){for(var u=c[w],i=0;i<u;++i)if(!c[i](r,n[i]))return;var e=a[w];t-=e;for(var o=0;o<e;++o)if(!a[o](r,n[t+o]))return;return!(0<=v)||y(f,v,r,ar(Array(t-u),0,n,u,t))}}}}var d=o[wn];d&&(f[d=d[0][wn]]=zn),o=Jn(bt,function(r,n){return Sn(n)?void 0:l(f,r)},o);var p=Rt(bt,o);return function(r,n){if(!qn(n)&&!g.isArray(n)){n=Pr(n);var t=0<=d&&{},u=0;for(var i in n){var e=o[i];if(e){if(!e(r,n[i]))return;u++}else{if(void 0===d)return;t&&(t[i]=n[i])}}return u===p&&(!t||y(f,d,r,tr(t)))}}}function f(e,r){if(!Sn(r)){if(void 0===e||wt(qn,jt,e))return g.always(e);if(Fn(e)){var n=e[wn][0][wn];return function(r){return r[n]}}if(g.isArray(e)){for(var a=[],v=[],s=void 0,t=e[w],u=0;u<t;++u){var i=e[u];Un(i)?s=i[wn]:(void 0!==s?v:a).push(f(i))}return ur(function(r){for(var n=[],t=0,u=a[w];t<u;++t)Rn(n,a[t](r));if(0<=s){var i=r[s];if(i)for(var e=0,o=i[w];e<o;++e)Rn(n,i[e])}for(var f=0,c=v[w];f<c;++f)Rn(n,v[f](r));return n})}var o=e[wn];return o&&(o=o[0][wn]),e=Jn(bt,f,e),ur(function(r){var n={};for(var t in e)Nn(n,t,e[t](r));if(0<=o){var u=r[o];if(u)for(var i in u)Nn(n,i,u[i])}return n})}}function c(){var r=arguments[w];if(r<2)return r?arguments[0]:Br;for(var n=Array(r);r--;)n[r]=arguments[r];return n}function v(i){function e(r,n,t,u){return o(r,n,t,u)}var o=function(r,n,t,u){return(o=$n(i(e)))(r,n,t,u)};return e}function s(r,n,t,u){return Pn(r)?mn(r,n,t,u):t.of(r)}function d(r,n,t,u){return g.isArray(r)?mn(r,n,t,u):g.isObject(r)?bt(r,n,t,u):t.of(r)}function p(r,n,u,i){return function r(n,t){return g.isArray(n)?mn(n,t,u,r):void 0!==n?i(n,t):u.of(n)}(r,n)}function m(n,r){return 1<arguments[w]?zr(C,n,r):function(r){return zr(C,n,r)}}function h(o){var f=1<arguments[w]?arguments[1]:{hint:0};return function(r,n,t,u){var i=Pn(r)?r:"",e=f.hint=function(r,n,t){var u=r.hint,i=t[w];i<=u&&(u=i-1),u<0&&(u=0);for(var e=u-1;0<=e&&u<i;++u,--e){if(n(t[u],u,r))return u;if(n(t[e],e,r))return e}for(;u<i;++u)if(n(t[u],u,r))return u;for(;0<=e;--e)if(n(t[e],e,r))return e;return i}(f,o,i);return t.map(function(r){return wr(e,r,i)},u(i[e],e))}}function A(){for(var r,n=arguments[w],t={},u=0;u<n;++u)t[r=arguments[u]]=r;return bu(t)}function b(n,r,t,u){var i=Pn(n)?n[w]:0;return t.map(function(r){return wr(i,r,n)},u(void 0,i))}function O(n,r){return 1<arguments[w]?kr(n,r):function(r){return kr(n,r)}}function j(r){var n=0;g.isFunction(r)&&(r=r.apply(null,o(n=r[w])));var t=Array(n),u=r.map(function(r){return l(t,r)}),i=r.map(f);return Tr(Tn(n,u[0],i[1]),Tn(n,u[1],i[0]))}function x(r){var n=0;g.isFunction(r)&&(r=r.apply(null,o(n=r[w])));var t=l(Array(n),r);return I(function(r){return t(Array(n),r)})}function I(r){var n=jn(r);return Tr(n,n)}var w="length",S=function(r,n){return r+n},U=function(r,n){return r*n},E=g.curry(S),F=g.curry(U),k=g.curry(function(r,n){return n/r}),q=function(r){return-r},M=function(r,n){return r<n},z=function(r,n){return n<r},N=g.curry(g.isInstanceOfU),R=function(r){return g.assign(g.create(null),r)},T=g.freeze(R(g.object0)),D=g.curry(function(r,n,t){return t.replace(r,n)}),W=Symbol.iterator,C=function(r){return r},L=function(r){return r},P=function(r){return r},B=function(r,n){return g.isString(r)?new RegExp(D(/[|\\{}()[\]^$+*?.]/g,"\\$&",r),n):r},$=function(r){return g.isArray(r)&&2===r[w]},_=g.curry(function(r,n){return[r,Eu(n)]}),G=function(t){return"function"==typeof t&&t[w]<4?t:(t=$n(t),function(r,n){return t(r,n,Bn,C)})},J=function(n){return P(function(r){try{return n(r)}catch(r){return r}})},H=function(r){return void 0!==r?String(r):""},K=function(r,n,t,u){return void 0!==u?Math.min(Math.max(r,u<0?n+u:u),n):t},Q=function(n){return function(r){return[r,n]}},V=function(n){return function(r){return void 0!==n&&void 0!==r?[n,r]:void 0}},X=function(n){return function(r){return void 0!==r?r:n}},Y=X(0),Z=g.always(!0),rr=function(r){return void 0!==r?!r:r},nr=function(n,t){return P(function(r){return n(r)?t(r):void 0})},tr=C,ur=C,ir=function(r){return!(r instanceof Object)||g.isArray(r)},er=C(function(r){if(Pn(r)){for(var n=r[w],t=Array(n),u=0;n;)t[u++]=r[--n];return t}}),or=C(function(r,n,t){for(var u=n[w],i=Array(u),e=0,o=!0,f=0;f<u;++f){var c=n[f],a=r(c,f);t!==a&&(i[e++]=a,o&&(o=c===a&&(0!==c||1/c==1/a)||c!=c&&a!=a))}return e!==u?(i[w]=e,i):o?n:i}),fr=function(r,n){return Pn(n)?or(r,n,void 0):void 0},cr=C(function(r,n){if(g.isArray(n)){for(var t=n[w],u=Array(),i=0;i<t;++i)if(void 0===(u[i]=r(n[i])))return;return u}}),ar=C(function(r,n,t,u,i){for(;u<i;)r[n++]=t[u++];return r}),vr=function(r,n){return g.Applicative(g.sndU,g.always(n),r)},sr=function(r){return vr(r.concat,(0,r.empty)())},dr=vr(S,0),pr=function(o){return g.curry(function(u,r,n){u=G(u);var i=void 0,e=void 0;return zr(function(r,n){var t=u(r,n);void 0===t||void 0!==e&&!o(t,e)||(i=r,e=t)},r,n),i})},yr=function(r,n,t,u){return $n(t)(u,void 0,r,n)},lr=function(i,r){return g.curryN(4,P(function(t,u){return u=r(u),function(r,n){return i(yr(u,t,r,n))}}))},mr=function(t){return function(n){return function(r){return t!==r?[r,n]:n}}},hr=function(r,n){for(;mr!==r;)n.push(r[0]),r=r[1];return n},Ar=C(function(r){return hr(r,[]).reverse()}),gr=g.Applicative(function(r,n){var t=n.p,u=n.x,i=n.c;return u=r(u),g.isFunction(u)||(t=[u,t]),{p:t,x:u,c:i}},function(r){return{p:[],x:r,c:void 0}},function(r,n){var t=void 0!==r.c?r:n;return{p:t.p,x:r.x(n.x),c:t.c}}),br=function(e,o){return function(i){return function(n,r,t,u){return t.map(function(r){return o(i,r,n)},u(e(i,n),i))}}},Or=function(r,n){return n instanceof Object?n[r]:void 0},jr=C(function(r,n,t){return void 0!==n?g.assocPartialU(r,n,t):g.dissocPartialU(r,t)||g.object0}),xr=br(Or,jr),Ir=function(r,n){return Pn(n)?n[r]:void 0},wr=C(function(r,n,t){Pn(t)||(t="");var u=t[w];if(void 0!==n){for(var i=Math.max(r+1,u),e=Array(i),o=0;o<i;++o)e[o]=t[o];return e[r]=n,e}if(u<=r)return ar(Array(u),0,t,0,u);for(var f=Array(u-1),c=0;c<r;++c)f[c]=t[c];for(var a=r+1;a<u;++a)f[a-1]=t[a];return f}),Sr=br(Ir,wr),Ur=function(i,r){return function(t,u){return u=r(t,u),function(r,n){return i(r,n,t,u)}}},Er=function(r,n,t){Pn(n)||(n="");var u=0;return qr(r,function(){return n[u++]},t)},Fr=C(function(r,n,t){switch(typeof r){case"string":return jr(r,n,t);case"number":return wr(r,n,t);case"object":return u(r,0,t,n);default:return 4===r[w]?r(t,void 0,g.Identity,g.always(n)):t}}),kr=function(r,n){return Fr(r,n,void 0)},qr=C(function(r,n,t){switch(typeof r){case"string":return jr(r,n(Or(r,t),r),t);case"number":return wr(r,n(Ir(r,t),r),t);case"object":return u(r,n,t);default:return 4===r[w]?r(t,void 0,g.Identity,n):(n(r(t,void 0),void 0),t)}}),Mr=function(r,n,t){return g.resolve($n(r)(t,void 0,g.IdentityAsync,n))},zr=C(function(r,n,t){switch(typeof n){case"string":return r(Or(n,t),n);case"number":return r(Ir(n,t),n);case"object":for(var u,i=n[w],e=0;e<i;++e)switch(typeof(u=n[e])){case"string":t=Or(u,t);break;case"number":t=Ir(u,t);break;default:return a(e,n)(t,n[e-1],Bn,r)}return r(t,n[i-1]);default:return r!==C&&4!==n[w]?r(n(t,void 0),void 0):n(t,void 0,Bn,r)}}),Nr=function(r,n){return zr(C,r,n)},Rr=function(i,e){return P(function(n,t,r,u){return r.map(function(r){return e(r,n,t)},u(i(n,t),t))})},Tr=function(i,e){return P(function(r,n,t,u){return t.map(e,u(i(r),n))})},Dr=function(r,n){return Tr(nr(g.isString,r),nr(g.isString,n))},Wr=function(r,n){return Tr(nr(g.isNumber,r),nr(g.isNumber,n))},Cr=C(function(r,n){var t=void 0;for(var u in r){var i=r[u],e=g.isObject(i)?Cr(i,n):zr(C,i,n);void 0!==e&&(t||(t={}),t[u]=e)}return t}),Lr=C(function(r,n,t){for(var u in r){var i=n&&n[u],e=r[u];t=g.isObject(e)?Lr(e,i,t):Fr(e,i,t)}return t}),Pr=function(r){return g.constructorOf(r)!==Object?g.toObject(r):r},Br=function(r,n,t,u){return u(r,n)},$r=C(function(i){return function(r){for(var n={},t=i[w];t--;){var u=r[0];void 0!==u&&(n[i[t]]=u),r=r[1]}return n}}),_r=C(function(r,n,t,u,i,e){var o=void 0,f=!0,c={};for(var a in n){o=1;var v=t[a],s=n[a](v,a,i,e);void 0!==s?(c[a]=s,f&&(f=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):f=!1}var d=o;for(var p in t)if(void 0===(d&&n[p])){o=1;var y=t[p],l=r(y,p,i,e);void 0!==l?(c[p]=l,f&&(f=y===l&&(0!==y||1/y==1/l)||y!=y&&l!=l)):f=!1}return o?f&&t===u?u:c:u}),Gr=function(h,A){return function(r,n,t,u){var i=r instanceof Object?Pr(r):g.object0;if(g.Identity===t)return _r(h,A,i,r,t,u);if(Bn!==t){var e=t.map,o=t.ap,f=t.of,c=f(Q),a=[];for(var v in A)a.push(v),c=o(e(Q,c),A[v](i[v],v,t,u));var s=!!a[w]||void 0;for(var d in i)void 0===(s&&A[d])&&(a.push(d),c=o(e(Q,c),h(i[d],d,t,u)));return a[w]?e($r(a),c):f(r)}for(var p in A){var y=A[p](i[p],p,t,u);if(void 0!==y)return y}for(var l in i)if(void 0===A[l]){var m=h(i[l],l,t,u);if(void 0!==m)return m}}},Jr=function(r,n,t){return g.acyclicEqualsU(t,r)?n:t},Hr=C(function(r,n,t,u){for(var i,e=0,o=n[w];e<o;++e)(r(i=n[e],e)?t:u).push(i)}),Kr="lastIndex",Qr="index",Vr=function(r){return r[Qr]+r[0][w]},Xr=C(function(r,n){var t=n[Kr];n[Kr]=Vr(r);var u=n.exec(r.input);return n[Kr]=t,u&&u[0]&&u}),Yr=function(t){return function(n){return function(r){return[t,r,n]}}},Zr=Tr(nr(N(Object),C(function(r){r=Pr(r);var n=[];for(var t in r)n.push([t,r[t]]);return n})),nr(g.isArray,C(function(r){for(var n={},t=0,u=r[w];t<u;++t){var i=r[t];2===i[w]&&(n[i[0]]=i[1])}return n}))),rn=C(function(r,n){if(n instanceof Object){var t={};for(var u in n=Pr(n)){var i=r(u),e=t[i];void 0===e&&(t[i]=e={}),e[u]=n[u]}return t}}),nn=C(function(e){return function(r){if(r instanceof Object){var n={};for(var t in r=Pr(r)){var u=r[t];if(u instanceof Object)for(var i in u=Pr(u))e(i)===t&&(n[i]=u[i])}return n}}}),tn=function(e,o,f){return f=$n(f),P(function(r,n,t,u){var i=-1;return f(r,n,t,function(r,n){return e<=++i&&!(o<=i)?u(r,n):t.of(r)})})},un=function(r,n){if(void 0!==n){var t=r(n);if(void 0!==t)return t}return n},en=function(i){return function(r,n,t,u){return t.map(function(r){return un(i,r)},u(r,n))}},on=function(i){return function(r,n,t,u){return u(un(i,r),n)}},fn=function(n){return vt(v(function(r){return[n,d,r]}))},cn=function(n){return vt(v(function(r){return Xn(cu(n),[d,r])}))},an=function(r,n,t){return void 0!==r(n,t,Bn,C)},vn=function(t){return function(r,n){return an(t,r,n)}},sn=function(e,o){return function(i){return function(r,n,t,u){return(i(r,n)?e:o)(r,n,t,u)}}},dn=function(i,e){return e=$n(e),i=$n(i),function(r,n,t,u){return(an(e,r,n)?e:i)(r,n,t,u)}},pn=function(e,o){o=$n(o),e=$n(e);var f=function(r){r=g.always(r);var n=o(void 0,void 0,g.Identity,r);return void 0===n?e(void 0,void 0,g.Identity,r):n};return function(r,n,t,u){var i=o(r,n,Bn,C);return t.map(f,u(void 0===i?e(r,n,Bn,C):i,n))}},yn=function(u){return P(function(r){for(var n=arguments[w],t=arguments[--n];n;)t=u(t,arguments[--n]);return t})},ln=function(r,n,t,u){return t.of(r)},mn=function(r,n,t,u){return t===g.Identity?or(u,r,void 0):t===Bn?i(u,r):e(t,u,r,void 0)},hn=function(i,e){return function(r,n,t,u){return t.chain(function(r){return e(r,n,t,u)},i(r,n,t,u))}},An=function(r,n){return[n,Au(r)]},gn=function(t){return function(r){for(var n=r;void 0!==r;)r=t(n=r);return n}},bn=function(o,f,c){return function(r,n){var t=f[w];if(Pn(r)){Pn(n)||(n="");for(var u=Math.max(t,r[w],n[w]),i=Array(u),e=0;e<u;++e)if(void 0===(i[e]=o(e<t?f[e]:c,r[e],n[e])))return;return i}}},On=(0,g.curry)(function(r,n){return Rr(bn(Nr,n,r),bn(Fr,n,r))}),jn=function(n){return function(r){return void 0!==r&&n(r)?r:void 0}},xn=C(function(u){return function(r){for(var n=[];;){var t=u(r);if(!$(t))return[r,n];r=t[0],n.push(t[1])}}}),In=function(i){return function(r){if($(r)){var n=r[1];if(g.isArray(n)){for(var t=r[0],u=n[w];u--;)t=i(tr([t,n[u]]));return t}}}},wn="珳襱댎纚䤤鬖罺좴",Sn=function(r){return g.isString(r)&&0===r.indexOf(wn)},Un=N(t),En=g.inherit(function(r){this[wn+r]=this[wn]=g.freeze([new t(r)]),g.freeze(this)},Object,g.assocPartialU(W,function(){return this[wn][W]()})),Fn=N(En),kn=[],qn=function(r){return null==r||"object"!=typeof r},Mn=function(r){return void 0===r||g.isArray(r)},zn=function(r){return void 0===r||N(Object)},Nn=function(r,n,t){void 0!==t&&(r[n]=t)},Rn=function(r,n){void 0!==n&&r.push(n)},Tn=function(t,u,i){return function(r){var n=Array(t);if(u(n,r))return i(n)}},Dn=C(function(a){return function(r){if(g.isArray(r)){for(var n=[],t=0,u=r.length;t<u;++t){var i=r[t];if(!g.isArray(i))return;if(!i.length)return;var e=a(i[0]);if(void 0===e)return;for(var o=0,f=i.length;o<f;++o){var c=i[o];if(!g.identicalU(e,a(c)))return;n.push(c)}}return n}}}),Wn=C(function(c){return function(r){if(g.isArray(r)){for(var n=new Map,t=0,u=r.length;t<u;++t){var i=r[t],e=c(i);if(void 0===e)return;var o=n.get(e);void 0!==o?o.push(i):n.set(e,[i])}var f=[];return n.forEach(function(r){return f.push(r)}),f}}}),Cn=C(function(o){return function(r){if($(r)){var n=r[1],t=n[w];if(t){for(var u=r[0],i=Array(t),e=0;e<t;++e)if(void 0===(i[e]=o([u,n[e]])))return;return i}}}}),Ln=C(function(f){return function(r){if(g.isArray(r)){var n=r[w];if(n){var t=f(r[0]);if($(t)){var u=Array(n),i=t[0];u[0]=t[1];for(var e=1;e<n;++e){var o=f(r[e]);if(!$(o)||!g.acyclicEqualsU(i,o[0]))return;u[e]=o[1]}return[i,u]}}}}}),Pn=function(r){return r instanceof Object&&(r=r[w])===r>>0&&0<=r||g.isString(r)},Bn=vr(function(r,n){return void 0!==r?r:n}),$n=C(function(r){switch(typeof r){case"string":return xr(r);case"number":return Sr(r);case"object":return a(0,r);default:return 4===r[w]?r:(i=r,P(function(r,n,t,u){return t.map(g.always(r),u(i(r,n),n))}))}var i}),_n=g.curry(function(r,n,t){return Fr([r,xu],n,t)}),Gn=g.curry(Er),Jn=g.curry(qr),Hn=g.curry(Mr),Kn=g.curry(function(r,n){return Fr(r,void 0,n)}),Qn=g.curry(Fr),Vn=g.curry(yr),Xn=yn(dn),Yn=function(i){return P(function(r,n,t,u){return $n(i(r,n))(r,n,t,u)})},Zn=C(function(){for(var r=arguments[w],n=ln;r--;){var t=arguments[r];n=t[w]<2?$n(t[0]):sn($n(t[1]),n)(t[0])}return n}),rt=C(function(e){e=$n(e);var o=arguments[w]-1;if(!o)return ln;var r=arguments[o];r=1===r[w]?(--o,$n(r[0])):ln;for(var f=Array(o),c=Array(o+1),n=0;n<o;++n){var t=arguments[n+1];f[n]=t[0],c[n]=$n(t[1])}return c[o]=r,function(r,n,t,u){var i=o;return e(r,n,Bn,function(r,n){for(var t=0;t<i;++t)if(f[t](r,n)){if(0===(i=t))return 0;break}}),c[i](r,n,t,u)}}),nt=g.curry(function(r,n,t){return sn($n(n),$n(t))(r)}),tt=g.curry(dn),ut=g.curry(function(t,r){return[r,Yn(function(r,n){return void 0!==r?t(r,n):ln})]}),it=sn(ln,Br),et=sn(Br,ln),ot=et(g.isDefined),ft=g.curry(function(i,e){return e=$n(e),P(function(r,t,n,u){return e(r,t,n,function(r,n){return u(r,i(n,t))})})}),ct=L(ft(function(r,n){return void 0!==n?void 0!==r?[n,r]:n:r})),at=L(ft(g.sndU)),vt=g.curry(function(r,n){return qr(r,C,n)}),st=g.curry(function(r,n){return Mr(r,C,n)}),dt=C(function(){var r=arguments[w],n=ln;if(r)for(n=$n(arguments[--r]);r;)n=hn($n(arguments[--r]),n);return n}),pt=C(g.curryN(2,function(n){return n=$n(n),function(r){return function r(n,t){var u=g.create(null);for(var i in t){var e=t[i];u[i]=g.isObject(e)?r(n,e):$n(e)}return Gr(n,u)}(n,r)}})),yt=pt(ln),lt=L($n([Zr,s])),mt=L($n([Zr,s,0])),ht=g.curry(tn),At=ht(0),gt=g.curry(function(r,n){return tn(r,void 0,n)}),bt=L(Gr(Br,T)),Ot=function(e){return function(r,n,u,i){return function r(n,t){return e(n,t)?i(n,t):d(n,t,u,r)}(r,n)}},jt=Ot(function(r){return void 0!==r&&!g.isArray(r)&&!g.isObject(r)}),xt=g.curry(function(t,r,n){return!zr(function(r,n){if(!t(r,n))return!0},r,n)}),It=xt(C),wt=g.curry(function(t,r,n){var u=!1;return zr(function(r,n){if(!t(r,n))return u=!1;u=!0},r,n),u}),St=wt(C),Ut=g.curry(function(t,r,n){return!!zr(function(r,n){if(t(r,n))return!0},r,n)}),Et=(0,g.curry)(function(u,r,n){var i=[];return zr(function(r,n){var t=u(r,n);void 0!==t&&i.push(t)},r,n),i}),Ft=Et(C),kt=(0,g.curry)(function(t,r,n){var u=[];return zr(function(r,n){u.push(t(r,n))},r,n),u}),qt=kt(C),Mt=lr(C,sr),zt=Mt(C),Nt=g.curry(function(t,r,n){return yr(dr,function(r,n){return t(r,n)?1:0},r,n)}),Rt=Nt(g.isDefined),Tt=g.curry(function(i,r,n){var e=new Map;return zr(function(r,n){var t=i(r,n),u=e.get(t);e.set(t,void 0!==u?u+1:1)},r,n),e}),Dt=Tt(C),Wt=g.curry(function(t,u,r,n){return zr(function(r,n){u=t(u,r,n)},r,n),u}),Ct=g.curry(function(r,n,t,u){var i=[],e=[];zr(function(r,n){e.push(r),i.push(n)},t,u);for(var o=e[w]-1;0<=o;--o)n=r(n,e[o],i[o]);return n}),Lt=g.curry(function(t,r,n){return zr(function(r,n){t(r,n)},r,n)}),Pt=g.curry(function(r,t,n,u){var i=r();return zr(function(r,n){t(i,r,n)},n,u),i}),Bt=g.curry(zr),$t=g.curry(function(r,n){return void 0!==zr(C,r,n)}),_t=g.curry(function(r,n){return!zr(Z,r,n)}),Gt=lr(H,C(function(t){return vr(function(r,n){return void 0!==r?void 0!==n?r+t+n:r:n})})),Jt=Gt(C),Ht=pr(z),Kt=Ht(C),Qt=g.curry(function(u,r,n){var i=0,e=0;return zr(function(r,n){var t=u(r,n);void 0!==t&&(e+=1,i+=t)},r,n),i/e}),Vt=Qt(C),Xt=pr(M),Yt=Xt(C),Zt=g.curry(function(t,r,n){return!zr(function(r,n){if(t(r,n))return!0},r,n)}),ru=Ut(C),nu=Vn(vr(U,1)),tu=nu(X(1)),uu=m,iu=Bt,eu=Vn(dr),ou=eu(Y),fu=g.curry(function(r,n){return Rr(r(n),Qn(n))}),cu=function(i){return function(r,n,t,u){return u(i(r,n),n)}},au=g.curry(Rr),vu=au(C),su=function(i){return function(r,n,t,u){return u(void 0!==r?i(r,n):r,n)}},du=function(i){return function(r,n,t,u){return t.map(function(r){return void 0!==r?i(r,n):r},u(r,n))}},pu=C(function(o){return function(r,n,t,u){var i=void 0,e=g.array0;return Pn(r)&&Hr(o,r,i=[],e=[]),t.map(function(r){var n=r?r[w]:0,t=e[w],u=n+t;return u===t?e:ar(ar(Array(u),0,r,0,n),n,e,0,t)},u(i,n))}}),yu=C,lu=Yn(function(r){return Pn(r)&&r[w]?r[w]-1:0}),mu=function(r){return hu(0,r)},hu=(0,g.curry)(function(c,a){return function(u,r,n,t){var i=Pn(u),e=i&&u[w],o=K(0,e,0,c),f=K(o,e,e,a);return n.map(function(r){var n=r?r[w]:0,t=o+n;return ar(ar(ar(Array(e-f+t),0,u,0,o),o,r,0,n),t,u,f,e)},t(i?ar(Array(Math.max(0,f-o)),0,u,o,f):void 0,r))}}),Au=function(r){return g.isObject(r)?bu(Jn(bt,An,r)):r},gu=C,bu=C(function(i){return function(n,r,t,u){return t.map(function(r){return Lr(i,r,n)},u(Cr(i,n),r))}}),Ou=g.curry(function(i,e){function o(r){return Jr(e,i,r)}return function(r,n,t,u){return t.map(o,u(Jr(i,e,r),n))}}),ju=b,xu=C(function(n,r,t,u){return t.map(function(r){return g.assign({},n instanceof Object?n:null,r)},u(void 0,r))}),Iu=L($n([mu(0),0])),wu=L(_(b)),Su=L(_(xu)),Uu=L(_(Iu)),Eu=function(i){return function(r,n,t,u){return t.of(i)}},Fu=Eu(),ku=L(On(Fu)),qu=g.curry(Tr),Mu=new En(-1),zu=yn(pn),Nu=g.curry(function(r,n){return Tr(Jn(r,m(n)),Jn(r,O(n)))}),Ru=g.curry(function(r,n){return[r,n,Tu(r)]}),Tu=function(i){return function(r,n,t,u){return t.map(function(r){return zr(C,i,r)},u(Fr(i,r,void 0),n))}},Du=g.curry(pn),Wu=Tr(rr,rr),Cu=function(n){return Tr(function(r){return g.acyclicEqualsU(n,r)},function(r){return!0===r?n:void 0})},Lu=function(r){var n=O(r),i=m(r),e=function(r){return fr(n,r)};return function(r,n,t,u){return t.map(e,u(fr(i,r),n))}},Pu=Tr(nr(Pn,C(function(r){for(var n=r[w],t=Array(n),u=0;u<n;++u)t[u]=[u,r[u]];return t})),nr(g.isArray,C(function(r){for(var n=r[w],t=Array(n),u=0;u<n;++u){var i=r[u];2===i[w]&&(t[i[0]]=i[1])}n=t[w];for(var e=0,o=0;o<n;++o){var f=t[o];void 0!==f&&(o!==e&&(t[e]=f),++e)}return t[w]=e,t}))),Bu=Tr(er,er),$u=L(j(function(r){return[[r],r]})),_u=function(e){return function(r,n,t,u){var i=nn(e);return t.map(i,u(rn(e,r),n))}},Gu=Tr(nr(N(Object),C(function(r){r=Pr(r);var n=[];for(var t in r){var u=r[t];if(g.isArray(u))for(var i=0,e=u[w];i<e;++i)n.push([t,u[i]]);else n.push([t,u])}return n})),nr(g.isArray,C(function(r){for(var n=g.create(null),t=0,u=r[w];t<u;++t){var i=r[t];if(2===i[w]){var e=i[0],o=i[1],f=n[e];void 0===f?n[e]=o:g.isArray(f)?f.push(o):n[e]=[f,o]}}return g.assign({},n)}))),Ju=C(function(r){var n=r||g.object0,t=n.reviver,u=n.replacer,i=n.space;return Tr(nr(g.isString,J(function(r){return JSON.parse(r,t)})),nr(g.isDefined,function(r){return JSON.stringify(r,u,i)}))}),Hu=Dr(J(decodeURI),encodeURI),Ku=Tr(nr(g.isString,J(decodeURIComponent)),nr(n,encodeURIComponent)),Qu=g.curry(function(r,n){return Dr(D(B(r,"g"),n),D(B(n,"g"),r))}),Vu=C(function(n){var t=1<arguments[w]?arguments[1]:n;return Tr(nr(g.isString,function(r){return r.split(t)}),nr(g.isArray,function(r){return r.join(n)}))}),Xu=C(function(u){var t=B(1<arguments[w]?arguments[1]:u,"");return Tr(nr(g.isString,function(r){var n=t.exec(r);return n?[r.slice(0,n[Qr]),r.slice(Vr(n))]:[r,""]}),function(r){if($(r)){var n=r[0],t=r[1];return t?n+u+t:n}})}),Yu=L($n([su(function(r){return g.isString(r)?r.replace(/\+/g,"%20"):r}),Vu("&"),Lu([Xu("="),Lu(Ku)]),Tu(Gu)])),Zu=Wr(q,q);r.Identity=g.Identity,r.IdentityAsync=g.IdentityAsync,r.FantasyFunctor=g.FantasyFunctor,r.fromFantasy=g.fromFantasy,r.fromFantasyApplicative=g.fromFantasyApplicative,r.fromFantasyMonad=g.fromFantasyMonad,r.seemsArrayLike=Pn,r.Select=Bn,r.toFunction=$n,r.assign=_n,r.disperse=Gn,r.modify=Jn,r.modifyAsync=Hn,r.remove=Kn,r.set=Qn,r.traverse=Vn,r.compose=c,r.flat=function(){for(var r=[p],n=0,t=arguments[w];n<t;++n)r.push(arguments[n],p);return r},r.lazy=v,r.choices=Xn,r.choose=Yn,r.cond=Zn,r.condOf=rt,r.ifElse=nt,r.orElse=tt,r.chain=ut,r.choice=function(){for(var r=arguments.length,n=Array(r),t=0;t<r;t++)n[t]=arguments[t];return n.reduceRight(dn,ln)},r.unless=it,r.when=et,r.optional=ot,r.zero=ln,r.mapIx=function(i){return function(r,n,t,u){return u(r,i(n,r))}},r.setIx=function(i){return function(r,n,t,u){return u(r,i)}},r.tieIx=ft,r.joinIx=ct,r.reIx=function(e){return e=$n(e),P(function(r,n,t,u){var i=0;return e(r,n,t,function(r){return u(r,i++)})})},r.skipIx=at,r.getLog=function(r,n){var t=yr(gr,function(r){return{p:[r,mr],x:r,c:r}},r,n),u=t.p,i=t.c;u=hr(u,["%O"]);for(var e=2;e<u[w];++e)u[0]+=" <= %O";return console.log.apply(console,u),i},r.log=function(){var r=g.curry(function(r,n){return console.log.apply(console,ar([],0,arguments,0,arguments[w]).concat([r,n])),n});return Tr(r("get"),r("set"))},r.transform=vt,r.transformAsync=st,r.seq=dt,r.branchOr=pt,r.branch=yt,r.branches=function(){for(var r=arguments[w],n={},t=0;t<r;++t)n[arguments[t]]=Br;return yt(n)},r.elems=s,r.elemsTotal=function(r,n,t,u){return Pn(r)?t===g.Identity?or(u,r,or):t===Bn?i(u,r):e(t,u,r,e):t.of(r)},r.entries=lt,r.keys=mt,r.keysEverywhere=function(r,n,u,t){var i=function(r,n){return u.ap(u.map(V,t(r[0],n)),e(r[1],n))},e=function r(n,t){return g.isArray(n)?mn(n,t,u,r):g.isObject(n)?lt(n,t,u,i):u.of(n)};return e(r,n)},r.subseq=ht,r.limit=At,r.offset=gt,r.matches=function(c){return function(n,r,t,u){if(g.isString(n)){var i=t.map;if(c.global){var e=[""];return e.input=n,e[Qr]=0,Bn===t?function(r,n,t){for(;t=Xr(t,n);){var u=r(t[0],t[Qr]);if(void 0!==u)return u}}(u,c,e):i((f=n,function(r){for(var n="",t=0,u=function(r){for(var n=[];Yr!==r;)n.push(r[0],r[1]),r=r[2];return n}(r),i=u[w]-2;-2!==i;i+=-2){var e=u[i];n+=f.slice(t,e[Qr]);var o=u[i+1];void 0!==o&&(n+=o),t=Vr(e)}return n+f.slice(t)}),function(r,n,t,u,i,e){for(var o=t(Yr);e=Xr(e,i);)o=n(n(r(Yr,t(e)),o),u(e[0],e[Qr]));return o}(i,t.ap,t.of,u,c,e))}var o=n.match(c);if(o)return i(function(r){return n.replace(c,void 0!==r?r:"")},u(o[0],o[Qr]))}var f;return t.of(n)}},r.values=bt,r.children=d,r.flatten=p,r.query=function(){for(var r=[],n=0,t=arguments[w];n<t;++n){var u=$n(arguments[n]);r.push(Ot(vn(u)),u)}return r},r.satisfying=Ot,r.leafs=jt,r.whereEq=function(r){return Ot(It(yt(Jn(jt,Cu,r))))},r.all=xt,r.and=It,r.all1=wt,r.and1=St,r.any=Ut,r.collectAs=Et,r.collect=Ft,r.collectTotalAs=kt,r.collectTotal=qt,r.concatAs=Mt,r.concat=zt,r.countIf=Nt,r.count=Rt,r.countsAs=Tt,r.counts=Dt,r.foldl=Wt,r.foldr=Ct,r.forEach=Lt,r.forEachWith=Pt,r.get=m,r.getAs=Bt,r.isDefined=$t,r.isEmpty=_t,r.joinAs=Gt,r.join=Jt,r.maximumBy=Ht,r.maximum=Kt,r.meanAs=Qt,r.mean=Vt,r.minimumBy=Xt,r.minimum=Yt,r.none=Zt,r.or=ru,r.productAs=nu,r.product=tu,r.select=uu,r.selectAs=iu,r.sumAs=eu,r.sum=ou,r.foldTraversalLens=fu,r.getter=cu,r.lens=au,r.partsOf=function(i){return 1!==arguments[w]&&(i=$n(c.apply(null,arguments))),function(n,r,t,u){return t.map(function(r){return Er(i,r,n)},u(qt(i,n),r))}},r.setter=vu,r.defaults=function(i){function e(r){return Jr(i,void 0,r)}return function(r,n,t,u){return t.map(e,u(void 0!==r?r:i,n))}},r.define=function(i){var e=X(i);return function(r,n,t,u){return t.map(e,u(void 0!==r?r:i,n))}},r.normalize=function(r){return[su(r),du(r)]},r.required=function(r){return Ou(r,void 0)},r.reread=su,r.rewrite=du,r.filter=pu,r.find=h,r.findWith=function(r){var n=$n(r),t=vn(n);return[1<arguments[w]?h(t,arguments[1]):h(t),n]},r.first=0,r.index=yu,r.last=lu,r.prefix=mu,r.slice=hu,r.suffix=function(r){return hu(0===r?1/0:r?-r:0,void 0)},r.pickIn=Au,r.prop=gu,r.props=A,r.propsExcept=function(){for(var n=g.create(null),r=0,t=arguments[w];r<t;++r)n[arguments[r]]="d";return[_u(function(r){return n[r]||"t"}),"t"]},r.propsOf=function r(n){var t;return(t=r).warned||(t.warned=1,console.warn("partial.lenses: `propsOf` has been deprecated and there is no replacement. See CHANGELOG for details.")),A.apply(null,g.keys(n))},r.removable=function(){function i(r){if(!(r instanceof Object))return r;for(var n=0,t=u[w];n<t;++n)if(g.hasU(u[n],r))return r}for(var r=arguments.length,u=Array(r),n=0;n<r;n++)u[n]=arguments[n];return function(r,n,t,u){return t.map(i,u(r,n))}},r.valueOr=function(i){return function(r,n,t,u){return u(null!=r?r:i,n)}},r.pick=bu,r.replace=Ou,r.appendTo=b,r.append=ju,r.assignTo=xu,r.prependTo=Iu,r.appendOp=wu,r.assignOp=Su,r.modifyOp=function(i){return function(r,n,t,u){return t.of(i(r,n))}},r.prependOp=Uu,r.setOp=Eu,r.removeOp=Fu,r.cross=ku,r.getInverse=O,r.iso=qu,r._=Mu,r.mapping=j,r.mappings=function(r){return g.isFunction(r)&&(r=r.apply(null,o(r[w]))),zu.apply(null,r.map(j))},r.pattern=x,r.patterns=function(r){return g.isFunction(r)&&(r=r.apply(null,o(r[w]))),zu.apply(null,r.map(x))},r.alternatives=zu,r.applyAt=Nu,r.attemptEveryDown=function(r){return Tr(fn(on(m(r))),fn(en(O(r))))},r.attemptEveryUp=function(r){return Tr(fn(en(m(r))),fn(on(O(r))))},r.attemptSomeDown=function(r){return Tr(cn(m(r)),cn(O(r)))},r.conjugate=Ru,r.inverse=Tu,r.iterate=function(r){return Tr(gn(m(r)),gn(O(r)))},r.orAlternatively=Du,r.fold=function(r){return Tr(In(m(r)),xn(O(r)))},r.unfold=function(r){return Tr(xn(m(r)),In(O(r)))},r.complement=Wu,r.identity=Br,r.is=Cu,r.subset=I,r.array=Lu,r.arrays=function(r){var n=O(r),i=m(r),e=function(r){return cr(n,r)};return function(r,n,t,u){return t.map(e,u(cr(i,r),n))}},r.indexed=Pu,r.reverse=Bu,r.singleton=$u,r.groupBy=function(r){return r=G(r),Tr(Wn(r),Dn(r))},r.ungroupBy=function(r){return r=G(r),Tr(Dn(r),Wn(r))},r.zipWith1=function(r){return Tr(Cn(m(r)),Ln(O(r)))},r.unzipWith1=function(r){return Tr(Ln(m(r)),Cn(O(r)))},r.disjoint=_u,r.keyed=Zr,r.multikeyed=Gu,r.json=Ju,r.uri=Hu,r.uriComponent=Ku,r.dropPrefix=function(n){return Dr(function(r){return r.startsWith(n)?r.slice(n[w]):void 0},function(r){return n+r})},r.dropSuffix=function(n){return Dr(function(r){return r.endsWith(n)?r.slice(0,r[w]-n[w]):void 0},function(r){return r+n})},r.replaces=Qu,r.split=Vu,r.uncouple=Xu,r.querystring=Yu,r.add=function(r){return Wr(E(r),E(-r))},r.divide=function(r){return Wr(k(r),F(r))},r.multiply=function(r){return Wr(F(r),k(r))},r.negate=Zu,r.subtract=function(r){return Wr(E(-r),E(r))},r.pointer=function(r){"#"===r[0]&&(r=decodeURIComponent(r));for(var n=r.split("/"),t=n[w],u=1;u<t;++u){var i=n[u];n[u-1]=/^(0|[1-9]\d*)$/.test(i)?nt(ir,Number(i),i):"-"===i?nt(ir,ju,i):i.replace("~1","/").replace("~0","~")}return n[w]=t-1,n},Object.defineProperty(r,"__esModule",{value:!0})});
|