9 lines
418 KiB
JavaScript
Raw Normal View History

2020-08-11 20:36:09 -04:00
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.0.9 (2019-06-26)
*/
!function(j){"use strict";var i=function(){},q=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},$=function(e){return function(){return e}},W=function(e){return e};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var e,t,n,r,o,s=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}},a=function(e){return function(){throw new Error(e)}},l=$(!1),u=$(!0),c=l,f=u,h=function(){return m},m=(r={fold:function(e,t){return e()},is:c,isSome:c,isNone:f,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:t,map:h,ap:h,each:function(){},bind:h,flatten:h,exists:c,forall:f,filter:h,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:$("none()")},Object.freeze&&Object.freeze(r),r),g=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:f,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return g(e(n))},ap:function(e){return e.fold(h,function(e){return g(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:m},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:g,none:h,from:function(e){return null===e||e===undefined?m:g(e)}},p=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},K=p("string"),x=p("object"),v=p("array"),y=p("null"),b=p("boolean"),C=p("function"),w=p("number"),z=Array.prototype.slice,N=(o=Array.prototype.indexOf)===undefined?function(e,t){return _(e,t)}:function(e,t){return o.call(e,t)},E=function(e,t){var n=N(e,t);return-1===n?T.none():T.some(n)},S=function(e,t){return-1<N(e,t)},k=function(e,t){return H(e,t).isSome()},X=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},A=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n,e)}},M=function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n,e)}},Y=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o,e)?n:r).push(a)}return{pass:n,fail:r}},R=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},D=function(e,t,n){return M(e,function(e){n=t(n,e)}),n},O=function(e,t,n){return A(e,function(e){n=t(n,e)}),n},B=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return T.some(o)}return T.none()},H=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n,e))return T.some(n)}return T.none()},_=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},P=Array.prototype.push,L=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);P.apply(t,e[n])}return t},V=function(e,t){var n=X(e,t);return L(n)},I=function(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n,e))return!1}return!0},F=function(e){var t=z.call(e,0);return t.reverse(),t},U=function(e,t){return R(e,function(e){return!S(t,e)})},G=function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n},J=function(e,t){var n=z.call(e,0);return n.sort(t),n},Q=function(e){return 0===e.length?T.none():T.some(e[0])},Z=function(e){return 0===e.length?T.none():T.some(e[e.length-1])},ee=C(Array.from)?Array.from:function(e){return z.call(e)};var te=function(){return(te=Object.assign||function(e){for(va