Socket
Socket
Sign inDemoInstall

helper-js

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helper-js - npm Package Compare versions

Comparing version 1.4.28 to 1.4.29

40

dist/helper-js.esm.js
/*!
* helper-js v1.4.28
* helper-js v1.4.29
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -21,13 +21,22 @@ * Released under the MIT License.

// resolve global
var t;
var _t;
try {
t = global;
_t = global;
} catch (e) {
t = window;
_t = window;
}
store.glb = t;
return t;
store.glb = _t;
return _t;
}
}
function isDocumentExisted() {
try {
t = document;
} catch (e) {
return false;
}
return true;
} // is 各种判断

@@ -1827,11 +1836,12 @@

if (timePart) {
var t = timePart.split('-').map(v => parseFloat(v));
h = t[0];
var _t2 = timePart.split('-').map(v => parseFloat(v));
if (t[1] != null) {
min = t[1];
h = _t2[0];
if (_t2[1] != null) {
min = _t2[1];
}
if (t[2] != null) {
s = t[2];
if (_t2[2] != null) {
s = _t2[2];
}

@@ -2219,5 +2229,5 @@ }

} else {
var t = rule;
var _t3 = rule;
rule = x => Object.prototype.toString.call(x) === "[object ".concat(t, "]");
rule = x => Object.prototype.toString.call(x) === "[object ".concat(_t3, "]");
}

@@ -2608,2 +2618,2 @@ }

export { Cache, CrossWindow, CrossWindowEventProcessor, EventProcessor, TreeData, URLHelper, addClass, addDate, appendTo, arrayAt, arrayDiff, arrayDistinct, arrayFirst, arrayGet, arrayLast, arrayRemove, arrayRemoveBySortedIndexes, arraySibling, arrayWithoutEnd, assignIfDifferent, attachCache, backupAttr, binarySearch, camelCase, camelToWords, cloneDate, cloneObj, copyTextToClipboard, createElementFromHTML, debounce, debounceImmediate, debounceTrailing, depthFirstSearch, elementsFromPoint, empty, executeOnceInScopeByName, executePromiseGetters, executeWithCount, findNodeList, findNodeListReverse, findParent, forAll, getBorder, getBoundingClientRect, getCalendar, getCss3Prefix, getElSize, getElSizeEvenInvisible, getImageSizeByUrl, getLocalStorage2, getMonthEnd, getMonthStart, getOffset, getOffsetParent, getOuterAttachedHeight, getOuterAttachedWidth, getPosition, getPositionFromOffset, getScroll, getSessionStorage2, getUrlParam, getUserLanguage, getViewportPosition, glb, groupArray, hasClass, insertAfter, insertBefore, isArray, isBool, isDescendantOf, isFunction, isIsoFormat, isNumber, isNumeric, isObject, isOffsetInEl, isPromise, isString, isset, iterateALL, iterateAll, joinFunctionsByNext, joinFunctionsByResult, joinMethods, jqFixedSize, jqMakeCarousel, kebabCase, makeStorageHelper, mapObjectTree, mapObjects, max, min, newArrayRemoveAt, numPad, numRand, objectExcept, objectGet, objectMap, objectMerge, objectOnly, objectSet, offDOM, offsetToViewportPosition, onDOM, onDOMMany, onQuickKeydown, openCenterWindow, openWindow, pairRows, parseISO, prependTo, promiseTimeout, removeClass, removeEl, replaceMultiple, resolveArgsByType, resolveValueOrGettter, restoreAttr, retry, setElChildByIndex, snakeCase, splitArray, store, store_executeOnceInScopeByName, strRand, studlyCase, titleCase, toArrayIfNot, uniqueId, unset, viewportPositionToOffset, waitFor, waitTime, walkTreeData, watchChange, windowLoaded };
export { Cache, CrossWindow, CrossWindowEventProcessor, EventProcessor, TreeData, URLHelper, addClass, addDate, appendTo, arrayAt, arrayDiff, arrayDistinct, arrayFirst, arrayGet, arrayLast, arrayRemove, arrayRemoveBySortedIndexes, arraySibling, arrayWithoutEnd, assignIfDifferent, attachCache, backupAttr, binarySearch, camelCase, camelToWords, cloneDate, cloneObj, copyTextToClipboard, createElementFromHTML, debounce, debounceImmediate, debounceTrailing, depthFirstSearch, elementsFromPoint, empty, executeOnceInScopeByName, executePromiseGetters, executeWithCount, findNodeList, findNodeListReverse, findParent, forAll, getBorder, getBoundingClientRect, getCalendar, getCss3Prefix, getElSize, getElSizeEvenInvisible, getImageSizeByUrl, getLocalStorage2, getMonthEnd, getMonthStart, getOffset, getOffsetParent, getOuterAttachedHeight, getOuterAttachedWidth, getPosition, getPositionFromOffset, getScroll, getSessionStorage2, getUrlParam, getUserLanguage, getViewportPosition, glb, groupArray, hasClass, insertAfter, insertBefore, isArray, isBool, isDescendantOf, isDocumentExisted, isFunction, isIsoFormat, isNumber, isNumeric, isObject, isOffsetInEl, isPromise, isString, isset, iterateALL, iterateAll, joinFunctionsByNext, joinFunctionsByResult, joinMethods, jqFixedSize, jqMakeCarousel, kebabCase, makeStorageHelper, mapObjectTree, mapObjects, max, min, newArrayRemoveAt, numPad, numRand, objectExcept, objectGet, objectMap, objectMerge, objectOnly, objectSet, offDOM, offsetToViewportPosition, onDOM, onDOMMany, onQuickKeydown, openCenterWindow, openWindow, pairRows, parseISO, prependTo, promiseTimeout, removeClass, removeEl, replaceMultiple, resolveArgsByType, resolveValueOrGettter, restoreAttr, retry, setElChildByIndex, snakeCase, splitArray, store, store_executeOnceInScopeByName, strRand, studlyCase, titleCase, toArrayIfNot, uniqueId, unset, viewportPositionToOffset, waitFor, waitTime, walkTreeData, watchChange, windowLoaded };
/*!
* helper-js v1.4.28
* helper-js v1.4.29
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)
* Released under the MIT License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).helperJs={})}(this,(function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t}));var r=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var o=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?r(e):t},i=t((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}));var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e},c=t((function(e){function t(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=t=Reflect.get:e.exports=t=function(e,t,n){var r=a(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},t(n,r,o||n)}e.exports=t})),u=t((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}));var l=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)};var s=function(e){if(Array.isArray(e))return e};var f=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}};var h=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var d=function(e,t){return s(e)||f(e,t)||h()};var v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y=function(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e};var g=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},m=t((function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof s?t:s,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function s(){}function f(){}function h(){}var d={};d[o]=function(){return this};var v=Object.getPrototypeOf,p=v&&v(v(k([])));p&&p!==t&&n.call(p,o)&&(d=p);var y=h.prototype=s.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e){var t;this._invoke=function(r,o){function i(){return new Promise((function(t,i){!function t(r,o,i,a){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?Promise.resolve(s.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(s).then((function(e){l.value=e,i(l)}),(function(e){return t("throw",e,i,a)}))}a(c.arg)}(r,o,t,i)}))}return t=t?t.then(i,i):i()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return f.prototype=y.constructor=h,h.constructor=f,h[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(m.prototype),m.prototype[i]=function(){return this},e.AsyncIterator=m,e.async=function(t,n,r,o){var i=new m(c(t,n,r,o));return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=k,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var b=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var w=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var x=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var O=function(e){return b(e)||w(e)||x()};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=m.mark(q),E={};function P(){if(E.glb)return E.glb;var e;try{e=global}catch(t){e=window}return E.glb=e,e}function T(e){return void 0!==e}function A(e){return"[object Array]"===Object.prototype.toString.call(e)}function L(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function N(e){return"[object Number]"===Object.prototype.toString.call(e)}function _(e){return isFinite(e)&&!isNaN(parseFloat(e))}function C(e){return"[object String]"===Object.prototype.toString.call(e)}function I(e){return"[object Object]"===Object.prototype.toString.call(e)}function F(e){return"function"==typeof e}function D(e,t){return 1===arguments.length&&(t=e,e=0),Math.floor(Math.random()*(t-e+1)+e)}function M(e,t){return e<t?e:t}function R(e){return e&&e[0].toUpperCase()+e.substr(1)}function B(e){return e.replace(/ /g,"-").replace(/_/g,"-").replace(/([A-Z])/g,"-$1").replace(/--+/g,"-").replace(/^-|-$|/g,"").toLowerCase()}function G(e){for(var t=e.toString().split(/[-_]/),n=1;n<t.length;n++)t[n]=R(t[n]);return t.join("")}function H(e){return e.toString().trim().split(/(?=[A-Z])/)}function U(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=0;o<e;o++)n+=r[D(r.length-1)];return t+n}function W(e,t){for(var n,r=0;(n=e.indexOf(t))>-1;)e.splice(n,1),r++;return r}function K(e){return e[e.length-1]}function z(e){return A(e)?e:[e]}function Y(e,t){var n=[];if(F(t))for(var r=t,o=1,i=0;i<e.length;){var a=i+r(o);n.push(e.slice(i,a)),i=a,o++}else for(var c=0;c<e.length;){var u=c+t;n.push(e.slice(c,u)),c=u}return n}function q(e){var t,n,r,o,i,a,c,u,l,s,f,h,d,v,p=arguments;return m.wrap((function(y){for(;;)switch(y.prev=y.next){case 0:if((t=p.length>1&&void 0!==p[1]?p[1]:{}).reverse){y.next=30;break}if(null==e.length){y.next=14;break}n=0;case 4:if(!(n<e.length)){y.next=12;break}if(r={value:e[n],index:n},t.exclude&&t.exclude(r)){y.next=9;break}return y.next=9,r;case 9:n++,y.next=4;break;case 12:y.next=28;break;case 14:if(!I(e)){y.next=27;break}o=0,i=Object.keys(e);case 16:if(!(o<i.length)){y.next=25;break}if(a=i[o],c={value:e[a],key:a},t.exclude&&t.exclude(c)){y.next=22;break}return y.next=22,c;case 22:o++,y.next=16;break;case 25:y.next=28;break;case 27:throw"Unsupported type";case 28:y.next=58;break;case 30:if(null==e.length){y.next=42;break}u=e.length-1;case 32:if(!(u>=0)){y.next=40;break}if(l={value:e[u],index:u},t.exclude&&t.exclude(l)){y.next=37;break}return y.next=37,l;case 37:u--,y.next=32;break;case 40:y.next=58;break;case 42:if(!I(e)){y.next=57;break}(s=Object.keys(e)).reverse(),f=0,h=s;case 46:if(!(f<h.length)){y.next=55;break}if(d=h[f],v={value:e[d],key:d},t.exclude&&t.exclude(v)){y.next=52;break}return y.next=52,v;case 52:f++,y.next=46;break;case 55:y.next=58;break;case 57:throw"Unsupported type";case 58:case"end":return y.stop()}}),S)}var J=q;function $(e,t,n){var r=A(t)?t:t.split("."),o=e;try{var i=!0,a=!1,c=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){o=o[u.value]}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}catch(e){if(n)throw"Path does not exist"}return o}function V(e,t){for(var n={},r=e.length,o=0;o<r;o++){var i=e[o];n[F(t)?t(i,o):i[t]]=i}return n}function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children",r=arguments.length>3?arguments[3]:void 0,o=A(e)?e:[e],i=function e(){g(this,e)},a=function e(o,a,c){r&&(o=o.slice()).reverse();for(var u=o.length,l=0;l<u;l++){var s=o[l],f=r?u-l-1:l,h=c?[].concat(O(c),[f]):[],d=t(s,f,a,h);if(!1===d)throw new i;if("skip children"!==d){if("skip siblings"===d)break;null!=s[n]&&e(s[n],s,h)}}};try{a(o,null,A(e)?[]:null)}catch(e){if(!(e instanceof i))throw e}}var Z=Q,X=function(){function e(t){g(this,e),this.childrenKey="children",this.data=t}return y(e,[{key:"iteratePath",value:m.mark((function e(t){var n,r,o,i,a,c,u,l,s,f,h,d,v,p,y,g,b,w,x,k,S,E,P=arguments;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=P.length>1&&void 0!==P[1]?P[1]:{},r=this.childrenKey,o=this.rootChildren,n.reverse){e.next=38;break}i=[],a=o,c=!0,u=!1,l=void 0,e.prev=8,s=t[Symbol.iterator]();case 10:if(c=(f=s.next()).done){e.next=22;break}return h=f.value,d=[].concat(O(i),[h]),v=a[h],e.next=16,{path:d,node:v};case 16:i=d,a=v[r];case 19:c=!0,e.next=10;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(8),u=!0,l=e.t0;case 28:e.prev=28,e.prev=29,c||null==s.return||s.return();case 31:if(e.prev=31,!u){e.next=34;break}throw l;case 34:return e.finish(31);case 35:return e.finish(28);case 36:e.next=66;break;case 38:(p=O(this.iteratePath(t,j({},n,{reverse:!1})))).reverse(),y=!0,g=!1,b=void 0,e.prev=43,w=p[Symbol.iterator]();case 45:if(y=(x=w.next()).done){e.next=52;break}return k=x.value,S=k.path,E=k.node,e.next=49,{path:S,node:E};case 49:y=!0,e.next=45;break;case 52:e.next=58;break;case 54:e.prev=54,e.t1=e.catch(43),g=!0,b=e.t1;case 58:e.prev=58,e.prev=59,y||null==w.return||w.return();case 61:if(e.prev=61,!g){e.next=64;break}throw b;case 64:return e.finish(61);case 65:return e.finish(58);case 66:case"end":return e.stop()}}),e,this,[[8,24,28,36],[29,,31,35],[43,54,58,66],[59,,61,65]])}))},{key:"getAllNodes",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.iteratePath(e)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value.node;t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t}},{key:"getNode",value:function(e){return K(this.getAllNodes(e))}},{key:"getNodeIndexAndParent",value:function(e){var t=e.slice(),n=t.pop();return{parent:this.getNode(t),index:n,parentPath:t}}},{key:"getNodeParent",value:function(e){return this.getNodeIndexAndParent(e).parent}},{key:"setPathNode",value:function(e,t){if(null==e||0===e.length)this.data=t;else{var n=this.childrenKey,r=this.rootChildren,o=this.getNodeIndexAndParent(e),i=o.parent,a=o.index;(1===e.length?r:i[n])[a]=t}}},{key:"removeNode",value:function(e){var t=this.childrenKey,n=this.rootChildren,r=this.getNodeIndexAndParent(e),o=r.parent,i=r.index,a=1===e.length?n:o[t],c=a[i];return a.splice(i,1),c}},{key:"walk",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.childrenKey,r=this.data;return Z(r,e,n,t.reverse)}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.childrenKey,r=new e;return this.walk((function(e,o,i,a){var c=Object.assign({},e);c[n]&&(c[n]=[]),t.afterNodeCreated&&t.afterNodeCreated(c,{oldNode:e,index:o,parent:i,path:a}),r.setPathNode(a,c)})),r.data}},{key:"rootChildren",get:function(){var e=this.childrenKey;this.data||(this.data=[]);var t=this.data;return A(t)?t:t[e]}}]),e}();function ee(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[],a=[],c=function(){for(var c=this,u=arguments.length,l=new Array(u),s=0;s<u;s++)l[s]=arguments[s];return new Promise((function(u,s){i.push(u),a.push(s),r=l,n||(n=!0,t=setTimeout((function(){var o=e.call.apply(e,[c].concat(O(r)));t=null,n=!1,i.forEach((function(e){return e(o)})),i=[],a=[]}),o))}))};return c.stop=function(){t&&(clearTimeout(t),t=null),n=!1,i=[],a.forEach((function(e){return e()})),a=[]},c}function te(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=function(){var i=this;return new Promise((function(a,c){n?a(r):(n=!0,a(r=e.call.apply(e,[i].concat(O(lastArgs)))),t=setTimeout((function(){t=null,n=!1,r=null}),o))}))};return i.stop=function(){t&&(clearTimeout(t),t=null),n=!1},i}function ne(){if("undefined"!=typeof pageYOffset)return{top:pageYOffset,left:pageXOffset};var e=document.body,t=document.documentElement;return{top:(t=t.clientHeight?t:e).scrollTop,left:t.scrollLeft}}function re(e){var t=ie(e),n=ne();return{x:t.left+n.left,y:t.top+n.top}}function oe(e){var t=e.offsetParent;return(!t||t===document.body&&"static"===getComputedStyle(document.body).position)&&(t=document.body.parentElement),t}function ie(e){var t=e.getBoundingClientRect(),n=t.top-document.documentElement.clientTop,r=t.bottom,o=t.left-document.documentElement.clientLeft,i=t.right;return{top:n,right:i,bottom:r,left:o,width:t.width||i-o,height:t.height||r-n,x:o,y:n}}var ae=ie;function ce(e,t,n){for(var r=n&&n.withSelf?e:e.parentElement;r;){var o=t(r);if("break"===o)return;if(o)return r;r=r.parentElement}}function ue(e,t){e["original_".concat(t)]=e.getAttribute(t)}function le(e,t){var n="original_".concat(t);e.setAttribute(t,e[n])}function se(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function fe(e){ue(e,"style"),e.style.display="block";var t=ie(e),n={width:t.width,height:t.height};return le(e,"style"),n}var he=fe;function de(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(o)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(o))}function ve(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(o)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(o))}function pe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=q(e,{reverse:n.reverse}),o=!0,i=!1,a=void 0;try{for(var c,u=r[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var l=c.value,s=l.value,f=l.index;if(t(s,f))return s}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}function ye(e){return new Date(e.getTime())}function ge(e,t,n){["year","month","day"].includes(n)||(n+="s");var r="get"+(n=R(n));return e["set"+n](e[r]()+t),e}function me(e){var t=ye(e);return t.setDate(1),t}function be(e){var t=ye(e);return ge(t,1,"month"),t.setDate(0),t}function we(e,t,n,r,o){var i,a,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1e3;null==n&&(n=0,r=e.length-1);for(var u,l=0;n>=0&&n<=r;){if(l>=c)throw Error("binarySearch: loop times is over ".concat(c,", you can increase the limit."));if((u=t(a=e[i=Math.floor((r-n)/2+n)],l))>0)r=i-1;else{if(!(u<0))return{index:i,value:a,count:l+1,hit:!0};n=i+1}l++}return o?{index:i,value:a,count:l+1,hit:!1,bigger:u>0}:null}function xe(e,t){return new Promise((function(n,r){setTimeout((function(){t&&t(),n()}),e)}))}function Oe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};P().open(e,t,Object.keys(n).map((function(e){return"".concat(e,"=").concat(n[e])})).join(","))}var ke=function(){function e(t){var n=this;g(this,e),this.baseUrl="",this.search={};var r=decodeURI(t).split("?");this.baseUrl=r[0],r[1]&&r[1].split("&").forEach((function(e){var t=e.split("=");n.search[t[0]]=null==t[1]?"":decodeURIComponent(t[1])}))}return y(e,[{key:"getHref",value:function(){var e=this,t=[this.baseUrl],n=Object.keys(this.search).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e.search[t]))})).join("&");return n&&t.push(n),t.join("?")}}]),e}();function je(e){return{storage:e,set:function(e,t,n){null==t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify({value:t,expired_at:n?(new Date).getTime()+60*n*1e3:null}))},get:function(e){var t=this.storage.getItem(e);if(t){if(!(t=JSON.parse(t)).expired_at||t.expired_at>(new Date).getTime())return t.value;this.storage.removeItem(e)}return null},clear:function(){this.storage.clear()}}}var Se=function(){function e(){g(this,e),this.eventStore=[]}return y(e,[{key:"on",value:function(e,t){this.eventStore.push({name:e,handler:t})}},{key:"once",value:function(e,t){var n=this,r=function(){n.off(e,o)},o=function(){t.apply(void 0,arguments),r()};return this.on(e,o),r}},{key:"onceTimeout",value:function(e,t,n){var r,o=this;return{off:function(){r&&r()},promise:new Promise((function(i,a){r=o.once(e,(function(){t.apply(void 0,arguments),i()})),xe(n).then((function(){r(),a()}))}))}}},{key:"off",value:function(e,t){for(var n=[],r=this.eventStore.length,o=0;o<r;o++){var i=this.eventStore[o];i.name===e&&i.handler===t&&n.unshift(o)}for(var a=0,c=n;a<c.length;a++){var u=c[a];this.eventStore.splice(u,1)}}},{key:"emit",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.eventStore[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value;c.name===e&&t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}for(var u=arguments.length,l=new Array(u>1?u-1:0),s=1;s<u;s++)l[s-1]=arguments[s];for(var f=0,h=t;f<h.length;f++){var d=h[f];d.handler.apply(d,l)}}}]),e}(),Ee=function(e){function t(e){var n;return g(this,t),(n=o(this,i(t).call(this))).storageName="_crossWindow",n.windows=[],n.timeout=200,n.BROADCAST="__BROADCAST__",e&&Object.assign(r(n),e),de(window,"storage",(function(e){if(e.key===n.storageName){var t,r=JSON.parse(e.newValue);if(!r.targets||r.targets.includes(n.id))(t=n).emitLocal.apply(t,[r.name].concat(O(r.args)))}})),n.id=U(),n.windows=[n.id],n.ready=new Promise((function(e,t){n.onceTimeout("_windows_updated",(function(e){var t=e.windows;n.windows=t}),n.timeout).promise.then((function(){e()}),(function(){e()})),n.broadcast("_join",n.id)})),n.ready.then((function(){n.on("_join",(function(e){n.windows.push(e),n.isMain()&&n.broadcast("_windows_updated",{windows:n.windows,type:"join",id:e})})),n.on("_windows_updated",(function(e){var t=e.windows;n.windows=t})),n.on("_exit",(function(e){var t=n.windows[0];W(n.windows,e),n.isMain()&&(n.emit("_windows_updated",{windows:n.windows,type:"exit",id:e}),t!=n.id&&n.emit("_main_updated",{windows:n.windows,old:t,new:n.id}))})),de(window,"beforeunload",(function(){n.exitGroup()}))})),n}return l(t,e),y(t,[{key:"isMain",value:function(){return this.id===this.windows[0]}},{key:"emitTo",value:function(e,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];var u;n===this.BROADCAST?n=null:(n&&!A(n)&&(n=[n]),n.includes(this.id)&&(u=c(i(t.prototype),"emit",this)).call.apply(u,[this,e].concat(o)));P().localStorage.setItem(this.storageName,JSON.stringify({name:e,targets:n,args:o,random:Math.random()}))}},{key:"emitLocal",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.id].concat(n))}},{key:"broadcast",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.BROADCAST].concat(n))}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.windows].concat(n))}},{key:"exitGroup",value:function(){this.broadcast("_exit",this.id)}}]),t}(Se),Pe=Ee;var Te=function(){function e(){g(this,e),this.store={}}return y(e,[{key:"has",value:function(e){return this.store.hasOwnProperty(e)}},{key:"remember",value:function(e,t){return this.has(e)||(this.store[e]={value:t()}),this.store[e].value}},{key:"forget",value:function(e){e?this.has(e)&&delete this.store[e]:this.store={}}}]),e}();e.Cache=Te,e.CrossWindow=Pe,e.CrossWindowEventProcessor=Ee,e.EventProcessor=Se,e.TreeData=X,e.URLHelper=ke,e.addClass=function(e,t){se(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)},e.addDate=ge,e.appendTo=function(e,t){t.appendChild(e)},e.arrayAt=function(e,t){return e[t>=0?t:e.length+t]},e.arrayDiff=function(e,t){for(var n=e.length,r=[];n--;)t.indexOf(e[n])<0&&r.push(e[n]);return r},e.arrayDistinct=function(e){return P().Set?O(new Set(e)):e.filter((function(e,t,n){return n.indexOf(e)===t}))},e.arrayFirst=function(e){return e[0]},e.arrayGet=function(e,t,n){return t<0&&(t+=e.length),null==n?e[t]:(n<0&&(n+=e.length),e.slice(t,n-t+1))},e.arrayLast=K,e.arrayRemove=W,e.arrayRemoveBySortedIndexes=function(e,t){for(var n=t.length-1;n>=0;n--){var r=t[n];e.splice(r,1)}},e.arraySibling=function(e,t,n){var r=e.indexOf(t);if(-1===r)throw"item is not in array";return A(n)?n.map((function(t){return e[r+t]})):e[r+n]},e.arrayWithoutEnd=function(e,t){return e.slice(0,e.length-t)},e.assignIfDifferent=function(e,t,n){e[t]!==n&&(e[t]=n)},e.attachCache=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Te,r=function(r){var o=t[r];Object.defineProperty(e,r,{get:function(){var e=this;return n.remember(r,(function(){return o.call(e)}))}})};for(var o in t)r(o)},e.backupAttr=ue,e.binarySearch=we,e.camelCase=G,e.camelToWords=H,e.cloneDate=ye,e.cloneObj=function e(t,r){switch(n(t)){case"undefined":case"boolean":case"nuber":case"string":case"function":return t;case"object":if(null===t)return t;var o;if(A(t)){o=[];var i=!0,a=!1,c=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var s=u.value;o.push(e(s,r))}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}else{o={};for(var f=0,h=Object.keys(t);f<h.length;f++){var d=h[f];r&&(!A(r)||r.includes(d))&&r(d,t[d],t)||(o[d]=e(t[d],r))}}return o;default:return t}},e.copyTextToClipboard=function(e){try{return void navigator.clipboard.writeText(e)}catch(e){}var t=document.createElement("textarea");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="2em",t.style.height="2em",t.style.padding=0,t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Copying text command was "+n)}catch(e){console.log("Oops, unable to copy")}document.body.removeChild(t)},e.createElementFromHTML=function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.childNodes.length>1?t.childNodes:t.childNodes[0]},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.immediate?te(e,t):ee(e,t)},e.debounceImmediate=te,e.debounceTrailing=ee,e.depthFirstSearch=Q,e.elementsFromPoint=function(){for(var e=document.elementsFromPoint||document.msElementsFromPoint||o,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(document,n);function o(e,t){var n=[],r=void 0;do{r!==document.elementFromPoint(e,t)?(r=document.elementFromPoint(e,t),n.push(r),r.style.pointerEvents="none"):r=!1}while(r);return n.forEach((function(e){return e.style.pointerEvents="all"})),n}},e.empty=function(e){return null==e||(null!=e.length?0===e.length:!L(e)&&(N(e)?isNaN(e):I(e)?0===Object.keys(e).length:void 0))},e.executeOnceInScopeByName=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:scope_executeOnceInScopeByName,r=arguments.length>3?arguments[3]:void 0;if(e="executeOnceInScopeByName_".concat(e),!n[e]){var o=t(),i=function(){delete n[e]};n[e]={destroy:i},r&&(n[e].value=o)}return n[e]},e.executePromiseGetters=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=new Promise((function(r,o){var i=[],a=Y(e,n),c=Promise.resolve();a.forEach((function(e){c=c.then((function(n){if(n&&i.push.apply(i,O(n)),!t)return Promise.all(e.map((function(e){return e()})));o("stopped")}))})),c.then((function(e){i.push.apply(i,O(e)),r(i)}))}));return{promise:r,destroy:function(){t=!0}}},e.executeWithCount=function(e){var t=0;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.call.apply(e,[this,t++].concat(r))}},e.findNodeList=pe,e.findNodeListReverse=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.reverse=!0,pe(e,t,n)},e.findParent=ce,e.forAll=function(e,t,n){if(n){if(A(e)||C(e)||e.hasOwnProperty("length"))for(var r=e.length-1;r>=0&&!1!==t(e[r],r);r--);else if(I(e)){var o=Object.keys(e);o.reverse();for(var i=0,a=o;i<a.length;i++){var c=a[i];if(!1===t(e[c],c))break}}else if(Number.isInteger(e))for(var u=e-1;u>=0&&!1!==t(u,u);u--);}else if(A(e)||C(e)||e.hasOwnProperty("length"))for(var l=0;l<e.length&&!1!==t(e[l],l);l++);else if(I(e))for(var s=0,f=Object.keys(e);s<f.length;s++){var h=f[s];if(!1===t(e[h],h))break}else if(Number.isInteger(e))for(var d=0;d<e&&!1!==t(d,d);d++);},e.getBorder=function(e){var t=document.body,n=ce(e,(function(e){return se(e,"work-area")})),r=re(n);return{left:r.x,right:r.x+n.offsetWidth,top:r.y+50,bottom:t.offsetHeight<P().innerHeight?P().innerHeight:t.offsetHeight}},e.getBoundingClientRect=ie,e.getCalendar=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[],o=new Date(e,t-1);e=o.getFullYear(),t=o.getMonth()+1;var i=me(o),a=i.getDay(),c=ge(clone(i),a+n,"day");if(a>n)for(var u=c.getDate(),l=c.getFullYear(),s=c.getMonth()+1,f=n;f<a;f++){var h=u+f;r.push({year:l,month:s,date:h,text:h,prevMonth:!0})}for(var d=be(o),v=d.getDate(),p=1;p<=v;p++){var y=p;r.push({year:e,month:t,date:y,text:y,currentMonth:!0})}var g=d.getDay(),m=6-n;if(g<m)for(var b=ge(clone(o),1,"month"),w=b.getFullYear(),x=b.getMonth()+1,O=g+1,k=1;O<=m;O++,k++)r.push({year:w,month:x,date:k,text:k,nextMonth:!0});return hp.splitArray(r,7)},e.getCss3Prefix=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e.noCache||null==E.css3Prefix)&&(E.css3Prefix=t()),E.css3Prefix;function t(){var e=document.createElement("div");e.style.cssText="-webkit-transition:all .1s; -moz-transition:all .1s; -o-transition:all .1s; -ms-transition:all .1s; transition:all .1s;";var t=e.style;return t.webkitTransition?"-webkit-":t.MozTransition?"-moz-":t.oTransition?"-o-":t.msTransition?"-ms-":""}},e.getElSize=fe,e.getElSizeEvenInvisible=he,e.getImageSizeByUrl=function(e){var t=document.createElement("img");return new Promise((function(n,r){de(t,"load",(function(){n({width:t.width,height:t.height})})),de(t,"error",(function(e){r(e)})),t.src=e}))},e.getLocalStorage2=function(){return E.localStorage2||(E.localStorage2=je(P().localStorage)),E.localStorage2},e.getMonthEnd=be,e.getMonthStart=me,e.getOffset=re,e.getOffsetParent=oe,e.getOuterAttachedHeight=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=j({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-top","margin-bottom"),t.border&&o.push("border-top-width","border-bottom-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getOuterAttachedWidth=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=j({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-left","margin-right"),t.border&&o.push("border-left-width","border-right-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getPosition=function(e){for(var t=oe(e),n={x:e.offsetLeft,y:e.offsetTop},r=e;(r=r.parentElement)!==t&&r;)n.x-=r.scrollLeft,n.y-=r.scrollTop;return n},e.getPositionFromOffset=function(e,t){var n=re(oe(e));return{x:t.x-n.x,y:t.y-n.y}},e.getScroll=ne,e.getSessionStorage2=function(){return E.sessionStorage2||(E.sessionStorage2=je(P().sessionStorage)),E.sessionStorage2},e.getUrlParam=function(e){var t=document.location.href,n=t.indexOf(e+"=");if(-1==n)return!1;var r=t.slice(e.length+n+1),o=r.indexOf("&");return-1!=o&&(r=r.slice(0,o)),r},e.getUserLanguage=function(){return navigator.language||navigator.userLanguage},e.getViewportPosition=ae,e.glb=P,e.groupArray=function(e,t){var n=new Map;e.forEach((function(e){var r=t(e);n.has(r)||n.set(r,[]),n.get(r).push(e)}));var r=[];return n.forEach((function(e,t){r.push([t,e])})),r},e.hasClass=se,e.insertAfter=function(e,t){t.parentElement.insertBefore(e,t.nextSibling)},e.insertBefore=function(e,t){t.parentElement.insertBefore(e,t)},e.isArray=A,e.isBool=L,e.isDescendantOf=function(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}},e.isFunction=F,e.isIsoFormat=function(e){return e.length>15&&e.length<30&&e.match(/^\d{4}-\d{2}-\d{2}T.*Z$/)},e.isNumber=N,e.isNumeric=_,e.isObject=I,e.isOffsetInEl=function(e,t,n){var r=re(n);return r.x<=e&&r.x+n.offsetWidth>=e&&r.y<=t&&r.y+n.offsetHeight>=t},e.isPromise=function(e){return"[object Promise]"===Object.prototype.toString.call(e)},e.isString=C,e.isset=T,e.iterateALL=J,e.iterateAll=q,e.joinFunctionsByNext=function(e){var t=function(){},n=!0,r=!1,o=void 0;try{for(var i,a=q(e,{reverse:!0})[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){t=c(i.value.value,t)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t;function c(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.apply(void 0,[t].concat(r))}}},e.joinFunctionsByResult=function(e){for(var t=e[0],n=1;n<e.length;n++)t=r(t,e[n]);return t;function r(e,t){return function(n){args;var r=e(n);return t(r)}}},e.joinMethods=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=!0,o=!1,i=void 0;try{for(var a,c=function(){var e=a.value,r=t;t=r?function(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return e.call.apply(e,[this,"value"===n?r.call.apply(r,[this].concat(o)):r].concat(o))}:e},u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)c()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return t},e.jqFixedSize=function(e){var t=P().jQuery;t(e).each((function(){var e=t(this);e.css({width:e.width()+"px",height:e.height()+"px"})}))},e.jqMakeCarousel=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:16,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"left",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;o.toString().match(/^\d+$/)&&(o+="px");var c=parseFloat(o),u=P().jQuery,l=u(e),s=l.find(t);l.css({position:"relative",height:l.height()+"px"});var f=s.find(n);f.css({margin:"0",marginRight:o});var h=(Math.ceil(f.width())+c)*f.length;s.css({position:"absolute",margin:"0",width:h+"px"});var d=s.height(),v=s.clone(),p=s.clone();s.css({left:0}),v.css({left:h+"px"}),p.css({left:2*h+"px"});var y=u("<div></div>");y.css({position:"absolute",width:3*h+"px",height:d+"px",left:0,top:a}),y.append(s).append(v).append(p),l.append(y);var g=0;function m(){"left"===i?g-=100:g+=100,y.animate({left:"".concat(g,"px")},r,"linear",(function(){Math.abs(g)>h&&("left"===i?g+=h:g-=h,y.css({left:g+"px"})),m()}))}m()},e.kebabCase=B,e.makeStorageHelper=je,e.mapObjectTree=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4,o=0,i=[{value:e}],a=function(){if(o>=r)throw"mapObjectTree: limit(".concat(r,") reached, object may has circular reference");o++;var e=i.shift(),a=e.value,c=e.key,u=e.parent,l=e.newParent,s=t(a,c,u,l),f=function(e,t,r){return A(e)?e=[]:I(e)&&(e={}),u?A(l)&&r?l.push(e):l[t]=e:n=e,e},h=void 0,d=void 0,v=void 0,p=void 0,y=void 0;if(s){var g=s.key,m=s.value;d=m,s.delete||!1===g?v=!0:null==g?h=f(m,c,!0):s.hasOwnProperty("value")&&(h=f(m,g)),p=s.stop,y=s.skip}else d=a,h=f(a,c);if(v)return"continue";if(y)return"continue";if(p)return"break";if(A(d))for(var b=d.length,w=0;w<b;w++)i.push({value:d[w],key:w,parent:d,newParent:h});else I(d)&&Object.keys(d).forEach((function(e){i.push({value:d[e],key:e,parent:d,newParent:h})}))};e:for(;i.length>0;){var c=a();switch(c){case"continue":continue;case"break":break e}}return n},e.mapObjects=V,e.max=M,e.min=function(e,t){return e<t?t:e},e.newArrayRemoveAt=function(e,t){t=z(t);var n={},r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){n[a.value]=!0}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}for(var u=[],l=e.length,s=0;s<l;s++)n[s]||u.push(e[s]);return u},e.numPad=function(e,t){for(var n=e.toString().length;n<t;)e="0"+e,n++;return e},e.numRand=D,e.objectExcept=function(e,t){var n={};for(var r in e)-1===t.indexOf(r)&&(n[r]=e[r]);return n},e.objectGet=$,e.objectMap=function(e,t){var n={};for(var r in e)n[r]=t(e[r],r,e);return n},e.objectMerge=function(e,t){for(var n in t)e.hasOwnProperty(n)&&I(e[n])&&I(t[n])?Object.assign(e[n],t[n]):e[n]=t[n];return e},e.objectOnly=function(e,t){var n={};for(var r in e)t.indexOf(r)>-1&&(n[r]=e[r]);return n},e.objectSet=function(e,t,n){var r=A(t)?t:t.split("."),o=K(r),i=$(e,r.slice(0,r.length-1));if(!i)throw"Path does not exist";i[o]=n},e.offDOM=ve,e.offsetToViewportPosition=function(e){var t=document.body,n=re(t),r=ae(t);return{x:e.x+r.x-n.x,y:e.y+r.y-n.y}},e.onDOM=de,e.onDOMMany=function(e,t,n){e=z(e),t=z(t);for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];var a=!0,c=!1,u=void 0;try{for(var l,s=e[Symbol.iterator]();!(a=(l=s.next()).done);a=!0){var f=l.value,h=!0,d=!1,v=void 0;try{for(var p,y=t[Symbol.iterator]();!(h=(p=y.next()).done);h=!0){var g=p.value;de.apply(void 0,[f,g,n].concat(o))}}catch(e){d=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(d)throw v}}}}catch(e){c=!0,u=e}finally{try{a||null==s.return||s.return()}finally{if(c)throw u}}var m=function(){var r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){var u=a.value,l=!0,s=!1,f=void 0;try{for(var h,d=t[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){ve(u,h.value,n)}}catch(e){s=!0,f=e}finally{try{l||null==d.return||d.return()}finally{if(s)throw f}}}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}};return m},e.onQuickKeydown=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=j({timeout:1e3},t);var n,r="",o=function(o){o.key&&1===o.key.length&&(r="".concat(r).concat(o.key),e(r),n&&(clearTimeout(n),n=null),n=setTimeout((function(){r=""}),t.timeout))};return de(document,"keydown",o),function(){ve(document,"keydown",o)}},e.openCenterWindow=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i={width:n,height:r,top:(P().screen.availHeight-30-r)/2,left:(P().screen.availWidth-30-n)/2};Object.assign(i,o),Oe(e,t,i)},e.openWindow=Oe,e.pairRows=function(e,t,n,r){r||(r=n);var o=V(t,r);return e.map((function(e){return[e,o[e[n]]]}))},e.parseISO=function(e){var t,n,r,o=e.split("T"),i=d(o,2),a=i[0],c=i[1],u=0,l=0,s=0,f=a.split("-").map((function(e){return parseInt(e)})),h=d(f,3);if(t=h[0],n=h[1],r=h[2],n-=1,c){var v=c.split("-").map((function(e){return parseFloat(e)}));u=v[0],null!=v[1]&&(l=v[1]),null!=v[2]&&(s=v[2])}var p=new Date(t,n,r,u,l,s);return p.setUTCHours(u),p},e.prependTo=function(e,t){t.insertBefore(e,t.firstChild)},e.promiseTimeout=function(e,t){return new Promise((function(n,r){var o,i;e.then((function(){clearTimeout(o),n.apply(void 0,arguments)}),(function(){i||(clearTimeout(o),r.apply(void 0,arguments))})),o=setTimeout((function(){i=!0;var e=new Error("Promise timeout!");e.name="timeout",r(e)}),t)}))},e.removeClass=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},e.removeEl=function(e){if(null!==e.parentNode)return e.parentNode.removeChild(e)},e.replaceMultiple=function(e,t){var n=new RegExp(Object.keys(e).join("|"),"g");return t.replace(n,(function(t){return e[t]}))},e.resolveArgsByType=function(e,t){var n=0;return t.map((function(t){var r,o;if(A(t)?(r=t[0],o=t[1]):(r=t,o=void 0),!F(r))if(null==r)r=function(){return!0};else{var i=r;r=function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}}var a=e[n];return r(a)?(n++,a):o}))},e.resolveValueOrGettter=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return F(e)?e.apply(void 0,O(t)):e},e.restoreAttr=le,e.retry=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;E.retry||(E.retry={});var r=e,o=a();return r[o]=0,i;function i(e,a,c){return t(e,a,c).then((function(e){return delete r[o],e})).catch((function(t){return r[o]++,r[o]>=n?(delete r[o],Promise.reject(t)):i(e,a,c)}))}function a(){var e=Math.random()+"";return r[e]?a():e}},e.setElChildByIndex=function(e,t,n){n.childComponentIndex=t;var r=e.childNodes.length;if(0===r)e.appendChild(n);else if(0===t)e.insertBefore(n,e.childNodes[0]);else{var o=we(e.childNodes,(function(e){return e.childComponentIndex-t}),0,M(t,r-1),!0),i=o.index,a=o.value;if(o.bigger)e.insertBefore(n,a);else{var c=e.childNodes[i+1];c?e.insertBefore(n,c):e.appendChild(n)}}},e.snakeCase=function(e){return B(e).replace(/-/g,"_")},e.splitArray=Y,e.store=E,e.store_executeOnceInScopeByName={},e.strRand=U,e.studlyCase=R,e.titleCase=function(e){return H(R(G(e))).join(" ").replace(/\bid\b/gi,"ID")},e.toArrayIfNot=z,e.uniqueId=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id_",n=t+U();E.uniqueId||(E.uniqueId={});var r=E.uniqueId;return document.getElementById(n)||r[n]?e(t):(r[n]=!0,n)},e.unset=function(e,t){e[t]=void 0;try{delete e[t]}catch(e){}},e.viewportPositionToOffset=function(e){var t=document.body,n=re(t),r=ae(t);return{x:e.x+n.x-r.x,y:e.y+n.y-r.y}},e.waitFor=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;F(e)&&(r=n,n=_(t)?t:100,t=e,e=null),E.waitFor||(E.waitFor={});var o=E.waitFor;return e&&T(o[e])&&(P().clearInterval(o[e]),delete o[e]),new Promise((function(i,a){var c=0;function u(n){c<=r?t()&&(l(n,e),i()):(l(n,e),a(new Error("waitFor: Limit is reached"))),c++}function l(e,t){e&&(t&&T(o[t])?(P().clearInterval(o[t]),delete o[t]):P().clearInterval(e))}var s=P().setInterval((function(){u(s)}),n);e&&(o[e]=s),u()}))},e.waitTime=xe,e.walkTreeData=Z,e.watchChange=function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=e.apply(void 0,o);n!==a&&t.apply(void 0,[a].concat(o)),n=a}},e.windowLoaded=function(){return new Promise((function(e,t){document&&"complete"===document.readyState?e():P().addEventListener("load",(function t(){e(),P().removeEventListener("load",t)}))}))},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).helperJs={})}(this,(function(e){"use strict";function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=n((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t}));var o=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var i=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t},a=n((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}));var c=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e},u=n((function(e){function t(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=t=Reflect.get:e.exports=t=function(e,t,n){var r=c(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},t(n,r,o||n)}e.exports=t})),l=n((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}));var s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)};var f=function(e){if(Array.isArray(e))return e};var h=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}};var d=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var v=function(e,t){return f(e)||h(e,t)||d()};var p=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=function(e,t,n){return t&&y(e.prototype,t),n&&y(e,n),e};var m=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},b=n((function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof s?t:s,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function s(){}function f(){}function h(){}var d={};d[o]=function(){return this};var v=Object.getPrototypeOf,p=v&&v(v(k([])));p&&p!==t&&n.call(p,o)&&(d=p);var y=h.prototype=s.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e){var t;this._invoke=function(r,o){function i(){return new Promise((function(t,i){!function t(r,o,i,a){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?Promise.resolve(s.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(s).then((function(e){l.value=e,i(l)}),(function(e){return t("throw",e,i,a)}))}a(c.arg)}(r,o,t,i)}))}return t=t?t.then(i,i):i()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return f.prototype=y.constructor=h,h.constructor=f,h[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(m.prototype),m.prototype[i]=function(){return this},e.AsyncIterator=m,e.async=function(t,n,r,o){var i=new m(c(t,n,r,o));return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=k,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var w=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var x=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var O=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var k=function(e){return w(e)||x(e)||O()};function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=b.mark(J),P={};function T(){if(P.glb)return P.glb;var e;try{e=global}catch(t){e=window}return P.glb=e,e}function A(e){return void 0!==e}function L(e){return"[object Array]"===Object.prototype.toString.call(e)}function N(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function _(e){return"[object Number]"===Object.prototype.toString.call(e)}function C(e){return isFinite(e)&&!isNaN(parseFloat(e))}function I(e){return"[object String]"===Object.prototype.toString.call(e)}function F(e){return"[object Object]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function M(e,t){return 1===arguments.length&&(t=e,e=0),Math.floor(Math.random()*(t-e+1)+e)}function R(e,t){return e<t?e:t}function B(e){return e&&e[0].toUpperCase()+e.substr(1)}function G(e){return e.replace(/ /g,"-").replace(/_/g,"-").replace(/([A-Z])/g,"-$1").replace(/--+/g,"-").replace(/^-|-$|/g,"").toLowerCase()}function H(e){for(var t=e.toString().split(/[-_]/),n=1;n<t.length;n++)t[n]=B(t[n]);return t.join("")}function U(e){return e.toString().trim().split(/(?=[A-Z])/)}function W(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=0;o<e;o++)n+=r[M(r.length-1)];return t+n}function K(e,t){for(var n,r=0;(n=e.indexOf(t))>-1;)e.splice(n,1),r++;return r}function z(e){return e[e.length-1]}function Y(e){return L(e)?e:[e]}function q(e,t){var n=[];if(D(t))for(var r=t,o=1,i=0;i<e.length;){var a=i+r(o);n.push(e.slice(i,a)),i=a,o++}else for(var c=0;c<e.length;){var u=c+t;n.push(e.slice(c,u)),c=u}return n}function J(e){var t,n,r,o,i,a,c,u,l,s,f,h,d,v,p=arguments;return b.wrap((function(y){for(;;)switch(y.prev=y.next){case 0:if((t=p.length>1&&void 0!==p[1]?p[1]:{}).reverse){y.next=30;break}if(null==e.length){y.next=14;break}n=0;case 4:if(!(n<e.length)){y.next=12;break}if(r={value:e[n],index:n},t.exclude&&t.exclude(r)){y.next=9;break}return y.next=9,r;case 9:n++,y.next=4;break;case 12:y.next=28;break;case 14:if(!F(e)){y.next=27;break}o=0,i=Object.keys(e);case 16:if(!(o<i.length)){y.next=25;break}if(a=i[o],c={value:e[a],key:a},t.exclude&&t.exclude(c)){y.next=22;break}return y.next=22,c;case 22:o++,y.next=16;break;case 25:y.next=28;break;case 27:throw"Unsupported type";case 28:y.next=58;break;case 30:if(null==e.length){y.next=42;break}u=e.length-1;case 32:if(!(u>=0)){y.next=40;break}if(l={value:e[u],index:u},t.exclude&&t.exclude(l)){y.next=37;break}return y.next=37,l;case 37:u--,y.next=32;break;case 40:y.next=58;break;case 42:if(!F(e)){y.next=57;break}(s=Object.keys(e)).reverse(),f=0,h=s;case 46:if(!(f<h.length)){y.next=55;break}if(d=h[f],v={value:e[d],key:d},t.exclude&&t.exclude(v)){y.next=52;break}return y.next=52,v;case 52:f++,y.next=46;break;case 55:y.next=58;break;case 57:throw"Unsupported type";case 58:case"end":return y.stop()}}),E)}var $=J;function V(e,t,n){var r=L(t)?t:t.split("."),o=e;try{var i=!0,a=!1,c=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){o=o[u.value]}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}catch(e){if(n)throw"Path does not exist"}return o}function Q(e,t){for(var n={},r=e.length,o=0;o<r;o++){var i=e[o];n[D(t)?t(i,o):i[t]]=i}return n}function Z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children",r=arguments.length>3?arguments[3]:void 0,o=L(e)?e:[e],i=function e(){m(this,e)},a=function e(o,a,c){r&&(o=o.slice()).reverse();for(var u=o.length,l=0;l<u;l++){var s=o[l],f=r?u-l-1:l,h=c?[].concat(k(c),[f]):[],d=t(s,f,a,h);if(!1===d)throw new i;if("skip children"!==d){if("skip siblings"===d)break;null!=s[n]&&e(s[n],s,h)}}};try{a(o,null,L(e)?[]:null)}catch(e){if(!(e instanceof i))throw e}}var X=Z,ee=function(){function e(t){m(this,e),this.childrenKey="children",this.data=t}return g(e,[{key:"iteratePath",value:b.mark((function e(t){var n,r,o,i,a,c,u,l,s,f,h,d,v,p,y,g,m,w,x,O,j,E,P=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=P.length>1&&void 0!==P[1]?P[1]:{},r=this.childrenKey,o=this.rootChildren,n.reverse){e.next=38;break}i=[],a=o,c=!0,u=!1,l=void 0,e.prev=8,s=t[Symbol.iterator]();case 10:if(c=(f=s.next()).done){e.next=22;break}return h=f.value,d=[].concat(k(i),[h]),v=a[h],e.next=16,{path:d,node:v};case 16:i=d,a=v[r];case 19:c=!0,e.next=10;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(8),u=!0,l=e.t0;case 28:e.prev=28,e.prev=29,c||null==s.return||s.return();case 31:if(e.prev=31,!u){e.next=34;break}throw l;case 34:return e.finish(31);case 35:return e.finish(28);case 36:e.next=66;break;case 38:(p=k(this.iteratePath(t,S({},n,{reverse:!1})))).reverse(),y=!0,g=!1,m=void 0,e.prev=43,w=p[Symbol.iterator]();case 45:if(y=(x=w.next()).done){e.next=52;break}return O=x.value,j=O.path,E=O.node,e.next=49,{path:j,node:E};case 49:y=!0,e.next=45;break;case 52:e.next=58;break;case 54:e.prev=54,e.t1=e.catch(43),g=!0,m=e.t1;case 58:e.prev=58,e.prev=59,y||null==w.return||w.return();case 61:if(e.prev=61,!g){e.next=64;break}throw m;case 64:return e.finish(61);case 65:return e.finish(58);case 66:case"end":return e.stop()}}),e,this,[[8,24,28,36],[29,,31,35],[43,54,58,66],[59,,61,65]])}))},{key:"getAllNodes",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.iteratePath(e)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value.node;t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t}},{key:"getNode",value:function(e){return z(this.getAllNodes(e))}},{key:"getNodeIndexAndParent",value:function(e){var t=e.slice(),n=t.pop();return{parent:this.getNode(t),index:n,parentPath:t}}},{key:"getNodeParent",value:function(e){return this.getNodeIndexAndParent(e).parent}},{key:"setPathNode",value:function(e,t){if(null==e||0===e.length)this.data=t;else{var n=this.childrenKey,r=this.rootChildren,o=this.getNodeIndexAndParent(e),i=o.parent,a=o.index;(1===e.length?r:i[n])[a]=t}}},{key:"removeNode",value:function(e){var t=this.childrenKey,n=this.rootChildren,r=this.getNodeIndexAndParent(e),o=r.parent,i=r.index,a=1===e.length?n:o[t],c=a[i];return a.splice(i,1),c}},{key:"walk",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.childrenKey,r=this.data;return X(r,e,n,t.reverse)}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.childrenKey,r=new e;return this.walk((function(e,o,i,a){var c=Object.assign({},e);c[n]&&(c[n]=[]),t.afterNodeCreated&&t.afterNodeCreated(c,{oldNode:e,index:o,parent:i,path:a}),r.setPathNode(a,c)})),r.data}},{key:"rootChildren",get:function(){var e=this.childrenKey;this.data||(this.data=[]);var t=this.data;return L(t)?t:t[e]}}]),e}();function te(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[],a=[],c=function(){for(var c=this,u=arguments.length,l=new Array(u),s=0;s<u;s++)l[s]=arguments[s];return new Promise((function(u,s){i.push(u),a.push(s),r=l,n||(n=!0,t=setTimeout((function(){var o=e.call.apply(e,[c].concat(k(r)));t=null,n=!1,i.forEach((function(e){return e(o)})),i=[],a=[]}),o))}))};return c.stop=function(){t&&(clearTimeout(t),t=null),n=!1,i=[],a.forEach((function(e){return e()})),a=[]},c}function ne(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=function(){var i=this;return new Promise((function(a,c){n?a(r):(n=!0,a(r=e.call.apply(e,[i].concat(k(lastArgs)))),t=setTimeout((function(){t=null,n=!1,r=null}),o))}))};return i.stop=function(){t&&(clearTimeout(t),t=null),n=!1},i}function re(){if("undefined"!=typeof pageYOffset)return{top:pageYOffset,left:pageXOffset};var e=document.body,t=document.documentElement;return{top:(t=t.clientHeight?t:e).scrollTop,left:t.scrollLeft}}function oe(e){var t=ae(e),n=re();return{x:t.left+n.left,y:t.top+n.top}}function ie(e){var t=e.offsetParent;return(!t||t===document.body&&"static"===getComputedStyle(document.body).position)&&(t=document.body.parentElement),t}function ae(e){var t=e.getBoundingClientRect(),n=t.top-document.documentElement.clientTop,r=t.bottom,o=t.left-document.documentElement.clientLeft,i=t.right;return{top:n,right:i,bottom:r,left:o,width:t.width||i-o,height:t.height||r-n,x:o,y:n}}var ce=ae;function ue(e,t,n){for(var r=n&&n.withSelf?e:e.parentElement;r;){var o=t(r);if("break"===o)return;if(o)return r;r=r.parentElement}}function le(e,t){e["original_".concat(t)]=e.getAttribute(t)}function se(e,t){var n="original_".concat(t);e.setAttribute(t,e[n])}function fe(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function he(e){le(e,"style"),e.style.display="block";var t=ae(e),n={width:t.width,height:t.height};return se(e,"style"),n}var de=he;function ve(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(o)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(o))}function pe(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(o)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(o))}function ye(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=J(e,{reverse:n.reverse}),o=!0,i=!1,a=void 0;try{for(var c,u=r[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var l=c.value,s=l.value,f=l.index;if(t(s,f))return s}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}function ge(e){return new Date(e.getTime())}function me(e,t,n){["year","month","day"].includes(n)||(n+="s");var r="get"+(n=B(n));return e["set"+n](e[r]()+t),e}function be(e){var t=ge(e);return t.setDate(1),t}function we(e){var t=ge(e);return me(t,1,"month"),t.setDate(0),t}function xe(e,t,n,r,o){var i,a,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1e3;null==n&&(n=0,r=e.length-1);for(var u,l=0;n>=0&&n<=r;){if(l>=c)throw Error("binarySearch: loop times is over ".concat(c,", you can increase the limit."));if((u=t(a=e[i=Math.floor((r-n)/2+n)],l))>0)r=i-1;else{if(!(u<0))return{index:i,value:a,count:l+1,hit:!0};n=i+1}l++}return o?{index:i,value:a,count:l+1,hit:!1,bigger:u>0}:null}function Oe(e,t){return new Promise((function(n,r){setTimeout((function(){t&&t(),n()}),e)}))}function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};T().open(e,t,Object.keys(n).map((function(e){return"".concat(e,"=").concat(n[e])})).join(","))}var je=function(){function e(t){var n=this;m(this,e),this.baseUrl="",this.search={};var r=decodeURI(t).split("?");this.baseUrl=r[0],r[1]&&r[1].split("&").forEach((function(e){var t=e.split("=");n.search[t[0]]=null==t[1]?"":decodeURIComponent(t[1])}))}return g(e,[{key:"getHref",value:function(){var e=this,t=[this.baseUrl],n=Object.keys(this.search).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e.search[t]))})).join("&");return n&&t.push(n),t.join("?")}}]),e}();function Se(e){return{storage:e,set:function(e,t,n){null==t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify({value:t,expired_at:n?(new Date).getTime()+60*n*1e3:null}))},get:function(e){var t=this.storage.getItem(e);if(t){if(!(t=JSON.parse(t)).expired_at||t.expired_at>(new Date).getTime())return t.value;this.storage.removeItem(e)}return null},clear:function(){this.storage.clear()}}}var Ee=function(){function e(){m(this,e),this.eventStore=[]}return g(e,[{key:"on",value:function(e,t){this.eventStore.push({name:e,handler:t})}},{key:"once",value:function(e,t){var n=this,r=function(){n.off(e,o)},o=function(){t.apply(void 0,arguments),r()};return this.on(e,o),r}},{key:"onceTimeout",value:function(e,t,n){var r,o=this;return{off:function(){r&&r()},promise:new Promise((function(i,a){r=o.once(e,(function(){t.apply(void 0,arguments),i()})),Oe(n).then((function(){r(),a()}))}))}}},{key:"off",value:function(e,t){for(var n=[],r=this.eventStore.length,o=0;o<r;o++){var i=this.eventStore[o];i.name===e&&i.handler===t&&n.unshift(o)}for(var a=0,c=n;a<c.length;a++){var u=c[a];this.eventStore.splice(u,1)}}},{key:"emit",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.eventStore[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value;c.name===e&&t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}for(var u=arguments.length,l=new Array(u>1?u-1:0),s=1;s<u;s++)l[s-1]=arguments[s];for(var f=0,h=t;f<h.length;f++){var d=h[f];d.handler.apply(d,l)}}}]),e}(),Pe=function(e){function t(e){var n;return m(this,t),(n=i(this,a(t).call(this))).storageName="_crossWindow",n.windows=[],n.timeout=200,n.BROADCAST="__BROADCAST__",e&&Object.assign(o(n),e),ve(window,"storage",(function(e){if(e.key===n.storageName){var t,r=JSON.parse(e.newValue);if(!r.targets||r.targets.includes(n.id))(t=n).emitLocal.apply(t,[r.name].concat(k(r.args)))}})),n.id=W(),n.windows=[n.id],n.ready=new Promise((function(e,t){n.onceTimeout("_windows_updated",(function(e){var t=e.windows;n.windows=t}),n.timeout).promise.then((function(){e()}),(function(){e()})),n.broadcast("_join",n.id)})),n.ready.then((function(){n.on("_join",(function(e){n.windows.push(e),n.isMain()&&n.broadcast("_windows_updated",{windows:n.windows,type:"join",id:e})})),n.on("_windows_updated",(function(e){var t=e.windows;n.windows=t})),n.on("_exit",(function(e){var t=n.windows[0];K(n.windows,e),n.isMain()&&(n.emit("_windows_updated",{windows:n.windows,type:"exit",id:e}),t!=n.id&&n.emit("_main_updated",{windows:n.windows,old:t,new:n.id}))})),ve(window,"beforeunload",(function(){n.exitGroup()}))})),n}return s(t,e),g(t,[{key:"isMain",value:function(){return this.id===this.windows[0]}},{key:"emitTo",value:function(e,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];var c;n===this.BROADCAST?n=null:(n&&!L(n)&&(n=[n]),n.includes(this.id)&&(c=u(a(t.prototype),"emit",this)).call.apply(c,[this,e].concat(o)));T().localStorage.setItem(this.storageName,JSON.stringify({name:e,targets:n,args:o,random:Math.random()}))}},{key:"emitLocal",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.id].concat(n))}},{key:"broadcast",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.BROADCAST].concat(n))}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.windows].concat(n))}},{key:"exitGroup",value:function(){this.broadcast("_exit",this.id)}}]),t}(Ee),Te=Pe;var Ae=function(){function e(){m(this,e),this.store={}}return g(e,[{key:"has",value:function(e){return this.store.hasOwnProperty(e)}},{key:"remember",value:function(e,t){return this.has(e)||(this.store[e]={value:t()}),this.store[e].value}},{key:"forget",value:function(e){e?this.has(e)&&delete this.store[e]:this.store={}}}]),e}();e.Cache=Ae,e.CrossWindow=Te,e.CrossWindowEventProcessor=Pe,e.EventProcessor=Ee,e.TreeData=ee,e.URLHelper=je,e.addClass=function(e,t){fe(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)},e.addDate=me,e.appendTo=function(e,t){t.appendChild(e)},e.arrayAt=function(e,t){return e[t>=0?t:e.length+t]},e.arrayDiff=function(e,t){for(var n=e.length,r=[];n--;)t.indexOf(e[n])<0&&r.push(e[n]);return r},e.arrayDistinct=function(e){return T().Set?k(new Set(e)):e.filter((function(e,t,n){return n.indexOf(e)===t}))},e.arrayFirst=function(e){return e[0]},e.arrayGet=function(e,t,n){return t<0&&(t+=e.length),null==n?e[t]:(n<0&&(n+=e.length),e.slice(t,n-t+1))},e.arrayLast=z,e.arrayRemove=K,e.arrayRemoveBySortedIndexes=function(e,t){for(var n=t.length-1;n>=0;n--){var r=t[n];e.splice(r,1)}},e.arraySibling=function(e,t,n){var r=e.indexOf(t);if(-1===r)throw"item is not in array";return L(n)?n.map((function(t){return e[r+t]})):e[r+n]},e.arrayWithoutEnd=function(e,t){return e.slice(0,e.length-t)},e.assignIfDifferent=function(e,t,n){e[t]!==n&&(e[t]=n)},e.attachCache=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ae,r=function(r){var o=t[r];Object.defineProperty(e,r,{get:function(){var e=this;return n.remember(r,(function(){return o.call(e)}))}})};for(var o in t)r(o)},e.backupAttr=le,e.binarySearch=xe,e.camelCase=H,e.camelToWords=U,e.cloneDate=ge,e.cloneObj=function e(t,n){switch(r(t)){case"undefined":case"boolean":case"nuber":case"string":case"function":return t;case"object":if(null===t)return t;var o;if(L(t)){o=[];var i=!0,a=!1,c=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var s=u.value;o.push(e(s,n))}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}else{o={};for(var f=0,h=Object.keys(t);f<h.length;f++){var d=h[f];n&&(!L(n)||n.includes(d))&&n(d,t[d],t)||(o[d]=e(t[d],n))}}return o;default:return t}},e.copyTextToClipboard=function(e){try{return void navigator.clipboard.writeText(e)}catch(e){}var t=document.createElement("textarea");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="2em",t.style.height="2em",t.style.padding=0,t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Copying text command was "+n)}catch(e){console.log("Oops, unable to copy")}document.body.removeChild(t)},e.createElementFromHTML=function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.childNodes.length>1?t.childNodes:t.childNodes[0]},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.immediate?ne(e,t):te(e,t)},e.debounceImmediate=ne,e.debounceTrailing=te,e.depthFirstSearch=Z,e.elementsFromPoint=function(){for(var e=document.elementsFromPoint||document.msElementsFromPoint||o,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(document,n);function o(e,t){var n=[],r=void 0;do{r!==document.elementFromPoint(e,t)?(r=document.elementFromPoint(e,t),n.push(r),r.style.pointerEvents="none"):r=!1}while(r);return n.forEach((function(e){return e.style.pointerEvents="all"})),n}},e.empty=function(e){return null==e||(null!=e.length?0===e.length:!N(e)&&(_(e)?isNaN(e):F(e)?0===Object.keys(e).length:void 0))},e.executeOnceInScopeByName=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:scope_executeOnceInScopeByName,r=arguments.length>3?arguments[3]:void 0;if(e="executeOnceInScopeByName_".concat(e),!n[e]){var o=t(),i=function(){delete n[e]};n[e]={destroy:i},r&&(n[e].value=o)}return n[e]},e.executePromiseGetters=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=new Promise((function(r,o){var i=[],a=q(e,n),c=Promise.resolve();a.forEach((function(e){c=c.then((function(n){if(n&&i.push.apply(i,k(n)),!t)return Promise.all(e.map((function(e){return e()})));o("stopped")}))})),c.then((function(e){i.push.apply(i,k(e)),r(i)}))}));return{promise:r,destroy:function(){t=!0}}},e.executeWithCount=function(e){var t=0;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.call.apply(e,[this,t++].concat(r))}},e.findNodeList=ye,e.findNodeListReverse=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.reverse=!0,ye(e,t,n)},e.findParent=ue,e.forAll=function(e,t,n){if(n){if(L(e)||I(e)||e.hasOwnProperty("length"))for(var r=e.length-1;r>=0&&!1!==t(e[r],r);r--);else if(F(e)){var o=Object.keys(e);o.reverse();for(var i=0,a=o;i<a.length;i++){var c=a[i];if(!1===t(e[c],c))break}}else if(Number.isInteger(e))for(var u=e-1;u>=0&&!1!==t(u,u);u--);}else if(L(e)||I(e)||e.hasOwnProperty("length"))for(var l=0;l<e.length&&!1!==t(e[l],l);l++);else if(F(e))for(var s=0,f=Object.keys(e);s<f.length;s++){var h=f[s];if(!1===t(e[h],h))break}else if(Number.isInteger(e))for(var d=0;d<e&&!1!==t(d,d);d++);},e.getBorder=function(e){var t=document.body,n=ue(e,(function(e){return fe(e,"work-area")})),r=oe(n);return{left:r.x,right:r.x+n.offsetWidth,top:r.y+50,bottom:t.offsetHeight<T().innerHeight?T().innerHeight:t.offsetHeight}},e.getBoundingClientRect=ae,e.getCalendar=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[],o=new Date(e,t-1);e=o.getFullYear(),t=o.getMonth()+1;var i=be(o),a=i.getDay(),c=me(clone(i),a+n,"day");if(a>n)for(var u=c.getDate(),l=c.getFullYear(),s=c.getMonth()+1,f=n;f<a;f++){var h=u+f;r.push({year:l,month:s,date:h,text:h,prevMonth:!0})}for(var d=we(o),v=d.getDate(),p=1;p<=v;p++){var y=p;r.push({year:e,month:t,date:y,text:y,currentMonth:!0})}var g=d.getDay(),m=6-n;if(g<m)for(var b=me(clone(o),1,"month"),w=b.getFullYear(),x=b.getMonth()+1,O=g+1,k=1;O<=m;O++,k++)r.push({year:w,month:x,date:k,text:k,nextMonth:!0});return hp.splitArray(r,7)},e.getCss3Prefix=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e.noCache||null==P.css3Prefix)&&(P.css3Prefix=t()),P.css3Prefix;function t(){var e=document.createElement("div");e.style.cssText="-webkit-transition:all .1s; -moz-transition:all .1s; -o-transition:all .1s; -ms-transition:all .1s; transition:all .1s;";var t=e.style;return t.webkitTransition?"-webkit-":t.MozTransition?"-moz-":t.oTransition?"-o-":t.msTransition?"-ms-":""}},e.getElSize=he,e.getElSizeEvenInvisible=de,e.getImageSizeByUrl=function(e){var t=document.createElement("img");return new Promise((function(n,r){ve(t,"load",(function(){n({width:t.width,height:t.height})})),ve(t,"error",(function(e){r(e)})),t.src=e}))},e.getLocalStorage2=function(){return P.localStorage2||(P.localStorage2=Se(T().localStorage)),P.localStorage2},e.getMonthEnd=we,e.getMonthStart=be,e.getOffset=oe,e.getOffsetParent=ie,e.getOuterAttachedHeight=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=S({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-top","margin-bottom"),t.border&&o.push("border-top-width","border-bottom-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getOuterAttachedWidth=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=S({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-left","margin-right"),t.border&&o.push("border-left-width","border-right-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getPosition=function(e){for(var t=ie(e),n={x:e.offsetLeft,y:e.offsetTop},r=e;(r=r.parentElement)!==t&&r;)n.x-=r.scrollLeft,n.y-=r.scrollTop;return n},e.getPositionFromOffset=function(e,t){var n=oe(ie(e));return{x:t.x-n.x,y:t.y-n.y}},e.getScroll=re,e.getSessionStorage2=function(){return P.sessionStorage2||(P.sessionStorage2=Se(T().sessionStorage)),P.sessionStorage2},e.getUrlParam=function(e){var t=document.location.href,n=t.indexOf(e+"=");if(-1==n)return!1;var r=t.slice(e.length+n+1),o=r.indexOf("&");return-1!=o&&(r=r.slice(0,o)),r},e.getUserLanguage=function(){return navigator.language||navigator.userLanguage},e.getViewportPosition=ce,e.glb=T,e.groupArray=function(e,t){var n=new Map;e.forEach((function(e){var r=t(e);n.has(r)||n.set(r,[]),n.get(r).push(e)}));var r=[];return n.forEach((function(e,t){r.push([t,e])})),r},e.hasClass=fe,e.insertAfter=function(e,t){t.parentElement.insertBefore(e,t.nextSibling)},e.insertBefore=function(e,t){t.parentElement.insertBefore(e,t)},e.isArray=L,e.isBool=N,e.isDescendantOf=function(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}},e.isDocumentExisted=function(){try{t=document}catch(e){return!1}return!0},e.isFunction=D,e.isIsoFormat=function(e){return e.length>15&&e.length<30&&e.match(/^\d{4}-\d{2}-\d{2}T.*Z$/)},e.isNumber=_,e.isNumeric=C,e.isObject=F,e.isOffsetInEl=function(e,t,n){var r=oe(n);return r.x<=e&&r.x+n.offsetWidth>=e&&r.y<=t&&r.y+n.offsetHeight>=t},e.isPromise=function(e){return"[object Promise]"===Object.prototype.toString.call(e)},e.isString=I,e.isset=A,e.iterateALL=$,e.iterateAll=J,e.joinFunctionsByNext=function(e){var t=function(){},n=!0,r=!1,o=void 0;try{for(var i,a=J(e,{reverse:!0})[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){t=c(i.value.value,t)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t;function c(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.apply(void 0,[t].concat(r))}}},e.joinFunctionsByResult=function(e){for(var t=e[0],n=1;n<e.length;n++)t=r(t,e[n]);return t;function r(e,t){return function(n){args;var r=e(n);return t(r)}}},e.joinMethods=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=!0,o=!1,i=void 0;try{for(var a,c=function(){var e=a.value,r=t;t=r?function(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return e.call.apply(e,[this,"value"===n?r.call.apply(r,[this].concat(o)):r].concat(o))}:e},u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)c()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return t},e.jqFixedSize=function(e){var t=T().jQuery;t(e).each((function(){var e=t(this);e.css({width:e.width()+"px",height:e.height()+"px"})}))},e.jqMakeCarousel=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:16,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"left",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;o.toString().match(/^\d+$/)&&(o+="px");var c=parseFloat(o),u=T().jQuery,l=u(e),s=l.find(t);l.css({position:"relative",height:l.height()+"px"});var f=s.find(n);f.css({margin:"0",marginRight:o});var h=(Math.ceil(f.width())+c)*f.length;s.css({position:"absolute",margin:"0",width:h+"px"});var d=s.height(),v=s.clone(),p=s.clone();s.css({left:0}),v.css({left:h+"px"}),p.css({left:2*h+"px"});var y=u("<div></div>");y.css({position:"absolute",width:3*h+"px",height:d+"px",left:0,top:a}),y.append(s).append(v).append(p),l.append(y);var g=0;function m(){"left"===i?g-=100:g+=100,y.animate({left:"".concat(g,"px")},r,"linear",(function(){Math.abs(g)>h&&("left"===i?g+=h:g-=h,y.css({left:g+"px"})),m()}))}m()},e.kebabCase=G,e.makeStorageHelper=Se,e.mapObjectTree=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4,o=0,i=[{value:e}],a=function(){if(o>=r)throw"mapObjectTree: limit(".concat(r,") reached, object may has circular reference");o++;var e=i.shift(),a=e.value,c=e.key,u=e.parent,l=e.newParent,s=t(a,c,u,l),f=function(e,t,r){return L(e)?e=[]:F(e)&&(e={}),u?L(l)&&r?l.push(e):l[t]=e:n=e,e},h=void 0,d=void 0,v=void 0,p=void 0,y=void 0;if(s){var g=s.key,m=s.value;d=m,s.delete||!1===g?v=!0:null==g?h=f(m,c,!0):s.hasOwnProperty("value")&&(h=f(m,g)),p=s.stop,y=s.skip}else d=a,h=f(a,c);if(v)return"continue";if(y)return"continue";if(p)return"break";if(L(d))for(var b=d.length,w=0;w<b;w++)i.push({value:d[w],key:w,parent:d,newParent:h});else F(d)&&Object.keys(d).forEach((function(e){i.push({value:d[e],key:e,parent:d,newParent:h})}))};e:for(;i.length>0;){var c=a();switch(c){case"continue":continue;case"break":break e}}return n},e.mapObjects=Q,e.max=R,e.min=function(e,t){return e<t?t:e},e.newArrayRemoveAt=function(e,t){t=Y(t);var n={},r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){n[a.value]=!0}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}for(var u=[],l=e.length,s=0;s<l;s++)n[s]||u.push(e[s]);return u},e.numPad=function(e,t){for(var n=e.toString().length;n<t;)e="0"+e,n++;return e},e.numRand=M,e.objectExcept=function(e,t){var n={};for(var r in e)-1===t.indexOf(r)&&(n[r]=e[r]);return n},e.objectGet=V,e.objectMap=function(e,t){var n={};for(var r in e)n[r]=t(e[r],r,e);return n},e.objectMerge=function(e,t){for(var n in t)e.hasOwnProperty(n)&&F(e[n])&&F(t[n])?Object.assign(e[n],t[n]):e[n]=t[n];return e},e.objectOnly=function(e,t){var n={};for(var r in e)t.indexOf(r)>-1&&(n[r]=e[r]);return n},e.objectSet=function(e,t,n){var r=L(t)?t:t.split("."),o=z(r),i=V(e,r.slice(0,r.length-1));if(!i)throw"Path does not exist";i[o]=n},e.offDOM=pe,e.offsetToViewportPosition=function(e){var t=document.body,n=oe(t),r=ce(t);return{x:e.x+r.x-n.x,y:e.y+r.y-n.y}},e.onDOM=ve,e.onDOMMany=function(e,t,n){e=Y(e),t=Y(t);for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];var a=!0,c=!1,u=void 0;try{for(var l,s=e[Symbol.iterator]();!(a=(l=s.next()).done);a=!0){var f=l.value,h=!0,d=!1,v=void 0;try{for(var p,y=t[Symbol.iterator]();!(h=(p=y.next()).done);h=!0){var g=p.value;ve.apply(void 0,[f,g,n].concat(o))}}catch(e){d=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(d)throw v}}}}catch(e){c=!0,u=e}finally{try{a||null==s.return||s.return()}finally{if(c)throw u}}var m=function(){var r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){var u=a.value,l=!0,s=!1,f=void 0;try{for(var h,d=t[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){pe(u,h.value,n)}}catch(e){s=!0,f=e}finally{try{l||null==d.return||d.return()}finally{if(s)throw f}}}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}};return m},e.onQuickKeydown=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=S({timeout:1e3},t);var n,r="",o=function(o){o.key&&1===o.key.length&&(r="".concat(r).concat(o.key),e(r),n&&(clearTimeout(n),n=null),n=setTimeout((function(){r=""}),t.timeout))};return ve(document,"keydown",o),function(){pe(document,"keydown",o)}},e.openCenterWindow=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i={width:n,height:r,top:(T().screen.availHeight-30-r)/2,left:(T().screen.availWidth-30-n)/2};Object.assign(i,o),ke(e,t,i)},e.openWindow=ke,e.pairRows=function(e,t,n,r){r||(r=n);var o=Q(t,r);return e.map((function(e){return[e,o[e[n]]]}))},e.parseISO=function(e){var t,n,r,o=e.split("T"),i=v(o,2),a=i[0],c=i[1],u=0,l=0,s=0,f=a.split("-").map((function(e){return parseInt(e)})),h=v(f,3);if(t=h[0],n=h[1],r=h[2],n-=1,c){var d=c.split("-").map((function(e){return parseFloat(e)}));u=d[0],null!=d[1]&&(l=d[1]),null!=d[2]&&(s=d[2])}var p=new Date(t,n,r,u,l,s);return p.setUTCHours(u),p},e.prependTo=function(e,t){t.insertBefore(e,t.firstChild)},e.promiseTimeout=function(e,t){return new Promise((function(n,r){var o,i;e.then((function(){clearTimeout(o),n.apply(void 0,arguments)}),(function(){i||(clearTimeout(o),r.apply(void 0,arguments))})),o=setTimeout((function(){i=!0;var e=new Error("Promise timeout!");e.name="timeout",r(e)}),t)}))},e.removeClass=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},e.removeEl=function(e){if(null!==e.parentNode)return e.parentNode.removeChild(e)},e.replaceMultiple=function(e,t){var n=new RegExp(Object.keys(e).join("|"),"g");return t.replace(n,(function(t){return e[t]}))},e.resolveArgsByType=function(e,t){var n=0;return t.map((function(t){var r,o;if(L(t)?(r=t[0],o=t[1]):(r=t,o=void 0),!D(r))if(null==r)r=function(){return!0};else{var i=r;r=function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}}var a=e[n];return r(a)?(n++,a):o}))},e.resolveValueOrGettter=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return D(e)?e.apply(void 0,k(t)):e},e.restoreAttr=se,e.retry=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;P.retry||(P.retry={});var r=e,o=a();return r[o]=0,i;function i(e,a,c){return t(e,a,c).then((function(e){return delete r[o],e})).catch((function(t){return r[o]++,r[o]>=n?(delete r[o],Promise.reject(t)):i(e,a,c)}))}function a(){var e=Math.random()+"";return r[e]?a():e}},e.setElChildByIndex=function(e,t,n){n.childComponentIndex=t;var r=e.childNodes.length;if(0===r)e.appendChild(n);else if(0===t)e.insertBefore(n,e.childNodes[0]);else{var o=xe(e.childNodes,(function(e){return e.childComponentIndex-t}),0,R(t,r-1),!0),i=o.index,a=o.value;if(o.bigger)e.insertBefore(n,a);else{var c=e.childNodes[i+1];c?e.insertBefore(n,c):e.appendChild(n)}}},e.snakeCase=function(e){return G(e).replace(/-/g,"_")},e.splitArray=q,e.store=P,e.store_executeOnceInScopeByName={},e.strRand=W,e.studlyCase=B,e.titleCase=function(e){return U(B(H(e))).join(" ").replace(/\bid\b/gi,"ID")},e.toArrayIfNot=Y,e.uniqueId=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id_",n=t+W();P.uniqueId||(P.uniqueId={});var r=P.uniqueId;return document.getElementById(n)||r[n]?e(t):(r[n]=!0,n)},e.unset=function(e,t){e[t]=void 0;try{delete e[t]}catch(e){}},e.viewportPositionToOffset=function(e){var t=document.body,n=oe(t),r=ce(t);return{x:e.x+n.x-r.x,y:e.y+n.y-r.y}},e.waitFor=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;D(e)&&(r=n,n=C(t)?t:100,t=e,e=null),P.waitFor||(P.waitFor={});var o=P.waitFor;return e&&A(o[e])&&(T().clearInterval(o[e]),delete o[e]),new Promise((function(i,a){var c=0;function u(n){c<=r?t()&&(l(n,e),i()):(l(n,e),a(new Error("waitFor: Limit is reached"))),c++}function l(e,t){e&&(t&&A(o[t])?(T().clearInterval(o[t]),delete o[t]):T().clearInterval(e))}var s=T().setInterval((function(){u(s)}),n);e&&(o[e]=s),u()}))},e.waitTime=Oe,e.walkTreeData=X,e.watchChange=function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=e.apply(void 0,o);n!==a&&t.apply(void 0,[a].concat(o)),n=a}},e.windowLoaded=function(){return new Promise((function(e,t){document&&"complete"===document.readyState?e():T().addEventListener("load",(function t(){e(),T().removeEventListener("load",t)}))}))},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "helper-js",
"version": "1.4.28",
"version": "1.4.29",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/helper-js.cjs.js",

@@ -16,2 +16,3 @@ # helper-js

###### glb() // get global cross environment
###### isDocumentExisted() // is document existed. detect is the environment browser
###### isset

@@ -18,0 +19,0 @@ typeof v !== 'undefined'

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc