hlp 3.2.2 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -478,6 +478,7 @@ hlp.scrollTo( document.querySelector('.foo'), 1000 ).then(() => { console.log('d
478
478
  hlp.scrollTo( 0, 1000, document.querySelector('.bar') ).then(() => { console.log('done'); }); // scoll inside .bar
479
479
  hlp.scrollTo( document.querySelector('.foo'), 1000, null, -200 ).then(() => { console.log('done'); }); // apply offset
480
480
  hlp.scrollTo( document.querySelector('.foo'), 1000, null, document.querySelector('.header') ).then(() => { console.log('done'); }); // apply offset (height of dom element only if it exists and is fixed!)
481
+ hlp.scrollTo( document.querySelector('.foo'), 1000, null, [document.querySelector('.header'), -200] ).then(() => { console.log('done'); }); // you can also provide multiple values (of different type)
481
482
  hlp.scrollTo( document.querySelector('.foo'), 1000, null, -200, true ).then(() => { console.log('done'); }); // only scroll up (never down)
482
483
 
483
484
  // get top/left scroll position
@@ -1465,19 +1465,24 @@ var hlp = /*#__PURE__*/function () {
1465
1465
  }
1466
1466
  }
1467
1467
 
1468
- if (!hlp.isNumeric(offset)) {
1469
- if (offset !== null) {
1470
- if (window.getComputedStyle(offset).position === 'fixed') {
1471
- offset = -1 * offset.offsetHeight;
1472
- } else {
1473
- offset = 0;
1474
- }
1475
- } else {
1476
- offset = 0;
1477
- }
1468
+ var offset_calc = 0;
1469
+
1470
+ if (!Array.isArray(offset)) {
1471
+ offset = [offset];
1478
1472
  }
1479
1473
 
1480
- to += offset;
1474
+ offset.forEach(function (offset__value) {
1475
+ if (hlp.isNumeric(offset__value)) {
1476
+ offset_calc += offset__value;
1477
+ } else {
1478
+ if (offset__value !== null) {
1479
+ if (window.getComputedStyle(offset__value).position === 'fixed') {
1480
+ offset_calc += -1 * offset__value.offsetHeight;
1481
+ }
1482
+ }
1483
+ }
1484
+ });
1485
+ to += offset_calc;
1481
1486
 
1482
1487
  var start = element.scrollTop,
1483
1488
  change = to - start,
package/hlp.js CHANGED
@@ -1 +1 @@
1
- !function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!u&&l)return l(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=r(e("@babel/runtime/helpers/defineProperty")),u=r(e("@babel/runtime/helpers/toConsumableArray")),l=r(e("@babel/runtime/helpers/slicedToArray")),s=r(e("@babel/runtime/helpers/typeof")),c=r(e("@babel/runtime/helpers/classCallCheck")),f=r(e("@babel/runtime/helpers/createClass"));function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=function(){function e(){(0,c.default)(this,e)}var n;return(0,f.default)(e,null,[{key:"x",value:function(e){if("function"==typeof e)try{return e=e(),this.x(e)}catch(e){return!1}return!(null===e||!1===e||"string"==typeof e&&""==e.trim()||"object"===(0,s.default)(e)&&0===Object.keys(e).length&&e.constructor===Object||void 0===e||Array.isArray(e)&&0===e.length||Array.isArray(e)&&1===e.length&&""===e[0])}},{key:"nx",value:function(e){return!this.x(e)}},{key:"true",value:function(t){if("function"==typeof t)try{return t=t(),this.true(t)}catch(e){return!1}return void 0!==t&&(null!==t&&(!1!==t&&((!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!==(0,s.default)(t)||0!==Object.keys(t).length||t.constructor!==Object)&&(0!==t&&("0"!==t&&(""!==t&&(" "!==t&&("null"!==t&&"false"!==t))))))))))}},{key:"false",value:function(t){if("function"==typeof t)try{return t=t(),this.false(t)}catch(e){return!1}return void 0!==t&&(null!==t&&(!1===t||(!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!==(0,s.default)(t)||0!==Object.keys(t).length||t.constructor!==Object)&&(0===t||("0"===t||""!==t&&(" "!==t&&("null"!==t&&"false"===t))))))))}},{key:"v",value:function(){if(this.nx(arguments))return"";for(var e=0;e<arguments.length;e++)if(this.x(arguments[e]))return arguments[e];return""}},{key:"loop",value:function(e,t){if(this.nx(e))return null;Array.isArray(e)?e.forEach((function(e,n){t(e,n)})):"object"===(0,s.default)(e)&&Object.entries(e).forEach((function(e){var n=(0,l.default)(e,2),r=n[0],o=n[1];t(o,r)}))}},{key:"map",value:function(e,t,n){return Object.keys(e).reduce((function(r,o){return r[o]=t.call(n||null,o,e[o]),r}),{})}},{key:"first",value:function(e){if(Array.isArray(e)){var t=null;return e.forEach((function(e,n){null===t&&(t=e)})),t}if("object"===(0,s.default)(e)){t=null;return Object.entries(e).forEach((function(e){var n=(0,l.default)(e,2),r=(n[0],n[1]);null===t&&(t=r)})),t}return null}},{key:"last",value:function(e){if(Array.isArray(e)){var t=null;return e.forEach((function(e,n){t=e})),t}if("object"===(0,s.default)(e)){var n=null;return Object.entries(e).forEach((function(e){var t=(0,l.default)(e,2),r=(t[0],t[1]);n=r})),n}return null}},{key:"rand",value:function(e){return Array.isArray(e)?e[Math.floor(Math.random()*e.length)]:"object"===(0,s.default)(e)?(e=Object.values(e))[Math.floor(Math.random()*e.length)]:null}},{key:"random_string",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===t&&(t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");for(var n=t.length,r="",o=0;o<e;o++)r+=t[0+~~(Math.random()*(n-1-0+1))];return r}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(Math.round(e+"e"+t)+"e-"+t)}},{key:"isInteger",value:function(e){return!isNaN(e)&&parseInt(Number(e))==e&&!isNaN(parseInt(e,10))}},{key:"random_int",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:99999;if(!this.isInteger(e)||!this.isInteger(t))return!1;if(e>t){var n=[t,e];e=n[0],t=n[1]}return~~(Math.random()*(t-e+1))+e}},{key:"capitalize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===e||""===e?e:e.charAt(0).toUpperCase()+e.slice(1)}},{key:"cookieExists",value:function(e){return void 0!==document.cookie&&null!==this.cookieGet(e)}},{key:"cookieGet",value:function(e){var t=document.cookie.match(new RegExp(e+"=([^;]+)"));return t?decodeURIComponent(t[1]):null}},{key:"cookieSet",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o="";window.location.protocol.indexOf("https")>-1&&(o="; SameSite=None; Secure"),document.cookie=e+"="+encodeURIComponent(t)+"; expires="+new Date((new Date).getTime()+24*n*60*60*1e3).toUTCString()+"; path=/"+o+"; domain="+(!0===r?this.urlHostTopLevel():"")}},{key:"cookieDelete",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";window.location.protocol.indexOf("https")>-1&&(n="; SameSite=None; Secure"),document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"+n+"; domain="+(!0===t?this.urlHostTopLevel():"")}},{key:"localStorageSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n*=864e5;var r=new Date,o={value:t,expiry:r.getTime()+n};localStorage.setItem(e,JSON.stringify(o))}},{key:"localStorageGet",value:function(e){var t=localStorage.getItem(e);if(!t)return null;var n=JSON.parse(t);return(new Date).getTime()>n.expiry?(localStorage.removeItem(e),null):n.value}},{key:"localStorageDelete",value:function(e){localStorage.removeItem(e)}},{key:"localStorageExists",value:function(e){return null!==this.localStorageGet(e)}},{key:"getParam",value:function(e){var t=window.location.search;if(this.nx(t))return null;for(var n=t.substring(1).split("&"),r=0;r<n.length;r++){var o=n[r].split("=");if(o[0]==e&&this.x(o[1]))return o[1]}return null}},{key:"getDevice",value:function(){return this.isPhone()?"phone":this.isTablet()?"tablet":"desktop"}},{key:"isPhone",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},{key:"isTablet",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},{key:"isDesktop",value:function(){return!this.isPhone()&&!this.isTablet()}},{key:"isMobile",value:function(){return!!(window.innerWidth<750||this.isPhone())}},{key:"isTouch",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints||!1}},{key:"isMac",value:function(){return"mac"===e.getOs()}},{key:"isLinux",value:function(){return"linux"===e.getOs()}},{key:"isWindows",value:function(){return"windows"===e.getOs()}},{key:"getOs",value:function(){var e=window.navigator.userAgent,t=window.navigator.platform,n="unknown";return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)||-1!==["iPhone","iPad","iPod"].indexOf(t)?n="mac":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="windows":(/Android/.test(e)||/Linux/.test(t))&&(n="linux"),n}},{key:"getBrowser",value:function(){var e=!!!document.documentMode&&!!window.StyleMedia;return-1!=navigator.userAgent.indexOf("Opera")||-1!=navigator.userAgent.indexOf("OPR")?"opera":-1==navigator.userAgent.indexOf("Chrome")||e?-1==navigator.userAgent.indexOf("Safari")||e?-1!=navigator.userAgent.indexOf("Firefox")?"firefox":-1!=navigator.userAgent.indexOf("MSIE")||1==!!document.documentMode?"ie":e?"edge":"unknown":"safari":"chrome"}},{key:"isObject",value:function(e){return!!e&&e.constructor===Object}},{key:"isArray",value:function(e){return!!e&&e.constructor===Array}},{key:"isString",value:function(e){return"string"==typeof e||e instanceof String}},{key:"isDate",value:function(e){if(this.nx(e))return!1;if("[object Date]"===Object.prototype.toString.call(e))return!0;if(!this.isString(e))return!1;if(3!==e.split("-").length)return!1;var t=parseInt(e.split("-")[2]),n=parseInt(e.split("-")[1]),r=parseInt(e.split("-")[0]),o=new Date;return o.setFullYear(r,n-1,t),o.getFullYear()==r&&o.getMonth()+1==n&&o.getDate()==t}},{key:"formatDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!1===t||!0===t||null===t||""===t?t=new Date:"object"!==(0,s.default)(t)&&(t=new Date(t.replace(/-/g,"/")));for(var n="",r=t.getMonth(),o=r+1,i=t.getDay(),a=t.getDate(),u=t.getFullYear(),l=t.getHours(),c=t.getMinutes(),f=t.getSeconds(),d=0,h=e.length;d<h;d++)switch(e[d]){case"j":n+=a;break;case"d":n+=a<10?"0"+a:a;break;case"l":var p=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");n+=p[i];break;case"w":n+=i;break;case"D":n+=(p=Array("Sun","Mon","Tue","Wed","Thr","Fri","Sat"))[i];break;case"m":n+=o<10?"0"+o:o;break;case"n":n+=o;break;case"F":var v=Array("January","February","March","April","May","June","July","August","September","October","November","December");n+=v[r];break;case"M":n+=(v=Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"))[r];break;case"Y":n+=u;break;case"y":n+=u.toString().slice(-2);break;case"H":n+=l<10?"0"+l:l;break;case"g":var g=0===l?12:l;n+=g>12?g-12:g;break;case"h":n+=(g=(g=0===l?12:l)>12?g-12:g)<10?"0"+g:g;break;case"a":n+=l<12?"am":"pm";break;case"i":n+=c<10?"0"+c:c;break;case"s":n+=f<10?"0"+f:f;break;case"c":n+=t.toISOString();break;default:n+=e[d]}return n}},{key:"deepCopy",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(Object(t)!==t)return t;if(n.has(t))return n.get(t);var r=t instanceof Date?new Date(t):t instanceof RegExp?new RegExp(t.source,t.flags):t.constructor?new t.constructor:Object.create(null);return n.set(t,r),t instanceof Map&&Array.from(t,(function(t){var o=(0,l.default)(t,2),i=o[0],a=o[1];return r.set(i,e.deepCopy(a,n))})),Object.assign.apply(Object,[r].concat((0,u.default)(Object.keys(t).map((function(r){return(0,a.default)({},r,e.deepCopy(t[r],n))})))))}},{key:"jsonStringToObject",value:function(e){if(this.nx(e)||!this.isString(e))return null;try{return JSON.parse(e)}catch(e){return null}}},{key:"isJsonString",value:function(e){if(this.nx(e)||!this.isString(e))return!1;try{JSON.parse(e);return!0}catch(e){return!1}}},{key:"jsonObjectToString",value:function(e){try{return JSON.stringify(e)}catch(e){return null}}},{key:"uuid",value:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},{key:"guid",value:function(){return this.uuid()}},{key:"replaceAll",value:function(e,t,n){return e.split(t).join(n)}},{key:"replaceLast",value:function(e,t,n){var r=e.lastIndexOf(t);return e=e.slice(0,r)+e.slice(r).replace(t,n)}},{key:"replaceFirst",value:function(e,t,n){return e.replace(t,n)}},{key:"findAllPositions",value:function(e,t){var n,r=e.length,o=0,i=[];if(0==r)return[];for(;(n=t.indexOf(e,o))>-1;)i.push(n),o=n+r;return i}},{key:"findAllPositionsCaseInsensitive",value:function(e,t){var n,r=e.length,o=0,i=[];if(0==r)return[];for(;(n=this.indexOfCaseInsensitive(e,t,o))>-1;)i.push(n),o=n+r;return i}},{key:"countAllOccurences",value:function(e,t){var n=new RegExp(e,"g");return(t.match(n)||[]).length}},{key:"countAllOccurencesCaseInsensitive",value:function(e,t){var n=new RegExp(e,"gi");return(t.match(n)||[]).length}},{key:"indexOfCaseInsensitive",value:function(e,t,n){return t.toLowerCase().indexOf(e.toLowerCase(),n)}},{key:"highlight",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500;if(this.nx(e)||this.nx(t))return e;if(!0===n){var o="...",i=this.findAllPositionsCaseInsensitive(t,e),a=e.split(" "),u=0;for(a.forEach((function(e,n){var l=!0;i.forEach((function(e){u>=e-r&&u<=e+t.length+r-1&&(l=!1)})),!0===l&&(a[n]=o),u+=e.length+1})),e=a.join(" ");e.indexOf(o+" "+o)>-1;)e=this.replaceAll(e,o+" "+o,o);e=e.trim()}for(var l=this.findAllPositionsCaseInsensitive(t,e),s='<strong class="highlight">',c="</strong>",f=0;f<l.length;f++){e=e.substring(0,l[f])+s+e.substring(l[f],l[f]+t.length)+c+e.substring(l[f]+t.length);for(var d=f+1;d<l.length;d++)l[d]=l[d]+s.length+c.length}return e}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("GET",e,t)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("POST",e,t)}},{key:"call",value:function(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null===o&&(o={}),"data"in o||(o.data={}),"headers"in o||(o.headers=null),"throttle"in o||(o.throttle=0),"allow_errors"in o||(o.allow_errors=!0),new Promise((function(i,a){setTimeout((function(){0!==n.indexOf("http")&&(n=e.baseUrl()+"/"+n);var u=new XMLHttpRequest;u.open(t,n,!0),"POST"===t&&(!("data"in o)||null===o.data||"object"!==(0,s.default)(o.data)||o.data instanceof FormData||(u.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.data=JSON.stringify(o.data)),u.setRequestHeader("X-Requested-With","XMLHttpRequest")),r.x(o.headers)&&Object.entries(o.headers).forEach((function(e){var t=(0,l.default)(e,2),n=t[0],r=t[1];u.setRequestHeader(n,r)})),u.onload=function(){(4!=u.readyState||!0!==o.allow_errors&&200!=u.status&&304!=u.status)&&(r.isJsonString(u.responseText)?a(r.jsonStringToObject(u.responseText)):a(u.responseText)),r.isJsonString(u.responseText)?i(r.jsonStringToObject(u.responseText)):i(u.responseText)},u.onerror=function(){a([u.readyState,u.status,u.statusText])},"GET"===t&&u.send(null),"POST"===t&&u.send(o.data)}),o.throttle)}))}},{key:"onResizeHorizontal",value:function(e){var t,n,r=window.innerWidth;window.addEventListener("resize",(function(){(t=window.innerWidth)!=r&&(r=t,n&&clearTimeout(n),n=window.setTimeout((function(){e()}),50))})),e()}},{key:"onResizeVertical",value:function(e){var t,n,r=window.innerHeight;window.addEventListener("resize",(function(){(t=window.innerHeight)!=r&&(r=t,n&&clearTimeout(n),n=window.setTimeout((function(){e()}),50))})),e()}},{key:"uniqueArray",value:function(e){for(var t={},n=[],r=0;r<e.length;r++)e[r]in t||(n.push(e[r]),t[e[r]]=!0);return n}},{key:"powerset",value:function(e){return Array.isArray(e)?e.reduce((function(e,t){return e.concat(e.map((function(e){return[].concat((0,u.default)(e),[t])})))}),[[]]):e}},{key:"charToInt",value:function(e){var t,n,r="ABCDEFGHIJKLMNOPQRSTUVWXYZ",o=0;for(t=0,n=(e=e.toUpperCase()).length-1;t<e.length;t+=1,n-=1)o+=Math.pow(r.length,n)*(r.indexOf(e[t])+1);return o}},{key:"intToChar",value:function(e){for(var t="",n=1,r=26;(e-=n)>=0;n=r,r*=26)t=String.fromCharCode(parseInt(e%r/n)+65)+t;return t}},{key:"slugify",value:function(e){return e.toString().toLowerCase().trim().split("ä").join("ae").split("ö").join("oe").split("ü").join("ue").split("ß").join("ss").replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}},{key:"incChar",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(e)+t)}},{key:"decChar",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(e)-t)}},{key:"range",value:function(e,t){var n=[],r=(0,s.default)(e),o=(0,s.default)(t),i=1;if("undefined"==r||"undefined"==o||r!=o)return null;if(t<e&&(i=-i),"number"==r)for(;i>0?t>=e:t<=e;)n.push(e),e+=i;else{if("string"!=r)return null;if(1!=e.length||1!=t.length)return null;for(e=e.charCodeAt(0),t=t.charCodeAt(0);i>0?t>=e:t<=e;)n.push(String.fromCharCode(e)),e+=i}return n}},{key:"dateToWeek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===e&&(e=new Date),(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)),n=Math.ceil(((e-t)/864e5+1)/7);return n}},{key:"weekToDate",value:function(e,t){var n=new Date(t,0,1+7*(e-1)),r=n.getDay(),o=n;return r<=4?o.setDate(n.getDate()-n.getDay()+1):o.setDate(n.getDate()+8-n.getDay()),o.setUTCHours(0,0,0,0),o}},{key:"addDays",value:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n}},{key:"objectsAreEqual",value:function(e,t){var n=this;if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function)return e===t;if(e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length)return!1;if(e instanceof Date)return!1;if(!(e instanceof Object))return!1;if(!(t instanceof Object))return!1;var r=Object.keys(e);return Object.keys(t).every((function(e){return-1!==r.indexOf(e)}))&&r.every((function(r){return n.objectsAreEqual(e[r],t[r])}))}},{key:"containsObject",value:function(e,t){var n;for(n in t)if(t.hasOwnProperty(n)&&this.objectsAreEqual(t[n],e))return!0;return!1}},{key:"fadeOut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return t<=25&&(t=25),new Promise((function(n){e.style.opacity=1,function r(){(e.style.opacity-=25/t)<0?(e.style.display="none",n()):requestAnimationFrame(r)}()}))}},{key:"fadeIn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return t<=25&&(t=25),new Promise((function(n){e.style.opacity=0,e.style.display="block",function r(){var o=parseFloat(e.style.opacity);(o+=25/t)>1?n():(e.style.opacity=o,requestAnimationFrame(r))}()}))}},{key:"scrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"scrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"closestScrollable",value:function(e){var t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,n=t&&!(t.includes("hidden")||t.includes("visible"));return e?n&&e.scrollHeight>=e.clientHeight?e:this.closestScrollable(e.parentNode)||document.scrollingElement||document.body:null}},{key:"offsetTop",value:function(e){return e.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop}},{key:"offsetLeft",value:function(e){return e.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft}},{key:"offsetRight",value:function(e){return e.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft+e.offsetWidth}},{key:"offsetBottom",value:function(e){return e.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop+e.offsetHeight}},{key:"offsetTopWithMargin",value:function(e){return this.offsetTop(e)-parseInt(getComputedStyle(e).marginTop)}},{key:"offsetLeftWithMargin",value:function(e){return this.offsetLeft(e)-parseInt(getComputedStyle(e).marginLeft)}},{key:"offsetRightWithMargin",value:function(e){return this.offsetRight(e)+parseInt(getComputedStyle(e).marginRight)}},{key:"offsetBottomWithMargin",value:function(e){return this.offsetBottom(e)+parseInt(getComputedStyle(e).marginBottom)}},{key:"documentHeight",value:function(){return Math.max(document.body.offsetHeight,document.body.scrollHeight,document.documentElement.clientHeight,document.documentElement.offsetHeight,document.documentElement.scrollHeight)}},{key:"documentWidth",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"windowWidth",value:function(){return window.innerWidth}},{key:"windowHeight",value:function(){return window.innerHeight}},{key:"windowWidthWithoutScrollbar",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"windowHeightWithoutScrollbar",value:function(){return document.documentElement.clientHeight||document.body.clientHeight}},{key:"outerWidthWithMargin",value:function(e){return e.offsetWidth+parseInt(getComputedStyle(e).marginLeft)+parseInt(getComputedStyle(e).marginRight)}},{key:"outerHeightWithMargin",value:function(e){return e.offsetHeight+parseInt(getComputedStyle(e).marginTop)+parseInt(getComputedStyle(e).marginBottom)}},{key:"scrollTo",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(u){null===o&&(o=document.scrollingElement||document.documentElement),e.isNumeric(t)||(t=o===(document.scrollingElement||documentElement)?n.offsetTopWithMargin(t):t.getBoundingClientRect().top-parseInt(getComputedStyle(t).marginTop)-(o.getBoundingClientRect().top-o.scrollTop-parseInt(getComputedStyle(o).marginTop))),e.isNumeric(i)||(i=null!==i&&"fixed"===window.getComputedStyle(i).position?-1*i.offsetHeight:0),t+=i;var l=o.scrollTop,s=t-l,c=+new Date;!0===a&&s>0?u():function e(){var n,i,a,f=+new Date-c;o.scrollTop=parseInt((n=f,i=l,a=s,(n/=r/2)<1?-a/2*(Math.sqrt(1-n*n)-1)+i:(n-=2,a/2*(Math.sqrt(1-n*n)+1)+i))),f<r?requestAnimationFrame(e):(o.scrollTop=t,u())}()}))}},{key:"loadJs",value:function(t){e.isArray(t)||(t=[t]);var n=[];return e.loop(t,(function(e,t){n.push(new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.onload=function(){t()},document.head.appendChild(r)})))})),Promise.all(n)}},{key:"loadJsSequentially",value:(n=(0,i.default)(o.default.mark((function t(n){var r,i,a;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.isArray(n)||(n=[n]),r=d(n),t.prev=2,r.s();case 4:if((i=r.n()).done){t.next=10;break}return a=i.value,t.next=8,e.loadJs(a);case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),r.e(t.t0);case 15:return t.prev=15,r.f(),t.finish(15);case 18:return t.abrupt("return");case 19:case"end":return t.stop()}}),t,null,[[2,12,15,18]])}))),function(e){return n.apply(this,arguments)})},{key:"triggerAfterAllImagesLoaded",value:function(e,t,n){var r=this;window.addEventListener("load",(function(o){null!==document.querySelector(e+" "+t)&&document.querySelectorAll(e+" "+t).forEach((function(o){r.triggerAfterAllImagesLoadedBindLoadEvent(o,e,t,n)}))})),document.addEventListener("DOMContentLoaded",(function(){null!==document.querySelector(e)&&new MutationObserver((function(o){o.forEach((function(o){"childList"===o.type&&o.addedNodes.length>0?o.addedNodes.forEach((function(o){r.triggerAfterAllImagesLoadedHandleEl(o,e,t,n)})):"attributes"===o.type&&"src"===o.attributeName&&o.target.classList.contains(t.replace(".",""))&&o.oldValue!==o.target.getAttribute("src")&&r.triggerAfterAllImagesLoadedHandleEl(o.target,e,t,n)}))})).observe(document.querySelector(e),{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!0,characterDataOldValue:!1})}))}},{key:"triggerAfterAllImagesLoadedHandleEl",value:function(e,t,n,r){var o=this;e.nodeType===Node.ELEMENT_NODE&&(e.classList.remove("loaded-img"),e.closest(t).classList.remove("loaded-all"),e.classList.contains("binded-trigger")||(e.classList.add("binded-trigger"),e.addEventListener("load",(function(){o.triggerAfterAllImagesLoadedBindLoadEvent(e,t,n,r)}))))}},{key:"triggerAfterAllImagesLoadedBindLoadEvent",value:function(e,t,n,r){e.classList.add("loaded-img"),e.closest(t).querySelectorAll(".loaded-img").length===e.closest(t).querySelectorAll(n).length&&(e.closest(t).classList.add("loaded-all"),r())}},{key:"isVisible",value:function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}},{key:"isVisibleInViewport",value:function(e){if(!this.isVisible(e))return!1;var t=e.getBoundingClientRect();return!(t.bottom<0||t.right<0||t.left>window.innerWidth||t.top>window.innerHeight)}},{key:"textareaAutoHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";this.textareaSetHeights(t),this.onResizeHorizontal((function(){e.textareaSetHeights(t)})),[].forEach.call(document.querySelectorAll(t),(function(t){t.addEventListener("keyup",(function(t){e.textareaSetHeight(t.target)}))}))}},{key:"textareaSetHeights",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";[].forEach.call(document.querySelectorAll(t),(function(t){e.isVisible(t)&&e.textareaSetHeight(t)}))}},{key:"textareaSetHeight",value:function(e){e.style.height="5px",e.style.height=e.scrollHeight+"px"}},{key:"real100vh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(null===e){var n=function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))};n(),window.addEventListener("resize",(function(){n()}))}else{var r=function(){console.log(e),null!==document.querySelector(e)&&document.querySelectorAll(e).forEach((function(e){e.style.height=window.innerHeight*(t/100)+"px"}))};r(),window.addEventListener("resize",(function(){r()}))}}},{key:"iOsRemoveHover",value:function(){"safari"===e.getBrowser()&&"desktop"!==e.getDevice()&&e.on("touchend","a",(function(e,t){t.click()}))}},{key:"isNumeric",value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},{key:"animate",value:function(t,n,r,o,i){var a=this;return new Promise((function(u){i<=50&&(i=50);var l=[];n.split(";").forEach((function(e){l.push(e.split(":")[0].trim())}));var s=[];l.forEach((function(e){s.push(e+" "+Math.round(i/1e3*10)/10+"s "+o)})),s="transition: "+s.join(", ")+" !important;";var c=null;NodeList.prototype.isPrototypeOf(t)?c=Array.from(t):null===t?(console.log("cannot animate element from "+n+" to "+r+" because it does not exist"),u()):c=[t];var f=c.length;c.forEach((function(t,o){var c=e.random_string(10,"abcdefghijklmnopqrstuvwxyz");t.classList.add(c),window.requestAnimationFrame((function(){var o=[],d=t.getAttribute("style");null!==d&&d.split(";").forEach((function(e){l.includes(e.split(":")[0].trim())||o.push(e)})),o=o.join(";")+n+";",t.setAttribute("style",o),window.requestAnimationFrame((function(){var o=document.createElement("style");o.innerHTML="."+c+" { "+s+" }",document.head.appendChild(o),window.requestAnimationFrame((function(){if(t.setAttribute("style",t.getAttribute("style").replace(n+";","")+r+";"),a.isVisible(t)){var l=!1;e.addEventListenerOnce(t,"transitionend",(function(e){if(l=!0,e.target!==e.currentTarget)return!1;document.head.removeChild(o),t.classList.remove(c),--f<=0&&window.requestAnimationFrame((function(){u()}))})),setTimeout((function(){!1===l&&(document.head.removeChild(o),t.classList.remove(c),--f<=0&&u())}),1.5*i)}else document.head.removeChild(o),t.classList.remove(c),--f<=0&&u()}))}))}))}))}))}},{key:"addEventListenerOnce",value:function(e,t,n,r,o){e.addEventListener(t,(function i(a){var u=n.apply(this,arguments,r);!1!==u&&e.removeEventListener(t,i,o)}))}},{key:"htmlDecode",value:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}},{key:"htmlEncode",value:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/`/g,"&#96;")}},{key:"nl2br",value:function(e){if(null==e)return"";return(e+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1<br/>")}},{key:"br2nl",value:function(e){if(null==e)return"";return e.replace(/<\s*\/?br\s*[\/]?>/gi,"\n")}},{key:"closest",value:function(e,t){if(!document.documentElement.contains(e))return null;do{if(this.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}},{key:"matches",value:function(e,t){for(var n=e,r=(n.parentNode||n.document).querySelectorAll(t),o=-1;r[++o]&&r[o]!=n;);return!!r[o]}},{key:"wrapTextNodes",value:function(e,t){null!==e&&Array.from(e.childNodes).filter((function(e){return 3===e.nodeType&&e.textContent.trim().length>1})).forEach((function(e){var n=document.createElement(t);e.after(n),n.appendChild(e)}))}},{key:"html2dom",value:function(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,void 0===t.content?this.html2domLegacy(e):t.content.firstChild}},{key:"html2domLegacy",value:function(e){var t,n,r,o={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]},i=document,a=i.createDocumentFragment();if(/<|&#?\w+;/.test(e)){for(t=a.appendChild(i.createElement("div")),n=o[(/<([\w:]+)/.exec(e)||["",""])[1].toLowerCase()]||o._default,t.innerHTML=n[1]+e.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1></$2>")+n[2],r=n[0];r--;)t=t.lastChild;for(a.removeChild(a.firstChild);t.firstChild;)a.appendChild(t.firstChild)}else a.appendChild(i.createTextNode(e));return a.querySelector("*")}},{key:"prevAll",value:function(e,t){for(var n=[];e=e.previousElementSibling;)(void 0===t||this.matches(e,t))&&n.push(e);return n}},{key:"nextAll",value:function(e,t){for(var n=[];e=e.nextElementSibling;)(void 0===t||this.matches(e,t))&&n.push(e);return n}},{key:"prevUntil",value:function(e,t){for(var n=[];(e=e.previousElementSibling)&&!this.matches(e,t);)n.push(e);return n}},{key:"nextUntil",value:function(e,t){for(var n=[];(e=e.nextElementSibling)&&!this.matches(e,t);)n.push(e);return n}},{key:"siblings",value:function(e,t){var n=[],r=e;for(e=e.parentNode.firstChild;e=e.nextElementSibling;)(void 0===t||this.matches(e,t))&&r!==e&&n.push(e);return n}},{key:"parents",value:function(e,t){for(var n=[],r=void 0!==t;null!==(e=e.parentElement);)e.nodeType===Node.ELEMENT_NODE&&(r&&!this.matches(e,t)||n.push(e));return n}},{key:"css",value:function(e){var t=document.styleSheets,n={};for(var r in t)try{var o=t[r].rules||t[r].cssRules;for(var i in o)this.matches(e,o[i].selectorText)&&(n=Object.assign(n,this.css2json(o[i].style),this.css2json(e.getAttribute("style"))))}catch(e){}return n}},{key:"css2json",value:function(e){var t={};if(!e)return t;if(e instanceof CSSStyleDeclaration)for(var n in e)e[n].toLowerCase&&void 0!==e[e[n]]&&(t[e[n].toLowerCase()]=e[e[n]]);else if("string"==typeof e)for(var r in e=e.split(";"))if(e[r].indexOf(":")>-1){var o=e[r].split(":");t[o[0].toLowerCase().trim()]=o[1].trim()}return t}},{key:"compareDates",value:function(e,t){return"string"==typeof e&&(e=e.split(" ").join("T")),"string"==typeof t&&(t=t.split(" ").join("T")),e=new Date(e),t=new Date(t),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()?0:e<t?-1:1}},{key:"spaceship",value:function(e,t){return null===e||null===t||(0,s.default)(e)!=(0,s.default)(t)?null:"string"==typeof e?e.localeCompare(t):e>t?1:e<t?-1:0}},{key:"focus",value:function(t){e.unfocus();var n=null;if(null!==(n="string"==typeof t||t instanceof String?document.querySelector(t):t)){var r=document.createElement("div");r.classList.add("hlp-focus-mask"),r.style.position="fixed",r.style.top=0,r.style.bottom=0,r.style.left=0,r.style.right=0,r.style.backgroundColor="rgba(0,0,0,0.8)",r.style.zIndex=2147483646,n.before(r),n.setAttribute("data-focussed",1),n.setAttribute("data-focussed-orig-z-index",n.style.zIndex),n.setAttribute("data-focussed-orig-position",n.style.position),n.setAttribute("data-focussed-orig-background-color",n.style.backgroundColor),n.setAttribute("data-focussed-orig-box-shadow",n.style.boxShadow),n.style.zIndex=2147483647,n.style.position="relative",n.style.backgroundColor="#ffffff",n.style.boxShadow="0px 0px 0px 20px #fff"}}},{key:"unfocus",value:function(){null!==document.querySelector(".hlp-focus-mask")&&document.querySelectorAll(".hlp-focus-mask").forEach((function(t){e.remove(t)})),null!==document.querySelector("[data-focussed]")&&document.querySelectorAll("[data-focussed]").forEach((function(e){e.style.zIndex=e.getAttribute("data-focussed-orig-z-index"),e.style.position=e.getAttribute("data-focussed-orig-position"),e.style.backgroundColor=e.getAttribute("data-focussed-orig-background-color"),e.style.boxShadow=e.getAttribute("data-focussed-orig-box-shadow"),e.removeAttribute("data-focussed"),e.removeAttribute("data-focussed-orig-z-index"),e.removeAttribute("data-focussed-orig-position"),e.removeAttribute("data-focussed-orig-background-color"),e.removeAttribute("data-focussed-orig-box-shadow")}))}},{key:"remove",value:function(e){null!==e&&e.parentNode.removeChild(e)}},{key:"on",value:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===o?(o=r,r=document):r=document.querySelector(r),r.addEventListener(t,(function(t){var r=e.closest(t.target,n);r&&o(t,r)}),!1)}},{key:"url",value:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname}},{key:"urlWithHash",value:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.hash}},{key:"fullUrl",value:function(){return window.location.href}},{key:"urlWithArgs",value:function(){return window.location.href.split("#")[0]}},{key:"baseUrl",value:function(){return window.location.protocol+"//"+window.location.host}},{key:"urlProtocol",value:function(){return window.location.protocol+"//"}},{key:"urlHost",value:function(){return window.location.host}},{key:"urlHostTopLevel",value:function(){var e=window.location.host;for(e=e.split(".");e.length>2;)e.shift();return e=e.join(".")}},{key:"urlPath",value:function(){return window.location.pathname}},{key:"urlHash",value:function(){return window.location.hash}},{key:"urlArgs",value:function(){return window.location.search}},{key:"urlOfScript",value:function(){if(document.currentScript)return document.currentScript.src;var e=document.getElementsByTagName("script");return e[e.length-1].src}},{key:"pathOfScript",value:function(){var e=this.urlOfScript();return e.substring(0,e.lastIndexOf("/"))}},{key:"waitUntil",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise((function(r,o){var i=setInterval((function(){null!==document.querySelector(e)&&(null===t||null===n&&void 0!==window.getComputedStyle(document.querySelector(e))[t]&&""!=window.getComputedStyle(document.querySelector(e))[t]||null!==n&&window.getComputedStyle(document.querySelector(e))[t]===n)&&(window.clearInterval(i),r())}),30)}))}},{key:"waitUntilVar",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null,o=null;return null===t?(r=e,o=window):(r=t,o=e),new Promise((function(e,t){var i=setInterval((function(){void 0!==o[r]&&null!==o[r]&&(null!==n&&o[r]!==n||(window.clearInterval(i),e()))}),30)}))}},{key:"ready",value:function(){return new Promise((function(e){if("loading"!==document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){return e()}))}))}},{key:"load",value:function(){return new Promise((function(e){if("complete"===document.readyState)return e();window.addEventListener("load",(function(){return e()}))}))}},{key:"runForEl",value:function(t,n){e.ready().then((function(){var r=e.pushId();null!==document.querySelector(t)&&document.querySelectorAll(t).forEach((function(e){void 0===e.runForEl&&(e.runForEl=[]),e.runForEl.includes(r)||(e.runForEl.push(r),n(e))})),void 0===window.runForEl_queue&&(window.runForEl_queue=[]),void 0===window.runForEl_observer&&(window.runForEl_observer=new MutationObserver((function(e){e.forEach((function(e){if(e.addedNodes)for(var t=function(t){var n=e.addedNodes[t];n.nodeType===Node.ELEMENT_NODE&&window.runForEl_queue.forEach((function(e){n.matches(e.selector)&&(void 0===n.runForEl&&(n.runForEl=[]),n.runForEl.includes(e.id)||(n.runForEl.push(e.id),e.callback(n))),null!==n.querySelector(e.selector)&&n.querySelectorAll(e.selector).forEach((function(t){void 0===t.runForEl&&(t.runForEl=[]),t.runForEl.includes(e.id)||(t.runForEl.push(e.id),e.callback(t))}))}))},n=0;n<e.addedNodes.length;n++)t(n)}))})).observe(document.body,{attributes:!1,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})),window.runForEl_queue.push({id:r,selector:t,callback:n})}))}},{key:"fmath",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,o={"*":t*n,"-":t-n,"+":t+n,"/":t/n}[e];return Math.round(10*o*Math.pow(10,r))/(10*Math.pow(10,r))}},{key:"trim",value:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),r=0,o=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),r=e.length,o=0;o<r;o++)if(-1===n.indexOf(e.charAt(o))){e=e.substring(o);break}for(o=(r=e.length)-1;o>=0;o--)if(-1===n.indexOf(e.charAt(o))){e=e.substring(0,o+1);break}return-1===n.indexOf(e.charAt(0))?e:""}},{key:"ltrim",value:function(e,t){t=t?(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1"):" \\s ";var n=new RegExp("^["+t+"]+","g");return(e+"").replace(n,"")}},{key:"rtrim",value:function(e,t){t=t?(t+"").replace(/([[\]().?/*{}+$^:])/g,"\\$1"):" \\s ";var n=new RegExp("["+t+"]+$","g");return(e+"").replace(n,"")}},{key:"pushId",value:function(){var n=null;void 0!==window&&(void 0===window.pushIdDataGlobal&&(window.pushIdDataGlobal={}),n=window.pushIdDataGlobal),void 0!==t&&(void 0===t.pushIdDataGlobal&&(t.pushIdDataGlobal={}),n=t.pushIdDataGlobal),e.objectsAreEqual(n,{})&&(n.lastPushTime=0,n.lastRandChars=[],n.PUSH_CHARS="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz");var r=(new Date).getTime(),o=r===n.lastPushTime;n.lastPushTime=r;for(var i=new Array(8),a=7;a>=0;a--)i[a]=n.PUSH_CHARS.charAt(r%64),r=Math.floor(r/64);if(0!==r)throw new Error;var u=i.join("");if(o){for(a=11;a>=0&&63===n.lastRandChars[a];a--)n.lastRandChars[a]=0;n.lastRandChars[a]++}else for(a=0;a<12;a++)n.lastRandChars[a]=Math.floor(64*Math.random());for(a=0;a<12;a++)u+=n.PUSH_CHARS.charAt(n.lastRandChars[a]);if(20!=u.length)throw new Error;return u}},{key:"getProp",value:function(e,t){for(var n=t.split(".");n.length&&(e=e[n.shift()]););return e}},{key:"base64toblob",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=512,r=atob(e),o=[],i=0;i<r.length;i+=n){for(var a=r.slice(i,i+n),u=new Array(a.length),l=0;l<a.length;l++)u[l]=a.charCodeAt(l);var s=new Uint8Array(u);o.push(s)}var c=new Blob(o,{type:t});return c}},{key:"blobtobase64",value:function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){var e=n.result.split(",")[1];t(e)},n.readAsDataURL(e)}))}},{key:"stringtoblob",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new Blob([e],{type:t});return n}},{key:"blobtostring",value:function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){t(n.result)},n.readAsText(e)}))}},{key:"filetobase64",value:function(e){return new Promise((function(t,n){var r=new FileReader;r.readAsDataURL(e),r.onload=function(){return t(r.result.split(",")[1])},r.onerror=function(e){return n(e)}}))}},{key:"blobtofile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file.txt",n=null;try{n=new File([e],t)}catch(r){n=new Blob([e],t)}return n}},{key:"filetoblob",value:function(e){return new Blob([e])}},{key:"base64tofile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"file.txt";return this.blobtofile(this.base64toblob(e,t),n)}},{key:"blobtourl",value:function(e){return URL.createObjectURL(e,{type:"text/plain"})}},{key:"stringtourl",value:function(e){return this.blobtourl(this.stringtoblob(e))}},{key:"base64tostring",value:function(e){return atob(e)}},{key:"stringtobase64",value:function(e){return btoa(e)}},{key:"base64tourl",value:function(e){return this.blobtourl(this.base64toblob(e))}},{key:"filetourl",value:function(e){return this.blobtourl(this.filetoblob(e))}},{key:"getImageOrientation",value:function(e){var t=this;return new Promise((function(n,r){e=e.replace("data:image/jpeg;base64,","");var o=t.base64tofile(e),i=new FileReader;i.onload=function(e){var t=new DataView(e.target.result);if(65496==t.getUint16(0,!1)){for(var r=t.byteLength,o=2;o<r;){if(t.getUint16(o+2,!1)<=8)return void n(-1);var i=t.getUint16(o,!1);if(o+=2,65505==i){if(1165519206!=t.getUint32(o+=2,!1))return void n(-1);var a=18761==t.getUint16(o+=6,!1);o+=t.getUint32(o+4,a);var u=t.getUint16(o,a);o+=2;for(var l=0;l<u;l++)if(274==t.getUint16(o+12*l,a))return void n(t.getUint16(o+12*l+8,a))}else{if(65280!=(65280&i))break;o+=t.getUint16(o,!1)}}n(-1)}else n(-2)},i.readAsArrayBuffer(o)}))}},{key:"resetImageOrientation",value:function(e,t){return new Promise((function(n,r){var o=new Image;o.onload=function(){var e=o.width,r=o.height,i=document.createElement("canvas"),a=i.getContext("2d");switch(4<t&&t<9?(i.width=r,i.height=e):(i.width=e,i.height=r),t){case 2:a.transform(-1,0,0,1,e,0);break;case 3:a.transform(-1,0,0,-1,e,r);break;case 4:a.transform(1,0,0,-1,0,r);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,r,0);break;case 7:a.transform(0,-1,-1,0,r,e);break;case 8:a.transform(0,-1,1,0,0,e)}a.drawImage(o,0,0);var u=i.toDataURL();u="data:image/jpeg;base64,"+u.split(",")[1],n(u)},o.src=e}))}},{key:"fixImageOrientation",value:function(e){var t=this;return new Promise((function(n,r){-1!==e.indexOf("data:")?(0===e.indexOf("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,","")),t.getImageOrientation(e).then((function(r){e="data:image/jpeg;base64,"+e,r<=1?n(e):t.resetImageOrientation(e,r).then((function(e){n(e)}))}))):n(e)}))}},{key:"debounce",value:function(e,t,n){var r;return function(){var o=this,i=arguments,a=function(){r=null,n||e.apply(o,i)},u=n&&!r;clearTimeout(r),r=setTimeout(a,t),u&&e.apply(o,i)}}},{key:"throttle",value:function(e,t,n){var r,o,i,a=null,u=0;n||(n={});var l=function(){u=!1===n.leading?0:Date.now(),a=null,i=e.apply(r,o),a||(r=o=null)};return function(){var s=Date.now();u||!1!==n.leading||(u=s);var c=t-(s-u);return r=this,o=arguments,c<=0||c>t?(a&&(clearTimeout(a),a=null),u=s,i=e.apply(r,o),a||(r=o=null)):a||!1===n.trailing||(a=setTimeout(l,c)),i}}},{key:"shuffle",value:function(e){for(var t,n,r=e.length;0!==r;)n=Math.floor(Math.random()*r),t=e[r-=1],e[r]=e[n],e[n]=t;return e}},{key:"findRecursiveInObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(null!==e&&"object"===(0,s.default)(e))for(var i=0,a=Object.entries(e);i<a.length;i++){var u=(0,l.default)(a[i],2),c=u[0],f=u[1];if(null!==f&&"object"===(0,s.default)(f))this.findRecursiveInObject(f,t,n,(""===r?"":r+".")+c,o);else if(!(null!==t&&c!==t||null!==n&&f!==n)){o.push(r);break}}return o}}]),e}();n.default=p,"undefined"!=typeof window&&(window.hlp={},Object.getOwnPropertyNames(p).forEach((function(e,t){"length"!==e&&"name"!==e&&"prototype"!==e&&"caller"!==e&&"arguments"!==e&&(window.hlp[e]=p[e])})))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"@babel/runtime/helpers/asyncToGenerator":5,"@babel/runtime/helpers/classCallCheck":6,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/defineProperty":8,"@babel/runtime/helpers/interopRequireDefault":9,"@babel/runtime/helpers/slicedToArray":14,"@babel/runtime/helpers/toConsumableArray":15,"@babel/runtime/helpers/typeof":16,"@babel/runtime/regenerator":18}],2:[function(e,t,n){t.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},{}],3:[function(e,t,n){t.exports=function(e){if(Array.isArray(e))return e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],4:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e){if(Array.isArray(e))return r(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":2}],5:[function(e,t,n){function r(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}t.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,l,"next",e)}function l(e){r(a,o,i,u,l,"throw",e)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],6:[function(e,t,n){t.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],7:[function(e,t,n){function r(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)}}t.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],8:[function(e,t,n){t.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],9:[function(e,t,n){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],10:[function(e,t,n){t.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{}],11:[function(e,t,n){t.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],12:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],13:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],14:[function(e,t,n){var r=e("./arrayWithHoles.js"),o=e("./iterableToArrayLimit.js"),i=e("./unsupportedIterableToArray.js"),a=e("./nonIterableRest.js");t.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithHoles.js":3,"./iterableToArrayLimit.js":11,"./nonIterableRest.js":12,"./unsupportedIterableToArray.js":17}],15:[function(e,t,n){var r=e("./arrayWithoutHoles.js"),o=e("./iterableToArray.js"),i=e("./unsupportedIterableToArray.js"),a=e("./nonIterableSpread.js");t.exports=function(e){return r(e)||o(e)||i(e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":4,"./iterableToArray.js":10,"./nonIterableSpread.js":13,"./unsupportedIterableToArray.js":17}],16:[function(e,t,n){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],17:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":2}],18:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":19}],19:[function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?p:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",v={};function g(){}function y(){}function m(){}var b={};l(b,i,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==n&&r.call(k,i)&&(b=k);var x=m.prototype=g.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,i,a,u){var l=c(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(l.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function E(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:C}}function C(){return{value:t,done:!0}}return y.prototype=m,l(x,"constructor",m),l(m,"constructor",y),y.displayName=l(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(S.prototype),l(S.prototype,a,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new S(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(x),l(x,u,"Generator"),l(x,i,(function(){return this})),l(x,"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=L,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},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 n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,v):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),v},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),j(n),v}},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;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}("object"==typeof t?t.exports:{});try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},{}]},{},[1]);
1
+ !function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!u&&l)return l(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=r(e("@babel/runtime/helpers/defineProperty")),u=r(e("@babel/runtime/helpers/toConsumableArray")),l=r(e("@babel/runtime/helpers/slicedToArray")),s=r(e("@babel/runtime/helpers/typeof")),c=r(e("@babel/runtime/helpers/classCallCheck")),f=r(e("@babel/runtime/helpers/createClass"));function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=function(){function e(){(0,c.default)(this,e)}var n;return(0,f.default)(e,null,[{key:"x",value:function(e){if("function"==typeof e)try{return e=e(),this.x(e)}catch(e){return!1}return!(null===e||!1===e||"string"==typeof e&&""==e.trim()||"object"===(0,s.default)(e)&&0===Object.keys(e).length&&e.constructor===Object||void 0===e||Array.isArray(e)&&0===e.length||Array.isArray(e)&&1===e.length&&""===e[0])}},{key:"nx",value:function(e){return!this.x(e)}},{key:"true",value:function(t){if("function"==typeof t)try{return t=t(),this.true(t)}catch(e){return!1}return void 0!==t&&(null!==t&&(!1!==t&&((!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!==(0,s.default)(t)||0!==Object.keys(t).length||t.constructor!==Object)&&(0!==t&&("0"!==t&&(""!==t&&(" "!==t&&("null"!==t&&"false"!==t))))))))))}},{key:"false",value:function(t){if("function"==typeof t)try{return t=t(),this.false(t)}catch(e){return!1}return void 0!==t&&(null!==t&&(!1===t||(!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!==(0,s.default)(t)||0!==Object.keys(t).length||t.constructor!==Object)&&(0===t||("0"===t||""!==t&&(" "!==t&&("null"!==t&&"false"===t))))))))}},{key:"v",value:function(){if(this.nx(arguments))return"";for(var e=0;e<arguments.length;e++)if(this.x(arguments[e]))return arguments[e];return""}},{key:"loop",value:function(e,t){if(this.nx(e))return null;Array.isArray(e)?e.forEach((function(e,n){t(e,n)})):"object"===(0,s.default)(e)&&Object.entries(e).forEach((function(e){var n=(0,l.default)(e,2),r=n[0],o=n[1];t(o,r)}))}},{key:"map",value:function(e,t,n){return Object.keys(e).reduce((function(r,o){return r[o]=t.call(n||null,o,e[o]),r}),{})}},{key:"first",value:function(e){if(Array.isArray(e)){var t=null;return e.forEach((function(e,n){null===t&&(t=e)})),t}if("object"===(0,s.default)(e)){t=null;return Object.entries(e).forEach((function(e){var n=(0,l.default)(e,2),r=(n[0],n[1]);null===t&&(t=r)})),t}return null}},{key:"last",value:function(e){if(Array.isArray(e)){var t=null;return e.forEach((function(e,n){t=e})),t}if("object"===(0,s.default)(e)){var n=null;return Object.entries(e).forEach((function(e){var t=(0,l.default)(e,2),r=(t[0],t[1]);n=r})),n}return null}},{key:"rand",value:function(e){return Array.isArray(e)?e[Math.floor(Math.random()*e.length)]:"object"===(0,s.default)(e)?(e=Object.values(e))[Math.floor(Math.random()*e.length)]:null}},{key:"random_string",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===t&&(t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");for(var n=t.length,r="",o=0;o<e;o++)r+=t[0+~~(Math.random()*(n-1-0+1))];return r}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(Math.round(e+"e"+t)+"e-"+t)}},{key:"isInteger",value:function(e){return!isNaN(e)&&parseInt(Number(e))==e&&!isNaN(parseInt(e,10))}},{key:"random_int",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:99999;if(!this.isInteger(e)||!this.isInteger(t))return!1;if(e>t){var n=[t,e];e=n[0],t=n[1]}return~~(Math.random()*(t-e+1))+e}},{key:"capitalize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===e||""===e?e:e.charAt(0).toUpperCase()+e.slice(1)}},{key:"cookieExists",value:function(e){return void 0!==document.cookie&&null!==this.cookieGet(e)}},{key:"cookieGet",value:function(e){var t=document.cookie.match(new RegExp(e+"=([^;]+)"));return t?decodeURIComponent(t[1]):null}},{key:"cookieSet",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o="";window.location.protocol.indexOf("https")>-1&&(o="; SameSite=None; Secure"),document.cookie=e+"="+encodeURIComponent(t)+"; expires="+new Date((new Date).getTime()+24*n*60*60*1e3).toUTCString()+"; path=/"+o+"; domain="+(!0===r?this.urlHostTopLevel():"")}},{key:"cookieDelete",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";window.location.protocol.indexOf("https")>-1&&(n="; SameSite=None; Secure"),document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"+n+"; domain="+(!0===t?this.urlHostTopLevel():"")}},{key:"localStorageSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n*=864e5;var r=new Date,o={value:t,expiry:r.getTime()+n};localStorage.setItem(e,JSON.stringify(o))}},{key:"localStorageGet",value:function(e){var t=localStorage.getItem(e);if(!t)return null;var n=JSON.parse(t);return(new Date).getTime()>n.expiry?(localStorage.removeItem(e),null):n.value}},{key:"localStorageDelete",value:function(e){localStorage.removeItem(e)}},{key:"localStorageExists",value:function(e){return null!==this.localStorageGet(e)}},{key:"getParam",value:function(e){var t=window.location.search;if(this.nx(t))return null;for(var n=t.substring(1).split("&"),r=0;r<n.length;r++){var o=n[r].split("=");if(o[0]==e&&this.x(o[1]))return o[1]}return null}},{key:"getDevice",value:function(){return this.isPhone()?"phone":this.isTablet()?"tablet":"desktop"}},{key:"isPhone",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},{key:"isTablet",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},{key:"isDesktop",value:function(){return!this.isPhone()&&!this.isTablet()}},{key:"isMobile",value:function(){return!!(window.innerWidth<750||this.isPhone())}},{key:"isTouch",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints||!1}},{key:"isMac",value:function(){return"mac"===e.getOs()}},{key:"isLinux",value:function(){return"linux"===e.getOs()}},{key:"isWindows",value:function(){return"windows"===e.getOs()}},{key:"getOs",value:function(){var e=window.navigator.userAgent,t=window.navigator.platform,n="unknown";return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)||-1!==["iPhone","iPad","iPod"].indexOf(t)?n="mac":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="windows":(/Android/.test(e)||/Linux/.test(t))&&(n="linux"),n}},{key:"getBrowser",value:function(){var e=!!!document.documentMode&&!!window.StyleMedia;return-1!=navigator.userAgent.indexOf("Opera")||-1!=navigator.userAgent.indexOf("OPR")?"opera":-1==navigator.userAgent.indexOf("Chrome")||e?-1==navigator.userAgent.indexOf("Safari")||e?-1!=navigator.userAgent.indexOf("Firefox")?"firefox":-1!=navigator.userAgent.indexOf("MSIE")||1==!!document.documentMode?"ie":e?"edge":"unknown":"safari":"chrome"}},{key:"isObject",value:function(e){return!!e&&e.constructor===Object}},{key:"isArray",value:function(e){return!!e&&e.constructor===Array}},{key:"isString",value:function(e){return"string"==typeof e||e instanceof String}},{key:"isDate",value:function(e){if(this.nx(e))return!1;if("[object Date]"===Object.prototype.toString.call(e))return!0;if(!this.isString(e))return!1;if(3!==e.split("-").length)return!1;var t=parseInt(e.split("-")[2]),n=parseInt(e.split("-")[1]),r=parseInt(e.split("-")[0]),o=new Date;return o.setFullYear(r,n-1,t),o.getFullYear()==r&&o.getMonth()+1==n&&o.getDate()==t}},{key:"formatDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!1===t||!0===t||null===t||""===t?t=new Date:"object"!==(0,s.default)(t)&&(t=new Date(t.replace(/-/g,"/")));for(var n="",r=t.getMonth(),o=r+1,i=t.getDay(),a=t.getDate(),u=t.getFullYear(),l=t.getHours(),c=t.getMinutes(),f=t.getSeconds(),d=0,h=e.length;d<h;d++)switch(e[d]){case"j":n+=a;break;case"d":n+=a<10?"0"+a:a;break;case"l":var p=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");n+=p[i];break;case"w":n+=i;break;case"D":n+=(p=Array("Sun","Mon","Tue","Wed","Thr","Fri","Sat"))[i];break;case"m":n+=o<10?"0"+o:o;break;case"n":n+=o;break;case"F":var v=Array("January","February","March","April","May","June","July","August","September","October","November","December");n+=v[r];break;case"M":n+=(v=Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"))[r];break;case"Y":n+=u;break;case"y":n+=u.toString().slice(-2);break;case"H":n+=l<10?"0"+l:l;break;case"g":var g=0===l?12:l;n+=g>12?g-12:g;break;case"h":n+=(g=(g=0===l?12:l)>12?g-12:g)<10?"0"+g:g;break;case"a":n+=l<12?"am":"pm";break;case"i":n+=c<10?"0"+c:c;break;case"s":n+=f<10?"0"+f:f;break;case"c":n+=t.toISOString();break;default:n+=e[d]}return n}},{key:"deepCopy",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(Object(t)!==t)return t;if(n.has(t))return n.get(t);var r=t instanceof Date?new Date(t):t instanceof RegExp?new RegExp(t.source,t.flags):t.constructor?new t.constructor:Object.create(null);return n.set(t,r),t instanceof Map&&Array.from(t,(function(t){var o=(0,l.default)(t,2),i=o[0],a=o[1];return r.set(i,e.deepCopy(a,n))})),Object.assign.apply(Object,[r].concat((0,u.default)(Object.keys(t).map((function(r){return(0,a.default)({},r,e.deepCopy(t[r],n))})))))}},{key:"jsonStringToObject",value:function(e){if(this.nx(e)||!this.isString(e))return null;try{return JSON.parse(e)}catch(e){return null}}},{key:"isJsonString",value:function(e){if(this.nx(e)||!this.isString(e))return!1;try{JSON.parse(e);return!0}catch(e){return!1}}},{key:"jsonObjectToString",value:function(e){try{return JSON.stringify(e)}catch(e){return null}}},{key:"uuid",value:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},{key:"guid",value:function(){return this.uuid()}},{key:"replaceAll",value:function(e,t,n){return e.split(t).join(n)}},{key:"replaceLast",value:function(e,t,n){var r=e.lastIndexOf(t);return e=e.slice(0,r)+e.slice(r).replace(t,n)}},{key:"replaceFirst",value:function(e,t,n){return e.replace(t,n)}},{key:"findAllPositions",value:function(e,t){var n,r=e.length,o=0,i=[];if(0==r)return[];for(;(n=t.indexOf(e,o))>-1;)i.push(n),o=n+r;return i}},{key:"findAllPositionsCaseInsensitive",value:function(e,t){var n,r=e.length,o=0,i=[];if(0==r)return[];for(;(n=this.indexOfCaseInsensitive(e,t,o))>-1;)i.push(n),o=n+r;return i}},{key:"countAllOccurences",value:function(e,t){var n=new RegExp(e,"g");return(t.match(n)||[]).length}},{key:"countAllOccurencesCaseInsensitive",value:function(e,t){var n=new RegExp(e,"gi");return(t.match(n)||[]).length}},{key:"indexOfCaseInsensitive",value:function(e,t,n){return t.toLowerCase().indexOf(e.toLowerCase(),n)}},{key:"highlight",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500;if(this.nx(e)||this.nx(t))return e;if(!0===n){var o="...",i=this.findAllPositionsCaseInsensitive(t,e),a=e.split(" "),u=0;for(a.forEach((function(e,n){var l=!0;i.forEach((function(e){u>=e-r&&u<=e+t.length+r-1&&(l=!1)})),!0===l&&(a[n]=o),u+=e.length+1})),e=a.join(" ");e.indexOf(o+" "+o)>-1;)e=this.replaceAll(e,o+" "+o,o);e=e.trim()}for(var l=this.findAllPositionsCaseInsensitive(t,e),s='<strong class="highlight">',c="</strong>",f=0;f<l.length;f++){e=e.substring(0,l[f])+s+e.substring(l[f],l[f]+t.length)+c+e.substring(l[f]+t.length);for(var d=f+1;d<l.length;d++)l[d]=l[d]+s.length+c.length}return e}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("GET",e,t)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("POST",e,t)}},{key:"call",value:function(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null===o&&(o={}),"data"in o||(o.data={}),"headers"in o||(o.headers=null),"throttle"in o||(o.throttle=0),"allow_errors"in o||(o.allow_errors=!0),new Promise((function(i,a){setTimeout((function(){0!==n.indexOf("http")&&(n=e.baseUrl()+"/"+n);var u=new XMLHttpRequest;u.open(t,n,!0),"POST"===t&&(!("data"in o)||null===o.data||"object"!==(0,s.default)(o.data)||o.data instanceof FormData||(u.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.data=JSON.stringify(o.data)),u.setRequestHeader("X-Requested-With","XMLHttpRequest")),r.x(o.headers)&&Object.entries(o.headers).forEach((function(e){var t=(0,l.default)(e,2),n=t[0],r=t[1];u.setRequestHeader(n,r)})),u.onload=function(){(4!=u.readyState||!0!==o.allow_errors&&200!=u.status&&304!=u.status)&&(r.isJsonString(u.responseText)?a(r.jsonStringToObject(u.responseText)):a(u.responseText)),r.isJsonString(u.responseText)?i(r.jsonStringToObject(u.responseText)):i(u.responseText)},u.onerror=function(){a([u.readyState,u.status,u.statusText])},"GET"===t&&u.send(null),"POST"===t&&u.send(o.data)}),o.throttle)}))}},{key:"onResizeHorizontal",value:function(e){var t,n,r=window.innerWidth;window.addEventListener("resize",(function(){(t=window.innerWidth)!=r&&(r=t,n&&clearTimeout(n),n=window.setTimeout((function(){e()}),50))})),e()}},{key:"onResizeVertical",value:function(e){var t,n,r=window.innerHeight;window.addEventListener("resize",(function(){(t=window.innerHeight)!=r&&(r=t,n&&clearTimeout(n),n=window.setTimeout((function(){e()}),50))})),e()}},{key:"uniqueArray",value:function(e){for(var t={},n=[],r=0;r<e.length;r++)e[r]in t||(n.push(e[r]),t[e[r]]=!0);return n}},{key:"powerset",value:function(e){return Array.isArray(e)?e.reduce((function(e,t){return e.concat(e.map((function(e){return[].concat((0,u.default)(e),[t])})))}),[[]]):e}},{key:"charToInt",value:function(e){var t,n,r="ABCDEFGHIJKLMNOPQRSTUVWXYZ",o=0;for(t=0,n=(e=e.toUpperCase()).length-1;t<e.length;t+=1,n-=1)o+=Math.pow(r.length,n)*(r.indexOf(e[t])+1);return o}},{key:"intToChar",value:function(e){for(var t="",n=1,r=26;(e-=n)>=0;n=r,r*=26)t=String.fromCharCode(parseInt(e%r/n)+65)+t;return t}},{key:"slugify",value:function(e){return e.toString().toLowerCase().trim().split("ä").join("ae").split("ö").join("oe").split("ü").join("ue").split("ß").join("ss").replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}},{key:"incChar",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(e)+t)}},{key:"decChar",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(e)-t)}},{key:"range",value:function(e,t){var n=[],r=(0,s.default)(e),o=(0,s.default)(t),i=1;if("undefined"==r||"undefined"==o||r!=o)return null;if(t<e&&(i=-i),"number"==r)for(;i>0?t>=e:t<=e;)n.push(e),e+=i;else{if("string"!=r)return null;if(1!=e.length||1!=t.length)return null;for(e=e.charCodeAt(0),t=t.charCodeAt(0);i>0?t>=e:t<=e;)n.push(String.fromCharCode(e)),e+=i}return n}},{key:"dateToWeek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===e&&(e=new Date),(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)),n=Math.ceil(((e-t)/864e5+1)/7);return n}},{key:"weekToDate",value:function(e,t){var n=new Date(t,0,1+7*(e-1)),r=n.getDay(),o=n;return r<=4?o.setDate(n.getDate()-n.getDay()+1):o.setDate(n.getDate()+8-n.getDay()),o.setUTCHours(0,0,0,0),o}},{key:"addDays",value:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n}},{key:"objectsAreEqual",value:function(e,t){var n=this;if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function)return e===t;if(e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length)return!1;if(e instanceof Date)return!1;if(!(e instanceof Object))return!1;if(!(t instanceof Object))return!1;var r=Object.keys(e);return Object.keys(t).every((function(e){return-1!==r.indexOf(e)}))&&r.every((function(r){return n.objectsAreEqual(e[r],t[r])}))}},{key:"containsObject",value:function(e,t){var n;for(n in t)if(t.hasOwnProperty(n)&&this.objectsAreEqual(t[n],e))return!0;return!1}},{key:"fadeOut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return t<=25&&(t=25),new Promise((function(n){e.style.opacity=1,function r(){(e.style.opacity-=25/t)<0?(e.style.display="none",n()):requestAnimationFrame(r)}()}))}},{key:"fadeIn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return t<=25&&(t=25),new Promise((function(n){e.style.opacity=0,e.style.display="block",function r(){var o=parseFloat(e.style.opacity);(o+=25/t)>1?n():(e.style.opacity=o,requestAnimationFrame(r))}()}))}},{key:"scrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"scrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"closestScrollable",value:function(e){var t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,n=t&&!(t.includes("hidden")||t.includes("visible"));return e?n&&e.scrollHeight>=e.clientHeight?e:this.closestScrollable(e.parentNode)||document.scrollingElement||document.body:null}},{key:"offsetTop",value:function(e){return e.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop}},{key:"offsetLeft",value:function(e){return e.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft}},{key:"offsetRight",value:function(e){return e.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft+e.offsetWidth}},{key:"offsetBottom",value:function(e){return e.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop+e.offsetHeight}},{key:"offsetTopWithMargin",value:function(e){return this.offsetTop(e)-parseInt(getComputedStyle(e).marginTop)}},{key:"offsetLeftWithMargin",value:function(e){return this.offsetLeft(e)-parseInt(getComputedStyle(e).marginLeft)}},{key:"offsetRightWithMargin",value:function(e){return this.offsetRight(e)+parseInt(getComputedStyle(e).marginRight)}},{key:"offsetBottomWithMargin",value:function(e){return this.offsetBottom(e)+parseInt(getComputedStyle(e).marginBottom)}},{key:"documentHeight",value:function(){return Math.max(document.body.offsetHeight,document.body.scrollHeight,document.documentElement.clientHeight,document.documentElement.offsetHeight,document.documentElement.scrollHeight)}},{key:"documentWidth",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"windowWidth",value:function(){return window.innerWidth}},{key:"windowHeight",value:function(){return window.innerHeight}},{key:"windowWidthWithoutScrollbar",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"windowHeightWithoutScrollbar",value:function(){return document.documentElement.clientHeight||document.body.clientHeight}},{key:"outerWidthWithMargin",value:function(e){return e.offsetWidth+parseInt(getComputedStyle(e).marginLeft)+parseInt(getComputedStyle(e).marginRight)}},{key:"outerHeightWithMargin",value:function(e){return e.offsetHeight+parseInt(getComputedStyle(e).marginTop)+parseInt(getComputedStyle(e).marginBottom)}},{key:"scrollTo",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(u){null===o&&(o=document.scrollingElement||document.documentElement),e.isNumeric(t)||(t=o===(document.scrollingElement||documentElement)?n.offsetTopWithMargin(t):t.getBoundingClientRect().top-parseInt(getComputedStyle(t).marginTop)-(o.getBoundingClientRect().top-o.scrollTop-parseInt(getComputedStyle(o).marginTop)));var l=0;Array.isArray(i)||(i=[i]),i.forEach((function(t){e.isNumeric(t)?l+=t:null!==t&&"fixed"===window.getComputedStyle(t).position&&(l+=-1*t.offsetHeight)})),t+=l;var s=o.scrollTop,c=t-s,f=+new Date;!0===a&&c>0?u():function e(){var n,i,a,l=+new Date-f;o.scrollTop=parseInt((n=l,i=s,a=c,(n/=r/2)<1?-a/2*(Math.sqrt(1-n*n)-1)+i:(n-=2,a/2*(Math.sqrt(1-n*n)+1)+i))),l<r?requestAnimationFrame(e):(o.scrollTop=t,u())}()}))}},{key:"loadJs",value:function(t){e.isArray(t)||(t=[t]);var n=[];return e.loop(t,(function(e,t){n.push(new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.onload=function(){t()},document.head.appendChild(r)})))})),Promise.all(n)}},{key:"loadJsSequentially",value:(n=(0,i.default)(o.default.mark((function t(n){var r,i,a;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.isArray(n)||(n=[n]),r=d(n),t.prev=2,r.s();case 4:if((i=r.n()).done){t.next=10;break}return a=i.value,t.next=8,e.loadJs(a);case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),r.e(t.t0);case 15:return t.prev=15,r.f(),t.finish(15);case 18:return t.abrupt("return");case 19:case"end":return t.stop()}}),t,null,[[2,12,15,18]])}))),function(e){return n.apply(this,arguments)})},{key:"triggerAfterAllImagesLoaded",value:function(e,t,n){var r=this;window.addEventListener("load",(function(o){null!==document.querySelector(e+" "+t)&&document.querySelectorAll(e+" "+t).forEach((function(o){r.triggerAfterAllImagesLoadedBindLoadEvent(o,e,t,n)}))})),document.addEventListener("DOMContentLoaded",(function(){null!==document.querySelector(e)&&new MutationObserver((function(o){o.forEach((function(o){"childList"===o.type&&o.addedNodes.length>0?o.addedNodes.forEach((function(o){r.triggerAfterAllImagesLoadedHandleEl(o,e,t,n)})):"attributes"===o.type&&"src"===o.attributeName&&o.target.classList.contains(t.replace(".",""))&&o.oldValue!==o.target.getAttribute("src")&&r.triggerAfterAllImagesLoadedHandleEl(o.target,e,t,n)}))})).observe(document.querySelector(e),{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!0,characterDataOldValue:!1})}))}},{key:"triggerAfterAllImagesLoadedHandleEl",value:function(e,t,n,r){var o=this;e.nodeType===Node.ELEMENT_NODE&&(e.classList.remove("loaded-img"),e.closest(t).classList.remove("loaded-all"),e.classList.contains("binded-trigger")||(e.classList.add("binded-trigger"),e.addEventListener("load",(function(){o.triggerAfterAllImagesLoadedBindLoadEvent(e,t,n,r)}))))}},{key:"triggerAfterAllImagesLoadedBindLoadEvent",value:function(e,t,n,r){e.classList.add("loaded-img"),e.closest(t).querySelectorAll(".loaded-img").length===e.closest(t).querySelectorAll(n).length&&(e.closest(t).classList.add("loaded-all"),r())}},{key:"isVisible",value:function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}},{key:"isVisibleInViewport",value:function(e){if(!this.isVisible(e))return!1;var t=e.getBoundingClientRect();return!(t.bottom<0||t.right<0||t.left>window.innerWidth||t.top>window.innerHeight)}},{key:"textareaAutoHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";this.textareaSetHeights(t),this.onResizeHorizontal((function(){e.textareaSetHeights(t)})),[].forEach.call(document.querySelectorAll(t),(function(t){t.addEventListener("keyup",(function(t){e.textareaSetHeight(t.target)}))}))}},{key:"textareaSetHeights",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";[].forEach.call(document.querySelectorAll(t),(function(t){e.isVisible(t)&&e.textareaSetHeight(t)}))}},{key:"textareaSetHeight",value:function(e){e.style.height="5px",e.style.height=e.scrollHeight+"px"}},{key:"real100vh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(null===e){var n=function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))};n(),window.addEventListener("resize",(function(){n()}))}else{var r=function(){console.log(e),null!==document.querySelector(e)&&document.querySelectorAll(e).forEach((function(e){e.style.height=window.innerHeight*(t/100)+"px"}))};r(),window.addEventListener("resize",(function(){r()}))}}},{key:"iOsRemoveHover",value:function(){"safari"===e.getBrowser()&&"desktop"!==e.getDevice()&&e.on("touchend","a",(function(e,t){t.click()}))}},{key:"isNumeric",value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},{key:"animate",value:function(t,n,r,o,i){var a=this;return new Promise((function(u){i<=50&&(i=50);var l=[];n.split(";").forEach((function(e){l.push(e.split(":")[0].trim())}));var s=[];l.forEach((function(e){s.push(e+" "+Math.round(i/1e3*10)/10+"s "+o)})),s="transition: "+s.join(", ")+" !important;";var c=null;NodeList.prototype.isPrototypeOf(t)?c=Array.from(t):null===t?(console.log("cannot animate element from "+n+" to "+r+" because it does not exist"),u()):c=[t];var f=c.length;c.forEach((function(t,o){var c=e.random_string(10,"abcdefghijklmnopqrstuvwxyz");t.classList.add(c),window.requestAnimationFrame((function(){var o=[],d=t.getAttribute("style");null!==d&&d.split(";").forEach((function(e){l.includes(e.split(":")[0].trim())||o.push(e)})),o=o.join(";")+n+";",t.setAttribute("style",o),window.requestAnimationFrame((function(){var o=document.createElement("style");o.innerHTML="."+c+" { "+s+" }",document.head.appendChild(o),window.requestAnimationFrame((function(){if(t.setAttribute("style",t.getAttribute("style").replace(n+";","")+r+";"),a.isVisible(t)){var l=!1;e.addEventListenerOnce(t,"transitionend",(function(e){if(l=!0,e.target!==e.currentTarget)return!1;document.head.removeChild(o),t.classList.remove(c),--f<=0&&window.requestAnimationFrame((function(){u()}))})),setTimeout((function(){!1===l&&(document.head.removeChild(o),t.classList.remove(c),--f<=0&&u())}),1.5*i)}else document.head.removeChild(o),t.classList.remove(c),--f<=0&&u()}))}))}))}))}))}},{key:"addEventListenerOnce",value:function(e,t,n,r,o){e.addEventListener(t,(function i(a){var u=n.apply(this,arguments,r);!1!==u&&e.removeEventListener(t,i,o)}))}},{key:"htmlDecode",value:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}},{key:"htmlEncode",value:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/`/g,"&#96;")}},{key:"nl2br",value:function(e){if(null==e)return"";return(e+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1<br/>")}},{key:"br2nl",value:function(e){if(null==e)return"";return e.replace(/<\s*\/?br\s*[\/]?>/gi,"\n")}},{key:"closest",value:function(e,t){if(!document.documentElement.contains(e))return null;do{if(this.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}},{key:"matches",value:function(e,t){for(var n=e,r=(n.parentNode||n.document).querySelectorAll(t),o=-1;r[++o]&&r[o]!=n;);return!!r[o]}},{key:"wrapTextNodes",value:function(e,t){null!==e&&Array.from(e.childNodes).filter((function(e){return 3===e.nodeType&&e.textContent.trim().length>1})).forEach((function(e){var n=document.createElement(t);e.after(n),n.appendChild(e)}))}},{key:"html2dom",value:function(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,void 0===t.content?this.html2domLegacy(e):t.content.firstChild}},{key:"html2domLegacy",value:function(e){var t,n,r,o={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]},i=document,a=i.createDocumentFragment();if(/<|&#?\w+;/.test(e)){for(t=a.appendChild(i.createElement("div")),n=o[(/<([\w:]+)/.exec(e)||["",""])[1].toLowerCase()]||o._default,t.innerHTML=n[1]+e.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1></$2>")+n[2],r=n[0];r--;)t=t.lastChild;for(a.removeChild(a.firstChild);t.firstChild;)a.appendChild(t.firstChild)}else a.appendChild(i.createTextNode(e));return a.querySelector("*")}},{key:"prevAll",value:function(e,t){for(var n=[];e=e.previousElementSibling;)(void 0===t||this.matches(e,t))&&n.push(e);return n}},{key:"nextAll",value:function(e,t){for(var n=[];e=e.nextElementSibling;)(void 0===t||this.matches(e,t))&&n.push(e);return n}},{key:"prevUntil",value:function(e,t){for(var n=[];(e=e.previousElementSibling)&&!this.matches(e,t);)n.push(e);return n}},{key:"nextUntil",value:function(e,t){for(var n=[];(e=e.nextElementSibling)&&!this.matches(e,t);)n.push(e);return n}},{key:"siblings",value:function(e,t){var n=[],r=e;for(e=e.parentNode.firstChild;e=e.nextElementSibling;)(void 0===t||this.matches(e,t))&&r!==e&&n.push(e);return n}},{key:"parents",value:function(e,t){for(var n=[],r=void 0!==t;null!==(e=e.parentElement);)e.nodeType===Node.ELEMENT_NODE&&(r&&!this.matches(e,t)||n.push(e));return n}},{key:"css",value:function(e){var t=document.styleSheets,n={};for(var r in t)try{var o=t[r].rules||t[r].cssRules;for(var i in o)this.matches(e,o[i].selectorText)&&(n=Object.assign(n,this.css2json(o[i].style),this.css2json(e.getAttribute("style"))))}catch(e){}return n}},{key:"css2json",value:function(e){var t={};if(!e)return t;if(e instanceof CSSStyleDeclaration)for(var n in e)e[n].toLowerCase&&void 0!==e[e[n]]&&(t[e[n].toLowerCase()]=e[e[n]]);else if("string"==typeof e)for(var r in e=e.split(";"))if(e[r].indexOf(":")>-1){var o=e[r].split(":");t[o[0].toLowerCase().trim()]=o[1].trim()}return t}},{key:"compareDates",value:function(e,t){return"string"==typeof e&&(e=e.split(" ").join("T")),"string"==typeof t&&(t=t.split(" ").join("T")),e=new Date(e),t=new Date(t),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()?0:e<t?-1:1}},{key:"spaceship",value:function(e,t){return null===e||null===t||(0,s.default)(e)!=(0,s.default)(t)?null:"string"==typeof e?e.localeCompare(t):e>t?1:e<t?-1:0}},{key:"focus",value:function(t){e.unfocus();var n=null;if(null!==(n="string"==typeof t||t instanceof String?document.querySelector(t):t)){var r=document.createElement("div");r.classList.add("hlp-focus-mask"),r.style.position="fixed",r.style.top=0,r.style.bottom=0,r.style.left=0,r.style.right=0,r.style.backgroundColor="rgba(0,0,0,0.8)",r.style.zIndex=2147483646,n.before(r),n.setAttribute("data-focussed",1),n.setAttribute("data-focussed-orig-z-index",n.style.zIndex),n.setAttribute("data-focussed-orig-position",n.style.position),n.setAttribute("data-focussed-orig-background-color",n.style.backgroundColor),n.setAttribute("data-focussed-orig-box-shadow",n.style.boxShadow),n.style.zIndex=2147483647,n.style.position="relative",n.style.backgroundColor="#ffffff",n.style.boxShadow="0px 0px 0px 20px #fff"}}},{key:"unfocus",value:function(){null!==document.querySelector(".hlp-focus-mask")&&document.querySelectorAll(".hlp-focus-mask").forEach((function(t){e.remove(t)})),null!==document.querySelector("[data-focussed]")&&document.querySelectorAll("[data-focussed]").forEach((function(e){e.style.zIndex=e.getAttribute("data-focussed-orig-z-index"),e.style.position=e.getAttribute("data-focussed-orig-position"),e.style.backgroundColor=e.getAttribute("data-focussed-orig-background-color"),e.style.boxShadow=e.getAttribute("data-focussed-orig-box-shadow"),e.removeAttribute("data-focussed"),e.removeAttribute("data-focussed-orig-z-index"),e.removeAttribute("data-focussed-orig-position"),e.removeAttribute("data-focussed-orig-background-color"),e.removeAttribute("data-focussed-orig-box-shadow")}))}},{key:"remove",value:function(e){null!==e&&e.parentNode.removeChild(e)}},{key:"on",value:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===o?(o=r,r=document):r=document.querySelector(r),r.addEventListener(t,(function(t){var r=e.closest(t.target,n);r&&o(t,r)}),!1)}},{key:"url",value:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname}},{key:"urlWithHash",value:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.hash}},{key:"fullUrl",value:function(){return window.location.href}},{key:"urlWithArgs",value:function(){return window.location.href.split("#")[0]}},{key:"baseUrl",value:function(){return window.location.protocol+"//"+window.location.host}},{key:"urlProtocol",value:function(){return window.location.protocol+"//"}},{key:"urlHost",value:function(){return window.location.host}},{key:"urlHostTopLevel",value:function(){var e=window.location.host;for(e=e.split(".");e.length>2;)e.shift();return e=e.join(".")}},{key:"urlPath",value:function(){return window.location.pathname}},{key:"urlHash",value:function(){return window.location.hash}},{key:"urlArgs",value:function(){return window.location.search}},{key:"urlOfScript",value:function(){if(document.currentScript)return document.currentScript.src;var e=document.getElementsByTagName("script");return e[e.length-1].src}},{key:"pathOfScript",value:function(){var e=this.urlOfScript();return e.substring(0,e.lastIndexOf("/"))}},{key:"waitUntil",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise((function(r,o){var i=setInterval((function(){null!==document.querySelector(e)&&(null===t||null===n&&void 0!==window.getComputedStyle(document.querySelector(e))[t]&&""!=window.getComputedStyle(document.querySelector(e))[t]||null!==n&&window.getComputedStyle(document.querySelector(e))[t]===n)&&(window.clearInterval(i),r())}),30)}))}},{key:"waitUntilVar",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null,o=null;return null===t?(r=e,o=window):(r=t,o=e),new Promise((function(e,t){var i=setInterval((function(){void 0!==o[r]&&null!==o[r]&&(null!==n&&o[r]!==n||(window.clearInterval(i),e()))}),30)}))}},{key:"ready",value:function(){return new Promise((function(e){if("loading"!==document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){return e()}))}))}},{key:"load",value:function(){return new Promise((function(e){if("complete"===document.readyState)return e();window.addEventListener("load",(function(){return e()}))}))}},{key:"runForEl",value:function(t,n){e.ready().then((function(){var r=e.pushId();null!==document.querySelector(t)&&document.querySelectorAll(t).forEach((function(e){void 0===e.runForEl&&(e.runForEl=[]),e.runForEl.includes(r)||(e.runForEl.push(r),n(e))})),void 0===window.runForEl_queue&&(window.runForEl_queue=[]),void 0===window.runForEl_observer&&(window.runForEl_observer=new MutationObserver((function(e){e.forEach((function(e){if(e.addedNodes)for(var t=function(t){var n=e.addedNodes[t];n.nodeType===Node.ELEMENT_NODE&&window.runForEl_queue.forEach((function(e){n.matches(e.selector)&&(void 0===n.runForEl&&(n.runForEl=[]),n.runForEl.includes(e.id)||(n.runForEl.push(e.id),e.callback(n))),null!==n.querySelector(e.selector)&&n.querySelectorAll(e.selector).forEach((function(t){void 0===t.runForEl&&(t.runForEl=[]),t.runForEl.includes(e.id)||(t.runForEl.push(e.id),e.callback(t))}))}))},n=0;n<e.addedNodes.length;n++)t(n)}))})).observe(document.body,{attributes:!1,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})),window.runForEl_queue.push({id:r,selector:t,callback:n})}))}},{key:"fmath",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,o={"*":t*n,"-":t-n,"+":t+n,"/":t/n}[e];return Math.round(10*o*Math.pow(10,r))/(10*Math.pow(10,r))}},{key:"trim",value:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),r=0,o=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),r=e.length,o=0;o<r;o++)if(-1===n.indexOf(e.charAt(o))){e=e.substring(o);break}for(o=(r=e.length)-1;o>=0;o--)if(-1===n.indexOf(e.charAt(o))){e=e.substring(0,o+1);break}return-1===n.indexOf(e.charAt(0))?e:""}},{key:"ltrim",value:function(e,t){t=t?(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1"):" \\s ";var n=new RegExp("^["+t+"]+","g");return(e+"").replace(n,"")}},{key:"rtrim",value:function(e,t){t=t?(t+"").replace(/([[\]().?/*{}+$^:])/g,"\\$1"):" \\s ";var n=new RegExp("["+t+"]+$","g");return(e+"").replace(n,"")}},{key:"pushId",value:function(){var n=null;void 0!==window&&(void 0===window.pushIdDataGlobal&&(window.pushIdDataGlobal={}),n=window.pushIdDataGlobal),void 0!==t&&(void 0===t.pushIdDataGlobal&&(t.pushIdDataGlobal={}),n=t.pushIdDataGlobal),e.objectsAreEqual(n,{})&&(n.lastPushTime=0,n.lastRandChars=[],n.PUSH_CHARS="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz");var r=(new Date).getTime(),o=r===n.lastPushTime;n.lastPushTime=r;for(var i=new Array(8),a=7;a>=0;a--)i[a]=n.PUSH_CHARS.charAt(r%64),r=Math.floor(r/64);if(0!==r)throw new Error;var u=i.join("");if(o){for(a=11;a>=0&&63===n.lastRandChars[a];a--)n.lastRandChars[a]=0;n.lastRandChars[a]++}else for(a=0;a<12;a++)n.lastRandChars[a]=Math.floor(64*Math.random());for(a=0;a<12;a++)u+=n.PUSH_CHARS.charAt(n.lastRandChars[a]);if(20!=u.length)throw new Error;return u}},{key:"getProp",value:function(e,t){for(var n=t.split(".");n.length&&(e=e[n.shift()]););return e}},{key:"base64toblob",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=512,r=atob(e),o=[],i=0;i<r.length;i+=n){for(var a=r.slice(i,i+n),u=new Array(a.length),l=0;l<a.length;l++)u[l]=a.charCodeAt(l);var s=new Uint8Array(u);o.push(s)}var c=new Blob(o,{type:t});return c}},{key:"blobtobase64",value:function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){var e=n.result.split(",")[1];t(e)},n.readAsDataURL(e)}))}},{key:"stringtoblob",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new Blob([e],{type:t});return n}},{key:"blobtostring",value:function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){t(n.result)},n.readAsText(e)}))}},{key:"filetobase64",value:function(e){return new Promise((function(t,n){var r=new FileReader;r.readAsDataURL(e),r.onload=function(){return t(r.result.split(",")[1])},r.onerror=function(e){return n(e)}}))}},{key:"blobtofile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file.txt",n=null;try{n=new File([e],t)}catch(r){n=new Blob([e],t)}return n}},{key:"filetoblob",value:function(e){return new Blob([e])}},{key:"base64tofile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"file.txt";return this.blobtofile(this.base64toblob(e,t),n)}},{key:"blobtourl",value:function(e){return URL.createObjectURL(e,{type:"text/plain"})}},{key:"stringtourl",value:function(e){return this.blobtourl(this.stringtoblob(e))}},{key:"base64tostring",value:function(e){return atob(e)}},{key:"stringtobase64",value:function(e){return btoa(e)}},{key:"base64tourl",value:function(e){return this.blobtourl(this.base64toblob(e))}},{key:"filetourl",value:function(e){return this.blobtourl(this.filetoblob(e))}},{key:"getImageOrientation",value:function(e){var t=this;return new Promise((function(n,r){e=e.replace("data:image/jpeg;base64,","");var o=t.base64tofile(e),i=new FileReader;i.onload=function(e){var t=new DataView(e.target.result);if(65496==t.getUint16(0,!1)){for(var r=t.byteLength,o=2;o<r;){if(t.getUint16(o+2,!1)<=8)return void n(-1);var i=t.getUint16(o,!1);if(o+=2,65505==i){if(1165519206!=t.getUint32(o+=2,!1))return void n(-1);var a=18761==t.getUint16(o+=6,!1);o+=t.getUint32(o+4,a);var u=t.getUint16(o,a);o+=2;for(var l=0;l<u;l++)if(274==t.getUint16(o+12*l,a))return void n(t.getUint16(o+12*l+8,a))}else{if(65280!=(65280&i))break;o+=t.getUint16(o,!1)}}n(-1)}else n(-2)},i.readAsArrayBuffer(o)}))}},{key:"resetImageOrientation",value:function(e,t){return new Promise((function(n,r){var o=new Image;o.onload=function(){var e=o.width,r=o.height,i=document.createElement("canvas"),a=i.getContext("2d");switch(4<t&&t<9?(i.width=r,i.height=e):(i.width=e,i.height=r),t){case 2:a.transform(-1,0,0,1,e,0);break;case 3:a.transform(-1,0,0,-1,e,r);break;case 4:a.transform(1,0,0,-1,0,r);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,r,0);break;case 7:a.transform(0,-1,-1,0,r,e);break;case 8:a.transform(0,-1,1,0,0,e)}a.drawImage(o,0,0);var u=i.toDataURL();u="data:image/jpeg;base64,"+u.split(",")[1],n(u)},o.src=e}))}},{key:"fixImageOrientation",value:function(e){var t=this;return new Promise((function(n,r){-1!==e.indexOf("data:")?(0===e.indexOf("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,","")),t.getImageOrientation(e).then((function(r){e="data:image/jpeg;base64,"+e,r<=1?n(e):t.resetImageOrientation(e,r).then((function(e){n(e)}))}))):n(e)}))}},{key:"debounce",value:function(e,t,n){var r;return function(){var o=this,i=arguments,a=function(){r=null,n||e.apply(o,i)},u=n&&!r;clearTimeout(r),r=setTimeout(a,t),u&&e.apply(o,i)}}},{key:"throttle",value:function(e,t,n){var r,o,i,a=null,u=0;n||(n={});var l=function(){u=!1===n.leading?0:Date.now(),a=null,i=e.apply(r,o),a||(r=o=null)};return function(){var s=Date.now();u||!1!==n.leading||(u=s);var c=t-(s-u);return r=this,o=arguments,c<=0||c>t?(a&&(clearTimeout(a),a=null),u=s,i=e.apply(r,o),a||(r=o=null)):a||!1===n.trailing||(a=setTimeout(l,c)),i}}},{key:"shuffle",value:function(e){for(var t,n,r=e.length;0!==r;)n=Math.floor(Math.random()*r),t=e[r-=1],e[r]=e[n],e[n]=t;return e}},{key:"findRecursiveInObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(null!==e&&"object"===(0,s.default)(e))for(var i=0,a=Object.entries(e);i<a.length;i++){var u=(0,l.default)(a[i],2),c=u[0],f=u[1];if(null!==f&&"object"===(0,s.default)(f))this.findRecursiveInObject(f,t,n,(""===r?"":r+".")+c,o);else if(!(null!==t&&c!==t||null!==n&&f!==n)){o.push(r);break}}return o}}]),e}();n.default=p,"undefined"!=typeof window&&(window.hlp={},Object.getOwnPropertyNames(p).forEach((function(e,t){"length"!==e&&"name"!==e&&"prototype"!==e&&"caller"!==e&&"arguments"!==e&&(window.hlp[e]=p[e])})))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"@babel/runtime/helpers/asyncToGenerator":5,"@babel/runtime/helpers/classCallCheck":6,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/defineProperty":8,"@babel/runtime/helpers/interopRequireDefault":9,"@babel/runtime/helpers/slicedToArray":14,"@babel/runtime/helpers/toConsumableArray":15,"@babel/runtime/helpers/typeof":16,"@babel/runtime/regenerator":18}],2:[function(e,t,n){t.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},{}],3:[function(e,t,n){t.exports=function(e){if(Array.isArray(e))return e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],4:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e){if(Array.isArray(e))return r(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":2}],5:[function(e,t,n){function r(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}t.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,l,"next",e)}function l(e){r(a,o,i,u,l,"throw",e)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],6:[function(e,t,n){t.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],7:[function(e,t,n){function r(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)}}t.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],8:[function(e,t,n){t.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],9:[function(e,t,n){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],10:[function(e,t,n){t.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{}],11:[function(e,t,n){t.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],12:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],13:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],14:[function(e,t,n){var r=e("./arrayWithHoles.js"),o=e("./iterableToArrayLimit.js"),i=e("./unsupportedIterableToArray.js"),a=e("./nonIterableRest.js");t.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithHoles.js":3,"./iterableToArrayLimit.js":11,"./nonIterableRest.js":12,"./unsupportedIterableToArray.js":17}],15:[function(e,t,n){var r=e("./arrayWithoutHoles.js"),o=e("./iterableToArray.js"),i=e("./unsupportedIterableToArray.js"),a=e("./nonIterableSpread.js");t.exports=function(e){return r(e)||o(e)||i(e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":4,"./iterableToArray.js":10,"./nonIterableSpread.js":13,"./unsupportedIterableToArray.js":17}],16:[function(e,t,n){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],17:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":2}],18:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":19}],19:[function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=S(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?p:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",v={};function g(){}function y(){}function m(){}var b={};l(b,i,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==n&&r.call(k,i)&&(b=k);var x=m.prototype=g.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,u){var l=c(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(l.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function S(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:C}}function C(){return{value:t,done:!0}}return y.prototype=m,l(x,"constructor",m),l(m,"constructor",y),y.displayName=l(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(E.prototype),l(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(x),l(x,u,"Generator"),l(x,i,(function(){return this})),l(x,"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=L,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},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 n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,v):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),v},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),j(n),v}},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;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}("object"==typeof t?t.exports:{});try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},{}]},{},[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hlp",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "main": "_js/_build/script.js",
5
5
  "files": [
6
6
  "_js/_build/*.js",