!function(){"use strict";functionr(e){if(null===e)return"null";if(void0===e)return"undefined";vart=typeofe;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}functionf(o){returnm(function(e,t){if(e.length!==t.length)return!1;for(varn=e.length,r=0;r<n;r++)if(!o.eq(e[r],t[r]))return!1;return!0})}functiond(l){returnm(function(e,t){varn,r,o,i=Object.keys(e),a=Object.keys(t);if(r=f(g),o=function(e){returnt=n,Array.prototype.slice.call(e).sort(t);vart},!m(function(e,t){returnr.eq(o(e),o(t))}).eq(i,a))return!1;for(varu=i.length,s=0;s<u;s++){varc=i[s];if(!l.eq(e[c],t[c]))return!1}return!0})}functione(r){returnfunction(e){returnn=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;vart,n}}functiont(t){returnfunction(e){returntypeofe===t}}functionn(t){returnfunction(e){returnt===e}}functionre(e){returnnull==e}functionV(e){return!re(e)}functionoe(){}functioni(n,r){returnfunction(){for(vare=[],t=0;t<arguments.length;t++)e[t]=arguments[t];returnn(r.apply(null,e))}}functiona(t,n){returnfunction(e){returnt(n(e))}}functionJ(e){returnfunction(){returne}}functionu(e){returne}functiono(e,t){returne===t}varm=function(e){return{eq:e}},g=m(function(e,t){returne===t}),p=m(function(e,t){if(e===t)return!0;varn=r(e);returnn===r(t)&&(-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(n)?e===t:"array"===n?f(p).eq(e,t):"object"===n&&d(p).eq(e,t))}),K=e("string"),h=e("object"),S=e("array"),l=n(null),v=t("boolean"),b=n(void0),y=t("function"),E=t("number");functionA(r){for(varo=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];returnfunction(){for(vare=[],t=0;t<arguments.length;t++)e[t]=arguments[t];varn=o.concat(e);returnr.apply(null,n)}}functions(t){returnfunction(e){return!t(e)}}functionC(e){returne()}functionw(e){e()}functionc(){returnN}varT=J(!1),x=J(!0),N={fold:function(e,t){returne()},isSome:T,isNone:x,getOr:u,getOrThunk:k,getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:J(null),getOrUndefined:J(void0),or:u,orThunk:k,map:c,each:oe,bind:c,exists:T,forall:x,filter:function(){returnN},toArray:function(){return[]},toString:J("none()")};functionk(e){returne()}function_(e,t){returnbe.call(e,t)}functionie(e,t){return-1<_(e,t)}functionF(e,t){for(varn=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}functionR(e,t){for(varn=e.length,r=newArray(n),o=0;o<n;o++){vari=e[o];r[o]=t(i,o)}returnr}functionX(e,t){for(varn=0,r=e.length;n<r;n++)t(e[n],n)}functionD(e,t){for(varn=e.length-1;0<=n;n--)t(e[n],n)}functionO(e,t){for(varn=[],r=[],o=0,i=e.length;o<i;o++){vara=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}}functionU(e,t){for(varn=[],r=0,o=e.length;r<o;r++){vari=e[r];t(i,r)&&n.push(i)}returnn}functionB(e,n,r){returnD(e,function(e,t){r=n(r,e,t)}),r}functionP(e,n,r){returnX(e,function(e,t){r=n(r,e,t)}),r}functionL(e,t,n){for(varr=0,o=e.length;r<o;r++){vari=e[r];if(t(i,r))returnhe.some(i);if(n(i,r))break}returnhe.none()}functionI(e,t){returnL(e,t,T)}functionM(e,t){for(varn=0,r=e.length;n<r;n++)if(t(e[n],n))returnhe.some(n);returnhe.none()}functionz(e,t){returnfunction(e){for(vart=[],n=0,r=e.length;n<r;++n){if(!S(e[n]))thrownewError("Arr.flatten item "+n+" was not an array, input: "+e);ye.apply(t,e[n])}returnt}(R(e,t))}functionj(e,t){for(varn=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0}functionH(e){vart=ve.call(e,0);returnt.reverse(),t}functionq(e,t){returnU(e,function(e){return!ie(t,e)})}function$(e,t){return0<=t&&t<e.length?he.some(e[t]):he.none()}functionW(e){return$(e,0)}functionY(e){return$(e,e.length-1)}functionG(e,t){for(varn=0;n<e.length;n++){varr=t(e[n],n);if(r.isSome())returnr}returnhe.none()}functionQ(