9 lines
134 KiB
JavaScript
9 lines
134 KiB
JavaScript
|
/**
|
||
|
* 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.8.1 (2021-05-20)
|
||
|
*/
|
||
|
!function(){"use strict";var e,n=function(r){return function(n){return t=typeof(e=n),(null===e?"null":"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)===r;var e,t}},t=function(e){return function(n){return typeof n===e}},p=n("string"),g=n("object"),a=n("array"),r=t("boolean"),i=(e=undefined,function(n){return e===n}),c=function(n){return!(null===(e=n)||e===undefined);var e},l=t("function"),f=t("number"),C=function(){},b=function(n){return function(){return n}},d=function(n){return n};function S(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}var o,u,s,h=function(e){return function(n){return!e(n)}},m=b(!1),T=b(!0),v=function(){return w},w=(o=function(n){return n.isNone()},{fold:function(n,e){return n()},is:m,isSome:m,isNone:T,getOr:s=function(n){return n},getOrThunk:u=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:b(null),getOrUndefined:b(undefined),or:s,orThunk:u,map:v,each:C,bind:v,exists:m,forall:T,filter:v,equals:o,equals_:o,toArray:function(){return[]},toString:b("none()")}),y=function(t){var n=b(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:T,isNone:m,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return y(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:w},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(m,function(n){return e(t,n)})}};return o},x={some:y,none:v,from:function(n){return null===n||n===undefined?w:y(n)}},R=Array.prototype.slice,D=Array.prototype.indexOf,O=Array.prototype.push,A=function(n,e){return t=n,r=e,-1<D.call(t,r);var t,r},k=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return!0}return!1},I=function(n,e){for(var t=[],r=0;r<n;r++)t.push(e(r));return t},B=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var u=n[o];r[o]=e(u,o)}return r},E=function(n,e){for(var t=0,r=n.length;t<r;t++){e(n[t],t)}},P=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var u=n[r];e(u,r)&&t.push(u)}return t},M=function(n,e,t){return function(n,e){for(var t=n.length-1;0<=t;t--){e(n[t],t)}}(n,function(n){t=e(t,n)}),t},N=function(n,e,t){return E(n,function(n){t=e(t,n)}),t},j=function(n,e){return function(n,e,t){for(var r=0,o=n.length;r<o;r++){var u=n[r];if(e(u,r))return x.some(u);if(t(u,r))break}return x.none()}(n,e,m)},W=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return x.some(t)}return x.none()},L=function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!a(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);O.apply(e,n[t])}return e},z=function(n,e){return L(B(n,e))},_=function(n,e){for(var t=0,r=n.length;t<r;++t){if(!0!==e(n[t],t))return!1}return!0},F=function(n,e){for(var t={},r=0,o=n.length;r<o;r++){var u=n[r];t[String(u)]=e(u,r)}return t},H=function(n){return[n]},q=function(n,e){return 0<=e&&e<n.length?x.some(n[e]):x.none()},V=function(n){return q(n,0)},U=function(n){return q(n,n.length-1)},K=function(n,e){for(var t=0;t<n.length;t++){var r=e(n[t],t);if(r.isSome())return r}return x.none()},$=function(){return($=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function G(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var r=Array(n),o=0,e=0;e<t;e++)for(var u=arguments[e],i=0,c=u.length;i<c;i++,o++)r[o]=u[i];return r}var X,Y=function(t){var r,o=!1;return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return o||(o=!0,r=t.apply(null,n)),r}},J=function(n,e){var t=function(n,e){for(var t=0
|