10 lines
122 KiB
JavaScript
10 lines
122 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.2.0 (2020-02-13)
|
||
|
*/
|
||
|
!function(f){"use strict";function o(e){return e}var R=function(e){function n(){return t}var t=e;return{get:n,set:function(e){t=e},clone:function(){return R(n())}}},T=function(){},O=function(t,r){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(r.apply(null,e))}},D=function(e){return function(){return e}};function b(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=o.concat(e);return r.apply(null,t)}}function d(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}}function e(){return u}var n,s=D(!1),i=D(!0),u=(n={fold:function(e,n){return e()},is:s,isSome:s,isNone:i,getOr:c,getOrThunk:r,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:D(null),getOrUndefined:D(undefined),or:c,orThunk:r,map:e,each:T,bind:e,exists:s,forall:i,filter:e,equals:t,equals_:t,toArray:function(){return[]},toString:D("none()")},Object.freeze&&Object.freeze(n),n);function t(e){return e.isNone()}function r(e){return e()}function c(e){return e}function a(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}}function l(e,n){return-1<function(e,n){return qe.call(e,n)}(e,n)}function m(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return!0}return!1}function g(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r}function p(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}}function h(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t}function v(e,n,t){return function(e,n){for(var t=e.length-1;0<=t;t--){n(e[t],t)}}(e,function(e){t=n(t,e)}),t}function w(e,n,t){return p(e,function(e){t=n(t,e)}),t}function y(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t))return We.some(o)}return We.none()}function C(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return We.some(t)}return We.none()}function S(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!je(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);Ve.apply(n,e[t])}return n}function x(e,n){return S(g(e,n))}function A(e,n){for(var t=0,r=e.length;t<r;++t){if(!0!==n(e[t],t))return!1}return!0}function E(e){var n=Ue.call(e,0);return n.reverse(),n}function N(e,n){for(var t=0;t<e.length;t++){var r=n(e[t],t);if(r.isSome())return r}return We.none()}function k(e,n){for(var t=Ge(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}}function I(e,t){return Ke(e,function(e,n){return{k:n,v:t(e,n)}})}function B(e,n){return Xe(e,n)?We.from(e[n]):We.none()}function P(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(n.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+n.length+']", got '+t.length+" arguments");var r={};return p(n,function(e,n){r[e]=D(t[n])}),r}}function M(e){return e.slice(0).sort()}function W(e,n){throw new Error("All required keys ("+M(e).join(", ")+") were not specified. Specified keys were: "+M(n).join(", ")+".")}function _(e){throw new Error("Unsupported keys for object: "+M(e).join(", "))}function L(n,e){if(!je(e))throw new Error("The "+n+" fields must be an array. Was: "+e+".");p(e,function(e){if(!Le(e))throw new Error("The value "+e+" in the "+n+" fields was not a string.")})}function j(e){var t=M(e);y(t,function(e,n){return n<t.length-1&&e===t[n+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")})}function z(e){return e.dom().nodeType}function H(n){return function(e){return z(e)===n}}function F(e){return z(e)===Je||"#comment"===nn(e)}function U(e,n,t){if(!(Le(t)||ze(t)||Fe(t)))throw f.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Erro
|