vis-timeline
Version:
Create a fully customizable, interactive timeline with items and ranges.
49 lines • 522 kB
JavaScript
/**
* vis-timeline and vis-graph2d
* https://visjs.github.io/vis-timeline/
*
* Create a fully customizable, interactive timeline with items and ranges.
*
* @version 8.2.1
* @date 2025-07-28T18:36:51.280Z
*
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
*
* @license
* vis.js is dual licensed under both
*
* 1. The Apache 2.0 License
* http://www.apache.org/licenses/LICENSE-2.0
*
* and
*
* 2. The MIT License
* http://opensource.org/licenses/MIT
*
* vis.js may be distributed under either license.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vis=t.vis||{})}(this,function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var o,s={exports:{}};function r(){return o||(o=1,function(t){t.exports=function(){var e,i;function o(){return e.apply(null,arguments)}function s(t){e=t}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(l(t,e))return!1;return!0}function d(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function p(t,e){var i,n=[],o=t.length;for(i=0;i<o;++i)n.push(e(t[i],i));return n}function m(t,e){for(var i in e)l(e,i)&&(t[i]=e[i]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function f(t,e,i,n){return qi(t,e,i,n,!0).utc()}function g(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(t){return null==t._pf&&(t._pf=g()),t._pf}function y(t){var e=null,n=!1,o=t._d&&!isNaN(t._d.getTime());return o&&(e=v(t),n=i.call(e.parsedDateParts,function(t){return null!=t}),o=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(o=o&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)),null!=Object.isFrozen&&Object.isFrozen(t)?o:(t._isValid=o,t._isValid)}function b(t){var e=f(NaN);return null!=t?m(v(e),t):v(e).userInvalidated=!0,e}i=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),n=i.length>>>0;for(e=0;e<n;e++)if(e in i&&t.call(this,i[e],e,i))return!0;return!1};var _=o.momentProperties=[],w=!1;function x(t,e){var i,n,o,s=_.length;if(d(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),d(e._i)||(t._i=e._i),d(e._f)||(t._f=e._f),d(e._l)||(t._l=e._l),d(e._strict)||(t._strict=e._strict),d(e._tzm)||(t._tzm=e._tzm),d(e._isUTC)||(t._isUTC=e._isUTC),d(e._offset)||(t._offset=e._offset),d(e._pf)||(t._pf=v(e)),d(e._locale)||(t._locale=e._locale),s>0)for(i=0;i<s;i++)d(o=e[n=_[i]])||(t[n]=o);return t}function D(t){x(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,o.updateOffset(this),w=!1)}function k(t){return t instanceof D||null!=t&&null!=t._isAMomentObject}function S(t){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var i=!0;return m(function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,t),i){var n,s,r,a=[],h=arguments.length;for(s=0;s<h;s++){if(n="","object"==typeof arguments[s]){for(r in n+="\n["+s+"] ",arguments[0])l(arguments[0],r)&&(n+=r+": "+arguments[0][r]+", ");n=n.slice(0,-2)}else n=arguments[s];a.push(n)}S(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)},e)}var T,M={};function O(t,e){null!=o.deprecationHandler&&o.deprecationHandler(t,e),M[t]||(S(e),M[t]=!0)}function E(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t){var e,i;for(i in t)l(t,i)&&(E(e=t[i])?this[i]=e:this["_"+i]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function I(t,e){var i,n=m({},t);for(i in e)l(e,i)&&(a(t[i])&&a(e[i])?(n[i]={},m(n[i],t[i]),m(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)l(t,i)&&!l(e,i)&&a(t[i])&&(n[i]=m({},n[i]));return n}function N(t){null!=t&&this.set(t)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,T=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)l(t,e)&&i.push(e);return i};var L={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function A(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return E(n)?n.call(e,i):n}function F(t,e,i){var n=""+Math.abs(t),o=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var R=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,j=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},H={};function z(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(H[t]=o),e&&(H[e[0]]=function(){return F(o.apply(this,arguments),e[1],e[2])}),i&&(H[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function G(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function W(t){var e,i,n=t.match(R);for(e=0,i=n.length;e<i;e++)H[n[e]]?n[e]=H[n[e]]:n[e]=G(n[e]);return function(e){var o,s="";for(o=0;o<i;o++)s+=E(n[o])?n[o].call(e,t):n[o];return s}}function B(t,e){return t.isValid()?(e=V(e,t.localeData()),Y[e]=Y[e]||W(e),Y[e](t)):t.localeData().invalidDate()}function V(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(j.lastIndex=0;i>=0&&j.test(t);)t=t.replace(j,n),j.lastIndex=0,i-=1;return t}var U={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function X(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(R).map(function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t}).join(""),this._longDateFormat[t])}var q="Invalid date";function Z(){return this._invalidDate}var K="%d",$=/\d{1,2}/;function J(t){return this._ordinal.replace("%d",t)}var Q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function tt(t,e,i,n){var o=this._relativeTime[i];return E(o)?o(t,e,i,n):o.replace(/%d/i,t)}function et(t,e){var i=this._relativeTime[t>0?"future":"past"];return E(i)?i(e):i.replace(/%s/i,e)}var it={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function nt(t){return"string"==typeof t?it[t]||it[t.toLowerCase()]:void 0}function ot(t){var e,i,n={};for(i in t)l(t,i)&&(e=nt(i))&&(n[e]=t[i]);return n}var st={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function rt(t){var e,i=[];for(e in t)l(t,e)&&i.push({unit:e,priority:st[e]});return i.sort(function(t,e){return t.priority-e.priority}),i}var at,lt=/\d/,ht=/\d\d/,dt=/\d{3}/,ct=/\d{4}/,ut=/[+-]?\d{6}/,pt=/\d\d?/,mt=/\d\d\d\d?/,ft=/\d\d\d\d\d\d?/,gt=/\d{1,3}/,vt=/\d{1,4}/,yt=/[+-]?\d{1,6}/,bt=/\d+/,_t=/[+-]?\d+/,wt=/Z|[+-]\d\d:?\d\d/gi,xt=/Z|[+-]\d\d(?::?\d\d)?/gi,Dt=/[+-]?\d+(\.\d{1,3})?/,kt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,St=/^[1-9]\d?/,Ct=/^([1-9]\d|\d)/;function Tt(t,e,i){at[t]=E(e)?e:function(t,n){return t&&i?i:e}}function Mt(t,e){return l(at,t)?at[t](e._strict,e._locale):new RegExp(Ot(t))}function Ot(t){return Et(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,o){return e||i||n||o}))}function Et(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Pt(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function It(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=Pt(e)),i}at={};var Nt={};function Lt(t,e){var i,n,o=e;for("string"==typeof t&&(t=[t]),c(e)&&(o=function(t,i){i[e]=It(t)}),n=t.length,i=0;i<n;i++)Nt[t[i]]=o}function At(t,e){Lt(t,function(t,i,n,o){n._w=n._w||{},e(t,n._w,n,o)})}function Ft(t,e,i){null!=e&&l(Nt,t)&&Nt[t](e,i._a,i,t)}function Rt(t){return t%4==0&&t%100!=0||t%400==0}var jt=0,Yt=1,Ht=2,zt=3,Gt=4,Wt=5,Bt=6,Vt=7,Ut=8;function Xt(t){return Rt(t)?366:365}z("Y",0,0,function(){var t=this.year();return t<=9999?F(t,4):"+"+t}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),Tt("Y",_t),Tt("YY",pt,ht),Tt("YYYY",vt,ct),Tt("YYYYY",yt,ut),Tt("YYYYYY",yt,ut),Lt(["YYYYY","YYYYYY"],jt),Lt("YYYY",function(t,e){e[jt]=2===t.length?o.parseTwoDigitYear(t):It(t)}),Lt("YY",function(t,e){e[jt]=o.parseTwoDigitYear(t)}),Lt("Y",function(t,e){e[jt]=parseInt(t,10)}),o.parseTwoDigitYear=function(t){return It(t)+(It(t)>68?1900:2e3)};var qt,Zt=$t("FullYear",!0);function Kt(){return Rt(this.year())}function $t(t,e){return function(i){return null!=i?(Qt(this,t,i),o.updateOffset(this,e),this):Jt(this,t)}}function Jt(t,e){if(!t.isValid())return NaN;var i=t._d,n=t._isUTC;switch(e){case"Milliseconds":return n?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return n?i.getUTCSeconds():i.getSeconds();case"Minutes":return n?i.getUTCMinutes():i.getMinutes();case"Hours":return n?i.getUTCHours():i.getHours();case"Date":return n?i.getUTCDate():i.getDate();case"Day":return n?i.getUTCDay():i.getDay();case"Month":return n?i.getUTCMonth():i.getMonth();case"FullYear":return n?i.getUTCFullYear():i.getFullYear();default:return NaN}}function Qt(t,e,i){var n,o,s,r,a;if(t.isValid()&&!isNaN(i)){switch(n=t._d,o=t._isUTC,e){case"Milliseconds":return void(o?n.setUTCMilliseconds(i):n.setMilliseconds(i));case"Seconds":return void(o?n.setUTCSeconds(i):n.setSeconds(i));case"Minutes":return void(o?n.setUTCMinutes(i):n.setMinutes(i));case"Hours":return void(o?n.setUTCHours(i):n.setHours(i));case"Date":return void(o?n.setUTCDate(i):n.setDate(i));case"FullYear":break;default:return}s=i,r=t.month(),a=29!==(a=t.date())||1!==r||Rt(s)?a:28,o?n.setUTCFullYear(s,r,a):n.setFullYear(s,r,a)}}function te(t){return E(this[t=nt(t)])?this[t]():this}function ee(t,e){if("object"==typeof t){var i,n=rt(t=ot(t)),o=n.length;for(i=0;i<o;i++)this[n[i].unit](t[n[i].unit])}else if(E(this[t=nt(t)]))return this[t](e);return this}function ie(t,e){return(t%e+e)%e}function ne(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=ie(e,12);return t+=(e-i)/12,1===i?Rt(t)?29:28:31-i%7%2}qt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},z("M",["MM",2],"Mo",function(){return this.month()+1}),z("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),z("MMMM",0,0,function(t){return this.localeData().months(this,t)}),Tt("M",pt,St),Tt("MM",pt,ht),Tt("MMM",function(t,e){return e.monthsShortRegex(t)}),Tt("MMMM",function(t,e){return e.monthsRegex(t)}),Lt(["M","MM"],function(t,e){e[Yt]=It(t)-1}),Lt(["MMM","MMMM"],function(t,e,i,n){var o=i._locale.monthsParse(t,n,i._strict);null!=o?e[Yt]=o:v(i).invalidMonth=t});var oe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),se="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),re=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ae=kt,le=kt;function he(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||re).test(e)?"format":"standalone"][t.month()]:r(this._months)?this._months:this._months.standalone}function de(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[re.test(e)?"format":"standalone"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ce(t,e,i){var n,o,s,r=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(o=qt.call(this._shortMonthsParse,r))?o:null:-1!==(o=qt.call(this._longMonthsParse,r))?o:null:"MMM"===e?-1!==(o=qt.call(this._shortMonthsParse,r))||-1!==(o=qt.call(this._longMonthsParse,r))?o:null:-1!==(o=qt.call(this._longMonthsParse,r))||-1!==(o=qt.call(this._shortMonthsParse,r))?o:null}function ue(t,e,i){var n,o,s;if(this._monthsParseExact)return ce.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=f([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}}function pe(t,e){if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=It(e);else if(!c(e=t.localeData().monthsParse(e)))return t;var i=e,n=t.date();return n=n<29?n:Math.min(n,ne(t.year(),i)),t._isUTC?t._d.setUTCMonth(i,n):t._d.setMonth(i,n),t}function me(t){return null!=t?(pe(this,t),o.updateOffset(this,!0),this):Jt(this,"Month")}function fe(){return ne(this.year(),this.month())}function ge(t){return this._monthsParseExact?(l(this,"_monthsRegex")||ye.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=ae),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function ve(t){return this._monthsParseExact?(l(this,"_monthsRegex")||ye.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=le),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function ye(){function t(t,e){return e.length-t.length}var e,i,n,o,s=[],r=[],a=[];for(e=0;e<12;e++)i=f([2e3,e]),n=Et(this.monthsShort(i,"")),o=Et(this.months(i,"")),s.push(n),r.push(o),a.push(o),a.push(n);s.sort(t),r.sort(t),a.sort(t),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function be(t,e,i,n,o,s,r){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,n,o,s,r),a}function _e(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function we(t,e,i){var n=7+e-i;return-(7+_e(t,0,n).getUTCDay()-e)%7+n-1}function xe(t,e,i,n,o){var s,r,a=1+7*(e-1)+(7+i-n)%7+we(t,n,o);return a<=0?r=Xt(s=t-1)+a:a>Xt(t)?(s=t+1,r=a-Xt(t)):(s=t,r=a),{year:s,dayOfYear:r}}function De(t,e,i){var n,o,s=we(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?n=r+ke(o=t.year()-1,e,i):r>ke(t.year(),e,i)?(n=r-ke(t.year(),e,i),o=t.year()+1):(o=t.year(),n=r),{week:n,year:o}}function ke(t,e,i){var n=we(t,e,i),o=we(t+1,e,i);return(Xt(t)-n+o)/7}function Se(t){return De(t,this._week.dow,this._week.doy).week}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),Tt("w",pt,St),Tt("ww",pt,ht),Tt("W",pt,St),Tt("WW",pt,ht),At(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=It(t)});var Ce={dow:0,doy:6};function Te(){return this._week.dow}function Me(){return this._week.doy}function Oe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ee(t){var e=De(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Pe(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Ie(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ne(t,e){return t.slice(e,7).concat(t.slice(0,e))}z("d",0,"do","day"),z("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),z("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),z("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),Tt("d",pt),Tt("e",pt),Tt("E",pt),Tt("dd",function(t,e){return e.weekdaysMinRegex(t)}),Tt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Tt("dddd",function(t,e){return e.weekdaysRegex(t)}),At(["dd","ddd","dddd"],function(t,e,i,n){var o=i._locale.weekdaysParse(t,n,i._strict);null!=o?e.d=o:v(i).invalidWeekday=t}),At(["d","e","E"],function(t,e,i,n){e[n]=It(t)});var Le="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ae="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Re=kt,je=kt,Ye=kt;function He(t,e){var i=r(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ne(i,this._week.dow):t?i[t.day()]:i}function ze(t){return!0===t?Ne(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Ge(t){return!0===t?Ne(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function We(t,e,i){var n,o,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(o=qt.call(this._weekdaysParse,r))?o:null:"ddd"===e?-1!==(o=qt.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=qt.call(this._minWeekdaysParse,r))?o:null:"dddd"===e?-1!==(o=qt.call(this._weekdaysParse,r))||-1!==(o=qt.call(this._shortWeekdaysParse,r))||-1!==(o=qt.call(this._minWeekdaysParse,r))?o:null:"ddd"===e?-1!==(o=qt.call(this._shortWeekdaysParse,r))||-1!==(o=qt.call(this._weekdaysParse,r))||-1!==(o=qt.call(this._minWeekdaysParse,r))?o:null:-1!==(o=qt.call(this._minWeekdaysParse,r))||-1!==(o=qt.call(this._weekdaysParse,r))||-1!==(o=qt.call(this._shortWeekdaysParse,r))?o:null}function Be(t,e,i){var n,o,s;if(this._weekdaysParseExact)return We.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=f([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function Ve(t){if(!this.isValid())return null!=t?this:NaN;var e=Jt(this,"Day");return null!=t?(t=Pe(t,this.localeData()),this.add(t-e,"d")):e}function Ue(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Xe(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Ie(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function qe(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$e.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Re),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ze(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$e.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=je),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ke(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$e.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ye),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $e(){function t(t,e){return e.length-t.length}var e,i,n,o,s,r=[],a=[],l=[],h=[];for(e=0;e<7;e++)i=f([2e3,1]).day(e),n=Et(this.weekdaysMin(i,"")),o=Et(this.weekdaysShort(i,"")),s=Et(this.weekdays(i,"")),r.push(n),a.push(o),l.push(s),h.push(n),h.push(o),h.push(s);r.sort(t),a.sort(t),l.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(){return this.hours()||24}function ti(t,e){z(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ei(t,e){return e._meridiemParse}function ii(t){return"p"===(t+"").toLowerCase().charAt(0)}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Je),z("k",["kk",2],0,Qe),z("hmm",0,0,function(){return""+Je.apply(this)+F(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Je.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),ti("a",!0),ti("A",!1),Tt("a",ei),Tt("A",ei),Tt("H",pt,Ct),Tt("h",pt,St),Tt("k",pt,St),Tt("HH",pt,ht),Tt("hh",pt,ht),Tt("kk",pt,ht),Tt("hmm",mt),Tt("hmmss",ft),Tt("Hmm",mt),Tt("Hmmss",ft),Lt(["H","HH"],zt),Lt(["k","kk"],function(t,e,i){var n=It(t);e[zt]=24===n?0:n}),Lt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),Lt(["h","hh"],function(t,e,i){e[zt]=It(t),v(i).bigHour=!0}),Lt("hmm",function(t,e,i){var n=t.length-2;e[zt]=It(t.substr(0,n)),e[Gt]=It(t.substr(n)),v(i).bigHour=!0}),Lt("hmmss",function(t,e,i){var n=t.length-4,o=t.length-2;e[zt]=It(t.substr(0,n)),e[Gt]=It(t.substr(n,2)),e[Wt]=It(t.substr(o)),v(i).bigHour=!0}),Lt("Hmm",function(t,e,i){var n=t.length-2;e[zt]=It(t.substr(0,n)),e[Gt]=It(t.substr(n))}),Lt("Hmmss",function(t,e,i){var n=t.length-4,o=t.length-2;e[zt]=It(t.substr(0,n)),e[Gt]=It(t.substr(n,2)),e[Wt]=It(t.substr(o))});var ni=/[ap]\.?m?\.?/i,oi=$t("Hours",!0);function si(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}var ri,ai={calendar:L,longDateFormat:U,invalidDate:q,ordinal:K,dayOfMonthOrdinalParse:$,relativeTime:Q,months:oe,monthsShort:se,week:Ce,weekdays:Le,weekdaysMin:Fe,weekdaysShort:Ae,meridiemParse:ni},li={},hi={};function di(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i<n;i+=1)if(t[i]!==e[i])return i;return n}function ci(t){return t?t.toLowerCase().replace("_","-"):t}function ui(t){for(var e,i,n,o,s=0;s<t.length;){for(e=(o=ci(t[s]).split("-")).length,i=(i=ci(t[s+1]))?i.split("-"):null;e>0;){if(n=mi(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&di(o,i)>=e-1)break;e--}s++}return ri}function pi(t){return!(!t||!t.match("^[^/\\\\]*$"))}function mi(e){var i=null;if(void 0===li[e]&&t&&t.exports&&pi(e))try{i=ri._abbr,n("./locale/"+e),fi(i)}catch(t){li[e]=null}return li[e]}function fi(t,e){var i;return t&&((i=d(e)?yi(t):gi(t,e))?ri=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ri._abbr}function gi(t,e){if(null!==e){var i,n=ai;if(e.abbr=t,null!=li[t])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=li[t]._config;else if(null!=e.parentLocale)if(null!=li[e.parentLocale])n=li[e.parentLocale]._config;else{if(null==(i=mi(e.parentLocale)))return hi[e.parentLocale]||(hi[e.parentLocale]=[]),hi[e.parentLocale].push({name:t,config:e}),null;n=i._config}return li[t]=new N(I(n,e)),hi[t]&&hi[t].forEach(function(t){gi(t.name,t.config)}),fi(t),li[t]}return delete li[t],null}function vi(t,e){if(null!=e){var i,n,o=ai;null!=li[t]&&null!=li[t].parentLocale?li[t].set(I(li[t]._config,e)):(null!=(n=mi(t))&&(o=n._config),e=I(o,e),null==n&&(e.abbr=t),(i=new N(e)).parentLocale=li[t],li[t]=i),fi(t)}else null!=li[t]&&(null!=li[t].parentLocale?(li[t]=li[t].parentLocale,t===fi()&&fi(t)):null!=li[t]&&delete li[t]);return li[t]}function yi(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ri;if(!r(t)){if(e=mi(t))return e;t=[t]}return ui(t)}function bi(){return T(li)}function _i(t){var e,i=t._a;return i&&-2===v(t).overflow&&(e=i[Yt]<0||i[Yt]>11?Yt:i[Ht]<1||i[Ht]>ne(i[jt],i[Yt])?Ht:i[zt]<0||i[zt]>24||24===i[zt]&&(0!==i[Gt]||0!==i[Wt]||0!==i[Bt])?zt:i[Gt]<0||i[Gt]>59?Gt:i[Wt]<0||i[Wt]>59?Wt:i[Bt]<0||i[Bt]>999?Bt:-1,v(t)._overflowDayOfYear&&(e<jt||e>Ht)&&(e=Ht),v(t)._overflowWeeks&&-1===e&&(e=Vt),v(t)._overflowWeekday&&-1===e&&(e=Ut),v(t).overflow=e),t}var wi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xi=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Di=/Z|[+-]\d\d(?::?\d\d)?/,ki=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Si=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ci=/^\/?Date\((-?\d+)/i,Ti=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Mi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Oi(t){var e,i,n,o,s,r,a=t._i,l=wi.exec(a)||xi.exec(a),h=ki.length,d=Si.length;if(l){for(v(t).iso=!0,e=0,i=h;e<i;e++)if(ki[e][1].exec(l[1])){o=ki[e][0],n=!1!==ki[e][2];break}if(null==o)return void(t._isValid=!1);if(l[3]){for(e=0,i=d;e<i;e++)if(Si[e][1].exec(l[3])){s=(l[2]||" ")+Si[e][0];break}if(null==s)return void(t._isValid=!1)}if(!n&&null!=s)return void(t._isValid=!1);if(l[4]){if(!Di.exec(l[4]))return void(t._isValid=!1);r="Z"}t._f=o+(s||"")+(r||""),zi(t)}else t._isValid=!1}function Ei(t,e,i,n,o,s){var r=[Pi(t),se.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(o,10)];return s&&r.push(parseInt(s,10)),r}function Pi(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Ii(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ni(t,e,i){return!t||Ae.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(v(i).weekdayMismatch=!0,i._isValid=!1,!1)}function Li(t,e,i){if(t)return Mi[t];if(e)return 0;var n=parseInt(i,10),o=n%100;return(n-o)/100*60+o}function Ai(t){var e,i=Ti.exec(Ii(t._i));if(i){if(e=Ei(i[4],i[3],i[2],i[5],i[6],i[7]),!Ni(i[1],e,t))return;t._a=e,t._tzm=Li(i[8],i[9],i[10]),t._d=_e.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),v(t).rfc2822=!0}else t._isValid=!1}function Fi(t){var e=Ci.exec(t._i);null===e?(Oi(t),!1===t._isValid&&(delete t._isValid,Ai(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:o.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Ri(t,e,i){return null!=t?t:null!=e?e:i}function ji(t){var e=new Date(o.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Yi(t){var e,i,n,o,s,r=[];if(!t._d){for(n=ji(t),t._w&&null==t._a[Ht]&&null==t._a[Yt]&&Hi(t),null!=t._dayOfYear&&(s=Ri(t._a[jt],n[jt]),(t._dayOfYear>Xt(s)||0===t._dayOfYear)&&(v(t)._overflowDayOfYear=!0),i=_e(s,0,t._dayOfYear),t._a[Yt]=i.getUTCMonth(),t._a[Ht]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=n[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[zt]&&0===t._a[Gt]&&0===t._a[Wt]&&0===t._a[Bt]&&(t._nextDay=!0,t._a[zt]=0),t._d=(t._useUTC?_e:be).apply(null,r),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[zt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(v(t).weekdayMismatch=!0)}}function Hi(t){var e,i,n,o,s,r,a,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(s=1,r=4,i=Ri(e.GG,t._a[jt],De(Zi(),1,4).year),n=Ri(e.W,1),((o=Ri(e.E,1))<1||o>7)&&(l=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,h=De(Zi(),s,r),i=Ri(e.gg,t._a[jt],h.year),n=Ri(e.w,h.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+s,(e.e<0||e.e>6)&&(l=!0)):o=s),n<1||n>ke(i,s,r)?v(t)._overflowWeeks=!0:null!=l?v(t)._overflowWeekday=!0:(a=xe(i,n,o,s,r),t._a[jt]=a.year,t._dayOfYear=a.dayOfYear)}function zi(t){if(t._f!==o.ISO_8601)if(t._f!==o.RFC_2822){t._a=[],v(t).empty=!0;var e,i,n,s,r,a,l,h=""+t._i,d=h.length,c=0;for(l=(n=V(t._f,t._locale).match(R)||[]).length,e=0;e<l;e++)s=n[e],(i=(h.match(Mt(s,t))||[])[0])&&((r=h.substr(0,h.indexOf(i))).length>0&&v(t).unusedInput.push(r),h=h.slice(h.indexOf(i)+i.length),c+=i.length),H[s]?(i?v(t).empty=!1:v(t).unusedTokens.push(s),Ft(s,i,t)):t._strict&&!i&&v(t).unusedTokens.push(s);v(t).charsLeftOver=d-c,h.length>0&&v(t).unusedInput.push(h),t._a[zt]<=12&&!0===v(t).bigHour&&t._a[zt]>0&&(v(t).bigHour=void 0),v(t).parsedDateParts=t._a.slice(0),v(t).meridiem=t._meridiem,t._a[zt]=Gi(t._locale,t._a[zt],t._meridiem),null!==(a=v(t).era)&&(t._a[jt]=t._locale.erasConvertYear(a,t._a[jt])),Yi(t),_i(t)}else Ai(t);else Oi(t)}function Gi(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function Wi(t){var e,i,n,o,s,r,a=!1,l=t._f.length;if(0===l)return v(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;o<l;o++)s=0,r=!1,e=x({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],zi(e),y(e)&&(r=!0),s+=v(e).charsLeftOver,s+=10*v(e).unusedTokens.length,v(e).score=s,a?s<n&&(n=s,i=e):(null==n||s<n||r)&&(n=s,i=e,r&&(a=!0));m(t,i||e)}function Bi(t){if(!t._d){var e=ot(t._i),i=void 0===e.day?e.date:e.day;t._a=p([e.year,e.month,i,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Yi(t)}}function Vi(t){var e=new D(_i(Ui(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Ui(t){var e=t._i,i=t._f;return t._locale=t._locale||yi(t._l),null===e||void 0===i&&""===e?b({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),k(e)?new D(_i(e)):(u(e)?t._d=e:r(i)?Wi(t):i?zi(t):Xi(t),y(t)||(t._d=null),t))}function Xi(t){var e=t._i;d(e)?t._d=new Date(o.now()):u(e)?t._d=new Date(e.valueOf()):"string"==typeof e?Fi(t):r(e)?(t._a=p(e.slice(0),function(t){return parseInt(t,10)}),Yi(t)):a(e)?Bi(t):c(e)?t._d=new Date(e):o.createFromInputFallback(t)}function qi(t,e,i,n,o){var s={};return!0!==e&&!1!==e||(n=e,e=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(a(t)&&h(t)||r(t)&&0===t.length)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=i,s._i=t,s._f=e,s._strict=n,Vi(s)}function Zi(t,e,i,n){return qi(t,e,i,n,!1)}o.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),o.ISO_8601=function(){},o.RFC_2822=function(){};var Ki=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Zi.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:b()}),$i=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Zi.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:b()});function Ji(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Zi();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}function Qi(){return Ji("isBefore",[].slice.call(arguments,0))}function tn(){return Ji("isAfter",[].slice.call(arguments,0))}var en=function(){return Date.now?Date.now():+new Date},nn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function on(t){var e,i,n=!1,o=nn.length;for(e in t)if(l(t,e)&&(-1===qt.call(nn,e)||null!=t[e]&&isNaN(t[e])))return!1;for(i=0;i<o;++i)if(t[nn[i]]){if(n)return!1;parseFloat(t[nn[i]])!==It(t[nn[i]])&&(n=!0)}return!0}function sn(){return this._isValid}function rn(){return On(NaN)}function an(t){var e=ot(t),i=e.year||0,n=e.quarter||0,o=e.month||0,s=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,l=e.minute||0,h=e.second||0,d=e.millisecond||0;this._isValid=on(e),this._milliseconds=+d+1e3*h+6e4*l+1e3*a*60*60,this._days=+r+7*s,this._months=+o+3*n+12*i,this._data={},this._locale=yi(),this._bubble()}function ln(t){return t instanceof an}function hn(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function dn(t,e,i){var n,o=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(n=0;n<o;n++)It(t[n])!==It(e[n])&&r++;return r+s}function cn(t,e){z(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+F(~~(t/60),2)+e+F(~~t%60,2)})}cn("Z",":"),cn("ZZ",""),Tt("Z",xt),Tt("ZZ",xt),Lt(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=pn(xt,t)});var un=/([\+\-]|\d\d)/gi;function pn(t,e){var i,n,o=(e||"").match(t);return null===o?null:0===(n=60*(i=((o[o.length-1]||[])+"").match(un)||["-",0,0])[1]+It(i[2]))?0:"+"===i[0]?n:-n}function mn(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(k(t)||u(t)?t.valueOf():Zi(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),o.updateOffset(i,!1),i):Zi(t).local()}function fn(t){return-Math.round(t._d.getTimezoneOffset())}function gn(t,e,i){var n,s=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=pn(xt,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(n=fn(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),s!==t&&(!e||this._changeInProgress?Ln(this,On(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:fn(this)}function vn(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function yn(t){return this.utcOffset(0,t)}function bn(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(fn(this),"m")),this}function _n(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=pn(wt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function wn(t){return!!this.isValid()&&(t=t?Zi(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function xn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Dn(){if(!d(this._isDSTShifted))return this._isDSTShifted;var t,e={};return x(e,this),(e=Ui(e))._a?(t=e._isUTC?f(e._a):Zi(e._a),this._isDSTShifted=this.isValid()&&dn(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function kn(){return!!this.isValid()&&!this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC}function Cn(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Tn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Mn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function On(t,e){var i,n,o,s=t,r=null;return ln(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:c(t)||!isNaN(+t)?(s={},e?s[e]=+t:s.milliseconds=+t):(r=Tn.exec(t))?(i="-"===r[1]?-1:1,s={y:0,d:It(r[Ht])*i,h:It(r[zt])*i,m:It(r[Gt])*i,s:It(r[Wt])*i,ms:It(hn(1e3*r[Bt]))*i}):(r=Mn.exec(t))?(i="-"===r[1]?-1:1,s={y:En(r[2],i),M:En(r[3],i),w:En(r[4],i),d:En(r[5],i),h:En(r[6],i),m:En(r[7],i),s:En(r[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(o=In(Zi(s.from),Zi(s.to)),(s={}).ms=o.milliseconds,s.M=o.months),n=new an(s),ln(t)&&l(t,"_locale")&&(n._locale=t._locale),ln(t)&&l(t,"_isValid")&&(n._isValid=t._isValid),n}function En(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Pn(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function In(t,e){var i;return t.isValid()&&e.isValid()?(e=mn(e,t),t.isBefore(e)?i=Pn(t,e):((i=Pn(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Nn(t,e){return function(i,n){var o;return null===n||isNaN(+n)||(O(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),Ln(this,On(i,n),t),this}}function Ln(t,e,i,n){var s=e._milliseconds,r=hn(e._days),a=hn(e._months);t.isValid()&&(n=null==n||n,a&&pe(t,Jt(t,"Month")+a*i),r&&Qt(t,"Date",Jt(t,"Date")+r*i),s&&t._d.setTime(t._d.valueOf()+s*i),n&&o.updateOffset(t,r||a))}On.fn=an.prototype,On.invalid=rn;var An=Nn(1,"add"),Fn=Nn(-1,"subtract");function Rn(t){return"string"==typeof t||t instanceof String}function jn(t){return k(t)||u(t)||Rn(t)||c(t)||Hn(t)||Yn(t)||null==t}function Yn(t){var e,i,n=a(t)&&!h(t),o=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r=s.length;for(e=0;e<r;e+=1)i=s[e],o=o||l(t,i);return n&&o}function Hn(t){var e=r(t),i=!1;return e&&(i=0===t.filter(function(e){return!c(e)&&Rn(t)}).length),e&&i}function zn(t){var e,i,n=a(t)&&!h(t),o=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<s.length;e+=1)i=s[e],o=o||l(t,i);return n&&o}function Gn(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Wn(t,e){1===arguments.length&&(arguments[0]?jn(arguments[0])?(t=arguments[0],e=void 0):zn(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var i=t||Zi(),n=mn(i,this).startOf("day"),s=o.calendarFormat(this,n)||"sameElse",r=e&&(E(e[s])?e[s].call(this,i):e[s]);return this.format(r||this.localeData().calendar(s,this,Zi(i)))}function Bn(){return new D(this)}function Vn(t,e){var i=k(t)?t:Zi(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=nt(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())}function Un(t,e){var i=k(t)?t:Zi(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=nt(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())}function Xn(t,e,i,n){var o=k(t)?t:Zi(t),s=k(e)?e:Zi(e);return!!(this.isValid()&&o.isValid()&&s.isValid())&&("("===(n=n||"()")[0]?this.isAfter(o,i):!this.isBefore(o,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i))}function qn(t,e){var i,n=k(t)?t:Zi(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=nt(e)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))}function Zn(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Kn(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function $n(t,e,i){var n,o,s;if(!this.isValid())return NaN;if(!(n=mn(t,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),e=nt(e)){case"year":s=Jn(this,n)/12;break;case"month":s=Jn(this,n);break;case"quarter":s=Jn(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-o)/864e5;break;case"week":s=(this-n-o)/6048e5;break;default:s=this-n}return i?s:Pt(s)}function Jn(t,e){if(t.date()<e.date())return-Jn(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(i,"months");return-(i+(e-n<0?(e-n)/(n-t.clone().add(i-1,"months")):(e-n)/(t.clone().add(i+1,"months")-n)))||0}function Qn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function to(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?B(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(i,"Z")):B(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,n,o="moment",s="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),t="["+o+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",n=s+'[")]',this.format(t+e+i+n)}function io(t){t||(t=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var e=B(this,t);return this.localeData().postformat(e)}function no(t,e){return this.isValid()&&(k(t)&&t.isValid()||Zi(t).isValid())?On({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function oo(t){return this.from(Zi(),t)}function so(t,e){return this.isValid()&&(k(t)&&t.isValid()||Zi(t).isValid())?On({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ro(t){return this.to(Zi(),t)}function ao(t){var e;return void 0===t?this._locale._abbr:(null!=(e=yi(t))&&(this._locale=e),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lo=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function ho(){return this._locale}var co=1e3,uo=60*co,po=60*uo,mo=3506328*po;function fo(t,e){return(t%e+e)%e}function go(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-mo:new Date(t,e,i).valueOf()}function vo(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-mo:Date.UTC(t,e,i)}function yo(t){var e,i;if(void 0===(t=nt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?vo:go,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=fo(e+(this._isUTC?0:this.utcOffset()*uo),po);break;case"minute":e=this._d.valueOf(),e-=fo(e,uo);break;case"second":e=this._d.valueOf(),e-=fo(e,co)}return this._d.setTime(e),o.updateOffset(this,!0),this}function bo(t){var e,i;if(void 0===(t=nt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?vo:go,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=po-fo(e+(this._isUTC?0:this.utcOffset()*uo),po)-1;break;case"minute":e=this._d.valueOf(),e+=uo-fo(e,uo)-1;break;case"second":e=this._d.valueOf(),e+=co-fo(e,co)-1}return this._d.setTime(e),o.updateOffset(this,!0),this}function _o(){return this._d.valueOf()-6e4*(this._offset||0)}function wo(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function Do(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function ko(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function So(){return this.isValid()?this.toISOString():null}function Co(){return y(this)}function To(){return m({},v(this))}function Mo(){return v(this).overflow}function Oo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Eo(t,e){var i,n,s,r=this._eras||yi("en")._eras;for(i=0,n=r.length;i<n;++i)switch("string"==typeof r[i].since&&(s=o(r[i].since).startOf("day"),r[i].since=s.valueOf()),typeof r[i].until){case"undefined":r[i].until=1/0;break;case"string":s=o(r[i].until).startOf("day").valueOf(),r[i].until=s.valueOf()}return r}function Po(t,e,i){var n,o,s,r,a,l=this.eras();for(t=t.toUpperCase(),n=0,o=l.length;n<o;++n)if(s=l[n].name.toUpperCase(),r=l[n].abbr.toUpperCase(),a=l[n].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(r===t)return l[n];break;case"NNNN":if(s===t)return l[n];break;case"NNNNN":if(a===t)return l[n]}else if([s,r,a].indexOf(t)>=0)return l[n]}function Io(t,e){var i=t.since<=t.until?1:-1;return void 0===e?o(t.since).year():o(t.since).year()+(e-t.offset)*i}function No(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].name;if(n[t].until<=i&&i<=n[t].since)return n[t].name}return""}function Lo(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].narrow;if(n[t].until<=i&&i<=n[t].since)return n[t].narrow}return""}function Ao(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].abbr;if(n[t].until<=i&&i<=n[t].since)return n[t].abbr}return""}function Fo(){var t,e,i,n,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t)if(i=s[t].since<=s[t].until?1:-1,n=this.clone().startOf("day").valueOf(),s[t].since<=n&&n<=s[t].until||s[t].until<=n&&n<=s[t].since)return(this.year()-o(s[t].since).year())*i+s[t].offset;return this.year()}function Ro(t){return l(this,"_erasNameRegex")||Bo.call(this),t?this._erasNameRegex:this._erasRegex}function jo(t){return l(this,"_erasAbbrRegex")||Bo.call(this),t?this._erasAbbrRegex:this._erasRegex}function Yo(t){return l(this,"_erasNarrowRegex")||Bo.call(this),t?this._erasNarrowRegex:this._erasRegex}function Ho(t,e){return e.erasAbbrRegex(t)}function zo(t,e){return e.erasNameRegex(t)}function Go(t,e){return e.erasNarrowRegex(t)}function Wo(t,e){return e._eraYearOrdinalRegex||bt}function Bo(){var t,e,i,n,o,s=[],r=[],a=[],l=[],h=this.eras();for(t=0,e=h.length;t<e;++t)i=Et(h[t].name),n=Et(h[t].abbr),o=Et(h[t].narrow),r.push(i),s.push(n),a.push(o),l.push(i),l.push(n),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Vo(t,e){z(0,[t,t.length],0,e)}function Uo(t){return Jo.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Xo(t){return Jo.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function qo(){return ke(this.year(),1,4)}function Zo(){return ke(this.isoWeekYear(),1,4)}function Ko(){var t=this.localeData()._week;return ke(this.year(),t.dow,t.doy)}function $o(){var t=this.localeData()._week;return ke(this.weekYear(),t.dow,t.doy)}function Jo(t,e,i,n,o){var s;return null==t?De(this,n,o).year:(e>(s=ke(t,n,o))&&(e=s),Qo.call(this,t,e,i,n,o))}function Qo(t,e,i,n,o){var s=xe(t,e,i,n,o),r=_e(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function ts(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}z("N",0,0,"eraAbbr"),z("NN",0,0,"eraAbbr"),z("NNN",0,0,"eraAbbr"),z("NNNN",0,0,"eraName"),z("NNNNN",0,0,"eraNarrow"),z("y",["y",1],"yo","eraYear"),z("y",["yy",2],0,"eraYear"),z("y",["yyy",3],0,"eraYear"),z("y",["yyyy",4],0,"eraYear"),Tt("N",Ho),Tt("NN",Ho),Tt("NNN",Ho),Tt("NNNN",zo),Tt("NNNNN",Go),Lt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,i,n){var o=i._locale.erasParse(t,n,i._strict);o?v(i).era=o:v(i).invalidEra=t}),Tt("y",bt),Tt("yy",bt),Tt("yyy",bt),Tt("yyyy",bt),Tt("yo",Wo),Lt(["y","yy","yyy","yyyy"],jt),Lt(["yo"],function(t,e,i,n){var o;i._locale._eraYearOrdinalRegex&&(o=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[jt]=i._locale.eraYearOrdinalParse(t,o):e[jt]=parseInt(t,10)}),z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Vo("gggg","weekYear"),Vo("ggggg","weekYear"),Vo("GGGG","isoWeekYear"),Vo("GGGGG","isoWeekYear"),Tt("G",_t),Tt("g",_t),Tt("GG",pt,ht),Tt("gg",pt,ht),Tt("GGGG",vt,ct),Tt("gggg",vt,ct),Tt("GGGGG",yt,ut),Tt("ggggg",yt,ut),At(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=It(t)}),At(["gg","GG"],function(t,e,i,n){e[n]=o.parseTwoDigitYear(t)}),z("Q",0,"Qo","quarter"),Tt("Q",lt),Lt("Q",function(t,e){e[Yt]=3*(It(t)-1)}),z("D",["DD",2],"Do","date"),Tt("D",pt,St),Tt("DD",pt,ht),Tt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Lt(["D","DD"],Ht),Lt("Do",function(t,e){e[Ht]=It(t.match(pt)[0])});var es=$t("Date",!0);function is(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}z("DDD",["DDDD",3],"DDDo","dayOfYear"),Tt("DDD",gt),Tt("DDDD",dt),Lt(["DDD","DDDD"],function(t,e,i){i._dayOfYear=It(t)}),z("m",["mm",2],0,"minute"),Tt("m",pt,Ct),Tt("mm",pt,ht),Lt(["m","mm"],Gt);var ns=$t("Minutes",!1);z("s",["ss",2],0,"second"),Tt("s",pt,Ct),Tt("ss",pt,ht),Lt(["s","ss"],Wt);var os,ss,rs=$t("Seconds",!1);for(z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Tt("S",gt,lt),Tt("SS",gt,ht),Tt("SSS",gt,dt),os="SSSS";os.length<=9;os+="S")Tt(os,bt);function as(t,e){e[Bt]=It(1e3*("0."+t))}for(os="S";os.length<=9;os+="S")Lt(os,as);function ls(){return this._isUTC?"UTC":""}function hs(){return this._isUTC?"Coordinated Universal Time":""}ss=$t("Milliseconds",!1),z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var ds=D.prototype;function cs(t){return Zi(1e3*t)}function us(){return Zi.apply(null,arguments).parseZone()}function ps(t){return t}ds.add=An,ds.calendar=Wn,ds.clone=Bn,ds.diff=$n,ds.endOf=bo,ds.format=io,ds.from=no,ds.fromNow=oo,ds.to=so,ds.toNow=ro,ds.get=te,ds.invalidAt=Mo,ds.isAfter=Vn,ds.isBefore=Un,ds.isBetween=Xn,ds.isSame=qn,ds.isSameOrAfter=Zn,ds.isSameOrBefore=Kn,ds.isValid=Co,ds.lang=lo,ds.locale=ao,ds.localeData=ho,ds.max=$i,ds.min=Ki,ds.parsingFlags=To,ds.set=ee,ds.startOf=yo,ds.subtract=Fn,ds.toArray=Do,ds.toObject=ko,ds.toDate=xo,ds.toISOString=to,ds.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ds[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ds.toJSON=So,ds.toString=Qn,ds.unix=wo,ds.valueOf=_o,ds.creationData=Oo,ds.eraName=No,ds.eraNarrow=Lo,ds.eraAbbr=Ao,ds.eraYear=Fo,ds.year=Zt,ds.isLeapYear=Kt,ds.weekYear=Uo,ds.isoWeekYear=Xo,ds.quarter=ds.quarters=ts,ds.month=me,ds.daysInMonth=fe,ds.week=ds.weeks=Oe,ds.isoWeek=ds.isoWeeks=Ee,ds.weeksInYear=Ko,ds.weeksInWeekYear=$o,ds.isoWeeksInYear=qo,ds.isoWeeksInISOWeekYear=Zo,ds.date=es,ds.day=ds.days=Ve,ds.weekday=Ue,ds.isoWeekday=Xe,ds.dayOfYear=is,ds.hour=ds.hours=oi,ds.minute=ds.minutes=ns,ds.second=ds.seconds=rs,ds.millisecond=ds.milliseconds=ss,ds.utcOffset=gn,ds.utc=yn,ds.local=bn,ds.parseZone=_n,ds.hasAlignedHourOffset=wn,ds.isDST=xn,ds.isLocal=kn,ds.isUtcOffset=Sn,ds.isUtc=Cn,ds.isUTC=Cn,ds.zoneAbbr=ls,ds.zoneName=hs,ds.dates=C("dates accessor is deprecated. Use date instead.",es),ds.months=C("months accessor is deprecated. Use month instead",me),ds.years=C("years accessor is deprecated. Use year instead",Zt),ds.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vn),ds.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Dn);var ms=N.prototype;function fs(t,e,i,n){var o=yi(),s=f().set(n,e);return o[i](s,t)}function gs(t,e,i){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return fs(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=fs(t,n,i,"month");return o}function vs(t,e,i,n){"boolean"==typeof t?(c(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,c(e)&&(i=e,e=void 0),e=e||"");var o,s=yi(),r=t?s._week.dow:0,a=[];if(null!=i)return fs(e,(i+r)%7,n,"day");for(o=0;o<7;o++)a[o]=fs(e,(o+r)%7,n,"day");return a}function ys(t,e){return gs(t,e,"months")}function bs(t,e){return gs(t,e,"monthsShort")}function _s(t,e,i){return vs(t,e,i,"weekdays")}function ws(t,e,i){return vs(t,e,i,"weekdaysShort")}function xs(t,e,i){return vs(t,e,i,"weekdaysMin")}ms.calendar=A,ms.longDateFormat=X,ms.invalidDate=Z,ms.ordinal=J,ms.preparse=ps,ms.postformat=ps,ms.relativeTime=tt,ms.pastFuture=et,ms.set=P,ms.eras=Eo,ms.erasParse=Po,ms.erasConvertYear=Io,ms.erasAbbrRegex=jo,ms.erasNameRegex=Ro,ms.erasNarrowRegex=Yo,ms.months=he,ms.monthsShort=de,ms.monthsParse=ue,ms.monthsRegex=ve,ms.monthsShortRegex=ge,ms.week=Se,ms.firstDayOfYear=Me,ms.firstDayOfWeek=Te,ms.weekdays=He,ms.weekdaysMin=Ge,ms.weekdaysShort=ze,ms.weekdaysParse=Be,ms.weekdaysRegex=qe,ms.weekdaysShortRegex=Ze,ms.weekdaysMinRegex=Ke,ms.isPM=ii,ms.meridiem=si,fi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===It(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),o.lang=C("moment.lang is deprecated. Use moment.locale instead.",fi),o.langData=C("moment.langData is deprecated. Use moment.localeData instead.",yi);var Ds=Math.abs;function ks(){var t=this._data;return this._milliseconds=Ds(this._milliseconds),this._days=Ds(this._days),this._months=Ds(this._months),t.milliseconds=Ds(t.milliseconds),t.seconds=Ds(t.seconds),t.minutes=Ds(t.minutes),t.hours=Ds(t.hours),t.months=Ds(t.months),t.years=Ds(t.years),this}function Ss(t,e,i,n){var o=On(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function Cs(t,e){return Ss(this,t,e,1)}function Ts(t,e){return Ss(this,t,e,-1)}function Ms(t){return t<0?Math.floor(t):Math.ceil(t)}function Os(){var t,e,i,n,o,s=this._milliseconds,r=this._days,a=this._months,l=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*Ms(Ps(a)+r),r=0,a=0),l.milliseconds=s%1e3,t=Pt(s/1e3),l.seconds=t%60,e=Pt(t/60),l.minutes=e%60,i=Pt(e/60),l.hours=i%24,r+=Pt(i/24),a+=o=Pt(Es(r)),r-=Ms(Ps(o)),n=Pt(a/12),a%=12,l.days=r,l.months=a,l.years=n,this}function Es(t){return 4800*t/146097}function Ps(t){return 146097*t/4800}function Is(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=nt(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+Es(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Ps(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function Ns(t){return function(){return this.as(t)}}var Ls=Ns("ms"),As=Ns("s"),Fs=Ns("m"),Rs=Ns("h"),js=Ns("d"),Ys=Ns("w"),Hs=Ns("M"),zs=Ns("Q"),Gs=Ns("y"),Ws=Ls;function Bs(){return On(this)}function Vs(t){return t=nt(t),this.isValid()?this[t+"s"]():NaN}function Us(t){return function(){return this.isValid()?this._data[t]:NaN}}var Xs=Us("milliseconds"),qs=Us("seconds"),Zs=Us("minutes"),Ks=Us("hours"),$s=Us("days"),Js=Us("months"),Qs=Us("years");function tr(){return Pt(this.days()/7)}var er=Math.round,ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nr(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function or(t,e,i,n){var o=On(t).abs(),s=er(o.as("s")),r=er(o.as("m")),a=er(o.as("h")),l=er(o.as("d")),h=er(o.as("M")),d=er(o.as("w")),c=er(o.as("y")),u=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||r<=1&&["m"]||r<i.m&&["mm",r]||a<=1&&["h"]||a<i.h&&["hh",a]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(u=u||d<=1&&["w"]||d<i.w&&["ww",d]),(u=u||h<=1&&["M"]||h<i.M&&["MM",h]||c<=1&&["y"]||["yy",c])[2]=e,u[3]=+t>0,u[4]=n,nr.apply(null,u)}function sr(t){return void 0===t?er:"function"==typeof t&&(er=t,!0)}function rr(t,e){return void 0!==ir[t]&&(void 0===e?ir[t]:(ir[t]=e,"s"===t&&(ir.ss=e-1),!0))}function ar(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,n,o=!1,s=ir;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(o=t),"object"==typeof e&&(s=Object.assign({},ir,e),null!=e.s&&null==e.ss&&(s.ss=e.s-1)),n=or(this,!o,s,i=this.localeData()),o&&(n=i.pastFuture(+this,n)),i.postformat(n)}var lr=Math.abs;function hr(t){return(t>0)-(t<0)||+t}function dr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n,o,s,r,a,l=lr(this._milliseconds)/1e3,h=lr(this._days),d=lr(this._months),c=this.asSeconds();return c?(t=Pt(l/60),e=Pt(t/60),l%=60,t%=60,i=Pt(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=c<0?"-":"",s=hr(this._months)!==hr(c)?"-":"",r=hr(this._days)!==hr(c)?"-":"",a=hr(this._milliseconds)!==hr(c)?"-":"",o+"P"+(i?s+i+"Y":"")+(d?s+d+"M":"")+(h?r+h+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+n+"S":"")):"P0D"}var cr=an.prototype;return cr.isValid=sn,cr.abs=ks,cr.add=Cs,cr.subtract=Ts,cr.as=Is,cr.asMilliseconds=Ls,cr.asSeconds=As,cr.asMinutes=Fs,cr.asHours=Rs,cr.asDays=js,cr.asWeeks=Ys,cr.asMonths=Hs,cr.asQuarters=zs,cr.asYears=Gs,cr.valueOf=Ws,cr._bubble=Os,cr.clone=Bs,cr.get=Vs,cr.milliseconds=Xs,cr.seconds=qs,cr.minutes=Zs,cr.hours=Ks,cr.days=$s,cr.weeks=tr,cr.months=Js,cr.years=Qs,cr.humanize=ar,cr.toISOString=dr,cr.toString=dr,cr.toJSON=dr,cr.locale=ao,cr.localeData=ho,cr.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",dr),cr.lang=lo,z("X",0,0,"unix"),z("x",0,0,"valueOf"),Tt("x",_t),Tt("X",Dt),Lt("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t))}),Lt("x",function(t,e,i){i._d=new Date(It(t))}),
//! moment.js
o.version="2.30.1",s(Zi),o.fn=ds,o.min=Qi,o.max=tn,o.now=en,o.utc=f,o.unix=cs,o.months=ys,o.isDate=u,o.locale=fi,o.invalid=b,o.duration=On,o.isMoment=k,o.weekdays=_s,o.parseZone=us,o.localeData=yi,o.isDuration=ln,o.monthsShort=bs,o.weekdaysMin=xs,o.defineLocale=gi,o.updateLocale=vi,o.locales=bi,o.weekdaysShort=ws,o.normalizeUnits=nt,o.relativeTimeRounding=sr,o.relativeTimeThreshold=rr,o.calendarFormat=Gn,o.prototype=ds,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}(s)),s.exports}var a,l;a||(a=1,l=function(t){
//! moment.js locale configuration
function e(t,e,i,n){var o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?o[i][0]:o[i][1]}return t.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},l(r()));var h;h||(h=1,function(t,e){e(r())}(0,function(t){
//! moment.js locale configuration
var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;return t.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(t,n){return t?/-MMM-/.test(n)?i[t.month()]:e[t.month()]:e},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}));var d;d||(d=1,function(t,e){e(r())}(0,function(t){
//! moment.js locale configuration
var e=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],n=t.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:e,monthsShortRegex:e,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(t,e){switch(e){case"D":return t+(1===t?"er":"");default:case"M":case"Q":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}},week:{dow:1,doy:4}});return n}));var c;c||(c=1,function(t,e){e(r())}(0,function(t){return t.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}));var u;u||(u=1,function(t,e){e(r())}(0,function(t){
//! moment.js locale configuration
var e=t.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(t,e){return"元"===e[1]?1:parseInt(e[1]||t,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(t){return"午後"===t},meridiem:function(t,e,i){return t<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(t){return t.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(t){return this.week()!==t.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(t,e){switch(e){case"y":return 1===t?"元年":t+"年";case"d":case"D":case"DDD":return t+"日";default:return t}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return e}));var p;p||(p=1,function(t,e){e(r())}(0,function(t){
//! moment.js locale configuration
var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],o=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,n){return t?/-MMM-/.test(n)?i[t.month()]:e[t.month()]:e},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}});return s}));var m;m||(m=1,function(t,e){e(r())}(0,function(t){
//! moment.js locale configuration
var e="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),n=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function o(t){return t%10<5&&t%10>1&&~~(t/10)%10!=1}function s(t,e,i){var n=t+" ";switch(i){case"ss":return n+(o(t)?"sekundy":"sekund");case"m":return e?"minuta":"minutę";case"mm":return n+(o(t)?"minuty":"minut");case"h":return e?"godzina":"godzinę";case"hh":return n+(o(t)?"godziny":"godzin");case"ww":return n+(o(t)?"tygodnie":"tygodni");case"MM":return n+(o(t)?"miesiące":"miesięcy");case"yy":return n+(o(t)?"lata":"lat")}}return t.defineLocale("pl",{months:function(t,n){return t?/D MMMM/.test(n)?i[t.month()]:e[t.month()]:e},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:s,M:"miesiąc",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}));var f;f||(f=1,function(t,e){e(r())}(0,function(t){function e(t,e,i){var n,o;return"m"===i?e?"минута":"минуту":t+" "+(n=+t,o={ss:e?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:e?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[i].split("_"),n%10==1&&n%100!=11?o[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?o[1]:o[2])}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],n=t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:e,m:e,mm:e,h:"час",hh:e,d:"день",dd:e,w:"неделя",ww:e,M:"месяц",MM:e,y:"год",yy:e},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t,e,i){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:4}});return n}));var g;g||(g=1,function(t,e){e(r())}(0,function(t){function e(t,e,i){var n,o;return"m"===i?e?"хвилина":"хвилину":"h"===i?e?"година":"годину":t+" "+(n=+t,o={ss:e?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:e?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:e?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[i].split("_"),n%10==1&&n%100!=11?o[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?o[1]:o[2])}function i(t){return function(){return t+"о"+(11===this.hours()?"б":"")+"] LT"}}var n=t.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(t,e){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===t?i.nominative.slice(1,7).concat(i.nominative.slice(0,1)):t?i[/(\[[ВвУу]\]) ?dddd/.test(e)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(e)?"genitive":"nominative"][t.day()]:i.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:e,m:e,mm:e,h:"годину",hh:e,d:"день",dd:e,M:"місяць",MM:e,y:"рік",yy:e},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(t){return/^(дня|вечора)$/.test(t)},meridiem:function(t,e,i){return t<4?"ночі":t<12?"ранку":t<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t+"-й";case"D":return t+"-го";default:return t}},week:{dow:1,doy:7}});return n}));var v,y,b,_,w,x,D,k,S,C,T,M,O,E,P,I,N={};function L(){if(y)return v;y=1;var t=function(t){return t&&t.Math===Math&&t};return v=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||t("object"==typeof v&&v)||function(){return this}()||Function("return this")()}function A(){return _?b:(_=1,b=function(t){try{return!!t()}catch(t){return!0}})}function F(){return x?w:(x=1,w=!A()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function R(){if(k)return D;k=1;var t=F(),e=Function.prototype,i=e.apply,n=e.call;return D="object"==typeof Reflect&&Reflect.apply||(t?n.bind(i):function(){return n.apply(i,arguments)}),D}function j(){if(C)return S;C=1;var t=F(),e=Function.prototype,i=e.call,n=t&&e.bind.bind(i,i);return S=t?n:function(t){return function(){return i.apply(t,arguments)}},S}function Y(){if(M)return T;M=1;var t=j(),e=t({}.toString),i=t("".slice);return T=function(t){return i(e(t),8,-1)},T}function H(){if(E)return O;E=1;var t=Y(),e=j();return O=function(i){if("Function"===t(i))return e(i)}}function z(){if(I)return P;I=1;var t="object"==typeof document&&document.all;return P=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var G,W,B,V,U={};function X(){return W?G:(W=1,G=!A()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function q(){if(V)return B;V=1;var t=F(),e=Function.prototype.call;return B=t?e.bind(e):function(){return e.apply(e,arguments)},B}var Z,K,$,J,Q,tt,et,it,nt,ot,st,rt,at,lt,ht,dt,ct,ut,pt,mt,ft,gt,vt,yt,bt,_t,wt,xt,Dt,kt,St,Ct,Tt,Mt,Ot,Et,Pt,It={};function Nt(){if(Z)return It;Z=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,i=e&&!t.call({1:2},1);return It.f=i?function(t){var i=e(this,t);return!!i&&i.enumerable}:t,It}function Lt(){return $?K:($=1,K=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function At(){if(Q)return J;Q=1;var t=j(),e=A(),i=Y(),n=Object,o=t("".split);return J=e(function(){return!n("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?o(t,""):n(t)}:n,J}function Ft(){return et||(et=1,tt=function(t){return null==t}),tt}function Rt(){if(nt)return it;nt=1;var t=Ft(),e=TypeError;return it=function(i){if(t(i))throw new e("Can't call method on "+i);return i},it}function jt(){if(st)return ot;st=1;var t=At(),e=Rt();return ot=function(i){return t(e(i))},ot}function Yt(){if(at)return rt;at=1;var t=z();return rt=function(e){return"object"==typeof e?null!==e:t(e)},rt}function Ht(){return ht?lt:(ht=1,lt={})}function zt(){if(ct)return dt;ct=1;var t=Ht(),e=L(),i=z(),n=function(t){return i(t)?t:void 0};return dt=function(i,o){return arguments.length<2?n(t[i])||n(e[i]):t[i]&&t[i][o]||e[i]&&e[i][o]},dt}function Gt(){return pt?ut:(pt=1,ut=j()({}.isPrototypeOf))}function Wt(){if(ft)return mt;ft=1;var t=L().navigator,e=t&&t.userAgent;return mt=e?String(e):""}function Bt(){if(vt)return gt;vt=1;var t,e,i=L(),n=Wt(),o=i.process,s=i.Deno,r=o&&o.versions||s&&s.version,a=r&&r.v8;return a&&(e=(t=a.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&n&&(!(t=n.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=n.match(/Chrome\/(\d+)/))&&(e=+t[1]),gt=e}function Vt(){if(bt)return yt;bt=1;var t=Bt(),e=A(),i=L().String;return yt=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}),yt}function Ut(){return wt?_t:(wt=1,_t=Vt()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Xt(){if(Dt)return xt;Dt=1;var t=zt(),e=z(),i=Gt(),n=Object;return xt=Ut()?function(t){return"symbol"==typeof t}:function(o){var s=t("Symbol");return e(s)&&i(s.prototype,n(o))},xt}function qt(){if(St)return kt;St=1;var t=String;return kt=function(e){try{return t(e)}catch(t){return"Object"}}}function Zt(){if(Tt)return Ct;Tt=1;var t=z(),e=qt(),i=TypeError;return Ct=function(n){if(t(n))return n;throw new i(e(n)+" is not a function")}}function Kt(){if(Ot)return Mt;Ot=1;var t=Zt(),e=Ft();return Mt=function(i,n){var o=i[n];return e(o)?void 0:t(o)}}function $t(){if(Pt)return Et;Pt=1;var t=q(),e=z(),i=Yt(),n=TypeError;return Et=function(o,s){var r,a;if("string"===s&&e(r=o.toString)&&!i(a=t(r,o)))return a;if(e(r=o.valueOf)&&!i(a=t(r,o)))return a;if("string"!==s&&e(r=o.toString)&&!i(a=t(r,o)))return a;throw new n("Can't convert object to primitive value")}}var Jt,Qt,te,ee,ie,ne,oe,se,re,ae,le,he,de,ce,ue,pe,me,fe,ge,ve,ye,be,_e,we,xe,De,ke,Se,Ce={exports:{}};function Te(){return Qt?Jt:(Qt=1,Jt=!0)}function Me(){if(ee)return te;ee=1;var t=L(),e=Object.defineProperty;return te=function(i,n){try{e(t,i,{value:n,configurable:!0,writable:!0})}catch(e){t[i]=n}return n}}function Oe(){if(ie)return Ce.exports;ie=1;var t=Te(),e=L(),i=Me(),n="__core-js_shared__",o=Ce.exports=e[n]||i(n,{});return(o.versions||(o.versions=[])).push({version:"3.44.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ce.exports}function Ee(){if(oe)return ne;oe=1;var t=Oe();return ne=function(e,i){return t[e]||(t[e]=i||{})}}function Pe(){if(re)return se;re=1;var t=Rt(),e=Object;return se=function(i){return e(t(i))}}function Ie(){if(le)return ae;le=1;var t=j(),e=Pe(),i=t({}.hasOwnProperty);return ae=Object.hasOwn||function(t,n){return i(e(t),n)},ae}function Ne(){if(de)return he;de=1;var t=j(),e=0,i=Math.random(),n=t(1.1.toString);return he=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++e+i,36)}}function Le(){if(ue)return ce;ue=1;var t=L(),e=Ee(),i=Ie(),n=Ne(),o=Vt(),s=Ut(),r=t.Symbol,a=e("wks"),l=s?r.for||r:r&&r.withoutSetter||n;return ce=function(t){return i(a,t)||(a[t]=o&&i(r,t)?r[t]:l("Symbol."+t)),a[t]}}function Ae(){if(me)return pe;me=1;var t=q(),e=Yt(),i=Xt(),n=Kt(),o=$t(),s=TypeError,r=Le()("toPrimitive");return pe=function(a,l){if(!e(a)||i(a))return a;var h,d=n(a,r);if(d){if(void 0===l&&(l="default"),h=t(d,a,l),!e(h)||i(h))return h;throw new s("Can't convert object to primitive value")}return void 0===l&&(l="number"),o(a,l)}}function Fe(){if(ge)return fe;ge=1;var t=Ae(),e=Xt();return fe=function(i){var n=t(i,"string");return e(n)?n:n+""}}function Re(){if(ye)return ve;ye=1;var t=L(),e=Yt(),i=t.document,n=e(i)&&e(i.createElement);return ve=function(t){return n?i.createElement(t):{}},ve}function je(){if(_e)return be;_e=1;var t=X(),e=A(),i=Re();return be=!t&&!e(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})}function Ye(){if(we)return U;we=1;var t=X(),e=q(),i=Nt(),n=Lt(),o=jt(),s=Fe(),r=Ie(),a=je(),l=Object.getOwnPropertyDescriptor;return U.f=t?l:function(t,h){if(t=o(t),h=s(h),a)try{return l(t,h)}catch(t){}if(r(t,h))return n(!e(i.f,t,h),t[h])},U}function He(){if(De)return xe;De=1;var t=A(),e=z(),i=/#|\.prototype\./,n=function(i,n){var l=s[o(i)];return l===a||l!==r&&(e(n)?t(n):!!n)},o=n.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=n.data={},r=n.NATIVE="N",a=n.POLYFILL="P";return xe=n}function ze(){if(Se)return ke;Se=1;var t=H(),e=Zt(),i=F(),n=t(t.bind);return ke=function(t,o){return e(t),void 0===o?t:i?n(t,o):function(){return t.apply(o,arguments)}},ke}var Ge,We,Be,Ve,Ue,Xe,qe,Ze,Ke,$e,Je,Qe,ti,ei,ii,ni,oi,si,ri,ai,li,hi,di,ci,ui,pi,mi,fi,gi,vi,yi,bi,_i,wi,xi,Di,ki,Si,Ci={};function Ti(){return We?Ge:(We=1,Ge=X()&&A()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Mi(){if(Ve)return Be;Ve=1;var t=Yt(),e=String,i=TypeError;return Be=function(n){if(t(n))return n;throw new i(e(n)+" is not an object")}}function Oi(){if(Ue)return Ci;Ue=1;var t=X(),e=je(),i=Ti(),n=Mi(),o=Fe(),s=TypeError,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",d="writable";return Ci.f=t?i?function(t,e,i){if(n(t),e=o(e),n(i),"function"==typeof t&&"prototype"===e&&"value"in i&&d in i&&!i[d]){var s=a(t,e);s&&s[d]&&(t[e]=i.value,i={configurable:h in i?i[h]:s[h],enumerable:l in i?i[l]:s[l],writable:!1})}return r(t,e,i)}:r:function(t,i,a){if(n(t),i=o(i),n(a),e)try{return r(t,i,a)}catch(t){}if("get"in a||"set"in a)throw new s("Accessors not supported");return"value"in a&&(t[i]=a.value),t},Ci}function Ei(){if(qe)return Xe;qe=1;var t=X(),e=Oi(),i=Lt();return Xe=t?function(t,n,o){return e.f(t,n,i(1,o))}:function(t,e,i){return t[e]=i,t},Xe}function Pi(){if(Ke)return Ze;Ke=1;var t=L(),e=R(),i=H(),n=z(),o=Ye().f,s=He(),r=Ht(),a=ze(),l=Ei(),h=Ie(),d=function(t){var i=function(n,o,s){if(this instanceof i){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,o)}return new t(n,o,s)}return e(t,this,arguments)};return i.prototype=t.prototype,i};return Ze=function(e,c){var u,p,m,f,g,v,y,b,_,w=e.target,x=e.global,D=e.stat,k=e.proto,S=x?t:D?t[w]:t[w]&&t[w].prototype,C=x?r:r[w]||l(r,w,{})[w],T=C.prototype;for(f in c)p=!(u=s(x?f:w+(D?".":"#")+f,e.forced))&&S&&h(S,f),v=C[f],p&&(y=e.dontCallGetSet?(_=o(S,f))&&_.value:S[f]),g=p&&y?y:c[f],(u||k||typeof v!=typeof g)&&(b=e.bind&&p?a(g,t):e.wrap&&p?d(g):k&&n(g)?i(g):g,(e.sham||g&&g.sham||v&&v.sham)&&l(b,"sham",!0),l(C,f,b),k&&(h(r,m=w+"Prototype")||l(r,m,{}),l(r[m],f,g),e.real&&T&&(u||!T[f])&&l(T,f,g)))}}function Ii(){if(Je)return $e;Je=1;var t=Y();return $e=Array.isArray||function(e){return"Array"===t(e)}}function Ni(){if(ti)return Qe;ti=1;var t=Math.ceil,e=Math.floor;return Qe=Math.trunc||function(i){var n=+i;return(n>0?e:t)(n)}}function Li(){if(ii)return ei;ii=1;var t=Ni();return ei=function(e){var i=+e;return i!=i||0===i?0:t(i)},ei}function Ai(){if(oi)return ni;oi=1;var t=Li(),e=Math.min;return ni=function(i){var n=t(i);return n>0?e(n,9007199254740991):0}}function Fi(){if(ri)return si;ri=1;var t=Ai();return si=function(e){return t(e.length)}}function Ri(){if(li)return ai;li=1;var t=TypeError;return ai=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e},ai}function ji(){if(di)return hi;di=1;var t=X(),e=Oi(),i=Lt();return hi=function(n,o,s){t?e.f(n,o,i(0,s)):n[o]=s},hi}function Yi(){if(ui)return ci;ui=1;var t={};return t[Le()("toStringTag")]="z",ci="[object z]"===String(t)}function Hi(){if(mi)return pi;mi=1;var t=Yi(),e=z(),i=Y(),n=Le()("toStringTag"),o=Object,s="Arguments"===i(function(){return arguments}());return pi=t?i:function(t){var r,a,l;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(r=o(t),n))?a:s?i(r):"Object"===(l=i(r))&&e(r.callee)?"Arguments":l},pi}function zi(){if(gi)return fi;gi=1;var t=j(),e=z(),i=Oe(),n=t(Function.toString);return e(i.inspectSource)||(i.inspectSource=function(t){return n(t)}),fi=i.inspectSource}function Gi(){if(yi)return vi;yi=1;var t=j(),e=A(),i=z(),n=Hi(),o=zt(),s=zi(),r=function(){},a=o("Reflect","construct"),l=/^\s*(?:class|function)\b/,h=t(l.exec),d=!l.test(r),c=function(t){if(!i(t))return!1;try{return a(r,[],t),!0}catch(t){return!1}},u=function(t){if(!i(t))return!1;switch(n(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!h(l,s(t))}catch(t){return!0}};return u.sham=!0,vi=!a||e(function(){var t;return c(c.call)||!c(Object)||!c(function(){t=!0})||t})?u:c}function Wi(){if(_i)return bi;_i=1;var t=Ii(),e=Gi(),i=Yt(),n=Le()("species"),o=Array;return bi=function(s){var r;return t(s)&&(r=s.constructor,(e(r)&&(r===o||t(r.prototype))||i(r)&&null===(r=r[n]))&&(r=void 0)),void 0===r?o:r}}function Bi(){if(xi)return wi;xi=1;var t=Wi();return wi=function(e,i){return new(t(e))(0===i?0:i)}}function Vi(){if(ki)return Di;ki=1;var t=A(),e=Le(),i=Bt(),n=e("species");return Di=function(e){return i>=51||!t(function(){var t=[];return(t.constructor={})[n]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Di}function Ui(){if(Si)return N;Si=1;var t=Pi(),e=A(),i=Ii(),n=Yt(),o=Pe(),s=Fi(),r=Ri(),a=ji(),l=Bi(),h=Vi(),d=Le(),c=Bt(),u=d("isConcatSpreadable"),p=c>=51||!e(function(){var t=[];return t[u]=!1,t.concat()[0]!==t}),m=function(t){if(!n(t))return!1;var e=t[u];return void 0!==e?!!e:i(t)};return t({target:"Array",proto:!0,arity:1,forced:!p||!h("concat")},{concat:function(t){var e,i,n,h,d,c=o(this),u=l(c,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(m(d=-1===e?c:arguments[e]))for(h=s(d),r(p+h),i=0;i<h;i++,p++)i in d&&a(u,p,d[i]);else r(p+1),a(u,p++,d);return u.length=p,u}}),N}var Xi,qi,Zi={},Ki={};function $i(){if(qi)return Xi;qi=1;var t=Hi(),e=String;return Xi=function(i){if("Symbol"===t(i))throw new TypeError("Cannot convert a Symbol value to a string");return e(i)}}var Ji,Qi,tn,en,nn,on,sn,rn,an,ln,hn,dn,cn,un,pn,mn,fn,gn,vn,yn={};function bn(){if(Qi)return Ji;Qi=1;var t=Li(),e=Math.max,i=Math.min;return Ji=function(n,o){var s=t(n);return s<0?e(s+o,0):i(s,o)}}function _n(){if(en)return tn;en=1;var t=jt(),e=bn(),i=Fi(),n=function(n){return function(o,s,r){var a=t(o),l=i(a);if(0===l)return!n&&-1;var h,d=e(r,l);if(n&&s!=s){for(;l>d;)if((h=a[d++])!=h)return!0}else for(;l>d;d++)if((n||d in a)&&a[d]===s)return n||d||0;return!n&&-1}};return tn={includes:n(!0),indexOf:n(!1)}}function wn(){return on?nn:(on=1,nn={})}function xn(){if(rn)return sn;rn=1;var t=j(),e=Ie(),i=jt(),n=_n().indexOf,o=wn(),s=t([].push);return sn=function(t,r){var a,l=i(t),h=0,d=[];for(a in l)!e(o,a)&&e(l,a)&&s(d,a);for(;r.length>h;)e(l,a=r[h++])&&(~n(d,a)||s(d,a));return d},sn}function Dn(){return ln?an:(ln=1,an=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function kn(){if(dn)return hn;dn=1;var t=xn(),e=Dn();return hn=Object.keys||function(i){return t(i,e)}}function Sn(){if(cn)return yn;cn=1;var t=X(),e=Ti(),i=Oi(),n=Mi(),o=jt(),s=kn();return yn.f=t&&!e?Object.defineProperties:function(t,e){n(t);for(var r,a=o(e),l=s(e),h=l.length,d=0;h>d;)i.f(t,r=l[d++],a[r]);return t},yn}function Cn(){return pn?un:(pn=1,un=zt()("document","documentElement"))}function Tn(){if(fn)return mn;fn=1;var t=Ee(),e=Ne(),i=t("keys");return mn=function(t){return i[t]||(i[t]=e(t))}}function Mn(){if(vn)return gn;vn=1;var t,e=Mi(),i=Sn(),n=Dn(),o=wn(),s=Cn(),r=Re(),a="prototype",l="script",h=Tn()("IE_PROTO"),d=function(){},c=function(t){return"<"+l+">"+t+"</"+l+">"},u=function(t){t.write(c("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,i,o;p="undefined"!=typeof document?document.domain&&t?u(t):(i=r("iframe"),o="java"+l+":",i.style.display="none",s.appendChild(i),i.src=String(o),(e=i.contentWindow.document).open(),e.write(c("document.F=Object")),e.close(),e.F):u(t);for(var h=n.length;h--;)delete p[a][n[h]];return p()};return o[h]=!0,gn=Object.create||function(t,n){var o;return null!==t?(d[a]=e(t),o=new d,d[a]=null,o[h]=t):o=p(),void 0===n?o:i.f(o,n)}}var On,En={};function Pn(){if(On)return En;On=1;var t=xn(),e=Dn().concat("length","prototype");return En.f=Object.getOwnPropertyNames||function(i){return t(i,e)},En}var In,Nn,Ln,An={};function Fn(){return Nn?In:(Nn=1,In=j()([].slice))}function Rn(){if(Ln)return An;Ln=1;var t=Y(),e=jt(),i=Pn().f,n=Fn(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return An.f=function(s){return o&&"Window"===t(s)?function(t){try{return i(t)}catch(t){return n(o)}}(s):i(e(s))},An}var jn,Yn,Hn,zn,Gn,Wn={};function Bn(){return jn||(jn=1,Wn.f=Object.getOwnPropertySymbols),Wn}function Vn(){if(Hn)return Yn;Hn=1;var t=Ei();return Yn=function(e,i,n,o){return o&&o.enumerable?e[i]=n:t(e,i,n),e}}function Un(){if(Gn)return zn;Gn=1;var t=Oi();return zn=function(e,i,n){return t.f(e,i,n)}}var Xn,qn,Zn,Kn,$n,Jn,Qn,to,eo,io,no,oo,so,ro,ao,lo,ho={};function co(){if(Xn)return ho;Xn=1;var t=Le();return ho.f=t,ho}function uo(){if(Zn)return qn;Zn=1;var t=Ht(),e=Ie(),i=co(),n=Oi().f;return qn=function(o){var s=t.Symbol||(t.Symbol={});e(s,o)||n(s,o,{value:i.f(o)})}}function po(){if($n)return Kn;$n=1;var t=q(),e=zt(),i=Le(),n=Vn();return Kn=function(){var o=e("Symbol"),s=o&&o.prototype,r=s&&s.valueOf,a=i("toPrimitive");s&&!s[a]&&n(s,a,function(e){return t(r,this)},{arity:1})}}function mo(){if(Qn)return Jn;Qn=1;var t=Yi(),e=Hi();return Jn=t?{}.toString:function(){return"[object "+e(this)+"]"}}function fo(){if(eo)return to;eo=1;var t=Yi(),e=Oi().f,i=Ei(),n=Ie(),o=mo(),s=Le()("toStringTag");return to=function(r,a,l,h){var d=l?r:r&&r.prototype;d&&(n(d,s)||e(d,s,{configurable:!0,value:a}),h&&!t&&i(d,"toString",o))},to}function go(){if(no)return io;no=1;var t=L(),e=z(),i=t.WeakMap;return io=e(i)&&/native code/.test(String(i))}function vo(){if(so)return oo;so=1;var t,e,i,n=go(),o=L(),s=Yt(),r=Ei(),a=Ie(),l=Oe(),h=Tn(),d=wn(),c="Object already initialized",u=o.TypeError,p=o.WeakMap;if(n||l.state){var m=l.state||(l.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,t=function(t,e){if(m.has(t))throw new u(c);return e.facade=t,m.set(t,e),e},e=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var f=h("state");d[f]=!0,t=function(t,e){if(a(t,f))throw new u(c);return e.facade=t,r(t,f,e),e},e=function(t){return a(t,f)?t[f]:{}},i=function(t){return a(t,f)}}return oo={set:t,get:e,has:i,enforce:function(n){return i(n)?e(n):t(n,{})},getterFor:function(t){return function(i){var n;if(!s(i)||(n=e(i)).type!==t)throw new u("Incompatible receiver, "+t+" required");return n}}},oo}function yo(){if(ao)return ro;ao=1;var t=ze(),e=j(),i=At(),n=Pe(),o=Fi(),s=Bi(),r=e([].push),a=function(e){var a=1===e,l=2===e,h=3===e,d=4===e,c=6===e,u=7===e,p=5===e||c;return function(m,f,g,v){for(var y,b,_=n(m),w=i(_),x=o(w),D=t(f,g),k=0,S=v||s,C=a?S(m,x):l||u?S(m,0):void 0;x>k;k++)if((p||k in w)&&(b=D(y=w[k],k,_),e))if(a)C[k]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return k;case 2:r(C,y)}else switch(e){case 4:return!1;case 7:r(C,y)}return c?-1:h||d?d:C}};return ro={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}var bo,_o,wo,xo={};function Do(){return _o?bo:(_o=1,bo=Vt()&&!!Symbol.for&&!!Symbol.keyFor)}var ko,So={};var Co,To,Mo,Oo={};function Eo(){if(To)return Co;To=1;var t=j(),e=Ii(),i=z(),n=Y(),o=$i(),s=t([].push);return Co=function(t){if(i(t))return t;if(e(t)){for(var r=t.length,a=[],l=0;l<r;l++){var h=t[l];"string"==typeof h?s(a,h):"number"!=typeof h&&"Number"!==n(h)&&"String"!==n(h)||s(a,o(h))}var d=a.length,c=!0;return function(t,i){if(c)return c=!1,i;if(e(this))return i;for(var n=0;n<d;n++)if(a[n]===t)return i}}},Co}function Po(){if(Mo)return Oo;Mo=1;var t=Pi(),e=zt(),i=R(),n=q(),o=j(),s=A(),r=z(),a=Xt(),l=Fn(),h=Eo(),d=Vt(),c=String,u=e("JSON","stringify"),p=o(/./.exec),m=o("".charAt),f=o("".charCodeAt),g=o("".replace),v=o(1.1.toString),y=/[\uD800-\uDFFF]/g,b=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,w=!d||s(function(){var t=e("Symbol")("stringify detection");return"[null]"!==u([t])||"{}"!==u({a:t})||"{}"!==u(Object(t))}),x=s(function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}),D=function(t,e){var o=l(arguments),s=h(e);if(r(s)||void 0!==t&&!a(t))return o[1]=function(t,e){if(r(s)&&(e=n(s,this,c(t),e)),!a(e))return e},i(u,null,o)},k=function(t,e,i){var n=m(i,e-1),o=m(i,e+1);return p(b,t)&&!p(_,o)||p(_,t)&&!p(b,n)?"\\u"+v(f(t,0),16):t};return u&&t({target:"JSON",stat:!0,arity:3,forced:w||x},{stringify:function(t,e,n){var o=l(arguments),s=i(w?D:u,null,o);return x&&"string"==typeof s?g(s,y,k):s}}),Oo}var Io,No,Lo={};function Ao(){return No||(No=1,function(){if(lo)return Ki;lo=1;var t=Pi(),e=L(),i=q(),n=j(),o=Te(),s=X(),r=Vt(),a=A(),l=Ie(),h=Gt(),d=Mi(),c=jt(),u=Fe(),p=$i(),m=Lt(),f=Mn(),g=kn(),v=Pn(),y=Rn(),b=Bn(),_=Ye(),w=Oi(),x=Sn(),D=Nt(),k=Vn(),S=Un(),C=Ee(),T=Tn(),M=wn(),O=Ne(),E=Le(),P=co(),I=uo(),N=po(),F=fo(),R=vo(),Y=yo().forEach,H=T("hidden"),z="Symbol",G="prototype",W=R.set,B=R.getterFor(z),V=Object[G],U=e.Symbol,Z=U&&U[G],K=e.RangeError,$=e.TypeError,J=e.QObject,Q=_.f,tt=w.f,et=y.f,it=D.f,nt=n([].push),ot=C("symbols"),st=C("op-symbols"),rt=C("wks"),at=!J||!J[G]||!J[G].findChild,lt=function(t,e,i){var n=Q(V,e);n&&delete V[e],tt(t,e,i),n&&t!==V&&tt(V,e,n)},ht=s&&a(function(){return 7!==f(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a})?lt:tt,dt=function(t,e){var i=ot[t]=f(Z);return W(i,{type:z,tag:t,description:e}),s||(i.description=e),i},ct=function(t,e,i){t===V&&ct(st,e,i),d(t);var n=u(e);return d(i),l(ot,n)?(i.enumerable?(l(t,H)&&t[H][n]&&(t[H][n]=!1),i=f(i,{enumerable:m(0,!1)})):(l(t,H)||tt(t,H,m(1,f(null))),t[H][n]=!0),ht(t,n,i)):tt(t,n,i)},ut=function(t,e){d(t);var n=c(e),o=g(n).concat(gt(n));return Y(o,function(e){s&&!i(pt,n,e)||ct(t,e,n[e])}),t},pt=function(t){var e=u(t),n=i(it,this,e);return!(this===V&&l(ot,e)&&!l(st,e))&&(!(n||!l(this,e)||!l(ot,e)||l(this,H)&&this[H][e])||n)},mt=function(t,e){var i=c(t),n=u(e);if(i!==V||!l(ot,n)||l(st,n)){var o=Q(i,n);return!o||!l(ot,n)||l(i,H)&&i[H][n]||(o.enumerable=!0),o}},ft=function(t){var e=et(c(t)),i=[];return Y(e,function(t){l(ot,t)||l(M,t)||nt(i,t)}),i},gt=function(t){var e=t===V,i=et(e?st:c(t)),n=[];return Y(i,function(t){!l(ot,t)||e&&!l(V,t)||nt(n,ot[t])}),n};r||(U=function(){if(h(Z,this))throw new $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,n=O(t),o=function(t){var s=void 0===this?e:this;s===V&&i(o,st,t),l(s,H)&&l(s[H],n)&&(s[H][n]=!1);var r=m(1,t);try{ht(s,n,r)}catch(t){if(!(t instanceof K))throw t;lt(s,n,r)}};return s&&at&&ht(V,n,{configurable:!0,set:o}),dt(n,t)},k(Z=U[G],"toString",function(){return B(this).tag}),k(U,"withoutSetter",function(t){return dt(O(t),t)}),D.f=pt,w.f=ct,x.f=ut,_.f=mt,v.f=y.f=ft,b.f=gt,P.f=function(t){return dt(E(t),t)},s&&(S(Z,"description",{configurable:!0,get:function(){return B(this).description}}),o||k(V,"propertyIsEnumerable",pt,{unsafe:!0}))),t({global:!0,constructor:!0,wrap:!0,forced:!r,sham:!r},{Symbol:U}),Y(g(rt),function(t){I(t)}),t({target:z,stat:!0,forced:!r},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),t({target:"Object",stat:!0,forced:!r,sham:!s},{create:function(t,e){return void 0===e?f(t):ut(f(t),e)},defineProperty:ct,defineProperties:ut,getOwnPropertyDescriptor:mt}),t({target:"Object",stat:!0,forced:!r},{getOwnPropertyNames:ft}),N(),F(U,z),M[H]=!0}(),function(){if(wo)return xo;wo=1;var t=Pi(),e=zt(),i=Ie(),n=$i(),o=Ee(),s=Do(),r=o("string-to-symbol-registry"),a=o("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{for:function(t){var o=n(t);if(i(r,o))return r[o];var s=e("Symbol")(o);return r[o]=s,a[s]=o,s}})}(),function(){if(ko)return So;ko=1;var t=Pi(),e=Ie(),i=Xt(),n=qt(),o=Ee(),s=Do(),r=o("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{keyFor:function(t){if(!i(t))throw new TypeError(n(t)+" is not a symbol");if(e(r,t))return r[t]}})}(),Po(),function(){if(Io)return Lo;Io=1;var t=Pi(),e=Vt(),i=A(),n=Bn(),o=Pe();t({target:"Object",stat:!0,forced:!e||i(function(){n.f(1)})},{getOwnPropertySymbols:function(t){var e=n.f;return e?e(o(t)):[]}})}()),Zi}var Fo,Ro={};function jo(){return Fo||(Fo=1,uo()("asyncDispose")),Ro}var Yo;var Ho,zo={};function Go(){return Ho||(Ho=1,uo()("dispose")),zo}var Wo;var Bo;var Vo,Uo={};function Xo(){return Vo||(Vo=1,uo()("iterator")),Uo}var qo;var Zo;var Ko;var $o;var Jo;var Qo;var ts,es={};function is(){if(ts)return es;ts=1;var t=uo(),e=po();return t("toPrimitive"),e(),es}var ns,os={};var ss;var rs,as,ls,hs={};function ds(){return ls?as:(ls=1,Ui(),Ao(),jo(),Yo||(Yo=1,uo()("asyncIterator")),Go(),Wo||(Wo=1,uo()("hasInstance")),Bo||(Bo=1,uo()("isConcatSpreadable")),Xo(),qo||(qo=1,uo()("match")),Zo||(Zo=1,uo()("matchAll")),Ko||(Ko=1,uo()("replace")),$o||($o=1,uo()("search")),Jo||(Jo=1,uo()("species")),Qo||(Qo=1,uo()("split")),is(),function(){if(ns)return os;ns=1;var t=zt(),e=uo(),i=fo();e("toStringTag"),i(t("Symbol"),"Symbol")}(),ss||(ss=1,uo()("unscopables")),function(){if(rs)return hs;rs=1;var t=L();fo()(t.JSON,"JSON",!0)}(),as=Ht().Symbol)}var cs,us,ps,ms,fs,gs,vs,ys,bs,_s,ws,xs,Ds,ks,Ss,Cs,Ts,Ms,Os,Es,Ps,Is,Ns,Ls,As,Fs,Rs,js,Ys,Hs,zs,Gs,Ws,Bs,Vs,Us={};function Xs(){return us?cs:(us=1,cs=function(){})}function qs(){return ms?ps:(ms=1,ps={})}function Zs(){if(gs)return fs;gs=1;var t=X(),e=Ie(),i=Function.prototype,n=t&&Object.getOwnPropertyDescriptor,o=e(i,"name"),s=o&&"something"===function(){}.name,r=o&&(!t||t&&n(i,"name").configurable);return fs={EXISTS:o,PROPER:s,CONFIGURABLE:r}}function Ks(){return ys?vs:(ys=1,vs=!A()(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}function $s(){if(_s)return bs;_s=1;var t=Ie(),e=z(),i=Pe(),n=Tn(),o=Ks(),s=n("IE_PROTO"),r=Object,a=r.prototype;return bs=o?r.getPrototypeOf:function(n){var o=i(n);if(t(o,s))return o[s];var l=o.constructor;return e(l)&&o instanceof l?l.prototype:o instanceof r?a:null},bs}function Js(){if(xs)return ws;xs=1;var t,e,i,n=A(),o=z(),s=Yt(),r=Mn(),a=$s(),l=Vn(),h=Le(),d=Te(),c=h("iterator"),u=!1;return[].keys&&("next"in(i=[].keys())?(e=a(a(i)))!==Object.prototype&&(t=e):u=!0),!s(t)||n(function(){var e={};return t[c].call(e)!==e})?t={}:d&&(t=r(t)),o(t[c])||l(t,c,function(){return this}),ws={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:u}}function Qs(){if(ks)return Ds;ks=1;var t=Js().IteratorPrototype,e=Mn(),i=Lt(),n=fo(),o=qs(),s=function(){return this};return Ds=function(r,a,l,h){var d=a+" Iterator";return r.prototype=e(t,{next:i(+!h,l)}),n(r,d,!1,!0),o[d]=s,r}}function tr(){if(Cs)return Ss;Cs=1;var t=j(),e=Zt();return Ss=function(i,n,o){try{return t(e(Object.getOwnPropertyDescriptor(i,n)[o]))}catch(t){}},Ss}function er(){if(Ms)return Ts;Ms=1;var t=Yt();return Ts=function(e){return t(e)||null===e}}function ir(){if(Es)return Os;Es=1;var t=er(),e=String,i=TypeError;return Os=function(n){if(t(n))return n;throw new i("Can't set "+e(n)+" as a prototype")}}function nr(){if(Is)return Ps;Is=1;var t=tr(),e=Yt(),i=Rt(),n=ir();return Ps=Object.setPrototypeOf||("__proto__"in{}?function(){var o,s=!1,r={};try{(o=t(Object.prototype,"__proto__","set"))(r,[]),s=r instanceof Array}catch(t){}return function(t,r){return i(t),n(r),e(t)?(s?o(t,r):t.__proto__=r,t):t}}():void 0)}function or(){if(Ls)return Ns;Ls=1;var t=Pi(),e=q(),i=Te(),n=Zs(),o=z(),s=Qs(),r=$s(),a=nr(),l=fo(),h=Ei(),d=Vn(),c=Le(),u=qs(),p=Js(),m=n.PROPER,f=n.CONFIGURABLE,g=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,y=c("iterator"),b="keys",_="values",w="entries",x=function(){return this};return Ns=function(n,c,p,D,k,S,C){s(p,c,D);var T,M,O,E=function(t){if(t===k&&A)return A;if(!v&&t&&t in N)return N[t];switch(t){case b:case _:case w:return function(){return new p(this,t)}}return function(){return new p(this)}},P=c+" Iterator",I=!1,N=n.prototype,L=N[y]||N["@@iterator"]||k&&N[k],A=!v&&L||E(k),F="Array"===c&&N.entries||L;if(F&&(T=r(F.call(new n)))!==Object.prototype&&T.next&&(i||r(T)===g||(a?a(T,g):o(T[y])||d(T,y,x)),l(T,P,!0,!0),i&&(u[P]=x)),m&&k===_&&L&&L.name!==_&&(!i&&f?h(N,"name",_):(I=!0,A=function(){return e(L,this)})),k)if(M={values:E(_),keys:S?A:E(b),entries:E(w)},C)for(O in M)(v||I||!(O in N))&&d(N,O,M[O]);else t({target:c,proto:!0,forced:v||I},M);return i&&!C||N[y]===A||d(N,y,A,{name:k}),u[c]=A,M}}function sr(){return Fs?As:(Fs=1,As=function(t,e){return{value:t,done:e}})}function rr(){if(js)return Rs;js=1;var t=jt(),e=Xs(),i=qs(),n=vo(),o=Oi().f,s=or(),r=sr(),a=Te(),l=X(),h="Array Iterator",d=n.set,c=n.getterFor(h);Rs=s(Array,"Array",function(e,i){d(this,{type:h,target:t(e),index:0,kind:i})},function(){var t=c(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=null,r(void 0,!0);switch(t.kind){case"keys":return r(i,!1);case"values":return r(e[i],!1)}return r([i,e[i]],!1)},"values");var u=i.Arguments=i.Array;if(e("keys"),e("values"),e("entries"),!a&&l&&"values"!==u.name)try{o(u,"name",{value:"values"})}catch(t){}return Rs}function ar(){return Hs?Ys:(Hs=1,Ys={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function lr(){if(zs)return Us;zs=1,rr();var t=ar(),e=L(),i=fo(),n=qs();for(var o in t)i(e[o],o),n[o]=n.Array;return Us}function hr(){if(Ws)return Gs;Ws=1;var t=ds();return lr(),Gs=t}var dr,cr,ur,pr,mr,fr,gr,vr,yr,br,_r,wr=i(Vs?Bs:(Vs=1,Bs=hr())),xr={};function Dr(){if(ur)return cr;ur=1;var t=L(),e=Ht();return cr=function(i,n){var o=e[i+"Prototype"],s=o&&o[n];if(s)return s;var r=t[i],a=r&&r.prototype;return a&&a[n]}}function kr(){return mr?pr:(mr=1,function(){if(dr)return xr;dr=1;var t=Pi(),e=Ii(),i=Gi(),n=Yt(),o=bn(),s=Fi(),r=jt(),a=ji(),l=Le(),h=Vi(),d=Fn(),c=h("slice"),u=l("species"),p=Array,m=Math.max;t({target:"Array",proto:!0,forced:!c},{slice:function(t,l){var h,c,f,g=r(this),v=s(g),y=o(t,v),b=o(void 0===l?v:l,v);if(e(g)&&(h=g.constructor,(i(h)&&(h===p||e(h.prototype))||n(h)&&null===(h=h[u]))&&(h=void 0),h===p||void 0===h))return d(g,y,b);for(c=new(void 0===h?p:h)(m(b-y,0)),f=0;y<b;y++,f++)y in g&&a(c,f,g[y]);return c.length=f,c}})}(),pr=Dr()("Array","slice"))}function Sr(){if(gr)return fr;gr=1;var t=Gt(),e=kr(),i=Array.prototype;return fr=function(n){var o=n.slice;return n===i||t(i,n)&&o===i.slice?e:o},fr}function Cr(){return yr?vr:(yr=1,vr=Sr())}var Tr,Mr,Or,Er,Pr,Ir,Nr,Lr,Ar,Fr=i(_r?br:(_r=1,br=Cr()));function Rr(){if(Mr)return Tr;Mr=1;var t=zt(),e=j(),i=Pn(),n=Bn(),o=Mi(),s=e([].concat);return Tr=t("Reflect","ownKeys")||function(t){var e=i.f(o(t)),r=n.f;return r?s(e,r(t)):e},Tr}function jr(){return Pr?Er:(Pr=1,Or||(Or=1,Pi()({target:"Reflect",stat:!0},{ownKeys:Rr()})),Er=Ht().Reflect.ownKeys)}function Yr(){return Nr?Ir:(Nr=1,Ir=jr())}var Hr,zr,Gr,Wr,Br,Vr,Ur,Xr=i(Ar?Lr:(Ar=1,Lr=Yr()));function qr(){return Gr?zr:(Gr=1,Hr||(Hr=1,Pi()({target:"Array",stat:!0},{isArray:Ii()})),zr=Ht().Array.isArray)}function Zr(){return Br?Wr:(Br=1,Wr=qr())}var Kr,$r,Jr,Qr,ta,ea,ia,na,oa,sa=i(Ur?Vr:(Ur=1,Vr=Zr())),ra={};function aa(){return Jr?$r:(Jr=1,function(){if(Kr)return ra;Kr=1;var t=Pi(),e=yo().map;t({target:"Array",proto:!0,forced:!Vi()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),$r=Dr()("Array","map"))}function la(){if(ta)return Qr;ta=1;var t=Gt(),e=aa(),i=Array.prototype;return Qr=function(n){var o=n.map;return n===i||t(i,n)&&o===i.map?e:o},Qr}function ha(){return ia?ea:(ia=1,ea=la())}var da,ca,ua,pa,ma,fa,ga,va=i(oa?na:(oa=1,na=ha())),ya={};function ba(){return ua?ca:(ua=1,function(){if(da)return ya;da=1;var t=Pi(),e=Pe(),i=kn();t({target:"Object",stat:!0,forced:A()(function(){i(1)})},{keys:function(t){return i(e(t))}})}(),ca=Ht().Object.keys)}function _a(){return ma?pa:(ma=1,pa=ba())}var wa,xa,Da,ka,Sa,Ca,Ta,Ma=i(ga?fa:(ga=1,fa=_a())),Oa={};function Ea(){return Da?xa:(Da=1,function(){if(wa)return Oa;wa=1;var t=Pi(),e=Date,i=j()(e.prototype.getTime);t({target:"Date",stat:!0},{now:function(){return i(new e)}})}(),xa=Ht().Date.now)}function Pa(){return Sa?ka:(Sa=1,ka=Ea())}var Ia,Na,La,Aa,Fa,Ra,ja,Ya,Ha,za,Ga,Wa=i(Ta?Ca:(Ta=1,Ca=Pa())),Ba={};function Va(){if(Na)return Ia;Na=1;var t=j(),e=Zt(),i=Yt(),n=Ie(),o=Fn(),s=F(),r=Function,a=t([].concat),l=t([].join),h={};return Ia=s?r.bind:function(t){var s=e(this),d=s.prototype,c=o(arguments,1),u=function(){var e=a(c,o(arguments));return this instanceof u?function(t,e,i){if(!n(h,e)){for(var o=[],s=0;s<e;s++)o[s]="a["+s+"]";h[e]=r("C,a","return new C("+l(o,",")+")")}return h[e](t,i)}(s,e.length,e):s.apply(t,e)};return i(d)&&(u.prototype=d),u},Ia}function Ua(){return Fa?Aa:(Fa=1,function(){if(La)return Ba;La=1;var t=Pi(),e=Va();t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e})}(),Aa=Dr()("Function","bind"))}function Xa(){if(ja)return Ra;ja=1;var t=Gt(),e=Ua(),i=Function.prototype;return Ra=function(n){var o=n.bind;return n===i||t(i,n)&&o===i.bind?e:o},Ra}function qa(){return Ha?Ya:(Ha=1,Ya=Xa())}var Za,Ka,$a,Ja,Qa,tl,el,il,nl,ol,sl,rl,al,ll=i(Ga?za:(Ga=1,za=qa())),hl={};function dl(){if(Ka)return Za;Ka=1;var t=A();return Za=function(e,i){var n=[][e];return!!n&&t(function(){n.call(null,i||function(){return 1},1)})}}function cl(){if(Ja)return $a;Ja=1;var t=yo().forEach,e=dl()("forEach");return $a=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},$a}function ul(){return el?tl:(el=1,function(){if(Qa)return hl;Qa=1;var t=Pi(),e=cl();t({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e})}(),tl=Dr()("Array","forEach"))}function pl(){return nl?il:(nl=1,il=ul())}function ml(){if(sl)return ol;sl=1;var t=Hi(),e=Ie(),i=Gt(),n=pl(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return ol=function(r){var a=r.forEach;return r===o||i(o,r)&&a===o.forEach||e(s,t(r))?n:a},ol}var fl,gl,vl,yl,bl,_l,wl,xl,Dl,kl=i(al?rl:(al=1,rl=ml())),Sl={};function Cl(){return vl?gl:(vl=1,function(){if(fl)return Sl;fl=1;var t=Pi(),e=j(),i=Ii(),n=e([].reverse),o=[1,2];t({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),n(this)}})}(),gl=Dr()("Array","reverse"))}function Tl(){if(bl)return yl;bl=1;var t=Gt(),e=Cl(),i=Array.prototype;return yl=function(n){var o=n.reverse;return n===i||t(i,n)&&o===i.reverse?e:o},yl}function Ml(){return wl?_l:(wl=1,_l=Tl())}var Ol,El,Pl,Il,Nl,Ll,Al,Fl,Rl,jl,Yl,Hl,zl,Gl=i(Dl?xl:(Dl=1,xl=Ml())),Wl={};function Bl(){if(El)return Ol;El=1;var t=X(),e=Ii(),i=TypeError,n=Object.getOwnPropertyDescriptor,o=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return Ol=o?function(t,o){if(e(t)&&!n(t,"length").writable)throw new i("Cannot set read only .length");return t.length=o}:function(t,e){return t.length=e}}function Vl(){if(Il)return Pl;Il=1;var t=qt(),e=TypeError;return Pl=function(i,n){if(!delete i[n])throw new e("Cannot delete property "+t(n)+" of "+t(i))}}function Ul(){return Al?Ll:(Al=1,function(){if(Nl)return Wl;Nl=1;var t=Pi(),e=Pe(),i=bn(),n=Li(),o=Fi(),s=Bl(),r=Ri(),a=Bi(),l=ji(),h=Vl(),d=Vi()("splice"),c=Math.max,u=Math.min;t({target:"Array",proto:!0,forced:!d},{splice:function(t,d){var p,m,f,g,v,y,b=e(this),_=o(b),w=i(t,_),x=arguments.length;for(0===x?p=m=0:1===x?(p=0,m=_-w):(p=x-2,m=u(c(n(d),0),_-w)),r(_+p-m),f=a(b,m),g=0;g<m;g++)(v=w+g)in b&&l(f,g,b[v]);if(f.length=m,p<m){for(g=w;g<_-m;g++)y=g+p,(v=g+m)in b?b[y]=b[v]:h(b,y);for(g=_;g>_-m+p;g--)h(b,g-1)}else if(p>m)for(g=_-m;g>w;g--)y=g+p-1,(v=g+m-1)in b?b[y]=b[v]:h(b,y);for(g=0;g<p;g++)b[g+w]=arguments[g+2];return s(b,_-m+p),f}})}(),Ll=Dr()("Array","splice"))}function Xl(){if(Rl)return Fl;Rl=1;var t=Gt(),e=Ul(),i=Array.prototype;return Fl=function(n){var o=n.splice;return n===i||t(i,n)&&o===i.splice?e:o},Fl}function ql(){return Yl?jl:(Yl=1,jl=Xl())}var Zl,Kl,$l,Jl,Ql,th,eh,ih,nh,oh=i(zl?Hl:(zl=1,Hl=ql())),sh={};function rh(){if(Kl)return Zl;Kl=1;var t=X(),e=j(),i=q(),n=A(),o=kn(),s=Bn(),r=Nt(),a=Pe(),l=At(),h=Object.assign,d=Object.defineProperty,c=e([].concat);return Zl=!h||n(function(){if(t&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},i={},n=Symbol("assign detection"),s="abcdefghijklmnopqrst";return e[n]=7,s.split("").forEach(function(t){i[t]=t}),7!==h({},e)[n]||o(h({},i)).join("")!==s})?function(e,n){for(var h=a(e),d=arguments.length,u=1,p=s.f,m=r.f;d>u;)for(var f,g=l(arguments[u++]),v=p?c(o(g),p(g)):o(g),y=v.length,b=0;y>b;)f=v[b++],t&&!i(m,g,f)||(h[f]=g[f]);return h}:h,Zl}function ah(){return Ql?Jl:(Ql=1,function(){if($l)return sh;$l=1;var t=Pi(),e=rh();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}(),Jl=Ht().Object.assign)}function lh(){return eh?th:(eh=1,th=ah())}var hh,dh,ch,uh=i(nh?ih:(nh=1,ih=lh())),ph={};function mh(){return ch?dh:(ch=1,function(){if(hh)return ph;hh=1;var t=Pi(),e=_n().includes,i=A(),n=Xs();t({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")}(),dh=Dr()("Array","includes"))}var fh,gh,vh,yh,bh,_h,wh,xh,Dh,kh,Sh,Ch,Th,Mh,Oh,Eh={};function Ph(){if(gh)return fh;gh=1;var t=Yt(),e=Y(),i=Le()("match");return fh=function(n){var o;return t(n)&&(void 0!==(o=n[i])?!!o:"RegExp"===e(n))},fh}function Ih(){if(yh)return vh;yh=1;var t=Ph(),e=TypeError;return vh=function(i){if(t(i))throw new e("The method doesn't accept regular expressions");return i},vh}function Nh(){if(_h)return bh;_h=1;var t=Le()("match");return bh=function(e){var i=/./;try{"/./"[e](i)}catch(n){try{return i[t]=!1,"/./"[e](i)}catch(t){}}return!1}}function Lh(){return Dh?xh:(Dh=1,function(){if(wh)return Eh;wh=1;var t=Pi(),e=j(),i=Ih(),n=Rt(),o=$i(),s=Nh(),r=e("".indexOf);t({target:"String",proto:!0,forced:!s("includes")},{includes:function(t){return!!~r(o(n(this)),o(i(t)),arguments.length>1?arguments[1]:void 0)}})}(),xh=Dr()("String","includes"))}function Ah(){if(Sh)return kh;Sh=1;var t=Gt(),e=mh(),i=Lh(),n=Array.prototype,o=String.prototype;return kh=function(s){var r=s.includes;return s===n||t(n,s)&&r===n.includes?e:"string"==typeof s||s===o||t(o,s)&&r===o.includes?i:r},kh}function Fh(){return Th?Ch:(Th=1,Ch=Ah())}var Rh,jh,Yh,Hh,zh,Gh,Wh,Bh=i(Oh?Mh:(Oh=1,Mh=Fh())),Vh={};function Uh(){return Yh?jh:(Yh=1,function(){if(Rh)return Vh;Rh=1;var t=Pi(),e=A(),i=Pe(),n=$s(),o=Ks();t({target:"Object",stat:!0,forced:e(function(){n(1)}),sham:!o},{getPrototypeOf:function(t){return n(i(t))}})}(),jh=Ht().Object.getPrototypeOf)}function Xh(){return zh?Hh:(zh=1,Hh=Uh())}var qh,Zh,Kh,$h,Jh,Qh,td,ed,id=i(Wh?Gh:(Wh=1,Gh=Xh()));function nd(){return Zh?qh:(Zh=1,Ui(),qh=Dr()("Array","concat"))}function od(){if($h)return Kh;$h=1;var t=Gt(),e=nd(),i=Array.prototype;return Kh=function(n){var o=n.concat;return n===i||t(i,n)&&o===i.concat?e:o},Kh}function sd(){return Qh?Jh:(Qh=1,Jh=od())}var rd,ad,ld,hd,dd,cd,ud,pd,md,fd=i(ed?td:(ed=1,td=sd())),gd={};function vd(){return ld?ad:(ld=1,function(){if(rd)return gd;rd=1;var t=Pi(),e=yo().filter;t({target:"Array",proto:!0,forced:!Vi()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),ad=Dr()("Array","filter"))}function yd(){if(dd)return hd;dd=1;var t=Gt(),e=vd(),i=Array.prototype;return hd=function(n){var o=n.filter;return n===i||t(i,n)&&o===i.filter?e:o},hd}function bd(){return ud?cd:(ud=1,cd=yd())}var _d,wd,xd,Dd,kd,Sd,Cd,Td,Md,Od=i(md?pd:(md=1,pd=bd())),Ed={};function Pd(){if(wd)return _d;wd=1;var t=X(),e=A(),i=j(),n=$s(),o=kn(),s=jt(),r=i(Nt().f),a=i([].push),l=t&&e(function(){var t=Object.create(null);return t[2]=2,!r(t,2)}),h=function(e){return function(i){for(var h,d=s(i),c=o(d),u=l&&null===n(d),p=c.length,m=0,f=[];p>m;)h=c[m++],t&&!(u?h in d:r(d,h))||a(f,e?[h,d[h]]:d[h]);return f}};return _d={entries:h(!0),values:h(!1)}}function Id(){return kd?Dd:(kd=1,function(){if(xd)return Ed;xd=1;var t=Pi(),e=Pd().values;t({target:"Object",stat:!0},{values:function(t){return e(t)}})}(),Dd=Ht().Object.values)}function Nd(){return Cd?Sd:(Cd=1,Sd=Id())}var Ld,Ad,Fd,Rd,jd,Yd,Hd,zd,Gd,Wd,Bd,Vd,Ud,Xd=i(Md?Td:(Md=1,Td=Nd())),qd={};function Zd(){return Ad?Ld:(Ad=1,Ld="\t\n\v\f\r \u2028\u2029\ufeff")}function Kd(){if(Rd)return Fd;Rd=1;var t=j(),e=Rt(),i=$i(),n=Zd(),o=t("".replace),s=RegExp("^["+n+"]+"),r=RegExp("(^|[^"+n+"])["+n+"]+$"),a=function(t){return function(n){var a=i(e(n));return 1&t&&(a=o(a,s,"")),2&t&&(a=o(a,r,"$1")),a}};return Fd={start:a(1),end:a(2),trim:a(3)}}function $d(){if(Yd)return jd;Yd=1;var t=L(),e=A(),i=j(),n=$i(),o=Kd().trim,s=Zd(),r=t.parseInt,a=t.Symbol,l=a&&a.iterator,h=/^[+-]?0x/i,d=i(h.exec),c=8!==r(s+"08")||22!==r(s+"0x16")||l&&!e(function(){r(Object(l))});return jd=c?function(t,e){var i=o(n(t));return r(i,e>>>0||(d(h,i)?16:10))}:r,jd}function Jd(){return Gd?zd:(Gd=1,function(){if(Hd)return qd;Hd=1;var t=Pi(),e=$d();t({global:!0,forced:parseInt!==e},{parseInt:e})}(),zd=Ht().parseInt)}function Qd(){return Bd?Wd:(Bd=1,Wd=Jd())}var tc,ec,ic,nc,oc,sc,rc,ac,lc,hc=i(Ud?Vd:(Ud=1,Vd=Qd())),dc={};function cc(){return ic?ec:(ic=1,function(){if(tc)return dc;tc=1;var t=Pi(),e=H(),i=_n().indexOf,n=dl(),o=e([].indexOf),s=!!o&&1/o([1],1,-0)<0;t({target:"Array",proto:!0,forced:s||!n("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return s?o(this,t,e)||0:i(this,t,e)}})}(),ec=Dr()("Array","indexOf"))}function uc(){if(oc)return nc;oc=1;var t=Gt(),e=cc(),i=Array.prototype;return nc=function(n){var o=n.indexOf;return n===i||t(i,n)&&o===i.indexOf?e:o},nc}function pc(){return rc?sc:(rc=1,sc=uc())}var mc,fc,gc,vc,yc,bc,_c,wc=i(lc?ac:(lc=1,ac=pc())),xc={};function Dc(){return gc?fc:(gc=1,function(){if(mc)return xc;mc=1;var t=Pi(),e=Pd().entries;t({target:"Object",stat:!0},{entries:function(t){return e(t)}})}(),fc=Ht().Object.entries)}function kc(){return yc?vc:(yc=1,vc=Dc())}var Sc,Cc,Tc,Mc,Oc,Ec,Pc,Ic=i(_c?bc:(_c=1,bc=kc()));function Nc(){if(Tc)return Cc;Tc=1,Sc||(Sc=1,Pi()({target:"Object",stat:!0,sham:!X()},{create:Mn()}));var t=Ht().Object;return Cc=function(e,i){return t.create(e,i)}}function Lc(){return Oc?Mc:(Oc=1,Mc=Nc())}var Ac,Fc,Rc,jc,Yc,Hc,zc,Gc,Wc,Bc,Vc,Uc,Xc,qc=i(Pc?Ec:(Pc=1,Ec=Lc())),Zc={};function Kc(){if(Fc)return Ac;Fc=1;var t=Li(),e=$i(),i=Rt(),n=RangeError;return Ac=function(o){var s=e(i(this)),r="",a=t(o);if(a<0||a===1/0)throw new n("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(s+=s))1&a&&(r+=s);return r}}function $c(){if(jc)return Rc;jc=1;var t=j(),e=Ai(),i=$i(),n=Kc(),o=Rt(),s=t(n),r=t("".slice),a=Math.ceil,l=function(t){return function(n,l,h){var d,c,u=i(o(n)),p=e(l),m=u.length,f=void 0===h?" ":i(h);return p<=m||""===f?u:((c=s(f,a((d=p-m)/f.length))).length>d&&(c=r(c,0,d)),t?u+c:c+u)}};return Rc={start:l(!1),end:l(!0)}}function Jc(){if(Hc)return Yc;Hc=1;var t=j(),e=A(),i=$c().start,n=RangeError,o=isFinite,s=Math.abs,r=Date.prototype,a=r.toISOString,l=t(r.getTime),h=t(r.getUTCDate),d=t(r.getUTCFullYear),c=t(r.getUTCHours),u=t(r.getUTCMilliseconds),p=t(r.getUTCMinutes),m=t(r.getUTCMonth),f=t(r.getUTCSeconds);return Yc=e(function(){return"0385-07-25T07:06:39.999Z"!==a.call(new Date(-50000000000001))})||!e(function(){a.call(new Date(NaN))})?function(){if(!o(l(this)))throw new n("Invalid time value");var t=this,e=d(t),r=u(t),a=e<0?"-":e>9999?"+":"";return a+i(s(e),a?6:4,0)+"-"+i(m(t)+1,2,0)+"-"+i(h(t),2,0)+"T"+i(c(t),2,0)+":"+i(p(t),2,0)+":"+i(f(t),2,0)+"."+i(r,3,0)+"Z"}:a,Yc}function Qc(){if(Wc)return Gc;Wc=1,function(){if(zc)return Zc;zc=1;var t=Pi(),e=q(),i=Pe(),n=Ae(),o=Jc(),s=Y();t({target:"Date",proto:!0,forced:A()(function(){return null!==new Date(NaN).toJSON()||1!==e(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(t){var r=i(this),a=n(r,"number");return"number"!=typeof a||isFinite(a)?"toISOString"in r||"Date"!==s(r)?r.toISOString():e(o,r):null}})}(),Po();var t=Ht(),e=R();return t.JSON||(t.JSON={stringify:JSON.stringify}),Gc=function(i,n,o){return e(t.JSON.stringify,null,arguments)},Gc}function tu(){return Vc?Bc:(Vc=1,Bc=Qc())}var eu,iu,nu,ou,su,ru,au,lu=i(Xc?Uc:(Xc=1,Uc=tu())),hu={},du={};function cu(){if(iu)return eu;iu=1;var t=L(),e=Wt(),i=Y(),n=function(t){return e.slice(0,t.length)===t};return eu=n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function uu(){if(ou)return nu;ou=1;var t=TypeError;return nu=function(e,i){if(e<i)throw new t("Not enough arguments");return e}}function pu(){if(ru)return su;ru=1;var t,e=L(),i=R(),n=z(),o=cu(),s=Wt(),r=Fn(),a=uu(),l=e.Function,h=/MSIE .\./.test(s)||"BUN"===o&&((t=e.Bun.version.split(".")).length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2]));return su=function(t,e){var o=e?2:1;return h?function(s,h){var d=a(arguments.length,1)>o,c=n(s)?s:l(s),u=d?r(arguments,o):[],p=d?function(){i(c,this,u)}:c;return e?t(p,h):t(p)}:t},su}var mu,fu,gu,vu,yu,bu,_u={};function wu(){return fu||(fu=1,function(){if(au)return du;au=1;var t=Pi(),e=L(),i=pu()(e.setInterval,!0);t({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i})}(),function(){if(mu)return _u;mu=1;var t=Pi(),e=L(),i=pu()(e.setTimeout,!0);t({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i})}()),hu}function xu(){return vu?gu:(vu=1,wu(),gu=Ht().setTimeout)}var Du,ku,Su,Cu,Tu,Mu,Ou,Eu,Pu,Iu,Nu,Lu=i(bu?yu:(bu=1,yu=xu())),Au={};function Fu(){if(ku)return Du;ku=1;var t=Pe(),e=bn(),i=Fi();return Du=function(n){for(var o=t(this),s=i(o),r=arguments.length,a=e(r>1?arguments[1]:void 0,s),l=r>2?arguments[2]:void 0,h=void 0===l?s:e(l,s);h>a;)o[a++]=n;return o},Du}function Ru(){return Tu?Cu:(Tu=1,function(){if(Su)return Au;Su=1;var t=Pi(),e=Fu(),i=Xs();t({target:"Array",proto:!0},{fill:e}),i("fill")}(),Cu=Dr()("Array","fill"))}function ju(){if(Ou)return Mu;Ou=1;var t=Gt(),e=Ru(),i=Array.prototype;return Mu=function(n){var o=n.fill;return n===i||t(i,n)&&o===i.fill?e:o},Mu}function Yu(){return Pu?Eu:(Pu=1,Eu=ju())}var Hu,zu=i(Nu?Iu:(Nu=1,Iu=Yu())),Gu={exports:{}};var Wu,Bu=(Hu||(Hu=1,function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((i=n[o])===e||i.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(i){n=0;for(var o=(i=i.slice(0)).length;n<o;++n)i[n].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}}(Gu)),Gu.exports),Vu=i(Bu);
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
* http://naver.github.io/egjs
*
* Forked By Naver egjs
* Copyright (c) hammerjs
* Licensed under the MIT license */
function Uu(){return Uu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Uu.apply(this,arguments)}function Xu(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function qu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Wu="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign;var Zu,Ku=Wu,$u=["","webkit","Moz","MS","ms","o"],Ju="undefined"==typeof document?{style:{}}:document.createElement("div"),Qu=Math.round,tp=Math.abs,ep=Date.now;function ip(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),s=0;s<$u.length;){if((n=(i=$u[s])?i+o:e)in t)return n;s++}}Zu="undefined"==typeof window?{}:window;var np=ip(Ju.style,"touchAction"),op=void 0!==np;var sp="compute",rp="auto",ap="manipulation",lp="none",hp="pan-x",dp="pan-y",cp=function(){if(!op)return!1;var t={},e=Zu.CSS&&Zu.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){return t[i]=!e||Zu.CSS.supports("touch-action",i)}),t}(),up="ontouchstart"in Zu,pp=void 0!==ip(Zu,"PointerEvent"),mp=up&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),fp="touch",gp="mouse",vp=16,yp=24,bp=["x","y"],_p=["clientX","clientY"];function wp(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function xp(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Dp(t,e){return t.indexOf(e)>-1}var kp=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===sp&&(t=this.compute()),op&&this.manager.element.style&&cp[t]&&(this.manager.element.style[np]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return wp(this.manager.recognizers,function(e){xp(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(Dp(t,lp))return lp;var e=Dp(t,hp),i=Dp(t,dp);return e&&i?lp:e||i?e?hp:dp:Dp(t,ap)?ap:rp}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,o=Dp(n,lp)&&!cp[lp],s=Dp(n,dp)&&!cp[dp],r=Dp(n,hp)&&!cp[hp];if(o){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}if(!r||!s)return o||s&&6&i||r&&i&yp?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Sp(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Cp(t){var e=t.length;if(1===e)return{x:Qu(t[0].clientX),y:Qu(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:Qu(i/e),y:Qu(n/e)}}function Tp(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:Qu(t.pointers[i].clientX),clientY:Qu(t.pointers[i].clientY)},i++;return{timeStamp:ep(),pointers:e,center:Cp(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Mp(t,e,i){i||(i=bp);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function Op(t,e,i){i||(i=bp);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function Ep(t,e){return t===e?1:tp(t)>=tp(e)?t<0?2:4:e<0?8:vp}function Pp(t,e,i){return{x:e/t||0,y:i/t||0}}function Ip(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=Tp(e)),o>1&&!i.firstMultiple?i.firstMultiple=Tp(e):1===o&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,l=e.center=Cp(n);e.timeStamp=ep(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=Op(a,l),e.distance=Mp(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(o=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=Ep(e.deltaX,e.deltaY);var h,d,c=Pp(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=tp(c.x)>tp(c.y)?c.x:c.y,e.scale=r?(h=r.pointers,Mp((d=n)[0],d[1],_p)/Mp(h[0],h[1],_p)):1,e.rotation=r?function(t,e){return Op(e[1],e[0],_p)+Op(t[1],t[0],_p)}(r.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(8!==e.eventType&&(a>25||void 0===r.velocity)){var l=e.deltaX-r.deltaX,h=e.deltaY-r.deltaY,d=Pp(a,l,h);n=d.x,o=d.y,i=tp(d.x)>tp(d.y)?d.x:d.y,s=Ep(l,h),t.lastInterval=e}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=s}(i,e);var u,p=t.element,m=e.srcEvent;Sp(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function Np(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,s=1&e&&n-o===0,r=12&e&&n-o===0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,Ip(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Lp(t){return t.trim().split(/\s+/g)}function Ap(t,e,i){wp(Lp(e),function(e){t.addEventListener(e,i,!1)})}function Fp(t,e,i){wp(Lp(e),function(e){t.removeEventListener(e,i,!1)})}function Rp(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var jp=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){xp(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Ap(this.element,this.evEl,this.domHandler),this.evTarget&&Ap(this.target,this.evTarget,this.domHandler),this.evWin&&Ap(Rp(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Fp(this.element,this.evEl,this.domHandler),this.evTarget&&Fp(this.target,this.evTarget,this.domHandler),this.evWin&&Fp(Rp(this.element),this.evWin,this.domHandler)},t}();function Yp(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}var Hp={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},zp={2:fp,3:"pen",4:gp,5:"kinect"},Gp="pointerdown",Wp="pointermove pointerup pointercancel";Zu.MSPointerEvent&&!Zu.PointerEvent&&(Gp="MSPointerDown",Wp="MSPointerMove MSPointerUp MSPointerCancel");var Bp=function(t){function e(){var i,n=e.prototype;return n.evEl=Gp,n.evWin=Wp,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Xu(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Hp[n],s=zp[t.pointerType]||t.pointerType,r=s===fp,a=Yp(e,t.pointerId,"pointerId");1&o&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):12&o&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))},e}(jp);function Vp(t){return Array.prototype.slice.call(t,0)}function Up(t,e,i){for(var n=[],o=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];Yp(o,r)<0&&n.push(t[s]),o[s]=r,s++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}var Xp={touchstart:1,touchmove:2,touchend:4,touchcancel:8},qp=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return Xu(e,t),e.prototype.handler=function(t){var e=Xp[t.type],i=Zp.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:fp,srcEvent:t})},e}(jp);function Zp(t,e){var i,n,o=Vp(t.touches),s=this.targetIds;if(3&e&&1===o.length)return s[o[0].identifier]=!0,[o,o];var r=Vp(t.changedTouches),a=[],l=this.target;if(n=o.filter(function(t){return Sp(t.target,l)}),1===e)for(i=0;i<n.length;)s[n[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),12&e&&delete s[r[i].identifier],i++;return a.length?[Up(n.concat(a),"identifier",!0),a]:void 0}var Kp={mousedown:1,mousemove:2,mouseup:4},$p=function(t){function e(){var i,n=e.prototype;return n.evEl="mousedown",n.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return Xu(e,t),e.prototype.handler=function(t){var e=Kp[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:gp,srcEvent:t}))},e}(jp);function Jp(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(i);setTimeout(function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)},2500)}}function Qp(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,Jp.call(this,e)):12&t&&Jp.call(this,e)}function tm(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],s=Math.abs(e-o.x),r=Math.abs(i-o.y);if(s<=25&&r<=25)return!0}return!1}var em=function(){return function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handler=function(t,e,i){var o=i.pointerType===fp,s=i.pointerType===gp;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)Qp.call(qu(qu(n)),e,i);else if(s&&tm.call(qu(qu(n)),i))return;n.callback(t,e,i)}},n.touch=new qp(n.manager,n.handler),n.mouse=new $p(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return Xu(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(jp)}();function im(t,e,i){return!!Array.isArray(t)&&(wp(t,i[e],i),!0)}var nm=32,om=1;function sm(t,e){var i=e.manager;return i?i.get(t):t}function rm(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var am=function(){function t(t){void 0===t&&(t={}),this.options=Uu({enable:!0},t),this.id=om++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return Ku(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(im(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=sm(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return im(t,"dropRecognizeWith",this)||(t=sm(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(im(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Yp(e,t=sm(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(im(t,"dropRequireFailure",this))return this;t=sm(t,this);var e=Yp(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+rm(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+rm(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=nm},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=Ku({},t);if(!xp(this.options.enable,[this,e]))return this.reset(),void(this.state=nm);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),lm=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Uu({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}Xu(e,t);var i=e.prototype;return i.getTouchAction=function(){return[ap]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&s&&n){if(4!==t.eventType)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||Mp(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&r?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout(function(){e.state=8,e.tryEmit()},i.interval),2):8}return nm},i.failTimeout=function(){var t=this;return this._timer=setTimeout(function(){t.state=nm},this.options.interval),nm},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(am),hm=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Uu({pointers:1},e))||this}Xu(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,n=6&e,o=this.attrTest(t);return n&&(8&i||!o)?16|e:n||o?4&i?8|e:2&e?4|e:2:nm},e}(am);function dm(t){return t===vp?"down":8===t?"up":2===t?"left":4===t?"right":""}var cm=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Uu({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}Xu(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(dp),t&yp&&e.push(hp),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,s=t.deltaX,r=t.deltaY;return o&e.direction||(6&e.direction?(o=0===s?1:s<0?2:4,i=s!==this.pX,n=Math.abs(t.deltaX)):(o=0===r?1:r<0?8:vp,i=r!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return hm.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=dm(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(hm),um=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Uu({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}Xu(e,t);var i=e.prototype;return i.getTouchAction=function(){return cm.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return 30&n?i=e.overallVelocity:6&n?i=e.overallVelocityX:n&yp&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&tp(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=dm(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(hm),pm=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Uu({event:"pinch",threshold:0,pointers:2},e))||this}Xu(e,t);var i=e.prototype;return i.getTouchAction=function(){return[lp]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(hm),mm=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Uu({event:"rotate",threshold:0,pointers:2},e))||this}Xu(e,t);var i=e.prototype;return i.getTouchAction=function(){return[lp]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(hm),fm=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Uu({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Xu(e,t);var i=e.prototype;return i.getTouchAction=function(){return[rp]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime>i.time;if(this._input=t,!o||!n||12&t.eventType&&!s)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout(function(){e.state=8,e.tryEmit()},i.time);else if(4&t.eventType)return 8;return nm},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=ep(),this.manager.emit(this.options.event,this._input)))},e}(am),gm={domEvents:!1,touchAction:sp,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},vm=[[mm,{enable:!1}],[pm,{enable:!1},["rotate"]],[um,{direction:6}],[cm,{direction:6},["swipe"]],[lm],[lm,{event:"doubletap",taps:2},["tap"]],[fm]];function ym(t,e){var i,n=t.element;n.style&&(wp(t.options.cssProps,function(o,s){i=ip(n.style,s),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}var bm=function(){function t(t,e){var i,n=this;this.options=Ku({},gm,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(pp?Bp:mp?qp:up?em:$p))(i,Np),this.touchAction=new kp(this,this.options.touchAction),ym(this,!0),wp(this.options.recognizers,function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return Ku(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var s=0;s<n.length;)i=n[s],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),s++}},e.get=function(t){if(t instanceof am)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(im(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(im(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=Yp(i,e);-1!==n&&(i.splice(n,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return wp(Lp(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return wp(Lp(t),function(t){e?i[t]&&i[t].splice(Yp(i[t],e),1):delete i[t]}),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},e.destroy=function(){this.element&&ym(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),_m={touchstart:1,touchmove:2,touchend:4,touchcancel:8},wm=function(t){function e(){var i,n=e.prototype;return n.evTarget="touchstart",n.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return Xu(e,t),e.prototype.handler=function(t){var e=_m[t.type];if(1===e&&(this.started=!0),this.started){var i=xm.call(this,t,e);12&e&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:fp,srcEvent:t})}},e}(jp);function xm(t,e){var i=Vp(t.touches),n=Vp(t.changedTouches);return 12&e&&(i=Up(i.concat(n),"identifier",!0)),[i,n]}function Dm(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,i),t.apply(this,arguments)}}var km=Dm(function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;)(!i||i&&void 0===t[n[o]])&&(t[n[o]]=e[n[o]]),o++;return t},"extend","Use `assign`."),Sm=Dm(function(t,e){return km(t,e,!0)},"merge","Use `assign`.");function Cm(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&Ku(n,i)}function Tm(t,e){return function(){return t.apply(e,arguments)}}var Mm=function(){var t=function(t,e){return void 0===e&&(e={}),new bm(t,Uu({recognizers:vm.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=vp,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=yp,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=vp,t.INPUT_START=1,t.INPUT_MOVE=2,t.INPUT_END=4,t.INPUT_CANCEL=8,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=nm,t.Manager=bm,t.Input=jp,t.TouchAction=kp,t.TouchInput=qp,t.MouseInput=$p,t.PointerEventInput=Bp,t.TouchMouseInput=em,t.SingleTouchInput=wm,t.Recognizer=am,t.AttrRecognizer=hm,t.Tap=lm,t.Pan=cm,t.Swipe=um,t.Pinch=pm,t.Rotate=mm,t.Press=fm,t.on=Ap,t.off=Fp,t.each=wp,t.merge=Sm,t.extend=km,t.bindFn=Tm,t.assign=Ku,t.inherit=Cm,t.bindFn=Tm,t.prefixed=ip,t.toArray=Vp,t.inArray=Yp,t.uniqueArray=Up,t.splitStr=Lp,t.boolOrFn=xp,t.hasParent=Sp,t.addEventListeners=Ap,t.removeEventListeners=Fp,t.defaults=Ku({},gm,{preset:vm}),t}();Mm.defaults;const Om=wr("DELETE");function Em(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Pm({},t,...i)}function Pm(){const t=Im(...arguments);return Lm(t),t}function Im(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<2)return e[0];if(e.length>2)return Im(Pm(e[0],e[1]),...Fr(e).call(e,2));const n=e[0],o=e[1];if(n instanceof Date&&o instanceof Date)return n.setTime(o.getTime()),n;for(const t of Xr(o))Object.prototype.propertyIsEnumerable.call(o,t)&&(o[t]===Om?delete n[t]:null===n[t]||null===o[t]||"object"!=typeof n[t]||"object"!=typeof o[t]||sa(n[t])||sa(o[t])?n[t]=Nm(o[t]):n[t]=Im(n[t],o[t]));return n}function Nm(t){return sa(t)?va(t).call(t,t=>Nm(t)):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):Im({},t):t}function Lm(t){for(const e of Ma(t))t[e]===Om?delete t[e]:"object"==typeof t[e]&&null!==t[e]&&Lm(t[e])}const Am="undefined"!=typeof window?window.Hammer||Mm:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function Fm(t){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const i=Am(this._dom.overlay);i.on("tap",ll(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{i.destroy()});const n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];kl(n).call(n,t=>{i.on(t,t=>{t.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=e=>{(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=t=>{("key"in t?"Escape"===t.key:27===t.keyCode)&&this.deactivate()}}Vu(Fm.prototype),Fm.current=null,Fm.prototype.destroy=function(){this.deactivate();for(const i of Gl(t=oh(e=this._cleanupQueue).call(e,0)).call(t)){var t,e;i()}},Fm.prototype.activate=function(){Fm.current&&Fm.current.deactivate(),Fm.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},Fm.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},Fm.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const Rm=/^\/?Date\((-?\d+)/i,jm=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ym=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Hm=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,zm=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Gm(t){return t instanceof Number||"number"==typeof t}function Wm(t){return t instanceof String||"string"==typeof t}function Bm(t){return"object"==typeof t&&null!==t}function Vm(t,e,i,n){let o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]),o?delete t[i]:t[i]=e[i]}const Um=uh;function Xm(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||!0===i)if("object"==typeof e[s]&&null!==e[s]&&id(e[s])===Object.prototype)void 0===t[s]?t[s]=Xm({},e[s],i):"object"==typeof t[s]&&null!==t[s]&&id(t[s])===Object.prototype?Xm(t[s],e[s],i):Vm(t,e,s,n);else if(sa(e[s])){var o;t[s]=Fr(o=e[s]).call(o)}else Vm(t,e,s,n);return t}function qm(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":sa(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function Zm(t,e){return[...t,e]}function Km(t){return Fr(t).call(t)}const $m=Xd;const Jm={asBoolean:(t,e)=>("function"==typeof t&&(t=t()),null!=t?0!=t:e||null),asNumber:(t,e)=>("function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null),asString:(t,e)=>("function"==typeof t&&(t=t()),null!=t?String(t):e||null),asSize:(t,e)=>("function"==typeof t&&(t=t()),Wm(t)?t:Gm(t)?t+"px":e||null),asElement:(t,e)=>("function"==typeof t&&(t=t()),t||e||null)};function Qm(t){let e;switch(t.length){case 3:case 4:return e=Ym.exec(t),e?{r:hc(e[1]+e[1],16),g:hc(e[2]+e[2],16),b:hc(e[3]+e[3],16)}:null;case 6:case 7:return e=jm.exec(t),e?{r:hc(e[1],16),g:hc(e[2],16),b:hc(e[3],16)}:null;default:return null}}function tf(t,e,i){var n;return"#"+Fr(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function ef(t,e,i){t/=255,e/=255,i/=255;const n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));if(n===o)return{h:0,s:0,v:n};return{h:60*((t===n?3:i===n?1:5)-(t===n?e-i:i===n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}}function nf(t){const e=document.createElement("div"),i={};e.style.cssText=t;for(let t=0;t<e.style.length;++t)i[e.style[t]]=e.style.getPropertyValue(e.style[t]);return i}function of(t,e,i){let n,o,s;const r=Math.floor(6*t),a=6*t-r,l=i*(1-e),h=i*(1-a*e),d=i*(1-(1-a)*e);switch(r%6){case 0:n=i,o=d,s=l;break;case 1:n=h,o=i,s=l;break;case 2:n=l,o=i,s=d;break;case 3:n=l,o=h,s=i;break;case 4:n=d,o=l,s=i;break;case 5:n=i,o=l,s=h}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*s)}}function sf(t,e,i){const n=of(t,e,i);return tf(n.r,n.g,n.b)}function rf(t){const e=Qm(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return ef(e.r,e.g,e.b)}function af(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function lf(t){return Hm.test(t)}function hf(t){return zm.test(t)}function df(t){if(null===t||"object"!=typeof t)return null;if(t instanceof Element)return t;const e=qc(t);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==typeof t[i]&&(e[i]=df(t[i]));return e}const cf={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1+--t*t*t*t*t,easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};const uf={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};let pf=class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return uf[t]}setColor(t){let e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"===t)return;const n=this._isColorString(t);if(void 0!==n&&(t=n),!0===Wm(t)){if(!0===lf(t)){const i=t.substr(4).substr(0,t.length-5).split(",");e={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===hf(t)){const i=t.substr(5).substr(0,t.length-6).split(",");e={r:i[0],g:i[1],b:i[2],a:i[3]}}else if(!0===af(t)){const i=Qm(t);e={r:i.r,g:i.g,b:i.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){const i=void 0!==t.a?t.a:"1.0";e={r:t.r,g:t.g,b:t.b,a:i}}if(void 0===e)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+lu(t));this._setColor(e,i)}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=uh({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Lu(()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=uh({},t)),this.color=t;const e=ef(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),s=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){const e=ef(this.color.r,this.color.g,this.color.b);e.v=t/100;const i=of(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color;const e=ef(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),zu(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const o=this;this.opacityRange.onchange=function(){o._setOpacity(this.value)},this.opacityRange.oninput=function(){o._setOpacity(this.value)},this.brightnessRange.onchange=function(){o._setBrightness(this.value)},this.brightnessRange.oninput=function(){o._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=ll(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=ll(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=ll(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=ll(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new Am(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",t=>{t.isFirst&&this._moveSelector(t)}),this.hammer.on("tap",t=>{this._moveSelector(t)}),this.hammer.on("panstart",t=>{this._moveSelector(t)}),this.hammer.on("panmove",t=>{this._moveSelector(t)}),this.hammer.on("panend",t=>{this._moveSelector(t)})}_generateHueCircle(){if(!1===this.generated){const t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;let n,o,s,r;t.clearRect(0,0,e,i),this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;const a=2*Math.PI/360,l=1/360,h=1/this.r;let d;for(s=0;s<360;s++)for(r=0;r<this.r;r++)n=this.centerCoordinates.x+r*Math.sin(a*s),o=this.centerCoordinates.y+r*Math.cos(a*s),d=of(s*l,r*h,1),t.fillStyle="rgb("+d.r+","+d.g+","+d.b+")",t.fillRect(n-.5,o-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,e,i)}this.generated=!0}_moveSelector(t){const e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=n-o,l=Math.atan2(r,a),h=.98*Math.min(Math.sqrt(r*r+a*a),s),d=Math.cos(l)*h+o,c=Math.sin(l)*h+s;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";let u=l/(2*Math.PI);u=u<0?u+1:u;const p=h/this.r,m=ef(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;const f=of(m.h,m.s,m.v);f.a=this.color.a,this.color=f,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}};function mf(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<1)throw new TypeError("Invalid arguments.");if(1===e.length)return document.createTextNode(e[0]);{const t=document.createElement(e[0]);return t.appendChild(mf(...Fr(e).call(e,1))),t}}let ff,gf=!1;const vf="background: #FFeeee; color: #dd0000";const yf=Fm,bf=pf,_f=class{constructor(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>!1;this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},uh(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new pf(n),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(sa(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==Od(t)&&(this.options.filter=Od(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===Od(this.options)&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const t=Od(this.options);let e=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):!0!==t&&-1===wc(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}_clean(){for(let t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t){if(!0===this.allowCreation){const o=document.createElement("div");o.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return kl(i).call(i,t=>{o.appendChild(t)}),this.domElements.push(o),this.domElements.length}return 0}_makeHeader(t){const e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerText=t,this._makeItem([],e)}_makeLabel(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(mf("i","b",t))}else n.innerText=t+":";return n}_makeDropdown(t,e,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==wc(t).call(t,e)&&(o=wc(t).call(t,e));for(let e=0;e<t.length;e++){const i=document.createElement("option");i.value=t[e],e===o&&(i.selected="selected"),i.innerText=t[e],n.appendChild(i)}const s=this;n.onchange=function(){s._update(this.value,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeRange(t,e,i){const n=t[0],o=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=s}catch(t){}a.step=r;let l="",h=0;if(void 0!==e){const t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),h=a.min,l="range increased"):e/t<o&&(a.min=Math.ceil(e/t),h=a.min,l="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),h=a.max,l="range increased"),a.value=e}else a.value=n;const d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=a.value;const c=this;a.onchange=function(){d.value=this.value,c._update(Number(this.value),i)},a.oninput=function(){d.value=this.value};const u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,d);""!==l&&this.popupHistory[p]!==h&&(this.popupHistory[p]=h,this._setupPopup(l,p))}_makeButton(){if(!0===this.options.showButton){const t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){const i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerText=t,i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Lu(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Lu(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){const n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));const o=this;n.onchange=function(){o._update(this.checked,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeTextInput(t,e,i){const n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});const o=this;n.onchange=function(){o._update(this.value,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeColorField(t,e,i){const n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{const n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)}),this.colorPicker.setCloseCallback(()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}})}_handleObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1;const o=Od(this.options);let s=!1;for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){n=!0;const a=t[r],l=Zm(e,r);if("function"==typeof o&&(n=o(r,e),!1===n&&!sa(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i)),!1!==n){s=!0;const t=this._getValue(l);if(sa(a))this._handleArray(a,t,l);else if("string"==typeof a)this._makeTextInput(a,t,l);else if("boolean"==typeof a)this._makeCheckbox(a,t,l);else if(a instanceof Object){if(!this.hideOption(e,r,this.moduleOptions))if(void 0!==a.enabled){const t=Zm(l,"enabled"),e=this._getValue(t);if(!0===e){const t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}else this._makeCheckbox(a,e,l)}else{const t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}}else console.error("dont know how to handle",a,r,l)}}return s}_handleArray(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}_update(t,e){const i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===n[e[i]]&&(n[e[i]]={}),i!==e.length-1?n=n[e[i]]:n[e[i]]=t);return i}_printOptions(){const t=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(mf("pre","const options = "+lu(t,null,2)))}getOptions(){const t={};for(let e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}},wf=Am,xf=class{constructor(t,e){this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(t,e){this.x=hc(t),this.y=hc(e)}setText(t){if(t instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(t)}else this.frame.innerText=t}show(t){if(void 0===t&&(t=!0),!0===t){const t=this.frame.clientHeight,e=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,n=this.frame.parentNode.clientWidth;let o=0,s=0;if("flip"==this.overflowMethod){let i=!1,r=!0;this.y-t<this.padding&&(r=!1),this.x+e>n-this.padding&&(i=!0),o=i?this.x-e:this.x,s=r?this.y-t:this.y}else s=this.y-t,s+t+this.padding>i&&(s=i-t-this.padding),s<this.padding&&(s=this.padding),o=this.x,o+e+this.padding>n&&(o=n-e-this.padding),o<this.padding&&(o=this.padding);this.frame.style.left=o+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},Df=vf,kf=class t{static validate(e,i,n){gf=!1,ff=i;let o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),gf}static parse(e,i,n){for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.check(o,e,i,n)}static check(e,i,n,o){if(void 0===n[e]&&void 0===n.__any__)return void t.getSuggestion(e,n,o);let s=e,r=!0;void 0===n[e]&&void 0!==n.__any__&&(s="__any__",r="object"===t.getType(i[e]));let a=n[s];r&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,s,a,o)}static checkFields(e,i,n,o,s,r){const a=function(i){console.error("%c"+i+t.printLocation(r,e),vf)},l=t.getType(i[e]),h=s[l];void 0!==h?"array"===t.getType(h)&&-1===wc(h).call(h,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+i[e]+'". '),gf=!0):"object"===l&&"__any__"!==o&&(r=Zm(r,e),t.parse(i[e],n[o],r)):void 0===s.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(Ma(s))+". Received ["+l+'] "'+i[e]+'"'),gf=!0)}static getType(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":sa(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(e,i,n){const o=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,ff,[],!0);let r;r=void 0!==o.indexMatch?" in "+t.printLocation(o.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+t.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+t.printLocation(o.path,e):". Did you mean one of these: "+t.print(Ma(i))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+r,vf),gf=!0}static findInOptions(e,i,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[];const l=e.toLowerCase();let h;for(const c in i){let u;if(void 0!==i[c].__type__&&!0===o){const o=t.findInOptions(e,i[c],Zm(n,c));s>o.distance&&(r=o.closestMatch,a=o.path,s=o.distance,h=o.indexMatch)}else{var d;-1!==wc(d=c.toLowerCase()).call(d,l)&&(h=c),u=t.levenshteinDistance(e,c),s>u&&(r=c,a=Km(n),s=u)}}return{closestMatch:r,path:a,distance:s,indexMatch:h}}static printLocation(t,e){let i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)i+=" ";i+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)i+=" ";i+=e+"\n";for(let e=0;e<t.length+1;e++){for(let n=0;n<t.length-e;n++)i+=" ";i+="}\n"}return i+"\n\n"}static print(t){return lu(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const i=[];let n,o;for(n=0;n<=e.length;n++)i[n]=[n];for(o=0;o<=t.length;o++)i[0][o]=o;for(n=1;n<=e.length;n++)for(o=1;o<=t.length;o++)e.charAt(n-1)==t.charAt(o-1)?i[n][o]=i[n-1][o-1]:i[n][o]=Math.min(i[n-1][o-1]+1,Math.min(i[n][o-1]+1,i[n-1][o]+1));return i[e.length][t.length]}};var Sf=Object.freeze({__proto__:null,Activator:yf,Alea:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){let[e,i,n]=function(){const t=function(){let t=4022871197;return function(e){const i=e.toString();for(let e=0;e<i.length;e++){t+=i.charCodeAt(e);let n=.02519603282416938*t;t=n>>>0,n-=t,n*=t,t=n>>>0,n-=t,t+=4294967296*n}return 2.3283064365386963e-10*(t>>>0)}}();let e=t(" "),i=t(" "),n=t(" ");for(let o=0;o<arguments.length;o++)e-=t(o<0||arguments.length<=o?void 0:arguments[o]),e<0&&(e+=1),i-=t(o<0||arguments.length<=o?void 0:arguments[o]),i<0&&(i+=1),n-=t(o<0||arguments.length<=o?void 0:arguments[o]),n<0&&(n+=1);return[e,i,n]}(t),o=1;const s=()=>{const t=2091639*e+2.3283064365386963e-10*o;return e=i,i=n,n=t-(o=0|t)};return s.uint32=()=>4294967296*s(),s.fract53=()=>s()+11102230246251565e-32*(2097152*s()|0),s.algorithm="Alea",s.seed=t,s.version="0.9",s}(e.length?e:[Wa()])},ColorPicker:bf,Configurator:_f,DELETE:Om,HSVToHex:sf,HSVToRGB:of,Hammer:wf,Popup:xf,RGBToHSV:ef,RGBToHex:tf,VALIDATOR_PRINT_STYLE:Df,Validator:kf,addClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=fd(i).call(i,Od(n).call(n,function(t){return!Bh(i).call(i,t)})),t.className=i.join(" ")},addCssText:function(t,e){const i=nf(e);for(const[e,n]of Ic(i))t.style.setProperty(e,n)},binarySearchCustom:function(t,e,i,n){let o=0,s=0,r=t.length-1;for(;s<=r&&o<1e4;){const a=Math.floor((s+r)/2),l=t[a],h=e(void 0===n?l[i]:l[i][n]);if(0==h)return a;-1==h?s=a+1:r=a-1,o++}return-1},binarySearchValue:function(t,e,i,n,o){let s,r,a,l,h=0,d=0,c=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};d<=c&&h<1e4;){if(l=Math.floor(.5*(c+d)),s=t[Math.max(0,l-1)][i],r=t[l][i],a=t[Math.min(t.length-1,l+1)][i],0==o(r,e))return l;if(o(s,e)<0&&o(r,e)>0)return"before"==n?Math.max(0,l-1):l;if(o(r,e)<0&&o(a,e)>0)return"before"==n?l:Math.min(t.length-1,l+1);o(r,e)<0?d=l+1:c=l-1,h++}return-1},bridgeObject:df,copyAndExtendArray:Zm,copyArray:Km,deepExtend:Xm,deepObjectAssign:Pm,easingFunctions:cf,equalArray:function(t,e){if(t.length!==e.length)return!1;for(let i=0,n=t.length;i<n;i++)if(t[i]!=e[i])return!1;return!0},extend:Um,fillIfDefined:function t(e,i){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(const o in e)if(void 0!==i[o])if(null===i[o]||"object"!=typeof i[o])Vm(e,i,o,n);else{const s=e[o],r=i[o];Bm(s)&&Bm(r)&&t(s,r,n)}},forEach:function(t,e){if(sa(t)){const i=t.length;for(let n=0;n<i;n++)e(t[n],n,t)}else for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&e(t[i],i,t)},getAbsoluteLeft:function(t){return t.getBoundingClientRect().left},getAbsoluteRight:function(t){return t.getBoundingClientRect().right},getAbsoluteTop:function(t){return t.getBoundingClientRect().top},getScrollBarWidth:function(){const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);const i=t.offsetWidth;e.style.overflow="scroll";let n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),i-n},getTarget:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,e=null;return t&&(t.target?e=t.target:t.srcElement&&(e=t.srcElement)),e instanceof Element&&(null==e.nodeType||3!=e.nodeType||(e=e.parentNode,e instanceof Element))?e:null},getType:qm,hasParent:function(t,e){let i=t;for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:rf,hexToRGB:Qm,insertSort:function(t,e){for(let i=0;i<t.length;i++){const n=t[i];let o;for(o=i;o>0&&e(n,t[o-1])<0;o--)t[o]=t[o-1];t[o]=n}return t},isDate:function(t){if(t instanceof Date)return!0;if(Wm(t)){if(Rm.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:Gm,isObject:Bm,isString:Wm,isValidHex:af,isValidRGB:lf,isValidRGBA:hf,mergeOptions:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=function(t){return null!=t},s=function(t){return null!==t&&"object"==typeof t};if(!s(t))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!s(n))throw new Error("Parameter globalOptions must be an object");const r=e[i],a=s(n)&&!function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(n)?n[i]:void 0,l=a?a.enabled:void 0;if(void 0===r)return;if("boolean"==typeof r)return s(t[i])||(t[i]={}),void(t[i].enabled=r);if(null===r&&!s(t[i])){if(!o(a))return;t[i]=qc(a)}if(!s(r))return;let h=!0;void 0!==r.enabled?h=r.enabled:void 0!==l&&(h=a.enabled),function(t,e,i){s(t[i])||(t[i]={});const n=e[i],o=t[i];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}(t,e,i),t[i].enabled=h},option:Jm,overrideOpacity:function(t,e){if(Bh(t).call(t,"rgba"))return t;if(Bh(t).call(t,"rgb")){const i=t.substr(wc(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}{const i=Qm(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"}},parseColor:function(t,e){if(Wm(t)){let e=t;if(lf(e)){var i;const t=va(i=e.substr(4).substr(0,e.length-5).split(",")).call(i,function(t){return hc(t)});e=tf(t[0],t[1],t[2])}if(!0===af(e)){const t=rf(e),i={h:t.h,s:.8*t.s,v:Math.min(1,1.02*t.v)},n={h:t.h,s:Math.min(1,1.25*t.s),v:.8*t.v},o=sf(n.h,n.s,n.v),s=sf(i.h,i.s,i.v);return{background:e,border:o,highlight:{background:s,border:o},hover:{background:s,border:o}}}return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}if(e){return{background:t.background||e.background,border:t.border||e.border,highlight:Wm(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||e.highlight.background,border:t.highlight&&t.highlight.border||e.highlight.border},hover:Wm(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||e.hover.border,background:t.hover&&t.hover.background||e.hover.background}}}return{background:t.background||void 0,border:t.border||void 0,highlight:Wm(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:Wm(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}}},preventDefault:function(t){t||(t=window.event),t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},pureDeepObjectAssign:Em,recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){const i=e.firstChild;i&&(t(i),e.removeChild(i))}},removeClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=Od(i).call(i,function(t){return!Bh(n).call(n,t)}),t.className=i.join(" ")},removeCssText:function(t,e){const i=nf(e);for(const e of Ma(i))t.style.removeProperty(e)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"==typeof e){const i=qc(e);for(let n=0;n<t.length;n++)Object.prototype.hasOwnProperty.call(e,t[n])&&"object"==typeof e[t[n]]&&(i[t[n]]=df(e[t[n]]));return i}return null},selectiveDeepExtend:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(sa(i))throw new TypeError("Arrays are not supported by deepExtend");for(let o=0;o<t.length;o++){const s=t[o];if(Object.prototype.hasOwnProperty.call(i,s))if(i[s]&&i[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?Xm(e[s],i[s],!1,n):Vm(e,i,s,n);else{if(sa(i[s]))throw new TypeError("Arrays are not supported by deepExtend");Vm(e,i,s,n)}}return e},selectiveExtend:function(t,e){if(!sa(t))throw new Error("Array with property names expected as first argument");for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];for(const i of n)for(let n=0;n<t.length;n++){const o=t[n];i&&Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},selectiveNotDeepExtend:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(sa(i))throw new TypeError("Arrays are not supported by deepExtend");for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&!Bh(t).call(t,o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?Xm(e[o],i[o]):Vm(e,i,o,n);else if(sa(i[o])){e[o]=[];for(let t=0;t<i[o].length;t++)e[o].push(i[o][t])}else Vm(e,i,o,n);return e},throttle:function(t){let e=!1;return()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,t()}))}},toArray:$m,topMost:function(t,e){let i;sa(e)||(e=[e]);for(const n of t)if(n){i=n[e[0]];for(let t=1;t<e.length;t++)i&&(i=i[e[t]]);if(void 0!==i)break}return i},updateProperty:function(t,e,i){return t[e]!==i&&(t[e]=i,!0)}});function Cf(t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].redundant=t[e].used,t[e].used=[])}function Tf(t){for(var e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;const n=t[e];for(var i=0;i<n.redundant.length;i++)n.redundant[i].parentNode.removeChild(n.redundant[i]);n.redundant=[]}}function Mf(t){Cf(t),Tf(t),Cf(t)}function Of(t,e,i){var n;return Object.prototype.hasOwnProperty.call(e,t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(n)):(n=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n}function Ef(t,e,i,n){var o;return Object.prototype.hasOwnProperty.call(e,t)?e[t].redundant.length>0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElement(t),void 0!==n?i.insertBefore(o,n):i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(o,n):i.appendChild(o)),e[t].used.push(o),o}function Pf(t,e,i,n,o,s){var r;if("circle"==i.style?((r=Of("circle",n,o)).setAttributeNS(null,"cx",t),r.setAttributeNS(null,"cy",e),r.setAttributeNS(null,"r",.5*i.size)):((r=Of("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),r.setAttributeNS(null,"y",e-.5*i.size),r.setAttributeNS(null,"width",i.size),r.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&r.setAttributeNS(null,"style",i.styles),r.setAttributeNS(null,"class",i.className+" vis-point"),s){var a=Of("text",n,o);s.xOffset&&(t+=s.xOffset),s.yOffset&&(e+=s.yOffset),s.content&&(a.textContent=s.content),s.className&&a.setAttributeNS(null,"class",s.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return r}function If(t,e,i,n,o,s,r,a){if(0!=n){n<0&&(e-=n*=-1);var l=Of("rect",s,r);l.setAttributeNS(null,"x",t-.5*i),l.setAttributeNS(null,"y",e),l.setAttributeNS(null,"width",i),l.setAttributeNS(null,"height",n),l.setAttributeNS(null,"class",o),a&&l.setAttributeNS(null,"style",a)}}function Nf(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}var Lf,Af,Ff,Rf,jf,Yf,Hf=Object.freeze({__proto__:null,cleanupElements:Tf,drawBar:If,drawPoint:Pf,getDOMElement:Ef,getNavigatorLanguage:Nf,getSVGElement:Of,prepareElements:Cf,resetElements:Mf});function zf(){return Af?Lf:(Af=1,Ao(),Lf=Ht().Object.getOwnPropertySymbols)}function Gf(){return Rf?Ff:(Rf=1,Ff=zf())}var Wf,Bf,Vf,Uf,Xf,qf,Zf=i(Yf?jf:(Yf=1,jf=Gf())),Kf={exports:{}},$f={};function Jf(){if(Bf)return Kf.exports;Bf=1,function(){if(Wf)return $f;Wf=1;var t=Pi(),e=A(),i=jt(),n=Ye().f,o=X();t({target:"Object",stat:!0,forced:!o||e(function(){n(1)}),sham:!o},{getOwnPropertyDescriptor:function(t,e){return n(i(t),e)}})}();var t=Ht().Object,e=Kf.exports=function(e,i){return t.getOwnPropertyDescriptor(e,i)};return t.getOwnPropertyDescriptor.sham&&(e.sham=!0),Kf.exports}function Qf(){return Uf?Vf:(Uf=1,Vf=Jf())}var tg,eg,ig,ng,og,sg,rg,ag=i(qf?Xf:(qf=1,Xf=Qf())),lg={};function hg(){return ig?eg:(ig=1,function(){if(tg)return lg;tg=1;var t=Pi(),e=X(),i=Rr(),n=jt(),o=Ye(),s=ji();t({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(t){for(var e,r,a=n(t),l=o.f,h=i(a),d={},c=0;h.length>c;)void 0!==(r=l(a,e=h[c++]))&&s(d,e,r);return d}})}(),eg=Ht().Object.getOwnPropertyDescriptors)}function dg(){return og?ng:(og=1,ng=hg())}var cg,ug,pg,mg,fg,gg,vg=i(rg?sg:(rg=1,sg=dg())),yg={exports:{}},bg={};function _g(){if(cg)return bg;cg=1;var t=Pi(),e=X(),i=Sn().f;return t({target:"Object",stat:!0,forced:Object.defineProperties!==i,sham:!e},{defineProperties:i}),bg}function wg(){if(ug)return yg.exports;ug=1,_g();var t=Ht().Object,e=yg.exports=function(e,i){return t.defineProperties(e,i)};return t.defineProperties.sham&&(e.sham=!0),yg.exports}function xg(){return mg?pg:(mg=1,pg=wg())}var Dg,kg,Sg,Cg,Tg,Mg,Og,Eg,Pg,Ig,Ng=i(gg?fg:(gg=1,fg=xg())),Lg={exports:{}},Ag={};function Fg(){if(Dg)return Ag;Dg=1;var t=Pi(),e=X(),i=Oi().f;return t({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!e},{defineProperty:i}),Ag}function Rg(){if(kg)return Lg.exports;kg=1,Fg();var t=Ht().Object,e=Lg.exports=function(e,i,n){return t.defineProperty(e,i,n)};return t.defineProperty.sham&&(e.sham=!0),Lg.exports}function jg(){return Cg?Sg:(Cg=1,Sg=Rg())}function Yg(){return Mg?Tg:(Mg=1,Tg=jg())}function Hg(){return Eg?Og:(Eg=1,Og=Yg())}function zg(){return Ig?Pg:(Ig=1,Pg=Hg())}var Gg,Wg=i(zg()),Bg={};var Vg;var Ug;var Xg,qg,Zg;function Kg(){if(Zg)return qg;Zg=1;var t=hr();return function(){if(Gg)return Bg;Gg=1;var t=Le(),e=Oi().f,i=t("metadata"),n=Function.prototype;void 0===n[i]&&e(n,i,{value:null})}(),Vg||(Vg=1,jo()),Ug||(Ug=1,Go()),Xg||(Xg=1,uo()("metadata")),qg=t}var $g,Jg,Qg;function tv(){if(Jg)return $g;Jg=1;var t=zt(),e=j(),i=t("Symbol"),n=i.keyFor,o=e(i.prototype.valueOf);return $g=i.isRegisteredSymbol||function(t){try{return void 0!==n(o(t))}catch(t){return!1}}}var ev,iv,nv;function ov(){if(iv)return ev;iv=1;for(var t=Ee(),e=zt(),i=j(),n=Xt(),o=Le(),s=e("Symbol"),r=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),l=i(s.prototype.valueOf),h=t("wks"),d=0,c=a(s),u=c.length;d<u;d++)try{var p=c[d];n(s[p])&&o(p)}catch(t){}return ev=function(t){if(r&&r(t))return!0;try{for(var e=l(t),i=0,n=a(h),o=n.length;i<o;i++)if(h[n[i]]==e)return!0}catch(t){}return!1},ev}var sv;var rv;var av;var lv;var hv;var dv;var cv;var uv,pv,mv,fv,gv;function vv(){if(mv)return pv;mv=1;var t=Kg();return Qg||(Qg=1,Pi()({target:"Symbol",stat:!0},{isRegisteredSymbol:tv()})),nv||(nv=1,Pi()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:ov()})),sv||(sv=1,uo()("customMatcher")),rv||(rv=1,uo()("observable")),av||(av=1,Pi()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:tv()})),lv||(lv=1,Pi()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:ov()})),hv||(hv=1,uo()("matcher")),dv||(dv=1,uo()("metadataKey")),cv||(cv=1,uo()("patternMatch")),uv||(uv=1,uo()("replaceAll")),pv=t}function yv(){return gv?fv:(gv=1,fv=vv())}var bv,_v,wv,xv,Dv,kv,Sv,Cv,Tv,Mv,Ov,Ev,Pv,Iv=i(yv()),Nv={};function Lv(){if(_v)return bv;_v=1;var t=j(),e=Li(),i=$i(),n=Rt(),o=t("".charAt),s=t("".charCodeAt),r=t("".slice),a=function(t){return function(a,l){var h,d,c=i(n(a)),u=e(l),p=c.length;return u<0||u>=p?t?"":void 0:(h=s(c,u))<55296||h>56319||u+1===p||(d=s(c,u+1))<56320||d>57343?t?o(c,u):h:t?r(c,u,u+2):d-56320+(h-55296<<10)+65536}};return bv={codeAt:a(!1),charAt:a(!0)}}function Av(){if(wv)return Nv;wv=1;var t=Lv().charAt,e=$i(),i=vo(),n=or(),o=sr(),s="String Iterator",r=i.set,a=i.getterFor(s);return n(String,"String",function(t){r(this,{type:s,string:e(t),index:0})},function(){var e,i=a(this),n=i.string,s=i.index;return s>=n.length?o(void 0,!0):(e=t(n,s),i.index+=e.length,o(e,!1))}),Nv}function Fv(){return Dv?xv:(Dv=1,rr(),Av(),Xo(),xv=co().f("iterator"))}function Rv(){if(Sv)return kv;Sv=1;var t=Fv();return lr(),kv=t}function jv(){return Tv?Cv:(Tv=1,Cv=Rv())}function Yv(){return Ov?Mv:(Ov=1,Mv=jv())}function Hv(){return Pv?Ev:(Pv=1,Ev=Yv())}var zv,Gv,Wv,Bv,Vv,Uv,Xv,qv,Zv,Kv,$v=i(Hv());function Jv(t){return Jv="function"==typeof Iv&&"symbol"==typeof $v?function(t){return typeof t}:function(t){return t&&"function"==typeof Iv&&t.constructor===Iv&&t!==Iv.prototype?"symbol":typeof t},Jv(t)}function Qv(){return Gv?zv:(Gv=1,is(),zv=co().f("toPrimitive"))}function ty(){return Bv?Wv:(Bv=1,Wv=Qv())}function ey(){return Uv?Vv:(Uv=1,Vv=ty())}function iy(){return qv?Xv:(qv=1,Xv=ey())}function ny(){return Kv?Zv:(Kv=1,Zv=iy())}var oy=i(ny());function sy(t){var e=function(t,e){if("object"!=Jv(t)||!t)return t;var i=t[oy];if(void 0!==i){var n=i.call(t,e);if("object"!=Jv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Jv(e)?e:e+""}function ry(t,e,i){return(e=sy(e))in t?Wg(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ay,ly,hy,dy,cy,uy,py,my,fy,gy,vy,yy,by,_y={};function wy(){if(ly)return ay;ly=1;var t=Zt(),e=Pe(),i=At(),n=Fi(),o=TypeError,s="Reduce of empty array with no initial value",r=function(r){return function(a,l,h,d){var c=e(a),u=i(c),p=n(c);if(t(l),0===p&&h<2)throw new o(s);var m=r?p-1:0,f=r?-1:1;if(h<2)for(;;){if(m in u){d=u[m],m+=f;break}if(m+=f,r?m<0:p<=m)throw new o(s)}for(;r?m>=0:p>m;m+=f)m in u&&(d=l(d,u[m],m,c));return d}};return ay={left:r(!1),right:r(!0)}}function xy(){return dy?hy:(dy=1,hy="NODE"===cu())}function Dy(){return py?uy:(py=1,function(){if(cy)return _y;cy=1;var t=Pi(),e=wy().left,i=dl(),n=Bt();t({target:"Array",proto:!0,forced:!xy()&&n>79&&n<83||!i("reduce")},{reduce:function(t){var i=arguments.length;return e(this,t,i,i>1?arguments[1]:void 0)}})}(),uy=Dr()("Array","reduce"))}function ky(){if(fy)return my;fy=1;var t=Gt(),e=Dy(),i=Array.prototype;return my=function(n){var o=n.reduce;return n===i||t(i,n)&&o===i.reduce?e:o},my}function Sy(){return vy?gy:(vy=1,gy=ky())}var Cy,Ty,My,Oy=i(by?yy:(by=1,yy=Sy())),Ey={};function Py(){if(Ty)return Cy;Ty=1;var t=Ii(),e=Fi(),i=Ri(),n=ze(),o=function(s,r,a,l,h,d,c,u){for(var p,m,f=h,g=0,v=!!c&&n(c,u);g<l;)g in a&&(p=v?v(a[g],g,r):a[g],d>0&&t(p)?(m=e(p),f=o(s,r,p,m,f,d-1)-1):(i(f+1),s[f]=p),f++),g++;return f};return Cy=o}var Iy,Ny,Ly,Ay,Fy,Ry,jy,Yy,Hy;function zy(){return Ly?Ny:(Ly=1,function(){if(My)return Ey;My=1;var t=Pi(),e=Py(),i=Zt(),n=Pe(),o=Fi(),s=Bi();t({target:"Array",proto:!0},{flatMap:function(t){var r,a=n(this),l=o(a);return i(t),(r=s(a,0)).length=e(r,a,a,l,0,1,t,arguments.length>1?arguments[1]:void 0),r}})}(),Iy||(Iy=1,Xs()("flatMap")),Ny=Dr()("Array","flatMap"))}function Gy(){if(Fy)return Ay;Fy=1;var t=Gt(),e=zy(),i=Array.prototype;return Ay=function(n){var o=n.flatMap;return n===i||t(i,n)&&o===i.flatMap?e:o},Ay}function Wy(){return jy?Ry:(jy=1,Ry=Gy())}var By,Vy,Uy=i(Hy?Yy:(Hy=1,Yy=Wy()));var Xy,qy,Zy,Ky,$y,Jy,Qy,tb,eb,ib,nb,ob,sb,rb,ab,lb,hb,db,cb,ub,pb,mb,fb,gb,vb,yb,bb,_b,wb,xb=i(Vy?By:(Vy=1,By=Rv())),Db={},kb={exports:{}};function Sb(){return qy?Xy:(qy=1,Xy=A()(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}function Cb(){if(Ky)return Zy;Ky=1;var t=A(),e=Yt(),i=Y(),n=Sb(),o=Object.isExtensible,s=t(function(){});return Zy=s||n?function(t){return!!e(t)&&((!n||"ArrayBuffer"!==i(t))&&(!o||o(t)))}:o,Zy}function Tb(){return Jy?$y:(Jy=1,$y=!A()(function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Mb(){if(Qy)return kb.exports;Qy=1;var t=Pi(),e=j(),i=wn(),n=Yt(),o=Ie(),s=Oi().f,r=Pn(),a=Rn(),l=Cb(),h=Ne(),d=Tb(),c=!1,u=h("meta"),p=0,m=function(t){s(t,u,{value:{objectID:"O"+p++,weakData:{}}})},f=kb.exports={enable:function(){f.enable=function(){},c=!0;var i=r.f,n=e([].splice),o={};o[u]=1,i(o).length&&(r.f=function(t){for(var e=i(t),o=0,s=e.length;o<s;o++)if(e[o]===u){n(e,o,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(t,e){if(!n(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,u)){if(!l(t))return"F";if(!e)return"E";m(t)}return t[u].objectID},getWeakData:function(t,e){if(!o(t,u)){if(!l(t))return!0;if(!e)return!1;m(t)}return t[u].weakData},onFreeze:function(t){return d&&c&&l(t)&&!o(t,u)&&m(t),t}};return i[u]=!0,kb.exports}function Ob(){if(eb)return tb;eb=1;var t=Le(),e=qs(),i=t("iterator"),n=Array.prototype;return tb=function(t){return void 0!==t&&(e.Array===t||n[i]===t)},tb}function Eb(){if(nb)return ib;nb=1;var t=Hi(),e=Kt(),i=Ft(),n=qs(),o=Le()("iterator");return ib=function(s){if(!i(s))return e(s,o)||e(s,"@@iterator")||n[t(s)]},ib}function Pb(){if(sb)return ob;sb=1;var t=q(),e=Zt(),i=Mi(),n=qt(),o=Eb(),s=TypeError;return ob=function(r,a){var l=arguments.length<2?o(r):a;if(e(l))return i(t(l,r));throw new s(n(r)+" is not iterable")},ob}function Ib(){if(ab)return rb;ab=1;var t=q(),e=Mi(),i=Kt();return rb=function(n,o,s){var r,a;e(n);try{if(!(r=i(n,"return"))){if("throw"===o)throw s;return s}r=t(r,n)}catch(t){a=!0,r=t}if("throw"===o)throw s;if(a)throw r;return e(r),s},rb}function Nb(){if(hb)return lb;hb=1;var t=ze(),e=q(),i=Mi(),n=qt(),o=Ob(),s=Fi(),r=Gt(),a=Pb(),l=Eb(),h=Ib(),d=TypeError,c=function(t,e){this.stopped=t,this.result=e},u=c.prototype;return lb=function(p,m,f){var g,v,y,b,_,w,x,D=f&&f.that,k=!(!f||!f.AS_ENTRIES),S=!(!f||!f.IS_RECORD),C=!(!f||!f.IS_ITERATOR),T=!(!f||!f.INTERRUPTED),M=t(m,D),O=function(t){return g&&h(g,"normal"),new c(!0,t)},E=function(t){return k?(i(t),T?M(t[0],t[1],O):M(t[0],t[1])):T?M(t,O):M(t)};if(S)g=p.iterator;else if(C)g=p;else{if(!(v=l(p)))throw new d(n(p)+" is not iterable");if(o(v)){for(y=0,b=s(p);b>y;y++)if((_=E(p[y]))&&r(u,_))return _;return new c(!1)}g=a(p,v)}for(w=S?p.next:g.next;!(x=e(w,g)).done;){try{_=E(x.value)}catch(t){h(g,"throw",t)}if("object"==typeof _&&_&&r(u,_))return _}return new c(!1)},lb}function Lb(){if(cb)return db;cb=1;var t=Gt(),e=TypeError;return db=function(i,n){if(t(n,i))return i;throw new e("Incorrect invocation")},db}function Ab(){if(pb)return ub;pb=1;var t=Pi(),e=L(),i=Mb(),n=A(),o=Ei(),s=Nb(),r=Lb(),a=z(),l=Yt(),h=Ft(),d=fo(),c=Oi().f,u=yo().forEach,p=X(),m=vo(),f=m.set,g=m.getterFor;return ub=function(m,v,y){var b,_=-1!==m.indexOf("Map"),w=-1!==m.indexOf("Weak"),x=_?"set":"add",D=e[m],k=D&&D.prototype,S={};if(p&&a(D)&&(w||k.forEach&&!n(function(){(new D).entries().next()}))){var C=(b=v(function(t,e){f(r(t,C),{type:m,collection:new D}),h(e)||s(e,t[x],{that:t,AS_ENTRIES:_})})).prototype,T=g(m);u(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(t){var e="add"===t||"set"===t;!(t in k)||w&&"clear"===t||o(C,t,function(i,n){var o=T(this).collection;if(!e&&w&&!l(i))return"get"===t&&void 0;var s=o[t](0===i?0:i,n);return e?this:s})}),w||c(C,"size",{configurable:!0,get:function(){return T(this).collection.size}})}else b=y.getConstructor(v,m,_,x),i.enable();return d(b,m,!1,!0),S[m]=b,t({global:!0,forced:!0},S),w||y.setStrong(b,m,_),b}}function Fb(){if(fb)return mb;fb=1;var t=Vn();return mb=function(e,i,n){for(var o in i)n&&n.unsafe&&e[o]?e[o]=i[o]:t(e,o,i[o],n);return e}}function Rb(){if(vb)return gb;vb=1;var t=zt(),e=Un(),i=Le(),n=X(),o=i("species");return gb=function(i){var s=t(i);n&&s&&!s[o]&&e(s,o,{configurable:!0,get:function(){return this}})}}function jb(){if(bb)return yb;bb=1;var t=Mn(),e=Un(),i=Fb(),n=ze(),o=Lb(),s=Ft(),r=Nb(),a=or(),l=sr(),h=Rb(),d=X(),c=Mb().fastKey,u=vo(),p=u.set,m=u.getterFor;return yb={getConstructor:function(a,l,h,u){var f=a(function(e,i){o(e,g),p(e,{type:l,index:t(null),first:null,last:null,size:0}),d||(e.size=0),s(i)||r(i,e[u],{that:e,AS_ENTRIES:h})}),g=f.prototype,v=m(l),y=function(t,e,i){var n,o,s=v(t),r=b(t,e);return r?r.value=i:(s.last=r={index:o=c(e,!0),key:e,value:i,previous:n=s.last,next:null,removed:!1},s.first||(s.first=r),n&&(n.next=r),d?s.size++:t.size++,"F"!==o&&(s.index[o]=r)),t},b=function(t,e){var i,n=v(t),o=c(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key===e)return i};return i(g,{clear:function(){for(var e=v(this),i=e.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=null),i=i.next;e.first=e.last=null,e.index=t(null),d?e.size=0:this.size=0},delete:function(t){var e=this,i=v(e),n=b(e,t);if(n){var o=n.next,s=n.previous;delete i.index[n.index],n.removed=!0,s&&(s.next=o),o&&(o.previous=s),i.first===n&&(i.first=o),i.last===n&&(i.last=s),d?i.size--:e.size--}return!!n},forEach:function(t){for(var e,i=v(this),o=n(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(o(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(g,h?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&e(g,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(t,e,i){var n=e+" Iterator",o=m(e),s=m(n);a(t,e,function(t,e){p(this,{type:n,target:t,state:o(t),kind:e,last:null})},function(){for(var t=s(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?l("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=null,l(void 0,!0))},i?"entries":"values",!i,!0),h(e)}},yb}function Yb(){return wb||(wb=1,_b||(_b=1,Ab()("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},jb()))),Db}var Hb,zb,Gb,Wb,Bb,Vb,Ub,Xb,qb,Zb,Kb,$b={};function Jb(){return zb||(zb=1,Hb=function(t,e){return 1===e?function(e,i){return e[t](i)}:function(e,i,n){return e[t](i,n)}}),Hb}function Qb(){if(Wb)return Gb;Wb=1;var t=zt(),e=Jb(),i=t("Map");return Gb={Map:i,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:i.prototype}}function t_(){return Ub?Vb:(Ub=1,rr(),Yb(),function(){if(Bb)return $b;Bb=1;var t=Pi(),e=j(),i=Zt(),n=Rt(),o=Nb(),s=Qb(),r=Te(),a=A(),l=s.Map,h=s.has,d=s.get,c=s.set,u=e([].push),p=r||a(function(){return 1!==l.groupBy("ab",function(t){return t}).get("a").length});t({target:"Map",stat:!0,forced:r||p},{groupBy:function(t,e){n(t),i(e);var s=new l,r=0;return o(t,function(t){var i=e(t,r++);h(s,i)?u(d(s,i),t):c(s,i,[t])}),s}})}(),Av(),Vb=Ht().Map)}function e_(){if(qb)return Xb;qb=1;var t=t_();return lr(),Xb=t}var i_,n_,o_=i(Kb?Zb:(Kb=1,Zb=e_())),s_={};function r_(){return n_||(n_=1,i_||(i_=1,Ab()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},jb()))),s_}var a_,l_,h_,d_,c_,u_,p_,m_,f_,g_,v_,y_,b_,__,w_,x_,D_,k_,S_,C_,T_,M_={};function O_(){if(l_)return a_;l_=1;var t=qt(),e=TypeError;return a_=function(i){if("object"==typeof i&&"size"in i&&"has"in i&&"add"in i&&"delete"in i&&"keys"in i)return i;throw new e(t(i)+" is not a set")},a_}function E_(){if(d_)return h_;d_=1;var t=zt(),e=Jb(),i=t("Set"),n=i.prototype;return h_={Set:i,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:n}}function P_(){if(u_)return c_;u_=1;var t=q();return c_=function(e,i,n){for(var o,s,r=n?e:e.iterator,a=e.next;!(o=t(a,r)).done;)if(void 0!==(s=i(o.value)))return s},c_}function I_(){if(m_)return p_;m_=1;var t=P_();return p_=function(e,i,n){return n?t(e.keys(),i,!0):e.forEach(i)},p_}function N_(){if(g_)return f_;g_=1;var t=E_(),e=I_(),i=t.Set,n=t.add;return f_=function(t){var o=new i;return e(t,function(t){n(o,t)}),o},f_}function L_(){return y_||(y_=1,v_=function(t){return t.size}),v_}function A_(){return __?b_:(__=1,b_=function(t){return{iterator:t,next:t.next,done:!1}})}function F_(){if(x_)return w_;x_=1;var t=Zt(),e=Mi(),i=q(),n=Li(),o=A_(),s="Invalid size",r=RangeError,a=TypeError,l=Math.max,h=function(e,i){this.set=e,this.size=l(i,0),this.has=t(e.has),this.keys=t(e.keys)};return h.prototype={getIterator:function(){return o(e(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},w_=function(t){e(t);var i=+t.size;if(i!=i)throw new a(s);var o=n(i);if(o<0)throw new r(s);return new h(t,o)}}function R_(){if(k_)return D_;k_=1;var t=O_(),e=E_(),i=N_(),n=L_(),o=F_(),s=I_(),r=P_(),a=e.has,l=e.remove;return D_=function(e){var h=t(this),d=o(e),c=i(h);return n(h)<=d.size?s(h,function(t){d.includes(t)&&l(c,t)}):r(d.getIterator(),function(t){a(c,t)&&l(c,t)}),c}}function j_(){return C_?S_:(C_=1,S_=function(){return!1})}var Y_,H_,z_,G_={};function W_(){if(H_)return Y_;H_=1;var t=O_(),e=E_(),i=L_(),n=F_(),o=I_(),s=P_(),r=e.Set,a=e.add,l=e.has;return Y_=function(e){var h=t(this),d=n(e),c=new r;return i(h)>d.size?s(d.getIterator(),function(t){l(h,t)&&a(c,t)}):o(h,function(t){d.includes(t)&&a(c,t)}),c}}var B_,V_,U_,X_={};function q_(){if(V_)return B_;V_=1;var t=O_(),e=E_().has,i=L_(),n=F_(),o=I_(),s=P_(),r=Ib();return B_=function(a){var l=t(this),h=n(a);if(i(l)<=h.size)return!1!==o(l,function(t){if(h.includes(t))return!1},!0);var d=h.getIterator();return!1!==s(d,function(t){if(e(l,t))return r(d,"normal",!1)})},B_}var Z_,K_,$_,J_={};function Q_(){if(K_)return Z_;K_=1;var t=O_(),e=L_(),i=I_(),n=F_();return Z_=function(o){var s=t(this),r=n(o);return!(e(s)>r.size)&&!1!==i(s,function(t){if(!r.includes(t))return!1},!0)}}var tw,ew,iw,nw={};function ow(){if(ew)return tw;ew=1;var t=O_(),e=E_().has,i=L_(),n=F_(),o=P_(),s=Ib();return tw=function(r){var a=t(this),l=n(r);if(i(a)<l.size)return!1;var h=l.getIterator();return!1!==o(h,function(t){if(!e(a,t))return s(h,"normal",!1)})},tw}var sw,rw,aw,lw,hw,dw={};function cw(){if(rw)return sw;rw=1;var t=O_(),e=E_(),i=N_(),n=F_(),o=P_(),s=e.add,r=e.has,a=e.remove;return sw=function(e){var l=t(this),h=n(e).getIterator(),d=i(l);return o(h,function(t){r(l,t)?a(d,t):s(d,t)}),d}}function uw(){return lw?aw:(lw=1,aw=function(t){try{var e=new Set,i={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},n=e[t](i);return 1===n.size&&4===n.values().next().value}catch(t){return!1}})}var pw,mw,fw,gw,vw,yw,bw,_w,ww,xw={};function Dw(){if(mw)return pw;mw=1;var t=O_(),e=E_().add,i=N_(),n=F_(),o=P_();return pw=function(s){var r=t(this),a=n(s).getIterator(),l=i(r);return o(a,function(t){e(l,t)}),l},pw}function kw(){return vw?gw:(vw=1,rr(),r_(),function(){if(T_)return M_;T_=1;var t=Pi(),e=R_(),i=A();t({target:"Set",proto:!0,real:!0,forced:!j_()("difference",function(t){return 0===t.size})||i(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var i=t++>1;return e.has(1)&&e.clear(),{done:i,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size})},{difference:e})}(),function(){if(z_)return G_;z_=1;var t=Pi(),e=A(),i=W_();t({target:"Set",proto:!0,real:!0,forced:!j_()("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||e(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:i})}(),function(){if(U_)return X_;U_=1;var t=Pi(),e=q_();t({target:"Set",proto:!0,real:!0,forced:!j_()("isDisjointFrom",function(t){return!t})},{isDisjointFrom:e})}(),function(){if($_)return J_;$_=1;var t=Pi(),e=Q_();t({target:"Set",proto:!0,real:!0,forced:!j_()("isSubsetOf",function(t){return t})},{isSubsetOf:e})}(),function(){if(iw)return nw;iw=1;var t=Pi(),e=ow();t({target:"Set",proto:!0,real:!0,forced:!j_()("isSupersetOf",function(t){return!t})},{isSupersetOf:e})}(),function(){if(hw)return dw;hw=1;var t=Pi(),e=cw(),i=uw();t({target:"Set",proto:!0,real:!0,forced:!j_()("symmetricDifference")||!i("symmetricDifference")},{symmetricDifference:e})}(),function(){if(fw)return xw;fw=1;var t=Pi(),e=Dw(),i=uw();t({target:"Set",proto:!0,real:!0,forced:!j_()("union")||!i("union")},{union:e})}(),Av(),gw=Ht().Set)}function Sw(){if(bw)return yw;bw=1;var t=kw();return lr(),yw=t}var Cw,Tw,Mw,Ow,Ew,Pw,Iw,Nw,Lw,Aw,Fw,Rw,jw=i(ww?_w:(ww=1,_w=Sw()));function Yw(){return Tw?Cw:(Tw=1,rr(),Av(),Cw=Pb())}function Hw(){if(Ow)return Mw;Ow=1;var t=Yw();return lr(),Mw=t}function zw(){return Pw?Ew:(Pw=1,Ew=Hw())}function Gw(){return Nw?Iw:(Nw=1,Iw=zw())}function Ww(){return Aw?Lw:(Aw=1,Lw=Gw())}var Bw,Vw,Uw,Xw,qw,Zw,Kw,$w,Jw,Qw,tx,ex,ix,nx,ox,sx,rx,ax=i(Rw?Fw:(Rw=1,Fw=Ww())),lx={};function hx(){if(Vw)return Bw;Vw=1;var t=Fn(),e=Math.floor,i=function(n,o){var s=n.length;if(s<8)for(var r,a,l=1;l<s;){for(a=l,r=n[l];a&&o(n[a-1],r)>0;)n[a]=n[--a];a!==l++&&(n[a]=r)}else for(var h=e(s/2),d=i(t(n,0,h),o),c=i(t(n,h),o),u=d.length,p=c.length,m=0,f=0;m<u||f<p;)n[m+f]=m<u&&f<p?o(d[m],c[f])<=0?d[m++]:c[f++]:m<u?d[m++]:c[f++];return n};return Bw=i}function dx(){if(Xw)return Uw;Xw=1;var t=Wt().match(/firefox\/(\d+)/i);return Uw=!!t&&+t[1]}function cx(){return Zw?qw:(Zw=1,qw=/MSIE|Trident/.test(Wt()))}function ux(){if($w)return Kw;$w=1;var t=Wt().match(/AppleWebKit\/(\d+)\./);return Kw=!!t&&+t[1]}function px(){if(Jw)return lx;Jw=1;var t=Pi(),e=j(),i=Zt(),n=Pe(),o=Fi(),s=Vl(),r=$i(),a=A(),l=hx(),h=dl(),d=dx(),c=cx(),u=Bt(),p=ux(),m=[],f=e(m.sort),g=e(m.push),v=a(function(){m.sort(void 0)}),y=a(function(){m.sort(null)}),b=h("sort"),_=!a(function(){if(u)return u<70;if(!(d&&d>3)){if(c)return!0;if(p)return p<603;var t,e,i,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)m.push({k:e+n,v:i})}for(m.sort(function(t,e){return e.v-t.v}),n=0;n<m.length;n++)e=m[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}});return t({target:"Array",proto:!0,forced:v||!y||!b||!_},{sort:function(t){void 0!==t&&i(t);var e=n(this);if(_)return void 0===t?f(e):f(e,t);var a,h,d=[],c=o(e);for(h=0;h<c;h++)h in e&&g(d,e[h]);for(l(d,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:r(e)>r(i)?1:-1}}(t)),a=o(d),h=0;h<a;)e[h]=d[h++];for(;h<c;)s(e,h++);return e}}),lx}function mx(){return tx?Qw:(tx=1,px(),Qw=Dr()("Array","sort"))}function fx(){if(ix)return ex;ix=1;var t=Gt(),e=mx(),i=Array.prototype;return ex=function(n){var o=n.sort;return n===i||t(i,n)&&o===i.sort?e:o},ex}function gx(){return ox?nx:(ox=1,nx=fx())}var vx,yx,bx,_x,wx,xx,Dx,kx,Sx,Cx=i(rx?sx:(rx=1,sx=gx())),Tx={};function Mx(){return bx?yx:(bx=1,function(){if(vx)return Tx;vx=1;var t=Pi(),e=yo().some;t({target:"Array",proto:!0,forced:!dl()("some")},{some:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),yx=Dr()("Array","some"))}function Ox(){if(wx)return _x;wx=1;var t=Gt(),e=Mx(),i=Array.prototype;return _x=function(n){var o=n.some;return n===i||t(i,n)&&o===i.some?e:o},_x}function Ex(){return Dx?xx:(Dx=1,xx=Ox())}var Px,Ix,Nx,Lx,Ax,Fx,Rx,jx,Yx=i(Sx?kx:(Sx=1,kx=Ex()));function Hx(){return Ix?Px:(Ix=1,rr(),Px=Dr()("Array","keys"))}function zx(){return Lx?Nx:(Lx=1,Nx=Hx())}function Gx(){if(Fx)return Ax;Fx=1,lr();var t=Hi(),e=Ie(),i=Gt(),n=zx(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Ax=function(r){var a=r.keys;return r===o||i(o,r)&&a===o.keys||e(s,t(r))?n:a},Ax}var Wx,Bx,Vx,Ux,Xx,qx,Zx,Kx,$x=i(jx?Rx:(jx=1,Rx=Gx()));function Jx(){return Bx?Wx:(Bx=1,rr(),Wx=Dr()("Array","values"))}function Qx(){return Ux?Vx:(Ux=1,Vx=Jx())}function tD(){if(qx)return Xx;qx=1,lr();var t=Hi(),e=Ie(),i=Gt(),n=Qx(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Xx=function(r){var a=r.values;return r===o||i(o,r)&&a===o.values||e(s,t(r))?n:a},Xx}var eD,iD,nD,oD,sD,rD,aD,lD,hD=i(Kx?Zx:(Kx=1,Zx=tD()));function dD(){return iD?eD:(iD=1,rr(),eD=Dr()("Array","entries"))}function cD(){return oD?nD:(oD=1,nD=dD())}function uD(){if(rD)return sD;rD=1,lr();var t=Hi(),e=Ie(),i=Gt(),n=cD(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return sD=function(r){var a=r.entries;return r===o||i(o,r)&&a===o.entries||e(s,t(r))?n:a},sD}var pD,mD,fD=i(lD?aD:(lD=1,aD=uD()));var gD=i(mD?pD:(mD=1,pD=jg()));const vD=[];for(let t=0;t<256;++t)vD.push((t+256).toString(16).slice(1));let yD;const bD=new Uint8Array(16);var _D={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function wD(t,e,i){if(_D.randomUUID&&!t)return _D.randomUUID();const n=(t=t||{}).random??t.rng?.()??function(){if(!yD){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");yD=crypto.getRandomValues.bind(crypto)}return yD(bD)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(t,e=0){return(vD[t[e+0]]+vD[t[e+1]]+vD[t[e+2]]+vD[t[e+3]]+"-"+vD[t[e+4]]+vD[t[e+5]]+"-"+vD[t[e+6]]+vD[t[e+7]]+"-"+vD[t[e+8]]+vD[t[e+9]]+"-"+vD[t[e+10]]+vD[t[e+11]]+vD[t[e+12]]+vD[t[e+13]]+vD[t[e+14]]+vD[t[e+15]]).toLowerCase()}(n)}function xD(t,e){var i=Ma(t);if(Zf){var n=Zf(t);e&&(n=Od(n).call(n,function(e){return ag(t,e).enumerable})),i.push.apply(i,n)}return i}function DD(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?kl(i=xD(Object(o),!0)).call(i,function(e){ry(t,e,o[e])}):vg?Ng(t,vg(o)):kl(n=xD(Object(o))).call(n,function(e){gD(t,e,ag(o,e))})}return t}class kD{constructor(t,e,i){var n,o,s;ry(this,"_source",void 0),ry(this,"_transformers",void 0),ry(this,"_target",void 0),ry(this,"_listeners",{add:ll(n=this._add).call(n,this),remove:ll(o=this._remove).call(o,this),update:ll(s=this._update).call(s,this)}),this._source=t,this._transformers=e,this._target=i}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}stop(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}_transformItems(t){var e;return Oy(e=this._transformers).call(e,(t,e)=>e(t),t)}_add(t,e){null!=e&&this._target.add(this._transformItems(this._source.get(e.items)))}_update(t,e){null!=e&&this._target.update(this._transformItems(this._source.get(e.items)))}_remove(t,e){null!=e&&this._target.remove(this._transformItems(e.oldData))}}class SD{constructor(t){ry(this,"_source",void 0),ry(this,"_transformers",[]),this._source=t}filter(t){return this._transformers.push(e=>Od(e).call(e,t)),this}map(t){return this._transformers.push(e=>va(e).call(e,t)),this}flatMap(t){return this._transformers.push(e=>Uy(e).call(e,t)),this}to(t){return new kD(this._source,this._transformers,t)}}function CD(t){return"string"==typeof t||"number"==typeof t}class TD{constructor(t){ry(this,"delay",void 0),ry(this,"max",void 0),ry(this,"_queue",[]),ry(this,"_timeout",null),ry(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(t)}setOptions(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()}static extend(t,e){const i=new TD(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(e&&e.replace)for(let o=0;o<e.replace.length;o++){const s=e.replace[o];n.push({name:s,original:t[s]}),i.replace(t,s)}return i._extended={object:t,methods:n},i}destroy(){if(this.flush(),this._extended){const t=this._extended.object,e=this._extended.methods;for(let i=0;i<e.length;i++){const n=e[i];n.original?t[n.name]=n.original:delete t[n.name]}this._extended=null}}replace(t,e){const i=this,n=t[e];if(!n)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];i.queue({args:e,fn:n,context:this})}}queue(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Lu(()=>{this.flush()},this.delay))}flush(){var t,e;kl(t=oh(e=this._queue).call(e,0)).call(t,t=>{t.fn.apply(t.context||t.fn,t.args||[])})}}class MD{constructor(){ry(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),ry(this,"subscribe",MD.prototype.on),ry(this,"unsubscribe",MD.prototype.off)}_trigger(t,e,i){var n;if("*"===t)throw new Error("Cannot trigger event *");kl(n=[...this._subscribers[t],...this._subscribers["*"]]).call(n,n=>{n(t,e,null!=i?i:null)})}on(t,e){"function"==typeof e&&this._subscribers[t].push(e)}off(t,e){var i;this._subscribers[t]=Od(i=this._subscribers[t]).call(i,t=>t!==e)}get testLeakSubscribers(){return this._subscribers}}class OD{constructor(t){ry(this,"_pairs",void 0),this._pairs=t}*[xb](){for(const[t,e]of this._pairs)yield[t,e]}*entries(){for(const[t,e]of this._pairs)yield[t,e]}*keys(){for(const[t]of this._pairs)yield t}*values(){for(const[,t]of this._pairs)yield t}toIdArray(){var t;return va(t=[...this._pairs]).call(t,t=>t[0])}toItemArray(){var t;return va(t=[...this._pairs]).call(t,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const t=qc(null);for(const[e,i]of this._pairs)t[e]=i;return t}toMap(){return new o_(this._pairs)}toIdSet(){return new jw(this.toIdArray())}toItemSet(){return new jw(this.toItemArray())}cache(){return new OD([...this._pairs])}distinct(t){const e=new jw;for(const[i,n]of this._pairs)e.add(t(n,i));return e}filter(t){const e=this._pairs;return new OD({*[xb](){for(const[i,n]of e)t(n,i)&&(yield[i,n])}})}forEach(t){for(const[e,i]of this._pairs)t(i,e)}map(t){const e=this._pairs;return new OD({*[xb](){for(const[i,n]of e)yield[i,t(n,i)]}})}max(t){const e=ax(this._pairs);let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,s]=i.value,r=t(s,e);r>o&&(o=r,n=s)}return n}min(t){const e=ax(this._pairs);let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,s]=i.value,r=t(s,e);r<o&&(o=r,n=s)}return n}reduce(t,e){for(const[i,n]of this._pairs)e=t(e,n,i);return e}sort(t){return new OD({[xb]:()=>{var e;return ax(Cx(e=[...this._pairs]).call(e,(e,i)=>{let[n,o]=e,[s,r]=i;return t(o,r,n,s)}))}})}}class ED extends MD{get idProp(){return this._idProp}constructor(t,e){super(),ry(this,"flush",void 0),ry(this,"length",void 0),ry(this,"_options",void 0),ry(this,"_data",void 0),ry(this,"_idProp",void 0),ry(this,"_queue",null),t&&!sa(t)&&(e=t,t=[]),this._options=e||{},this._data=new o_,this.length=0,this._idProp=this._options.fieldId||"id",t&&t.length&&this.add(t),this.setOptions(e)}setOptions(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=TD.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"==typeof t.queue&&this._queue.setOptions(t.queue)))}add(t,e){const i=[];let n;if(sa(t)){const e=va(t).call(t,t=>t[this._idProp]);if(Yx(e).call(e,t=>this._data.has(t)))throw new Error("A duplicate id was found in the parameter array.");for(let e=0,o=t.length;e<o;e++)n=this._addItem(t[e]),i.push(n)}else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");n=this._addItem(t),i.push(n)}return i.length&&this._trigger("add",{items:i},e),i}update(t,e){const i=[],n=[],o=[],s=[],r=this._idProp,a=t=>{const e=t[r];if(null!=e&&this._data.has(e)){const i=t,r=uh({},this._data.get(e)),a=this._updateItem(i);n.push(a),s.push(i),o.push(r)}else{const e=this._addItem(t);i.push(e)}};if(sa(t))for(let e=0,i=t.length;e<i;e++)t[e]&&"object"==typeof t[e]?a(t[e]):console.warn("Ignoring input item, which is not an object at index "+e);else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");a(t)}if(i.length&&this._trigger("add",{items:i},e),n.length){const t={items:n,oldData:o,data:s};this._trigger("update",t,e)}return fd(i).call(i,n)}updateOnly(t,e){var i;sa(t)||(t=[t]);const n=va(i=va(t).call(t,t=>{const e=this._data.get(t[this._idProp]);if(null==e)throw new Error("Updating non-existent items is not allowed.");return{oldData:e,update:t}})).call(i,t=>{let{oldData:e,update:i}=t;const n=e[this._idProp],o=Em(e,i);return this._data.set(n,o),{id:n,oldData:e,updatedData:o}});if(n.length){const t={items:va(n).call(n,t=>t.id),oldData:va(n).call(n,t=>t.oldData),data:va(n).call(n,t=>t.updatedData)};return this._trigger("update",t,e),t.items}return[]}get(t,e){let i,n,o;CD(t)?(i=t,o=e):sa(t)?(n=t,o=e):o=t;const s=o&&"Object"===o.returnType?"Object":"Array",r=o&&Od(o),a=[];let l,h,d;if(null!=i)l=this._data.get(i),l&&r&&!r(l)&&(l=void 0);else if(null!=n)for(let t=0,e=n.length;t<e;t++)l=this._data.get(n[t]),null==l||r&&!r(l)||a.push(l);else{var c;h=[...$x(c=this._data).call(c)];for(let t=0,e=h.length;t<e;t++)d=h[t],l=this._data.get(d),null==l||r&&!r(l)||a.push(l)}if(o&&o.order&&null==i&&this._sort(a,o.order),o&&o.fields){const t=o.fields;if(null!=i&&null!=l)l=this._filterFields(l,t);else for(let e=0,i=a.length;e<i;e++)a[e]=this._filterFields(a[e],t)}if("Object"==s){const t={};for(let e=0,i=a.length;e<i;e++){const i=a[e];t[i[this._idProp]]=i}return t}return null!=i?null!=l?l:null:a}getIds(t){const e=this._data,i=t&&Od(t),n=t&&t.order,o=[...$x(e).call(e)],s=[];if(i)if(n){const t=[];for(let e=0,n=o.length;e<n;e++){const n=o[e],s=this._data.get(n);null!=s&&i(s)&&t.push(s)}this._sort(t,n);for(let e=0,i=t.length;e<i;e++)s.push(t[e][this._idProp])}else for(let t=0,e=o.length;t<e;t++){const e=o[t],n=this._data.get(e);null!=n&&i(n)&&s.push(n[this._idProp])}else if(n){const t=[];for(let i=0,n=o.length;i<n;i++){const n=o[i];t.push(e.get(n))}this._sort(t,n);for(let e=0,i=t.length;e<i;e++)s.push(t[e][this._idProp])}else for(let t=0,i=o.length;t<i;t++){const i=o[t],n=e.get(i);null!=n&&s.push(n[this._idProp])}return s}getDataSet(){return this}forEach(t,e){const i=e&&Od(e),n=this._data,o=[...$x(n).call(n)];if(e&&e.order){const i=this.get(e);for(let e=0,n=i.length;e<n;e++){const n=i[e];t(n,n[this._idProp])}}else for(let e=0,n=o.length;e<n;e++){const n=o[e],s=this._data.get(n);null==s||i&&!i(s)||t(s,n)}}map(t,e){const i=e&&Od(e),n=[],o=this._data,s=[...$x(o).call(o)];for(let e=0,o=s.length;e<o;e++){const o=s[e],r=this._data.get(o);null==r||i&&!i(r)||n.push(t(r,o))}return e&&e.order&&this._sort(n,e.order),n}_filterFields(t,e){var i;return t?Oy(i=sa(e)?e:Ma(e)).call(i,(e,i)=>(e[i]=t[i],e),{}):t}_sort(t,e){if("string"==typeof e){const i=e;Cx(t).call(t,(t,e)=>{const n=t[i],o=e[i];return n>o?1:n<o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");Cx(t).call(t,e)}}remove(t,e){const i=[],n=[],o=sa(t)?t:[t];for(let t=0,e=o.length;t<e;t++){const e=this._remove(o[t]);if(e){const t=e[this._idProp];null!=t&&(i.push(t),n.push(e))}}return i.length&&this._trigger("remove",{items:i,oldData:n},e),i}_remove(t){let e;if(CD(t)?e=t:t&&"object"==typeof t&&(e=t[this._idProp]),null!=e&&this._data.has(e)){const t=this._data.get(e)||null;return this._data.delete(e),--this.length,t}return null}clear(t){var e;const i=[...$x(e=this._data).call(e)],n=[];for(let t=0,e=i.length;t<e;t++)n.push(this._data.get(i[t]));return this._data.clear(),this.length=0,this._trigger("remove",{items:i,oldData:n},t),i}max(t){let e=null,i=null;for(const o of hD(n=this._data).call(n)){var n;const s=o[t];"number"==typeof s&&(null==i||s>i)&&(e=o,i=s)}return e||null}min(t){let e=null,i=null;for(const o of hD(n=this._data).call(n)){var n;const s=o[t];"number"==typeof s&&(null==i||s<i)&&(e=o,i=s)}return e||null}distinct(t){const e=this._data,i=[...$x(e).call(e)],n=[];let o=0;for(let s=0,r=i.length;s<r;s++){const r=i[s],a=e.get(r)[t];let l=!1;for(let t=0;t<o;t++)if(n[t]==a){l=!0;break}l||void 0===a||(n[o]=a,o++)}return n}_addItem(t){const e=function(t,e){return null==t[e]&&(t[e]=wD()),t}(t,this._idProp),i=e[this._idProp];if(this._data.has(i))throw new Error("Cannot add item: item with id "+i+" already exists");return this._data.set(i,e),++this.length,i}_updateItem(t){const e=t[this._idProp];if(null==e)throw new Error("Cannot update item: item has no id (item: "+lu(t)+")");const i=this._data.get(e);if(!i)throw new Error("Cannot update item: no item with id "+e+" found");return this._data.set(e,DD(DD({},i),t)),e}stream(t){if(t){const e=this._data;return new OD({*[xb](){for(const i of t){const t=e.get(i);null!=t&&(yield[i,t])}}})}var e;return new OD({[xb]:ll(e=fD(this._data)).call(e,this._data)})}get testLeakData(){return this._data}get testLeakIdProp(){return this._idProp}get testLeakOptions(){return this._options}get testLeakQueue(){return this._queue}set testLeakQueue(t){this._queue=t}}class PD extends MD{get idProp(){return this.getDataSet().idProp}constructor(t,e){var i;super(),ry(this,"length",0),ry(this,"_listener",void 0),ry(this,"_data",void 0),ry(this,"_ids",new jw),ry(this,"_options",void 0),this._options=e||{},this._listener=ll(i=this._onEvent).call(i,this),this.setData(t)}setData(t){if(this._data){this._data.off&&this._data.off("*",this._listener);const t=this._data.getIds({filter:Od(this._options)}),e=this._data.get(t);this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:e})}if(null!=t){this._data=t;const e=this._data.getIds({filter:Od(this._options)});for(let t=0,i=e.length;t<i;t++){const i=e[t];this._ids.add(i)}this.length=e.length,this._trigger("add",{items:e})}else this._data=new ED;this._data.on&&this._data.on("*",this._listener)}refresh(){const t=this._data.getIds({filter:Od(this._options)}),e=[...this._ids],i={},n=[],o=[],s=[];for(let e=0,o=t.length;e<o;e++){const o=t[e];i[o]=!0,this._ids.has(o)||(n.push(o),this._ids.add(o))}for(let t=0,n=e.length;t<n;t++){const n=e[t],r=this._data.get(n);null==r?console.error("If you see this, report it please."):i[n]||(o.push(n),s.push(r),this._ids.delete(n))}this.length+=n.length-o.length,n.length&&this._trigger("add",{items:n}),o.length&&this._trigger("remove",{items:o,oldData:s})}get(t,e){if(null==this._data)return null;let i,n=null;CD(t)||sa(t)?(n=t,i=e):i=t;const o=uh({},this._options,i),s=Od(this._options),r=i&&Od(i);return s&&r&&(o.filter=t=>s(t)&&r(t)),null==n?this._data.get(o):this._data.get(n,o)}getIds(t){if(this._data.length){const e=Od(this._options),i=null!=t?Od(t):null;let n;return n=i?e?t=>e(t)&&i(t):i:e,this._data.getIds({filter:n,order:t&&t.order})}return[]}forEach(t,e){if(this._data){var i;const n=Od(this._options),o=e&&Od(e);let s;s=o?n?function(t){return n(t)&&o(t)}:o:n,kl(i=this._data).call(i,t,{filter:s,order:e&&e.order})}}map(t,e){if(this._data){var i;const n=Od(this._options),o=e&&Od(e);let s;return s=o?n?t=>n(t)&&o(t):o:n,va(i=this._data).call(i,t,{filter:s,order:e&&e.order})}return[]}getDataSet(){return this._data.getDataSet()}stream(t){var e;return this._data.stream(t||{[xb]:ll(e=$x(this._ids)).call(e,this._ids)})}dispose(){var t;null!==(t=this._data)&&void 0!==t&&t.off&&this._data.off("*",this._listener);const e="This data view has already been disposed of.",i={get:()=>{throw new Error(e)},set:()=>{throw new Error(e)},configurable:!1};for(const t of Xr(PD.prototype))gD(this,t,i)}_onEvent(t,e,i){if(!e||!e.items||!this._data)return;const n=e.items,o=[],s=[],r=[],a=[],l=[],h=[];switch(t){case"add":for(let t=0,e=n.length;t<e;t++){const e=n[t];this.get(e)&&(this._ids.add(e),o.push(e))}break;case"update":for(let t=0,i=n.length;t<i;t++){const i=n[t];this.get(i)?this._ids.has(i)?(s.push(i),l.push(e.data[t]),a.push(e.oldData[t])):(this._ids.add(i),o.push(i)):this._ids.has(i)&&(this._ids.delete(i),r.push(i),h.push(e.oldData[t]))}break;case"remove":for(let t=0,i=n.length;t<i;t++){const i=n[t];this._ids.has(i)&&(this._ids.delete(i),r.push(i),h.push(e.oldData[t]))}}this.length+=o.length-r.length,o.length&&this._trigger("add",{items:o},i),s.length&&this._trigger("update",{items:s,oldData:a,data:l},i),r.length&&this._trigger("remove",{items:r,oldData:h},i)}}function ID(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof kl(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof va(e)&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.stream&&function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.add&&"function"==typeof e.clear&&"function"==typeof e.distinct&&"function"==typeof kl(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof va(e)&&"function"==typeof e.max&&"function"==typeof e.min&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.remove&&"function"==typeof e.setOptions&&"function"==typeof e.stream&&"function"==typeof e.update&&"function"==typeof e.updateOnly}(t,e.getDataSet())}console.warn("You're running a development build.");var ND=i(r());const LD="undefined"!=typeof window&&window.moment||ND;var AD,FD,RD,jD,YD,HD,zD,GD,WD,BD,VD,UD={exports:{}},XD={},qD={exports:{}},ZD={};function KD(){if(AD)return ZD;function t(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}AD=1;var e=/javascript\s*\:/gim;return ZD.whiteList=t(),ZD.getDefaultWhiteList=t,ZD.onAttr=function(t,e,i){},ZD.onIgnoreAttr=function(t,e,i){},ZD.safeAttrValue=function(t,i){return e.test(i)?"":i},ZD}function $D(){return RD?FD:(RD=1,FD={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}})}function JD(){if(zD)return HD;zD=1;var t=KD(),e=function(){if(YD)return jD;YD=1;var t=$D();return jD=function(e,i){";"!==(e=t.trimRight(e))[e.length-1]&&(e+=";");var n=e.length,o=!1,s=0,r=0,a="";function l(){if(!o){var n=t.trim(e.slice(s,r)),l=n.indexOf(":");if(-1!==l){var h=t.trim(n.slice(0,l)),d=t.trim(n.slice(l+1));if(h){var c=i(s,a.length,h,d,n);c&&(a+=c+"; ")}}}s=r+1}for(;r<n;r++){var h=e[r];if("/"===h&&"*"===e[r+1]){var d=e.indexOf("*/",r+2);if(-1===d)break;s=(r=d+1)+1,o=!1}else"("===h?o=!0:")"===h?o=!1:";"===h?o||l():"\n"===h&&l()}return t.trim(a)},jD}();function i(t){return null==t}function n(e){(e=function(t){var e={};for(var i in t)e[i]=t[i];return e}(e||{})).whiteList=e.whiteList||t.whiteList,e.onAttr=e.onAttr||t.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||t.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||t.safeAttrValue,this.options=e}return $D(),n.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var n=this.options,o=n.whiteList,s=n.onAttr,r=n.onIgnoreAttr,a=n.safeAttrValue;return e(t,function(t,e,n,l,h){var d=o[n],c=!1;if(!0===d?c=d:"function"==typeof d?c=d(l):d instanceof RegExp&&(c=d.test(l)),!0!==c&&(c=!1),l=a(n,l)){var u,p={position:e,sourcePosition:t,source:h,isWhite:c};return c?i(u=s(n,l,p))?n+":"+l:u:i(u=r(n,l,p))?void 0:u}})},HD=n}function QD(){return GD||(GD=1,function(t,e){var i=KD(),n=JD();for(var o in e=t.exports=function(t,e){return new n(e).process(t)},e.FilterCSS=n,i)e[o]=i[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)}(qD,qD.exports)),qD.exports}function tk(){return BD?WD:(BD=1,WD={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}})}function ek(){if(VD)return XD;VD=1;var t=QD().FilterCSS,e=QD().getDefaultWhiteList,i=tk();function n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var o=new t;function s(t){return t.replace(r,"<").replace(a,">")}var r=/</g,a=/>/g,l=/"/g,h=/"/g,d=/&#([a-zA-Z0-9]*);?/gim,c=/:?/gim,u=/&newline;?/gim,p=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,m=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,f=/u\s*r\s*l\s*\(.*/gi;function g(t){return t.replace(l,""")}function v(t){return t.replace(h,'"')}function y(t){return t.replace(d,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function b(t){return t.replace(c,":").replace(u," ")}function _(t){for(var e="",n=0,o=t.length;n<o;n++)e+=t.charCodeAt(n)<32?" ":t.charAt(n);return i.trim(e)}function w(t){return t=_(t=b(t=y(t=v(t))))}function x(t){return t=s(t=g(t))}return XD.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},XD.getDefaultWhiteList=n,XD.onTag=function(t,e,i){},XD.onIgnoreTag=function(t,e,i){},XD.onTagAttr=function(t,e,i){},XD.onIgnoreTagAttr=function(t,e,i){},XD.safeAttrValue=function(t,e,n,s){if(n=w(n),"href"===e||"src"===e){if("#"===(n=i.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===e){if(p.lastIndex=0,p.test(n))return""}else if("style"===e){if(m.lastIndex=0,m.test(n))return"";if(f.lastIndex=0,f.test(n)&&(p.lastIndex=0,p.test(n)))return"";!1!==s&&(n=(s=s||o).process(n))}return n=x(n)},XD.escapeHtml=s,XD.escapeQuote=g,XD.unescapeQuote=v,XD.escapeHtmlEntities=y,XD.escapeDangerHtml5Entities=b,XD.clearNonPrintableCharacter=_,XD.friendlyAttrValue=w,XD.escapeAttrValue=x,XD.onIgnoreTagStripAll=function(){return""},XD.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var n=!Array.isArray(t),o=[],s=!1;return{onIgnoreTag:function(r,a,l){if(function(e){return!!n||-1!==i.indexOf(t,e)}(r)){if(l.isClosing){var h="[/removed]",d=l.position+10;return o.push([!1!==s?s:l.position,d]),s=!1,h}return s||(s=l.position),"[removed]"}return e(r,a,l)},remove:function(t){var e="",n=0;return i.forEach(o,function(i){e+=t.slice(n,i[0]),n=i[1]}),e+=t.slice(n)}}},XD.stripCommentTag=function(t){for(var e="",i=0;i<t.length;){var n=t.indexOf("\x3c!--",i);if(-1===n){e+=t.slice(i);break}e+=t.slice(i,n);var o=t.indexOf("--\x3e",n);if(-1===o)break;i=o+3}return e},XD.stripBlankChar=function(t){var e=t.split("");return(e=e.filter(function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))})).join("")},XD.attributeWrapSign='"',XD.cssFilter=o,XD.getDefaultCSSWhiteList=e,XD}var ik,nk,ok,sk,rk={};function ak(){if(ik)return rk;ik=1;var t=tk();function e(e){var i,n=t.spaceIndex(e);return i=-1===n?e.slice(1,-1):e.slice(1,n+1),"/"===(i=t.trim(i).toLowerCase()).slice(0,1)&&(i=i.slice(1)),"/"===i.slice(-1)&&(i=i.slice(0,-1)),i}function i(t){return"</"===t.slice(0,2)}var n=/[^a-zA-Z0-9\\_:.-]/gim;function o(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}}function s(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}}function r(t,e){for(;e>0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function a(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}return rk.parseTag=function(t,n,o){var s="",r=0,a=!1,l=!1,h=0,d=t.length,c="",u="";t:for(h=0;h<d;h++){var p=t.charAt(h);if(!1===a){if("<"===p){a=h;continue}}else if(!1===l){if("<"===p){s+=o(t.slice(r,h)),a=h,r=h;continue}if(">"===p||h===d-1){s+=o(t.slice(r,a)),c=e(u=t.slice(a,h+1)),s+=n(a,s.length,c,u,i(u)),r=h+1,a=!1;continue}if('"'===p||"'"===p)for(var m=1,f=t.charAt(h-m);""===f.trim()||"="===f;){if("="===f){l=p;continue t}f=t.charAt(h-++m)}}else if(p===l){l=!1;continue}}return r<d&&(s+=o(t.substr(r))),s},rk.parseAttr=function(e,i){var l=0,h=0,d=[],c=!1,u=e.length;function p(e,o){if(!((e=(e=t.trim(e)).replace(n,"").toLowerCase()).length<1)){var s=i(e,o||"");s&&d.push(s)}}for(var m=0;m<u;m++){var f,g=e.charAt(m);if(!1!==c||"="!==g)if(!1===c||m!==h)if(/\s|\n|\t/.test(g)){if(e=e.replace(/\s|\n|\t/g," "),!1===c){if(-1===(f=o(e,m))){p(t.trim(e.slice(l,m))),c=!1,l=m+1;continue}m=f-1;continue}if(-1===(f=r(e,m-1))){p(c,a(t.trim(e.slice(l,m)))),c=!1,l=m+1;continue}}else;else{if(-1===(f=e.indexOf(g,m+1)))break;p(c,t.trim(e.slice(h+1,f))),c=!1,l=(m=f)+1}else c=e.slice(l,m),l=m+1,h='"'===e.charAt(l)||"'"===e.charAt(l)?l:s(e,m+1)}return l<e.length&&(!1===c?p(e.slice(l)):p(c,a(t.trim(e.slice(l))))),t.trim(d.join(" "))},rk}function lk(){if(ok)return nk;ok=1;var t=QD().FilterCSS,e=ek(),i=ak(),n=i.parseTag,o=i.parseAttr,s=tk();function r(t){return null==t}function a(i){(i=function(t){var e={};for(var i in t)e[i]=t[i];return e}(i||{})).stripIgnoreTag&&(i.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),i.onIgnoreTag=e.onIgnoreTagStripAll),i.whiteList||i.allowList?i.whiteList=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i.toLowerCase()]=t[i].map(function(t){return t.toLowerCase()}):e[i.toLowerCase()]=t[i];return e}(i.whiteList||i.allowList):i.whiteList=e.whiteList,this.attributeWrapSign=!0===i.singleQuotedAttributeValue?"'":e.attributeWrapSign,i.onTag=i.onTag||e.onTag,i.onTagAttr=i.onTagAttr||e.onTagAttr,i.onIgnoreTag=i.onIgnoreTag||e.onIgnoreTag,i.onIgnoreTagAttr=i.onIgnoreTagAttr||e.onIgnoreTagAttr,i.safeAttrValue=i.safeAttrValue||e.safeAttrValue,i.escapeHtml=i.escapeHtml||e.escapeHtml,this.options=i,!1===i.css?this.cssFilter=!1:(i.css=i.css||{},this.cssFilter=new t(i.css))}return a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var i=this,a=i.options,l=a.whiteList,h=a.onTag,d=a.onIgnoreTag,c=a.onTagAttr,u=a.onIgnoreTagAttr,p=a.safeAttrValue,m=a.escapeHtml,f=i.attributeWrapSign,g=i.cssFilter;a.stripBlankChar&&(t=e.stripBlankChar(t)),a.allowCommentTag||(t=e.stripCommentTag(t));var v=!1;a.stripIgnoreTagBody&&(v=e.StripTagBody(a.stripIgnoreTagBody,d),d=v.onIgnoreTag);var y=n(t,function(t,e,i,n,a){var v={sourcePosition:t,position:e,isClosing:a,isWhite:Object.prototype.hasOwnProperty.call(l,i)},y=h(i,n,v);if(!r(y))return y;if(v.isWhite){if(v.isClosing)return"</"+i+">";var b=function(t){var e=s.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=s.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=s.trim(t.slice(0,-1))),{html:t,closing:i}}(n),_=l[i],w=o(b.html,function(t,e){var n=-1!==s.indexOf(_,t),o=c(i,t,e,n);return r(o)?n?(e=p(i,t,e,g))?t+"="+f+e+f:t:r(o=u(i,t,e,n))?void 0:o:o});return n="<"+i,w&&(n+=" "+w),b.closing&&(n+=" /"),n+=">"}return r(y=d(i,n,v))?m(n):y},m);return v&&(y=v.remove(y)),y},nk=a}var hk=(sk||(sk=1,function(t,e){var i=ek(),n=ak(),o=lk();function s(t,e){return new o(e).process(t)}(e=t.exports=s).filterXSS=s,e.FilterXSS=o,function(){for(var t in i)e[t]=i[t];for(var o in n)e[o]=n[o]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(UD,UD.exports)),UD.exports),dk=i(hk);function ck(t,e){var i=Ma(t);if(Zf){var n=Zf(t);e&&(n=Od(n).call(n,function(e){return ag(t,e).enumerable})),i.push.apply(i,n)}return i}function uk(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?kl(i=ck(Object(o),!0)).call(i,function(e){ry(t,e,o[e])}):vg?Ng(t,vg(o)):kl(n=ck(Object(o))).call(n,function(e){gD(t,e,ag(o,e))})}return t}function pk(t){var e;if(!t)return!1;let i=null!==(e=t.idProp)&&void 0!==e?e:t._idProp;return!!i&&ID(i,t)}const mk=/^\/?Date\((-?\d+)/i,fk=/^\d+$/;function gk(t,e){let i;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Wm(t)&&!isNaN(Date.parse(t))?ND(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":try{return gk(t,"Moment").toDate()}catch(i){throw i instanceof TypeError?new TypeError("Cannot convert object of type "+qm(t)+" to type "+e):i}case"Moment":if(Gm(t))return ND(t);if(t instanceof Date)return ND(t.valueOf());if(ND.isMoment(t))return ND(t);if(Wm(t))return i=mk.exec(t),i?ND(Number(i[1])):(i=fk.exec(t),ND(i?Number(t):t));throw new TypeError("Cannot convert object of type "+qm(t)+" to type "+e);case"ISODate":if(Gm(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(ND.isMoment(t))return t.toDate().toISOString();if(Wm(t))return i=mk.exec(t),i?new Date(Number(i[1])).toISOString():ND(t).format();throw new Error("Cannot convert object of type "+qm(t)+" to type ISODate");case"ASPDate":if(Gm(t))return"/Date("+t+")/";if(t instanceof Date||ND.isMoment(t))return"/Date("+t.valueOf()+")/";if(Wm(t)){let e;return i=mk.exec(t),e=i?new Date(Number(i[1])).valueOf():new Date(t).valueOf(),"/Date("+e+")/"}throw new Error("Cannot convert object of type "+qm(t)+" to type ASPDate");default:throw new Error("Unknown type ".concat(e))}}}function vk(t){var e,i,n,o,s,r;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"};const l=t._idProp,h=new ED({fieldId:l}),d=va((c=t,e=new SD(c))).call(e,t=>{var e;return Oy(e=Ma(t)).call(e,(e,i)=>(e[i]=gk(t[i],a[i]),e),{})}).to(h);var c;return d.all().start(),{add:function(){return t.getDataSet().add(...arguments)},remove:function(){return t.getDataSet().remove(...arguments)},update:function(){return t.getDataSet().update(...arguments)},updateOnly:function(){return t.getDataSet().updateOnly(...arguments)},clear:function(){return t.getDataSet().clear(...arguments)},forEach:ll(i=kl(h)).call(i,h),get:ll(n=h.get).call(n,h),getIds:ll(o=h.getIds).call(o,h),off:ll(s=h.off).call(s,h),on:ll(r=h.on).call(r,h),get length(){return h.length},idProp:l,type:a,rawDS:t,coercedDS:h,dispose:()=>d.stop()}}const yk=t=>{const e=new dk.FilterXSS(t);return t=>"string"==typeof t?e.process(t):t},bk=t=>t;let _k=yk();const wk=uk(uk({},Sf),{},{convert:gk,setupXSSProtection:t=>{t&&(!0===t.disabled?(_k=bk,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(_k=yk(t.filterOptions)))}});gD(wk,"xss",{get:function(){return _k}});var xk,Dk,kk,Sk,Ck,Tk,Mk,Ok,Ek,Pk={};function Ik(){if(Dk)return xk;Dk=1;var t=L(),e=A(),i=j(),n=$i(),o=Kd().trim,s=Zd(),r=i("".charAt),a=t.parseFloat,l=t.Symbol,h=l&&l.iterator,d=1/a(s+"-0")!=-1/0||h&&!e(function(){a(Object(h))});return xk=d?function(t){var e=o(n(t)),i=a(e);return 0===i&&"-"===r(e,0)?-0:i}:a,xk}function Nk(){return Ck?Sk:(Ck=1,function(){if(kk)return Pk;kk=1;var t=Pi(),e=Ik();t({global:!0,forced:parseFloat!==e},{parseFloat:e})}(),Sk=Ht().parseFloat)}function Lk(){return Mk?Tk:(Mk=1,Tk=Nk())}var Ak=i(Ek?Ok:(Ek=1,Ok=Lk()));class Fk{constructor(t,e){this.options=null,this.props=null}setOptions(t){t&&wk.extend(this.options,t)}redraw(){return!1}destroy(){}_isResized(){const t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t}}var Rk,jk,Yk,Hk,zk,Gk,Wk,Bk,Vk;function Uk(){return Yk?jk:(Yk=1,Rk||(Rk=1,Pi()({target:"String",proto:!0},{repeat:Kc()})),jk=Dr()("String","repeat"))}function Xk(){if(zk)return Hk;zk=1;var t=Gt(),e=Uk(),i=String.prototype;return Hk=function(n){var o=n.repeat;return"string"==typeof n||n===i||t(i,n)&&o===i.repeat?e:o},Hk}function qk(){return Wk?Gk:(Wk=1,Gk=Xk())}var Zk=i(Vk?Bk:(Vk=1,Bk=qk()));function Kk(t,e,i){if(i&&!sa(i))return Kk(t,e,[i]);if(e.hiddenDates=[],i&&1==sa(i)){var n;for(let n=0;n<i.length;n++)if(void 0===Zk(i[n])){const o={};o.start=t(i[n].start).toDate().valueOf(),o.end=t(i[n].end).toDate().valueOf(),e.hiddenDates.push(o)}Cx(n=e.hiddenDates).call(n,(t,e)=>t.start-e.start)}}function $k(t,e,i){if(i&&!sa(i))return $k(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){Kk(t,e,i);const n=t(e.range.start),o=t(e.range.end),s=(e.range.end-e.range.start)/e.domProps.centerContainer.width;for(let r=0;r<i.length;r++)if(void 0!==Zk(i[r])){let a=t(i[r].start),l=t(i[r].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: ".concat(i[r].start));if("Invalid Date"==l._d)throw new Error("Supplied end date is not valid: ".concat(i[r].end));if(l-a>=4*s){let t=0,s=o.clone();switch(Zk(i[r])){case"daily":a.day()!=l.day()&&(t=1),a=a.dayOfYear(n.dayOfYear()).year(n.year()).subtract(7,"days"),l=l.dayOfYear(n.dayOfYear()).year(n.year()).subtract(7-t,"days"),s.add(1,"weeks");break;case"weekly":{const t=l.diff(a,"days"),e=a.day();a=a.date(n.date()).month(n.month()).year(n.year()),l=a.clone(),a=a.day(e).subtract(1,"weeks"),l=l.day(e).add(t,"days").subtract(1,"weeks"),s.add(1,"weeks");break}case"monthly":a.month()!=l.month()&&(t=1),a=a.month(n.month()).year(n.year()).subtract(1,"months"),l=l.month(n.month()).year(n.year()).subtract(1,"months").add(t,"months"),s.add(1,"months");break;case"yearly":a.year()!=l.year()&&(t=1),a=a.year(n.year()).subtract(1,"years"),l=l.year(n.year()).subtract(1,"years").add(t,"years"),s.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",Zk(i[r]))}for(;a<s;)switch(e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()}),Zk(i[r])){case"daily":a=a.add(1,"days"),l=l.add(1,"days");break;case"weekly":a=a.add(1,"weeks"),l=l.add(1,"weeks");break;case"monthly":a=a.add(1,"months"),l=l.add(1,"months");break;case"yearly":a=a.add(1,"y"),l=l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",Zk(i[r]))}e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()})}}Jk(e);const r=lS(e.range.start,e.hiddenDates),a=lS(e.range.end,e.hiddenDates);let l=e.range.start,h=e.range.end;1==r.hidden&&(l=1==e.range.startToFront?r.startDate-1:r.endDate+1),1==a.hidden&&(h=1==e.range.endToFront?a.startDate-1:a.endDate+1),1!=r.hidden&&1!=a.hidden||e.range._applyRange(l,h)}}function Jk(t){var e;const i=t.hiddenDates,n=[];for(var o=0;o<i.length;o++)for(let t=0;t<i.length;t++)o!=t&&1!=i[t].remove&&1!=i[o].remove&&(i[t].start>=i[o].start&&i[t].end<=i[o].end?i[t].remove=!0:i[t].start>=i[o].start&&i[t].start<=i[o].end?(i[o].end=i[t].end,i[t].remove=!0):i[t].end>=i[o].start&&i[t].end<=i[o].end&&(i[o].start=i[t].start,i[t].remove=!0));for(o=0;o<i.length;o++)!0!==i[o].remove&&n.push(i[o]);t.hiddenDates=n,Cx(e=t.hiddenDates).call(e,(t,e)=>t.start-e.start)}function Qk(t,e,i){let n=!1;const o=e.current.valueOf();for(let t=0;t<e.hiddenDates.length;t++){const i=e.hiddenDates[t].start;var s=e.hiddenDates[t].end;if(o>=i&&o<s){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){const n=t(i),o=t(s);n.year()!=o.year()?e.switchedYear=!0:n.month()!=o.month()?e.switchedMonth=!0:n.dayOfYear()!=o.dayOfYear()&&(e.switchedDay=!0),e.current=o}}function tS(t,e,i){let n;if(0==t.body.hiddenDates.length)return n=t.range.conversion(i),(e.valueOf()-n.offset)*n.scale;{const o=lS(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);const s=iS(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){n=t.range.conversion(i,s);const o=nS(t.body.hiddenDates,e,n.offset);return e=t.options.moment(e).toDate().valueOf(),e+=o,-(n.offset-e.valueOf())*n.scale}if(e>t.range.end){const o={start:t.range.start,end:e};return e=oS(t.options.moment,t.body.hiddenDates,o,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}return e=oS(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}}function eS(t,e,i){if(0==t.body.hiddenDates.length){const n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}{const n=iS(t.body.hiddenDates,t.range.start,t.range.end),o=(t.range.end-t.range.start-n)*e/i,s=rS(t.body.hiddenDates,t.range,o);return new Date(s+o+t.range.start)}}function iS(t,e,i){let n=0;for(let o=0;o<t.length;o++){const s=t[o].start,r=t[o].end;s>=e&&r<i&&(n+=r-s)}return n}function nS(t,e,i){let n=0;for(let o=0;o<t.length;o++){const s=t[o].start,r=t[o].end;s>=e&&r<=i&&(n+=r-s)}return n}function oS(t,e,i,n){return n=t(n).toDate().valueOf(),n-=sS(t,e,i,n)}function sS(t,e,i,n){let o=0;n=t(n).toDate().valueOf();for(let t=0;t<e.length;t++){const s=e[t].start,r=e[t].end;s>=i.start&&r<i.end&&n>=r&&(o+=r-s)}return o}function rS(t,e,i){let n=0,o=0,s=e.start;for(let r=0;r<t.length;r++){const a=t[r].start,l=t[r].end;if(a>=e.start&&l<e.end){if(o+=a-s,s=l,o>=i)break;n+=l-a}}return n}function aS(t,e,i,n){const o=lS(e,t);return 1==o.hidden?i<0?1==n?o.startDate-(o.endDate-e)-1:o.startDate-1:1==n?o.endDate+(e-o.startDate)+1:o.endDate+1:e}function lS(t,e){for(let o=0;o<e.length;o++){var i=e[o].start,n=e[o].end;if(t>=i&&t<n)return{hidden:!0,startDate:i,endDate:n}}return{hidden:!1,startDate:i,endDate:n}}var hS,dS,cS,uS,pS=Object.freeze({__proto__:null,convertHiddenOptions:Kk,correctTimeForHidden:oS,getAccumulatedHiddenDuration:rS,getHiddenDurationBefore:sS,getHiddenDurationBeforeStart:nS,getHiddenDurationBetween:iS,getIsHidden:lS,printDates:function(t){for(let e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new Date(t[e].end),t[e].start,t[e].end,t[e].remove)},removeDuplicates:Jk,snapAwayFromHidden:aS,stepOverHiddenDates:Qk,toScreen:tS,toTime:eS,updateHiddenDates:$k});class mS extends Fk{constructor(t,e){var i,n,o,s,r,a,l;super();const h=LD().hours(0).minutes(0).seconds(0).milliseconds(0),d=h.clone().add(-3,"days").valueOf(),c=h.clone().add(3,"days").valueOf();this.millisecondsPerPixelCache=void 0,void 0===e?(this.start=d,this.end=c):(this.start=e.start||d,this.end=e.end||c),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:LD,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=wk.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",ll(i=this._onDragStart).call(i,this)),this.body.emitter.on("panmove",ll(n=this._onDrag).call(n,this)),this.body.emitter.on("panend",ll(o=this._onDragEnd).call(o,this)),this.body.emitter.on("mousewheel",ll(s=this._onMouseWheel).call(s,this)),this.body.emitter.on("touch",ll(r=this._onTouch).call(r,this)),this.body.emitter.on("pinch",ll(a=this._onPinch).call(a,this)),this.body.dom.rollingModeBtn.addEventListener("click",ll(l=this.startRolling).call(l,this)),this.setOptions(e)}setOptions(t){if(t){const e=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll"];wk.selectiveExtend(e,this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}}startRolling(){const t=this;!function e(){t.stopRolling(),t.rolling=!0;let i=t.end-t.start;const n=wk.convert(new Date,"Date").valueOf(),o=t.options.rollingMode&&t.options.rollingMode.offset||.5,s=n-i*o,r=n+i*(1-o);t.setRange(s,r,{animation:!1}),i=1/t.conversion(t.body.domProps.center.width).scale/10,i<30&&(i=30),i>1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=Lu(e,i)}()}stopRolling(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}setRange(t,e,i,n,o){i||(i={}),!0!==i.byUser&&(i.byUser=!1);const s=this,r=null!=t?wk.convert(t,"Date").valueOf():null,a=null!=e?wk.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){const t=this.start,e=this.end,d="object"==typeof i.animation&&"duration"in i.animation?i.animation.duration:500,c="object"==typeof i.animation&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",u=wk.easingFunctions[c];var l;if(!u)throw new Error(fd(l="Unknown easing function ".concat(lu(c),". Choose from: ")).call(l,Ma(wk.easingFunctions).join(", ")));const p=Wa();let m=!1;const f=()=>{if(!s.props.touch.dragging){const l=Wa()-p,c=u(l/d),g=l>d,v=g||null===r?r:t+(r-t)*c,y=g||null===a?a:e+(a-e)*c;h=s._applyRange(v,y),$k(s.options.moment,s.body,s.options.hiddenDates),m=m||h;const b={start:new Date(s.start),end:new Date(s.end),byUser:i.byUser,event:i.event};if(o&&o(c,h,g),h&&s.body.emitter.emit("rangechange",b),g){if(m&&(s.body.emitter.emit("rangechanged",b),n))return n()}else s.animationTimer=Lu(f,20)}};return f()}var h=this._applyRange(r,a);if($k(this.options.moment,this.body,this.options.hiddenDates),h){const t={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",t),clearTimeout(s.timeoutID),s.timeoutID=Lu(()=>{s.body.emitter.emit("rangechanged",t)},200),n)return n()}}getMillisecondsPerPixel(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}_applyRange(t,e){let i=null!=t?wk.convert(t,"Date").valueOf():this.start,n=null!=e?wk.convert(e,"Date").valueOf():this.end;const o=null!=this.options.max?wk.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?wk.convert(this.options.min,"Date").valueOf():null;let r;if(isNaN(i)||null===i)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(n)||null===n)throw new Error('Invalid end "'.concat(e,'"'));if(n<i&&(n=i),null!==s&&i<s&&(r=s-i,i+=r,n+=r,null!=o&&n>o&&(n=o)),null!==o&&n>o&&(r=n-o,i-=r,n-=r,null!=s&&i<s&&(i=s)),null!==this.options.zoomMin){let t=Ak(this.options.zoomMin);if(t<0&&(t=0),n-i<t){const e=.5;this.end-this.start===t&&i>=this.start-e&&n<=this.end?(i=this.start,n=this.end):(r=t-(n-i),i-=r/2,n+=r/2)}}if(null!==this.options.zoomMax){let t=Ak(this.options.zoomMax);t<0&&(t=0),n-i>t&&(this.end-this.start===t&&i<this.start&&n>this.end?(i=this.start,n=this.end):(r=n-i-t,i+=r/2,n-=r/2))}const a=this.start!=i||this.end!=n;return i>=this.start&&i<=this.end||n>=this.start&&n<=this.end||this.start>=i&&this.start<=n||this.end>=i&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=i,this.end=n,a}getRange(){return{start:this.start,end:this.end}}conversion(t,e){return mS.conversion(this.start,this.end,t,e)}static conversion(t,e,i,n){return void 0===n&&(n=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}}_onDragStart(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))}_onDrag(t){if(!t)return;if(!this.props.touch.dragging)return;if(!this.options.moveable)return;if(!this.props.touch.allowDragging)return;const e=this.options.direction;fS(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let n=this.props.touch.end-this.props.touch.start;n-=iS(this.body.hiddenDates,this.start,this.end);const o="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;let s;s=this.options.rtl?i/o*n:-i/o*n;const r=this.props.touch.start+s,a=this.props.touch.end+s,l=aS(this.body.hiddenDates,r,this.previousDelta-i,!0),h=aS(this.body.hiddenDates,a,this.previousDelta-i,!0);if(l!=r||h!=a)return this.deltaDifference+=i,this.props.touch.start=l,this.props.touch.end=h,void this._onDrag(t);this.previousDelta=i,this._applyRange(r,a);const d=new Date(this.start),c=new Date(this.end);this.body.emitter.emit("rangechange",{start:d,end:c,byUser:!0,event:t}),this.body.emitter.emit("panmove")}_onDragEnd(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))}_onMouseWheel(t){let e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail?e=-t.detail/3:t.deltaY&&(e=-t.deltaY/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){const i=this.options.zoomFriction||5;let n,o;if(n=e<0?1-e/i:1/(1+e/i),this.rolling){const t=this.options.rollingMode&&this.options.rollingMode.offset||.5;o=this.start+(this.end-this.start)*t}else{const e=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);o=this._pointerToDate(e)}this.zoom(n,o,e,t),t.preventDefault()}}_onTouch(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,wk.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;wk.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();const e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,n=iS(this.body.hiddenDates,this.start,this.end),o=sS(this.options.moment,this.body.hiddenDates,this,i),s=n-o;let r=i-o+(this.props.touch.start-(i-o))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;const l=aS(this.body.hiddenDates,r,1-e,!0),h=aS(this.body.hiddenDates,a,e-1,!0);l==r&&h==a||(this.props.touch.start=l,this.props.touch.end=h,this.scaleOffset=1-t.scale,r=l,a=h);const d={animation:!1,byUser:!0,event:t};this.setRange(r,a,d),this.startToFront=!1,this.endToFront=!0}_isInsideRange(t){const e=t.center?t.center.x:t.clientX,i=this.body.dom.centerContainer.getBoundingClientRect(),n=this.options.rtl?e-i.left:i.right-e,o=this.body.util.toTime(n);return o>=this.start&&o<=this.end}_pointerToDate(t){let e;const i=this.options.direction;if(fS(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();{const i=this.body.domProps.center.height;return e=this.conversion(i),t.y/e.scale+e.offset}}getPointer(t,e){const i=e.getBoundingClientRect();return this.options.rtl?{x:i.right-t.x,y:t.y-i.top}:{x:t.x-i.left,y:t.y-i.top}}zoom(t,e,i,n){null==e&&(e=(this.start+this.end)/2);const o=iS(this.body.hiddenDates,this.start,this.end),s=sS(this.options.moment,this.body.hiddenDates,this,e),r=o-s;let a=e-s+(this.start-(e-s))*t,l=e+r+(this.end-(e+r))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);const h=aS(this.body.hiddenDates,a,i,!0),d=aS(this.body.hiddenDates,l,-i,!0);h==a&&d==l||(a=h,l=d);const c={animation:!1,byUser:!0,event:n};this.setRange(a,l,c),this.startToFront=!1,this.endToFront=!0}move(t){const e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n}moveTo(t){const e=(this.start+this.end)/2-t,i=this.start-e,n=this.end-e;this.setRange(i,n,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}}function fS(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}function gS(){return dS?hS:(dS=1,wu(),hS=Ht().setInterval)}var vS=i(uS?cS:(uS=1,cS=gS())),yS=null;let bS;if("undefined"!=typeof window){bS=function t(e,i){var n=i||{preventDefault:!1};if(e.Manager){var o=e,s=function(e,i){var s=Object.create(n);return i&&o.assign(s,i),t(new o(e,s),s)};return o.assign(s,o),s.Manager=function(e,i){var s=Object.create(n);return i&&o.assign(s,i),t(new o.Manager(e,s),s)},s}var r=Object.create(e),a=e.element;function l(t){return t.match(/[^ ]+/g)}function h(t){if("hammer.input"!==t.type){if(t.srcEvent._handled||(t.srcEvent._handled={}),t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var e=!1;t.stopPropagation=function(){e=!0};var i=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof i&&(t.srcEvent.stopPropagation=function(){i(),t.stopPropagation()}),t.firstTarget=yS;for(var n=yS.isConnected?yS:t.target;n&&!e;){var o=n.hammer;if(o)for(var s,r=0;r<o.length;r++)if(s=o[r]._handlers[t.type])for(var a=0;a<s.length&&!e;a++)s[a](t);n=n.parentNode}}return a.hammer||(a.hammer=[]),a.hammer.push(r),e.on("hammer.input",function(t){!0!==n.preventDefault&&n.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(yS=t.target)}),r._handlers={},r.on=function(t,i){return l(t).forEach(function(t){var n=r._handlers[t];n||(r._handlers[t]=n=[],e.on(t,h)),n.push(i)}),r},r.off=function(t,i){return l(t).forEach(function(t){var n=r._handlers[t];n&&((n=i?n.filter(function(t){return t!==i}):[]).length>0?r._handlers[t]=n:(e.off(t,h),delete r._handlers[t]))}),r},r.emit=function(t,i){yS=i.target,e.emit(t,i)},r.destroy=function(){var t=e.element.hammer,i=t.indexOf(r);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,r._handlers={},e.destroy()},r}(window.Hammer||Mm,{preventDefault:"mouse"})}else bS=function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:e=>({set:t})}}()};var _S=bS;function wS(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}class xS{constructor(t,e,i,n,o){this.moment=o&&o.moment||LD,this.options=o||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,sa(n)?this.hiddenDates=n:this.hiddenDates=null!=n?[n]:[],this.format=xS.FORMAT}setMoment(t){this.moment=t,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}setFormat(t){const e=wk.deepExtend({},xS.FORMAT);this.format=wk.deepExtend(e,t)}setRange(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=null!=t?this.moment(t.valueOf()):Wa(),this._end=null!=e?this.moment(e.valueOf()):Wa(),this.autoScale&&this.setMinimumStep(i)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch("week"==this.scale&&this.current.weekday(0),this.scale){case"year":this.current=this.current.year(this.step*Math.floor(this.current.year()/this.step)).month(0);case"month":this.current=this.current.date(1);case"week":case"day":case"weekday":this.current=this.current.hours(0);case"hour":this.current=this.current.minutes(0);case"minute":this.current=this.current.seconds(0);case"second":this.current=this.current.milliseconds(0)}if(1!=this.step){let t=this.current.clone();switch(this.scale){case"millisecond":this.current=this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current=this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current=this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current=this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current=this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current=this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current=this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current=this.current.subtract(this.current.year()%this.step,"year")}t.isSame(this.current)||(this.current=this.moment(aS(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){const t=this.current.valueOf();switch(this.scale){case"millisecond":this.current=this.current.add(this.step,"millisecond");break;case"second":this.current=this.current.add(this.step,"second");break;case"minute":this.current=this.current.add(this.step,"minute");break;case"hour":this.current=this.current.add(this.step,"hour"),this.current.month()<6?this.current=this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!==0&&(this.current=this.current.add(this.step-this.current.hours()%this.step,"hour"));break;case"weekday":case"day":this.current=this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday())this.current=this.current.weekday(0).add(this.step,"week");else if(!1===this.options.showMajorLabels)this.current=this.current.add(this.step,"week");else{const t=this.current.clone();t.add(1,"week"),t.isSame(this.current,"month")?this.current=this.current.add(this.step,"week"):this.current=this.current.add(this.step,"week").date(1)}break;case"month":this.current=this.current.add(this.step,"month");break;case"year":this.current=this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&(this.current=this.current.milliseconds(0));break;case"second":this.current.seconds()>0&&this.current.seconds()<this.step&&(this.current=this.current.seconds(0));break;case"minute":this.current.minutes()>0&&this.current.minutes()<this.step&&(this.current=this.current.minutes(0));break;case"hour":this.current.hours()>0&&this.current.hours()<this.step&&(this.current=this.current.hours(0));break;case"weekday":case"day":this.current.date()<this.step+1&&(this.current=this.current.date(1));break;case"week":this.current.week()<this.step&&(this.current=this.current.week(1));break;case"month":this.current.month()<this.step&&(this.current=this.current.month(0))}this.current.valueOf()==t&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Qk(this.moment,this,t)}getCurrent(){return this.current.clone()}setScale(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)}setAutoScale(t){this.autoScale=t}setMinimumStep(t){if(null==t)return;const e=31104e6,i=2592e6,n=864e5,o=36e5,s=6e4,r=1e3;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),6048e5>t&&this.options.showWeekScale&&(this.scale="week",this.step=1),1728e5>t&&(this.scale="day",this.step=2),n>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),o>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}static snap(t,e,i){let n=LD(t);if("year"==e){const t=n.year()+Math.round(n.month()/12);n=n.year(Math.round(t/i)*i).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if("month"==e)n=n.date()>15?n.date(1).add(1,"month"):n.date(1),n=n.hours(0).minutes(0).seconds(0).milliseconds(0);else if("week"==e)n=n.weekday()>2?n.weekday(0).add(1,"week"):n.weekday(0),n=n.hours(0).minutes(0).seconds(0).milliseconds(0);else if("day"==e){switch(i){case 5:case 2:n=n.hours(24*Math.round(n.hours()/24));break;default:n=n.hours(12*Math.round(n.hours()/12))}n=n.minutes(0).seconds(0).milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n=n.hours(12*Math.round(n.hours()/12));break;default:n=n.hours(6*Math.round(n.hours()/6))}n=n.minutes(0).seconds(0).milliseconds(0)}else if("hour"==e){if(4===i)n=n.minutes(60*Math.round(n.minutes()/60));else n=n.minutes(30*Math.round(n.minutes()/30));n=n.seconds(0).milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:n=n.minutes(5*Math.round(n.minutes()/5)).seconds(0);break;case 5:n=n.seconds(60*Math.round(n.seconds()/60));break;default:n=n.seconds(30*Math.round(n.seconds()/30))}n=n.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:n=n.seconds(5*Math.round(n.seconds()/5)).milliseconds(0);break;case 5:n=n.milliseconds(1e3*Math.round(n.milliseconds()/1e3));break;default:n=n.milliseconds(500*Math.round(n.milliseconds()/500))}else if("millisecond"==e){const t=i>5?i/2:1;n=n.milliseconds(Math.round(n.milliseconds()/t)*t)}return n}isMajor(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}const t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return this.options.showWeekScale?1==t.isoWeekday():1==t.date();case"week":return 1==t.date();case"month":return 0==t.month();default:return!1}}getLabelMinor(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);const e=this.format.minorLabels[this.scale];return"week"===this.scale&&1===t.date()&&0!==t.weekday()?"":e&&e.length>0?this.moment(t).format(e):""}getLabelMajor(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);const e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}getClassName(){var t;const e=this.moment,i=this.moment(this.current),n=i.locale?i.locale("en"):i.lang("en"),o=this.step,s=[];function r(t){return t/o%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(Wa(),"day")?" vis-today":t.isSame(e().add(1,"day"),"day")?" vis-tomorrow":t.isSame(e().add(-1,"day"),"day")?" vis-yesterday":""}function l(t){return t.isSame(Wa(),"week")?" vis-current-week":""}function h(t){return t.isSame(Wa(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":s.push(a(n)),s.push(r(n.milliseconds()));break;case"second":s.push(a(n)),s.push(r(n.seconds()));break;case"minute":s.push(a(n)),s.push(r(n.minutes()));break;case"hour":s.push(fd(t="vis-h".concat(n.hours())).call(t,4==this.step?"-h"+(n.hours()+4):"")),s.push(a(n)),s.push(r(n.hours()));break;case"weekday":s.push("vis-".concat(n.format("dddd").toLowerCase())),s.push(a(n)),s.push(l(n)),s.push(r(n.date()));break;case"day":s.push("vis-day".concat(n.date())),s.push("vis-".concat(n.format("MMMM").toLowerCase())),s.push(a(n)),s.push(h(n)),s.push(this.step<=2?a(n):""),s.push(this.step<=2?"vis-".concat(n.format("dddd").toLowerCase()):""),s.push(r(n.date()-1));break;case"week":s.push("vis-week".concat(n.format("w"))),s.push(l(n)),s.push(r(n.week()));break;case"month":s.push("vis-".concat(n.format("MMMM").toLowerCase())),s.push(h(n)),s.push(r(n.month()));break;case"year":s.push("vis-year".concat(n.year())),s.push(function(t){return t.isSame(Wa(),"year")?" vis-current-year":""}(n)),s.push(r(n.year()))}return Od(s).call(s,String).join(" ")}}xS.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};class DS extends Fk{constructor(t,e){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:wk.extend({},xS.FORMAT),moment:LD,timeAxis:null},this.options=wk.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(wk.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),wk.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof LD.locale?LD.locale(t.locale):LD.lang(t.locale)))}_create(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"}destroy(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}redraw(){const t=this.props,e=this.dom.foreground,i=this.dom.background,n="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,o=e.parentNode!==n;this._calculateCharSize();const s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;const a=e.nextSibling,l=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height="".concat(this.props.height,"px"),this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),l?this.body.dom.backgroundVertical.insertBefore(i,l):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}_repaintLabels(){const t=this.options.orientation.axis,e=wk.convert(this.body.range.start,"Number"),i=wk.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let o=n-sS(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();const s=new xS(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);s.setMoment(this.options.moment),this.options.format&&s.setFormat(this.options.format),this.options.timeAxis&&s.setScale(this.options.timeAxis),this.step=s;const r=this.dom;let a,l,h,d,c,u;r.redundant.lines=r.lines,r.redundant.majorTexts=r.majorTexts,r.redundant.minorTexts=r.minorTexts,r.lines=[],r.majorTexts=[],r.minorTexts=[];let p,m,f,g=0,v=0;const y=1e3;let b;for(s.start(),l=s.getCurrent(),d=this.body.util.toScreen(l);s.hasNext()&&v<y;){if(v++,c=s.isMajor(),b=s.getClassName(),a=l,h=d,s.next(),l=s.getCurrent(),d=this.body.util.toScreen(l),p=g,g=d-h,"week"===s.scale)u=!0;else u=g>=.4*p;if(this.options.showMinorLabels&&u){var _=this._repaintMinorText(h,s.getLabelMinor(a),t,b);_.style.width="".concat(g,"px")}c&&this.options.showMajorLabels?(h>0&&(null==f&&(f=h),_=this._repaintMajorText(h,s.getLabelMajor(a),t,b)),m=this._repaintMajorLine(h,g,t,b)):u?m=this._repaintMinorLine(h,g,t,b):m&&(m.style.width="".concat(hc(m.style.width)+g,"px"))}if(v!==y||kS||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(y," lines.")),kS=!0),this.options.showMajorLabels){const e=this.body.util.toTime(0),i=s.getLabelMajor(e),n=i.length*(this.props.majorCharWidth||10)+10;(null==f||n<f)&&this._repaintMajorText(0,i,t,b)}kl(wk).call(wk,this.dom.redundant,t=>{for(;t.length;){const e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})}_repaintMinorText(t,e,i,n){let o=this.dom.redundant.minorTexts.shift();if(!o){const t=document.createTextNode("");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}this.dom.minorTexts.push(o),o.innerHTML=wk.xss(e);let s="top"==i?this.props.majorLabelHeight:0;return this._setXY(o,t,s),o.className="vis-text vis-minor ".concat(n),o}_repaintMajorText(t,e,i,n){let o=this.dom.redundant.majorTexts.shift();if(!o){const t=document.createElement("div");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}o.childNodes[0].innerHTML=wk.xss(e),o.className="vis-text vis-major ".concat(n);let s="top"==i?0:this.props.minorLabelHeight;return this._setXY(o,t,s),this.dom.majorTexts.push(o),o}_setXY(t,e,i){var n;const o=this.options.rtl?-1*e:e;t.style.transform=fd(n="translate(".concat(o,"px, ")).call(n,i,"px)")}_repaintMinorLine(t,e,i,n){var o;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.minorLineHeight,"px");let a="top"==i?r.majorLabelHeight:this.body.domProps.top.height,l=t-r.minorLineWidth/2;return this._setXY(s,l,a),s.className=fd(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(o,n),s}_repaintMajorLine(t,e,i,n){var o;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.majorLineHeight,"px");let a="top"==i?0:this.body.domProps.top.height,l=t-r.majorLineWidth/2;return this._setXY(s,l,a),s.className=fd(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(o,n),s}_calculateCharSize(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}}var kS=!1;function SS(t){var e,i=t&&t.preventDefault||!1,n=t&&t.container||window,o={},s={keydown:{},keyup:{}},r={};for(e=97;e<=122;e++)r[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)r[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r.delete={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){h(t,"keydown")},l=function(t){h(t,"keyup")},h=function(t,e){if(void 0!==s[e][t.keyCode]){for(var n=s[e][t.keyCode],o=0;o<n.length;o++)(void 0===n[o].shift||1==n[o].shift&&1==t.shiftKey||0==n[o].shift&&0==t.shiftKey)&&n[o].fn(t);1==i&&t.preventDefault()}};return o.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===r[t])throw new Error("unsupported key: "+t);void 0===s[i][r[t].code]&&(s[i][r[t].code]=[]),s[i][r[t].code].push({fn:e,shift:r[t].shift})},o.bindAll=function(t,e){for(var i in void 0===e&&(e="keydown"),r)r.hasOwnProperty(i)&&o.bind(i,t,e)},o.getKey=function(t){for(var e in r)if(r.hasOwnProperty(e)){if(1==t.shiftKey&&1==r[e].shift&&t.keyCode==r[e].code)return e;if(0==t.shiftKey&&0==r[e].shift&&t.keyCode==r[e].code)return e;if(t.keyCode==r[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},o.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===r[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=s[i][r[t].code];if(void 0!==o)for(var a=0;a<o.length;a++)o[a].fn==e&&o[a].shift==r[t].shift||n.push(s[i][r[t].code][a]);s[i][r[t].code]=n}else s[i][r[t].code]=[]},o.reset=function(){s={keydown:{},keyup:{}}},o.destroy=function(){s={keydown:{},keyup:{}},n.removeEventListener("keydown",a,!0),n.removeEventListener("keyup",l,!0)},n.addEventListener("keydown",a,!0),n.addEventListener("keyup",l,!0),o}function CS(t){var e,i;this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=_S(this.dom.overlay),this.hammer.on("tap",ll(e=this._onTapOverlay).call(e,this));var n=this,o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];kl(o).call(o,function(t){n.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(e){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||n.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=SS(),this.escListener=ll(i=this.deactivate).call(i,this)}Vu(CS.prototype),CS.current=null,CS.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},CS.prototype.activate=function(){var t;CS.current&&CS.current.deactivate(),CS.current=this,this.active=!0,this.dom.overlay.style.display="none",wk.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),ll(t=this.keycharm).call(t,"esc",this.escListener)},CS.prototype.deactivate=function(){CS.current===this&&(CS.current=null),this.active=!1,this.dom.overlay.style.display="",wk.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},CS.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};const TS={current:"current",time:"time",deleteSelected:"Delete selected"},MS={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},OS={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},ES={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},PS={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},IS={current:"corriente",time:"hora",deleteSelected:"Eliminar selección"},NS={current:"поточний",time:"час",deleteSelected:"Видалити обране"},LS={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},AS={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},FS={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},RS={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},jS={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},YS={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},HS={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},zS={en:TS,en_EN:TS,en_US:TS,it:MS,it_IT:MS,it_CH:MS,nl:OS,nl_NL:OS,nl_BE:OS,de:ES,de_DE:ES,fr:PS,fr_FR:PS,fr_CA:PS,fr_BE:PS,es:IS,es_ES:IS,uk:NS,uk_UA:NS,ru:LS,ru_RU:LS,pl:AS,pl_PL:AS,pt:FS,pt_BR:FS,pt_PT:FS,ja:RS,ja_JP:RS,lt:HS,lt_LT:HS,sv:jS,sv_SE:jS,nb:YS,nn:YS,nb_NO:YS,nn_NO:YS};class GS extends Fk{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={moment:LD,locales:zS,locale:"en",id:void 0,title:void 0},this.options=wk.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=wk.extend({},zS,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];kl(i=Ma(this.options.locales)).call(i,t=>{this.options.locales[t]=wk.extend({},n,this.options.locales[t])}),e&&null!=e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(t){t&&wk.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}_create(){var t,e,i;const n=document.createElement("div");n["custom-time"]=this,n.className="vis-custom-time ".concat(this.options.id||""),n.style.position="absolute",n.style.top="0px",n.style.height="100%",this.bar=n;const o=document.createElement("div");function s(t){this.body.range._onMouseWheel(t)}o.style.position="relative",o.style.top="0px",this.options.rtl?o.style.right="-10px":o.style.left="-10px",o.style.height="100%",o.style.width="20px",o.addEventListener?(o.addEventListener("mousewheel",ll(s).call(s,this),!1),o.addEventListener("DOMMouseScroll",ll(s).call(s,this),!1)):o.attachEvent("onmousewheel",ll(s).call(s,this)),n.appendChild(o),this.hammer=new _S(o),this.hammer.on("panstart",ll(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",ll(e=this._onDrag).call(e,this)),this.hammer.on("panend",ll(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:_S.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){const t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));const e=this.body.util.toScreen(this.customTime);let i=this.options.locales[this.options.locale];i||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),i=this.options.locales.en);let n=this.options.title;var o;void 0===n?(n=fd(o="".concat(i.time,": ")).call(o,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")),n=n.charAt(0).toUpperCase()+n.substring(1)):"function"==typeof n&&(n=n.call(this,this.customTime));return this.options.rtl?this.bar.style.right="".concat(e,"px"):this.bar.style.left="".concat(e,"px"),this.bar.title=n,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(t){this.customTime=wk.convert(t,"Date"),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(t,e){var i;(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement("div"),this.marker.className="vis-custom-time-marker",this.marker.innerHTML=wk.xss(t),this.marker.style.position="absolute",e)&&(this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",()=>{this.marker.focus()}),this.marker.addEventListener("input",ll(i=this._onMarkerChange).call(i,this)),this.marker.title=t,this.marker.addEventListener("blur",t=>{this.title!=t.target.innerHTML&&(this._onMarkerChanged(t),this.title=t.target.innerHTML)}));this.bar.appendChild(this.marker)}setCustomTitle(t){this.options.title=t}_onDragStart(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()}_onDrag(t){if(!this.eventParams.dragging)return;let e=this.options.rtl?-1*t.deltaX:t.deltaX;const i=this.body.util.toScreen(this.eventParams.customTime)+e,n=this.body.util.toTime(i),o=this.body.util.getScale(),s=this.body.util.getStep(),r=this.options.snap,a=r?r(n,o,s):n;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}_onDragEnd(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())}_onMarkerChange(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}_onMarkerChanged(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}static customTimeFromTarget(t){let e=t.target;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"custom-time"))return e["custom-time"];e=e.parentNode}return null}}class WS{_create(t){var e,i,n;this.dom={},this.dom.container=t,this.dom.container.style.position="relative",this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.loadingScreen=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.loadingScreen.className="vis-loading-screen",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",()=>{!0===this.initialDrawDone&&this._redraw()}),this.on("rangechanged",()=>{this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)}),this.on("touch",ll(e=this._onTouch).call(e,this)),this.on("panmove",ll(i=this._onDrag).call(i,this));const o=this;this._origRedraw=ll(n=this._redraw).call(n,this),this._redraw=wk.throttle(this._origRedraw),this.on("_change",t=>{o.itemSet&&o.itemSet.initialItemSetDrawn&&t&&1==t.queue?o._redraw():o._origRedraw()}),this.hammer=new _S(this.dom.root);const s=this.hammer.get("pinch").set({enable:!0});s&&function(t){t.getTouchAction=function(){return["pan-y"]}}(s),this.hammer.get("pan").set({threshold:5,direction:_S.DIRECTION_ALL}),this.timelineListeners={};const r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];var a,l;function h(t){this.isActive()&&this.emit("mousewheel",t);let e=0,i=0;if("detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=-1*i,i=0),"deltaY"in t&&(i=-1*t.deltaY),"deltaX"in t&&(e=t.deltaX),t.deltaMode&&(1===t.deltaMode?(e*=40,i*=40):(e*=40,i*=800)),this.options.preferZoom){if(!this.options.zoomKey||t[this.options.zoomKey])return}else if(this.options.zoomKey&&t[this.options.zoomKey])return;if(this.options.verticalScroll||this.options.horizontalScroll)if(this.options.verticalScroll&&Math.abs(i)>=Math.abs(e)){const e=this.props.scrollTop,n=e+i;if(this.isActive()){this._setScrollTop(n)!==e&&(this._redraw(),this.emit("scroll",t),t.preventDefault())}}else if(this.options.horizontalScroll){const n=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,o=this.range.start+n,s=this.range.end+n,r={animation:!1,byUser:!0,event:t};this.range.setRange(o,s,r),t.preventDefault()}}kl(r).call(r,t=>{const e=e=>{o.isActive()&&o.emit(t,e)};o.hammer.on(t,e),o.timelineListeners[t]=e}),wS(this.hammer,t=>{o.emit("touch",t)}),a=this.hammer,(l=t=>{o.emit("release",t)}).inputHandler=function(t){t.isFinal&&l(t)},a.on("hammer.input",l.inputHandler);const d="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function c(t){if(o.options.verticalScroll&&(t.preventDefault(),o.isActive())){const e=-t.target.scrollTop;o._setScrollTop(e),o._redraw(),o.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(d,ll(h).call(h,this),!1),this.dom.top.addEventListener(d,ll(h).call(h,this),!1),this.dom.bottom.addEventListener(d,ll(h).call(h,this),!1),this.dom.left.parentNode.addEventListener("scroll",ll(c).call(c,this)),this.dom.right.parentNode.addEventListener("scroll",ll(c).call(c,this));let u=!1;function p(t){var e;if(t.preventDefault&&(o.emit("dragover",o.getEventProperties(t)),t.preventDefault()),wc(e=t.target.className).call(e,"timeline")>-1&&!u)return t.dataTransfer.dropEffect="move",u=!0,!1}function m(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return u=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?o.itemSet._onAddItem(t):o.itemSet._onDropObjectOnItem(t),o.emit("drop",o.getEventProperties(t)),!1}if(this.dom.center.addEventListener("dragover",ll(p).call(p,this),!1),this.dom.center.addEventListener("drop",ll(m).call(m,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root),t.appendChild(this.dom.loadingScreen)}setOptions(t){var e;if(t){const e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"];if(wk.selectiveExtend(e,this.options,t),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!=typeof this.options.orientation&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"==typeof t.orientation&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){const t=this.timeAxis2=new DS(this.body,this.options);t.setOptions=e=>{const i=e?wk.extend({},e):{};i.orientation="top",DS.prototype.setOptions.call(t,i)},this.components.push(t)}}else if(this.timeAxis2){var i;const t=wc(i=this.components).call(i,this.timeAxis2);var n;if(-1!==t)oh(n=this.components).call(n,t,1);this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&Kk(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new CS(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(kl(e=this.components).call(e,e=>e.setOptions(t)),"configure"in t){var o;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);const e=wk.deepExtend({},this.options);kl(o=this.components).call(o,t=>{wk.deepExtend(e,t.options)}),this.configurator.setModuleOptions({global:e})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){var t;this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(const t in this.timelineListeners)Object.prototype.hasOwnProperty.call(this.timelineListeners,t)&&delete this.timelineListeners[t];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,kl(t=this.components).call(t,t=>t.destroy()),this.body=null}setCustomTime(t,e){var i;const n=Od(i=this.customTimes).call(i,t=>e===t.options.id);if(0===n.length)throw new Error("No custom time bar found with id ".concat(lu(e)));n.length>0&&n[0].setCustomTime(t)}getCustomTime(t){var e;const i=Od(e=this.customTimes).call(e,e=>e.options.id===t);if(0===i.length)throw new Error("No custom time bar found with id ".concat(lu(t)));return i[0].getCustomTime()}setCustomTimeMarker(t,e,i){var n;const o=Od(n=this.customTimes).call(n,t=>t.options.id===e);if(0===o.length)throw new Error("No custom time bar found with id ".concat(lu(e)));o.length>0&&o[0].setCustomMarker(t,i)}setCustomTimeTitle(t,e){var i;const n=Od(i=this.customTimes).call(i,t=>t.options.id===e);if(0===n.length)throw new Error("No custom time bar found with id ".concat(lu(e)));if(n.length>0)return n[0].setCustomTitle(t)}getEventProperties(t){return{event:t}}addCustomTime(t,e){var i;const n=void 0!==t?wk.convert(t,"Date"):new Date,o=Yx(i=this.customTimes).call(i,t=>t.options.id===e);if(o)throw new Error("A custom time with id ".concat(lu(e)," already exists"));const s=new GS(this.body,wk.extend({},this.options,{time:n,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(s),this.components.push(s),this._redraw(),e}removeCustomTime(t){var e;const i=Od(e=this.customTimes).call(e,e=>e.options.id===t);if(0===i.length)throw new Error("No custom time bar found with id ".concat(lu(t)));kl(i).call(i,t=>{var e,i,n,o;oh(e=this.customTimes).call(e,wc(i=this.customTimes).call(i,t),1),oh(n=this.components).call(n,wc(o=this.components).call(o,t),1),t.destroy()})}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(t){return this.time=t,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(t,e){const i=this.getDataRange();if(null===i.min&&null===i.max)return;const n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),s=new Date(i.max.valueOf()+.01*n),r=!t||void 0===t.animation||t.animation;this.range.setRange(o,s,{animation:r},e)}getDataRange(){throw new Error("Cannot invoke abstract method getDataRange")}setWindow(t,e,i,n){let o,s;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(s=arguments[0],o=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(s=arguments[0],n=arguments[1],o=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))}moveTo(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.range.end-this.range.start,o=wk.convert(t,"Date").valueOf(),s=o-n/2,r=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)}getWindow(){const t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}zoomIn(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=(r-r/(1+t))/2,l=o+a,h=s-a;this.setWindow(l,h,e,i)}zoomOut(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=o-r*t/2,l=s+r*t/2;this.setWindow(a,l,e,i)}redraw(){this._redraw()}_redraw(){var t;this.redrawCount++;const e=this.dom;if(!e||!e.container||0==e.root.offsetWidth)return;let i=!1;const n=this.options,o=this.props;$k(this.options.moment,this.body,this.options.hiddenDates),"top"==n.orientation?(wk.addClassName(e.root,"vis-top"),wk.removeClassName(e.root,"vis-bottom")):(wk.removeClassName(e.root,"vis-top"),wk.addClassName(e.root,"vis-bottom")),n.rtl?(wk.addClassName(e.root,"vis-rtl"),wk.removeClassName(e.root,"vis-ltr")):(wk.addClassName(e.root,"vis-ltr"),wk.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=wk.option.asSize(n.maxHeight,""),e.root.style.minHeight=wk.option.asSize(n.minHeight,""),e.root.style.width=wk.option.asSize(n.width,"");const s=e.root.offsetWidth;o.border.left=1,o.border.right=1,o.border.top=1,o.border.bottom=1,o.center.height=e.center.offsetHeight,o.left.height=e.left.offsetHeight,o.right.height=e.right.offsetHeight,o.top.height=e.top.clientHeight||-o.border.top,o.bottom.height=Math.round(e.bottom.getBoundingClientRect().height)||e.bottom.clientHeight||-o.border.bottom;const r=Math.max(o.left.height,o.center.height,o.right.height),a=o.top.height+r+o.bottom.height+o.border.top+o.border.bottom;e.root.style.height=wk.option.asSize(n.height,"".concat(a,"px")),o.root.height=e.root.offsetHeight,o.background.height=o.root.height;const l=o.root.height-o.top.height-o.bottom.height;o.centerContainer.height=l,o.leftContainer.height=l,o.rightContainer.height=o.leftContainer.height,o.root.width=s,o.background.width=o.root.width,this.initialDrawDone||(o.scrollbarWidth=wk.getScrollBarWidth());const h=e.leftContainer.clientWidth,d=e.rightContainer.clientWidth;n.verticalScroll?n.rtl?(o.left.width=h||-o.border.left,o.right.width=d+o.scrollbarWidth||-o.border.right):(o.left.width=h+o.scrollbarWidth||-o.border.left,o.right.width=d||-o.border.right):(o.left.width=h||-o.border.left,o.right.width=d||-o.border.right),this._setDOM();let c=this._updateScrollTop();"top"!=n.orientation.item&&(c+=Math.max(o.centerContainer.height-o.center.height-o.border.top-o.border.bottom,0)),e.center.style.transform="translateY(".concat(c,"px)");const u=0==o.scrollTop?"hidden":"",p=o.scrollTop==o.scrollTopMin?"hidden":"";e.shadowTop.style.visibility=u,e.shadowBottom.style.visibility=p,e.shadowTopLeft.style.visibility=u,e.shadowBottomLeft.style.visibility=p,e.shadowTopRight.style.visibility=u,e.shadowBottomRight.style.visibility=p,n.verticalScroll&&(e.rightContainer.className="vis-panel vis-right vis-vertical-scroll",e.leftContainer.className="vis-panel vis-left vis-vertical-scroll",e.shadowTopRight.style.visibility="hidden",e.shadowBottomRight.style.visibility="hidden",e.shadowTopLeft.style.visibility="hidden",e.shadowBottomLeft.style.visibility="hidden",e.left.style.top="0px",e.right.style.top="0px"),(!n.verticalScroll||o.center.height<o.centerContainer.height)&&(e.left.style.top="".concat(c,"px"),e.right.style.top="".concat(c,"px"),e.rightContainer.className=e.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),e.leftContainer.className=e.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),o.left.width=h||-o.border.left,o.right.width=d||-o.border.right,this._setDOM());const m=o.center.height>o.centerContainer.height;this.hammer.get("pan").set({direction:m?_S.DIRECTION_ALL:_S.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),kl(t=this.components).call(t,t=>{i=t.redraw()||i});if(i){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}_setDOM(){const t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;const i=t.root.width-t.left.width-t.right.width;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height="".concat(t.background.height,"px"),e.backgroundVertical.style.height="".concat(t.background.height,"px"),e.backgroundHorizontal.style.height="".concat(t.centerContainer.height,"px"),e.centerContainer.style.height="".concat(t.centerContainer.height,"px"),e.leftContainer.style.height="".concat(t.leftContainer.height,"px"),e.rightContainer.style.height="".concat(t.rightContainer.height,"px"),e.background.style.width="".concat(t.background.width,"px"),e.backgroundVertical.style.width="".concat(t.centerContainer.width,"px"),e.backgroundHorizontal.style.width="".concat(t.background.width,"px"),e.centerContainer.style.width="".concat(t.center.width,"px"),e.top.style.width="".concat(t.top.width,"px"),e.bottom.style.width="".concat(t.bottom.width,"px"),e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left="".concat(t.left.width+t.border.left,"px"),e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top="".concat(t.top.height,"px"),e.centerContainer.style.left="".concat(t.left.width,"px"),e.centerContainer.style.top="".concat(t.top.height,"px"),e.leftContainer.style.left="0",e.leftContainer.style.top="".concat(t.top.height,"px"),e.rightContainer.style.left="".concat(t.left.width+t.center.width,"px"),e.rightContainer.style.top="".concat(t.top.height,"px"),e.top.style.left="".concat(t.left.width,"px"),e.top.style.top="0",e.bottom.style.left="".concat(t.left.width,"px"),e.bottom.style.top="".concat(t.top.height+t.centerContainer.height,"px"),e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"}setCurrentTime(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}getCurrentTime(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}_toTime(t){return eS(this,t,this.props.center.width)}_toGlobalTime(t){return eS(this,t,this.props.root.width)}_toScreen(t){return tS(this,t,this.props.center.width)}_toGlobalScreen(t){return tS(this,t,this.props.root.width)}_initAutoResize(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){const t=this;this._stopAutoResize(),this._onResize=()=>{if(1==t.options.autoResize){if(t.dom.root){const e=t.dom.root.offsetHeight,i=t.dom.root.offsetWidth;i==t.props.lastWidth&&e==t.props.lastHeight||(t.props.lastWidth=i,t.props.lastHeight=e,t.props.scrollbarWidth=wk.getScrollBarWidth(),t.body.emitter.emit("_change"))}}else t._stopAutoResize()},window.addEventListener("resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=vS(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null)}_onTouch(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(t){this.touch.allowDragging=!1}_onDrag(t){if(!t)return;if(!this.touch.allowDragging)return;const e=t.deltaY,i=this._getScrollTop(),n=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),n!=i&&this.emit("verticalDrag")}_setScrollTop(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){const t=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<t&&(this.props.scrollTop=t),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw new Error("Cannot invoke abstract method _createConfigurator")}}Vu(WS.prototype);class BS extends Fk{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:LD,locales:zS,locale:"en"},this.options=wk.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=wk.extend({},zS,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];kl(i=Ma(this.options.locales)).call(i,t=>{this.options.locales[t]=wk.extend({},n,this.options.locales[t])}),this.offset=0,this._create()}_create(){const t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(t){t&&wk.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}redraw(){if(this.options.showCurrentTime){var t,e;const i=this.body.dom.backgroundVertical;this.bar.parentNode!=i&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),i.appendChild(this.bar),this.start());let n=this.options.moment(Wa()+this.offset);this.options.alignCurrentTime&&(n=n.startOf(this.options.alignCurrentTime));const o=this.body.util.toScreen(n);let s=this.options.locales[this.options.locale];s||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),s=this.options.locales.en);let r=fd(t=fd(e="".concat(s.current," ")).call(e,s.time,": ")).call(t,n.format("dddd, MMMM Do YYYY, H:mm:ss"));r=r.charAt(0).toUpperCase()+r.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(-1*o,"px)"):this.bar.style.transform="translateX(".concat(o,"px)"),this.bar.title=r}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){const t=this;!function e(){t.stop();let i=1/t.body.range.conversion(t.body.domProps.center.width).scale/10;i<30&&(i=30),i>1e3&&(i=1e3),t.redraw(),t.body.emitter.emit("currentTimeTick"),t.currentTimeTimer=Lu(e,i)}()}stop(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(t){const e=wk.convert(t,"Date").valueOf(),i=Wa();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Wa()+this.offset)}}var VS,US,XS,qS,ZS,KS,$S,JS,QS,tC={};function eC(){return XS?US:(XS=1,function(){if(VS)return tC;VS=1;var t=Pi(),e=yo().find,i=Xs(),n="find",o=!0;n in[]&&Array(1)[n](function(){o=!1}),t({target:"Array",proto:!0,forced:o},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),i(n)}(),US=Dr()("Array","find"))}function iC(){if(ZS)return qS;ZS=1;var t=Gt(),e=eC(),i=Array.prototype;return qS=function(n){var o=n.find;return n===i||t(i,n)&&o===i.find?e:o},qS}function nC(){return $S?KS:($S=1,KS=iC())}var oC=i(QS?JS:(QS=1,JS=nC()));const sC=.001;function rC(t){Cx(t).call(t,(t,e)=>t.data.start-e.data.start)}function aC(t){Cx(t).call(t,(t,e)=>("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start))}function lC(t,e,i,n){return null===pC(t,e.item,!1,t=>t.stack&&(i||null===t.top),t=>t.stack,()=>e.axis,n)}function hC(t,e,i){const n=pC(t,e.item,!1,t=>t.stack,()=>!0,t=>t.baseTop);i.height=n-i.top+.5*e.item.vertical}function dC(t,e,i,n){for(let o=0;o<t.length;o++){if(null==t[o].data.subgroup){t[o].top=e.item.vertical;continue}if(void 0===t[o].data.subgroup||!n)continue;let s=0;for(const e in i)!Object.prototype.hasOwnProperty.call(i,e)||!0!==i[e].visible||i[e].index>=i[t[o].data.subgroup].index||(s+=i[e].height,i[t[o].data.subgroup].top=s);t[o].top=s+.5*e.item.vertical}n||cC(t,e,i)}function cC(t,e,i){var n;pC(Cx(n=Xd(i)).call(n,(t,e)=>t.index>e.index?1:t.index<e.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let n=0;n<t.length;n++)void 0!==t[n].data.subgroup&&(t[n].top=i[t[n].data.subgroup].top+.5*e.item.vertical)}function uC(t,e,i){let n=!1;const o=[];for(let t in i)Object.prototype.hasOwnProperty.call(i[t],"index")?o[i[t].index]=t:o.push(t);for(let s=0;s<o.length;s++){if(subgroup=o[s],!Object.prototype.hasOwnProperty.call(i,subgroup))continue;n=n||i[subgroup].stack,i[subgroup].top=0;for(const t in i)i[t].visible&&i[subgroup].index>i[t].index&&(i[subgroup].top+=i[t].height);const r=t[subgroup];for(let t=0;t<r.length;t++)void 0!==r[t].data.subgroup&&(r[t].top=i[r[t].data.subgroup].top+.5*e.item.vertical,i[subgroup].stack&&(r[t].baseTop=r[t].top));n&&i[subgroup].stack&&hC(t[subgroup],e,i[subgroup])}}function pC(t,e,i,n,o,s,r){let a=t=>t.start,l=t=>t.end;if(!i){const i=!(!t[0]||!t[0].options.rtl);a=i?t=>t.right:t=>t.left,l=t=>a(t)+t.width+e.horizontal}const h=[],d=[];let c=null,u=0;for(const e of t)if(n(e))h.push(e);else if(o(e)){const t=a(e);null!==c&&t<c-sC&&(u=0),c=t,u=fC(d,e=>a(e)-sC>t,u),oh(d).call(d,u,0,e),u++}c=null;let p=null;u=0;let m=0,f=0,g=0;for(;h.length>0;){var v;const t=h.shift();t.top=s(t);const i=a(t),n=l(t);null!==c&&i<c-sC&&(m=0,f=0,u=0,p=null),(null===c||i>c+sC)&&(m=fC(d,t=>i<l(t)-sC,m)),c=i,(null===p||p<n-sC)&&(f=fC(d,t=>n<a(t)-sC,Math.max(m,f))),null!==p&&p-sC>n&&(f=gC(d,t=>n+sC>=a(t),m,f)+1),p=n;const y=Cx(v=vC(d,t=>i<l(t)-sC,m,f)).call(v,(t,e)=>t.top-e.top);for(let i=0;i<y.length;i++){const n=y[i];mC(t,n,e)&&(t.top=n.top+n.height+e.vertical)}o(t)&&(u=fC(d,t=>a(t)-sC>i,u),oh(d).call(d,u,0,t),u<m&&m++,u<=f&&f++,u++);const b=t.top+t.height;if(b>g&&(g=b),r&&r())return null}return g}function mC(t,e,i){return t.top-i.vertical+sC<e.top+e.height&&t.top+t.height+i.vertical-sC>e.top}function fC(t,e,i){i||(i=0);for(let n=i;n<t.length;n++)if(e(t[n]))return n;return t.length}function gC(t,e,i,n){i||(i=0),n||(n=t.length);for(let o=n-1;o>=i;o--)if(e(t[o]))return o;return i-1}function vC(t,e,i,n){i||(i=0),n=n?Math.min(n,t.length):t.length;const o=[];for(let s=i;s<n;s++)e(t[s])&&o.push(t[s]);return o}var yC=Object.freeze({__proto__:null,nostack:dC,orderByEnd:aC,orderByStart:rC,stack:lC,stackSubgroups:cC,stackSubgroupsWithInnerStack:uC,substack:hC});const bC="__background__";class _C{constructor(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.height=0,this.stackDirty=!0,this._disposeCallbacks=[],e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(const t in e.subgroupStack)Object.prototype.hasOwnProperty.call(e.subgroupStack,t)&&(this.subgroupStack[t]=e.subgroupStack[t],this.doInnerStack=this.doInnerStack||e.subgroupStack[t]);e&&e.heightMode?this.heightMode=e.heightMode:this.heightMode=i.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;const n=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",n),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off("checkRangedItems",n)}),this._create(),this.setData(e)}_create(){const t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;const e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;const i=document.createElement("div");i.className="vis-group",i["vis-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)}setData(t){if(this.itemSet.groupTouchParams.isDragging)return;let e,i;if(t&&t.subgroupVisibility)for(const e in t.subgroupVisibility)Object.prototype.hasOwnProperty.call(t.subgroupVisibility,e)&&(this.subgroupVisibility[e]=t.subgroupVisibility[e]);var n;this.itemSet.options&&this.itemSet.options.groupTemplate?(i=ll(n=this.itemSet.options.groupTemplate).call(n,this),e=i(t,this.dom.inner)):e=t&&t.content;if(e instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object&&e.isReactComponent||(e instanceof Object?i(t,this.dom.inner):this.dom.inner.innerHTML=null!=e?wk.xss(e):wk.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?wk.removeClassName(this.dom.inner,"vis-hidden"):wk.addClassName(this.dom.inner,"vis-hidden"),t&&t.nestedGroups?(this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups),void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0),wk.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(wk.removeClassName(this.dom.label,"collapsed"),wk.addClassName(this.dom.label,"expanded")):(wk.removeClassName(this.dom.label,"expanded"),wk.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,wk.removeClassName(this.dom.label,"collapsed"),wk.removeClassName(this.dom.label,"expanded"),wk.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(wk.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?wk.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):wk.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):wk.addClassName(this.dom.label,"vis-group-level-0");const o=t&&t.className||null;o!=this.className&&(this.className&&(wk.removeClassName(this.dom.label,this.className),wk.removeClassName(this.dom.foreground,this.className),wk.removeClassName(this.dom.background,this.className),wk.removeClassName(this.dom.axis,this.className)),wk.addClassName(this.dom.label,o),wk.addClassName(this.dom.foreground,o),wk.addClassName(this.dom.background,o),wk.addClassName(this.dom.axis,o),this.className=o),this.style&&(wk.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(wk.addCssText(this.dom.label,t.style),this.style=t.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){const t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;const e={};let i=0;kl(wk).call(wk,this.items,(t,n)=>{if(t.dirty=!0,t.displayed){const o=!0;e[n]=t.redraw(o),i=e[n].length}});if(i>0)for(let t=0;t<i;t++)kl(wk).call(wk,e,e=>{e[t]()});return!0}return!1}_calculateGroupSizeAndPosition(){const{offsetTop:t,offsetLeft:e,offsetWidth:i}=this.dom.foreground;this.top=t,this.right=e,this.width=i}_shouldBailItemsRedraw(){const t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems};let n=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Wa()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction(e=>{t.itemSet.userContinueNotBail=e,n=!e}):n=0==t.itemSet.userContinueNotBail)}return n}_redrawItems(t,e,i,n){if(t||this.stackDirty||this.isVisible&&!e){var o,s,r,a,l,h;const t={byEnd:Od(o=this.orderedItems.byEnd).call(o,t=>!t.isCluster),byStart:Od(s=this.orderedItems.byStart).call(s,t=>!t.isCluster)},e={byEnd:[...new jw(Od(r=va(a=this.orderedItems.byEnd).call(a,t=>t.cluster)).call(r,t=>!!t))],byStart:[...new jw(Od(l=va(h=this.orderedItems.byStart).call(h,t=>t.cluster)).call(l,t=>!!t))]},f=()=>{var i,o;return[...this._updateItemsInRange(t,Od(i=this.visibleItems).call(i,t=>!t.isCluster),n),...this._updateClustersInRange(e,Od(o=this.visibleItems).call(o,t=>t.isCluster),n)]},g=t=>{let e={};for(const n in this.subgroups){var i;if(!Object.prototype.hasOwnProperty.call(this.subgroups,n))continue;const o=Od(i=this.visibleItems).call(i,t=>t.data.subgroup===n);e[n]=t?Cx(o).call(o,(e,i)=>t(e.data,i.data)):o}return e};if("function"==typeof this.itemSet.options.order){const t=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){uC(g(this.itemSet.options.order),i,this.subgroups),this.visibleItems=f(),this._updateSubGroupHeights(i)}else{var d,c,u,p;this.visibleItems=f(),this._updateSubGroupHeights(i);const e=Cx(d=Od(c=Fr(u=this.visibleItems).call(u)).call(c,t=>t.isCluster||!t.isCluster&&!t.cluster)).call(d,(e,i)=>t.itemSet.options.order(e.data,i.data));this.shouldBailStackItems=lC(e,i,!0,ll(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=f(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){uC(g(),i,this.subgroups)}else{var m;this.shouldBailStackItems=lC(this.visibleItems,i,!0,ll(m=this._shouldBailItemsRedraw).call(m,this))}else dC(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups);for(let t=0;t<this.visibleItems.length;t++)this.visibleItems[t].repositionX(),void 0!==this.subgroupVisibility[this.visibleItems[t].data.subgroup]&&(this.subgroupVisibility[this.visibleItems[t].data.subgroup]||this.visibleItems[t].hide());this.itemSet.options.cluster&&kl(wk).call(wk,this.items,t=>{t.cluster&&t.displayed&&t.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=wk.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=wk.updateProperty(this.props.label,"width",i)||t,t=wk.updateProperty(this.props.label,"height",n)||t}_applyGroupHeight(t){this.dom.background.style.height="".concat(t,"px"),this.dom.foreground.style.height="".concat(t,"px"),this.dom.label.style.height="".concat(t,"px")}_updateItemsVerticalPosition(t){for(let e=0,i=this.visibleItems.length;e<i;e++){const i=this.visibleItems[e];i.repositionY(t),this.isVisible||this.groupId==bC||i.displayed&&i.hide()}}redraw(t,e,i,n){var o,s,r,a,l;let h=!1;const d=this.isVisible;let c;const u=[()=>{i=this._didMarkerHeightChange.call(this)||i},ll(o=this._updateSubGroupHeights).call(o,this,e),ll(s=this._calculateGroupSizeAndPosition).call(s,this),()=>{var i;this.isVisible=ll(i=this._isGroupVisible).call(i,this)(t,e)},()=>{var n;ll(n=this._redrawItems).call(n,this)(i,d,e,t)},ll(r=this._updateSubgroupsSizes).call(r,this),()=>{var t;c=this.height=ll(t=this._calculateHeight).call(t,this)(e)},ll(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var t;h=ll(t=this._didResize).call(t,this)(h,c)},()=>{var t;ll(t=this._applyGroupHeight).call(t,this)(c)},()=>{var t;ll(t=this._updateItemsVerticalPosition).call(t,this)(e)},ll(l=()=>(!this.isVisible&&this.height&&(h=!1),h)).call(l,this)];if(n)return u;{let t;return kl(u).call(u,e=>{t=e()}),t}}_updateSubGroupHeights(t){if(Ma(this.subgroups).length>0){const e=this;this._resetSubgroups(),kl(wk).call(wk,this.visibleItems,i=>{void 0!==i.data.subgroup&&(e.subgroups[i.data.subgroup].height=Math.max(e.subgroups[i.data.subgroup].height,i.height+t.item.vertical),e.subgroups[i.data.subgroup].visible=void 0===this.subgroupVisibility[i.data.subgroup]||Boolean(this.subgroupVisibility[i.data.subgroup]))})}}_isGroupVisible(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop}_calculateHeight(t){let e,i;if(i="fixed"===this.heightMode?wk.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)e=Math.max(this.height,this.props.label.height);else if(i.length>0){let n=i[0].top,o=i[0].top+i[0].height;if(kl(wk).call(wk,i,t=>{n=Math.min(n,t.top),o=Math.max(o,t.top+t.height)}),n>t.axis){const e=n-t.axis;o-=e,kl(wk).call(wk,i,t=>{t.top-=e})}e=Math.ceil(o+t.item.vertical/2),"fitItems"!==this.heightMode&&(e=Math.max(e,this.props.label.height))}else e=this.props.label.height;return e}show(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}hide(){const t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);const e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);const i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);const n=this.dom.axis;n.parentNode&&n.parentNode.removeChild(n)}add(t){var e;if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),!Bh(e=this.visibleItems).call(e,t)){const e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}}_addToSubgroup(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;null!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)<new Date(this.subgroups[e].start)&&(this.subgroups[e].start=t.data.start);const i=t.data.end||t.data.start;new Date(i)>new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)}_updateSubgroupsSizes(){const t=this;if(t.subgroups)for(const i in t.subgroups){var e;if(!Object.prototype.hasOwnProperty.call(t.subgroups,i))continue;const n=t.subgroups[i].items[0].data.end||t.subgroups[i].items[0].data.start;let o=t.subgroups[i].items[0].data.start,s=n-1;kl(e=t.subgroups[i].items).call(e,t=>{new Date(t.data.start)<new Date(o)&&(o=t.data.start);const e=t.data.end||t.data.start;new Date(e)>new Date(s)&&(s=e)}),t.subgroups[i].start=o,t.subgroups[i].end=new Date(s-1)}}orderSubgroups(){if(void 0!==this.subgroupOrderer){const t=[];if("string"==typeof this.subgroupOrderer){for(const e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});Cx(t).call(t,(t,e)=>t.sortField-e.sortField)}else if("function"==typeof this.subgroupOrderer){for(const e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&t.push(this.subgroups[e].items[0].data);Cx(t).call(t,this.subgroupOrderer)}if(t.length>0)for(let e=0;e<t.length;e++)this.subgroups[t[e].subgroup].index=e}}_resetSubgroups(){for(const t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&(this.subgroups[t].visible=!1,this.subgroups[t].height=0)}remove(t){var e,i;delete this.items[t.id],t.setParent(null),this.stackDirty=!0;const n=wc(e=this.visibleItems).call(e,t);-1!=n&&oh(i=this.visibleItems).call(i,n,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())}_removeFromSubgroup(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;if(null!=e){const o=this.subgroups[e];if(o){var i;const s=wc(i=o.items).call(i,t);var n;if(s>=0)oh(n=o.items).call(n,s,1),o.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}removeFromDataSet(t){this.itemSet.removeItem(t.id)}order(){const t=wk.toArray(this.items),e=[],i=[];for(let n=0;n<t.length;n++)void 0!==t[n].data.end&&i.push(t[n]),e.push(t[n]);this.orderedItems={byStart:e,byEnd:i},rC(this.orderedItems.byStart),aC(this.orderedItems.byEnd)}_updateItemsInRange(t,e,i){const n=[],o={};if(!this.isVisible&&void 0!==this.height&&this.groupId!=bC){for(let t=0;t<e.length;t++){var s=e[t];s.displayed&&s.hide()}return n}const r=(i.end-i.start)/4,a=i.start-r,l=i.end+r,h=t=>{const{start:e,end:i}=t;return i<a?-1:e<=l?0:1};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],n,o,i);const d=wk.binarySearchCustom(t.byStart,t=>t<a?-1:t<=l?0:1,"data","start");if(this._traceVisible(d,t.byStart,n,o,t=>t.data.start<a||t.data.start>l),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],n,o,i)}else{const e=wk.binarySearchCustom(t.byEnd,h,"data");this._traceVisible(e,t.byEnd,n,o,t=>t.data.end<a||t.data.start>l)}this._sortVisibleItems(t.byStart,n,o);const c={};let u=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;c[t]=e.redraw(i),u=c[t].length}}if(u>0)for(let t=0;t<u;t++)kl(wk).call(wk,c,e=>{e[t]()});for(let t=0;t<n.length;t++)n[t].repositionX();return n}_traceVisible(t,e,i,n,o){if(-1!=t){for(let s=t;s>=0;s--){let t=e[s];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.unshift(t))}for(let s=t+1;s<e.length;s++){let t=e[s];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.push(t))}}}_sortVisibleItems(t,e,i){e.length=0;for(let n=0;n<t.length;n++){let o=t[n];i[o.id]&&e.push(o)}}_checkIfVisible(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()}_checkIfVisibleWithReference(t,e,i,n){t.isVisible(n)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()}_updateClustersInRange(t,e,i){const n=[],o={};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],n,o,i);for(let e=0;e<t.byStart.length;e++)this._checkIfVisibleWithReference(t.byStart[e],n,o,i);for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],n,o,i);const s={};let r=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;s[t]=e.redraw(i),r=s[t].length}}if(r>0)for(var a=0;a<r;a++)kl(wk).call(wk,s,function(t){t[a]()});for(let t=0;t<n.length;t++)n[t].repositionX();return n}changeSubgroup(t,e,i){this._removeFromSubgroup(t,e),this._addToSubgroup(t,i),this.orderSubgroups()}dispose(){let t;for(this.hide();t=this._disposeCallbacks.pop();)t()}}class wC extends _C{constructor(t,e,i){super(t,e,i),this.width=0,this.height=0,this.top=0,this.left=0}redraw(t,e,i){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(let t=0,i=this.visibleItems.length;t<i;t++){this.visibleItems[t].repositionY(e)}return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}}class xC{constructor(t,e,i){var n;this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.defaultOptions={locales:zS,locale:"en"},this.options=wk.extend({},this.defaultOptions,i),this.options.locales=wk.extend({},zS,this.options.locales);const o=this.defaultOptions.locales[this.defaultOptions.locale];kl(n=Ma(this.options.locales)).call(n,t=>{this.options.locales[t]=wk.extend({},o,this.options.locales[t])}),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=i&&i.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(t),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(t){null!=t.group&&this.data.group!=t.group&&null!=this.parent&&this.parent.itemSet._moveToGroup(this,t.group),this.setSelectability(t),this.parent&&(this.parent.stackDirty=!0);null!=t.subgroup&&this.data.subgroup!=t.subgroup&&null!=this.parent&&this.parent.changeSubgroup(this,this.data.subgroup,t.subgroup),this.data=t,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}setSelectability(t){t&&(this.selectable=void 0===t.selectable||Boolean(t.selectable))}setParent(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t}isVisible(t){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var t,e;const i=this,n=document.createElement("div");n.className="vis-drag-center",n.dragCenterItem=this,this.hammerDragCenter=new _S(n),this.hammerDragCenter.on("tap",t=>{i.parent.itemSet.body.emitter.emit("click",{event:t,item:i.id})}),this.hammerDragCenter.on("doubletap",t=>{t.stopPropagation(),i.parent.itemSet._onUpdateItem(i),i.parent.itemSet.body.emitter.emit("doubleClick",{event:t,item:i.id})}),this.hammerDragCenter.on("panstart",t=>{t.stopPropagation(),i.parent.itemSet._onDragStart(t)}),this.hammerDragCenter.on("panmove",ll(t=i.parent.itemSet._onDrag).call(t,i.parent.itemSet)),this.hammerDragCenter.on("panend",ll(e=i.parent.itemSet._onDragEnd).call(e,i.parent.itemSet)),this.hammerDragCenter.get("press").set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(n,this.dom.dragLeft):this.dom.box.appendChild(n):this.dom.point&&this.dom.point.appendChild(n),this.dom.dragCenter=n}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&(this.hammerDragCenter.destroy(),this.hammerDragCenter=null))}_repaintDeleteButton(t){const e=(this.options.editable.overrideItems||null==this.editable)&&this.options.editable.remove||!this.options.editable.overrideItems&&null!=this.editable&&this.editable.remove;if(this.selected&&e&&!this.dom.deleteButton){const e=this,i=document.createElement("div");this.options.rtl?i.className="vis-delete-rtl":i.className="vis-delete";let n=this.options.locales[this.options.locale];n||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),n=this.options.locales.en),i.title=n.deleteSelected,this.hammerDeleteButton=new _S(i).on("tap",t=>{t.stopPropagation(),e.parent.removeFromDataSet(e)}),t.appendChild(i),this.dom.deleteButton=i}else this.selected&&e||!this.dom.deleteButton||(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&(this.hammerDeleteButton.destroy(),this.hammerDeleteButton=null))}_repaintOnItemUpdateTimeTooltip(t){if(!this.options.tooltipOnItemUpdateTime)return;const e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){const e=document.createElement("div");e.className="vis-onUpdateTime-tooltip",t.appendChild(e),this.dom.onItemUpdateTimeTooltip=e}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.dom.onItemUpdateTimeTooltip.style.transform="translateX(-50%)",this.dom.onItemUpdateTimeTooltip.style.left="50%";const t=50,e=this.parent.itemSet.body.domProps.scrollTop;let n;n="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;let o,s;var i;if(n+this.parent.top-t<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top="".concat(this.height+2,"px")):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom="".concat(this.height+2,"px")),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template)s=ll(i=this.options.tooltipOnItemUpdateTime.template).call(i,this),o=s(this.data);else o="start: ".concat(LD(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(o+="<br> end: ".concat(LD(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=wk.xss(o)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(t){let e,i,n,o,s;const r=this._getItemData(),a=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];var l,h;this.options.visibleFrameTemplate?(s=ll(l=this.options.visibleFrameTemplate).call(l,this),o=wk.xss(s(r,a))):o="";if(a)if(o instanceof Object&&!(o instanceof Element))s(r,a);else if(i=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(o),i){if(o instanceof Element)a.innerHTML="",a.appendChild(o);else if(null!=o)a.innerHTML=wk.xss(o);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.itemVisibleFrameContent=o}this.options.template?(n=ll(h=this.options.template).call(h,this),e=n(r,t,this.data)):e=this.data.content;if(e instanceof Object&&!(e instanceof Element))n(r,t);else if(i=this._contentToString(this.content)!==this._contentToString(e),i){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=wk.xss(e);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.content=e}}_updateDataAttributes(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let e=[];if(sa(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Ma(this.data)}for(const i of e){const e=this.data[i];null!=e?t.setAttribute("data-".concat(i),e):t.removeAttribute("data-".concat(i))}}}_updateStyle(t){this.style&&(wk.removeCssText(t,this.style),this.style=null),this.data.style&&(wk.addCssText(t,this.data.style),this.style=this.data.style)}_contentToString(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t}_updateEditStatus(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"==typeof this.options.editable&&(this.editable={},wk.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),this.options&&this.options.editable&&!0===this.options.editable.overrideItems||this.data&&("boolean"==typeof this.data.editable?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:"object"==typeof this.data.editable&&(this.editable={},wk.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){var t;return ll(t=this.options.tooltip.template).call(t,this)(this._getItemData(),this.data)}return this.data.title}}xC.prototype.stack=!0;class DC extends xC{constructor(t,e,i){if(super(t,e,i),this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t))}isVisible(t){if(this.cluster)return!1;let e;const i=this.data.align||this.options.align,n=this.width*t.getMillisecondsPerPixel();return e="right"==i?this.data.start.getTime()>t.start&&this.data.start.getTime()-n<t.end:"left"==i?this.data.start.getTime()+n>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+n/2>t.start&&this.data.start.getTime()-n/2<t.end,e}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-line",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-dot",this.dom.box["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){const e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className="vis-item vis-box".concat(e),this.dom.line.className="vis-item vis-line".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}_getDomComponentsSizes(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.props.dot.height=t.dot.height,this.props.dot.width=t.dot.width,this.props.line.width=t.line.width,this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(t){var e,i,n,o;let s;const r=[ll(e=this._createDomElement).call(e,this),ll(i=this._appendDomElement).call(i,this),ll(n=this._updateDirtyDomComponents).call(n,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&ll(t=this._updateDomComponentsSizes).call(t,this)(s)},ll(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return kl(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom;t.box.remove?t.box.remove():t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.remove?t.line.remove():t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.remove?t.dot.remove():t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}}repositionXY(){const t=this.options.rtl,e=function(t,e,i){var n;if(void 0===e&&void 0===i)return;const o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?fd(n="translate(".concat(o,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(o,"px)")};e(this.dom.box,this.boxX,this.boxY,t),e(this.dom.dot,this.dotX,this.dotY,t),e(this.dom.line,this.lineX,this.lineY,t)}repositionX(){const t=this.conversion.toScreen(this.data.start),e=void 0===this.data.align?this.options.align:this.data.align,i=this.props.line.width,n=this.props.dot.width;"right"==e?(this.boxX=t-this.width,this.lineX=t-i,this.dotX=t-i/2-n/2):"left"==e?(this.boxX=t,this.lineX=t,this.dotX=t+i/2-n/2):(this.boxX=t-this.width/2,this.lineX=this.options.rtl?t-i:t-i/2,this.dotX=t-n/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){const t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){const t=this.parent.top+this.top+1;this.boxY=this.top||0,e.height="".concat(t,"px"),e.bottom="",e.top="0"}else{const t=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),e.height="".concat(t,"px"),e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}}class kC extends xC{constructor(t,e,i){if(super(t,e,i),this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t))}isVisible(t){if(this.cluster)return!1;const e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end}_createDomElement(){this.dom||(this.dom={},this.dom.point=document.createElement("div"),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement("div"),this.dom.point.appendChild(this.dom.dot),this.dom.point["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.point)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);const t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.point.className="vis-item vis-point".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}_getDomComponentsSizes(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}_updateDomComponentsSizes(t){this.props.dot.width=t.dot.width,this.props.dot.height=t.dot.height,this.props.content.height=t.content.height,this.options.rtl?this.dom.content.style.marginRight="".concat(this.props.dot.width/2,"px"):this.dom.content.style.marginLeft="".concat(this.props.dot.width/2,"px"),this.width=t.point.width,this.height=t.point.height,this.dom.dot.style.top="".concat((this.height-this.props.dot.height)/2,"px");const e=this.props.dot.width,i=this.options.rtl?e/2:e/2*-1;this.dom.dot.style.transform="translateX(".concat(i,"px"),this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(t){var e,i,n,o;let s;const r=[ll(e=this._createDomElement).call(e,this),ll(i=this._appendDomElement).call(i,this),ll(n=this._updateDirtyDomComponents).call(n,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&ll(t=this._updateDomComponentsSizes).call(t,this)(s)},ll(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return kl(r).call(r,e=>{t=e()}),t}}repositionXY(){const t=this.options.rtl;!function(t,e,i){var n;if(void 0===e&&void 0===i)return;const o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?fd(n="translate(".concat(o,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(o,"px)")}(this.dom.point,this.pointX,this.pointY,t)}show(t){if(!this.displayed)return this.redraw(t)}hide(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}repositionX(){const t=this.conversion.toScreen(this.data.start);this.pointX=t,this.options.rtl?this.right=t-this.props.dot.width:this.left=t-this.props.dot.width,this.repositionXY()}repositionY(){const t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}}class SC extends xC{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}}isVisible(t){return!this.cluster&&(this.data.start<t.end&&this.data.end>t.start)}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dom.box["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,this.whiteSpace="nowrap"!==window.getComputedStyle(this.dom.content).whiteSpace,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(t){var e,i,n,o;let s;const r=[ll(e=this._createDomElement).call(e,this),ll(i=this._appendDomElement).call(i,this),ll(n=this._updateDirtyDomComponents).call(n,this),()=>{var t;this.dirty&&(s=ll(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&ll(t=this._updateDomComponentsSizes).call(t,this)(s)},ll(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return kl(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}}repositionX(t){const e=this.parent.width;let i=this.conversion.toScreen(this.data.start),n=this.conversion.toScreen(this.data.end);const o=void 0===this.data.align?this.options.align:this.data.align;let s,r;!1===this.data.limitSize||void 0!==t&&!0!==t||(i<-e&&(i=-e),n>2*e&&(n=2*e));const a=Math.max(Math.round(1e3*(n-i))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=i:this.left=i,this.width=a+this.props.content.width,r=this.props.content.width):(this.options.rtl?this.right=i:this.left=i,this.width=a,r=Math.min(n-i,this.props.content.width)),this.options.rtl?this.dom.box.style.transform="translateX(".concat(-1*this.right,"px)"):this.dom.box.style.transform="translateX(".concat(this.left,"px)"),this.dom.box.style.width="".concat(a,"px"),this.whiteSpace&&(this.height=this.dom.box.offsetHeight),o){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){const t=-1*Math.max(a-r,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(a-r,0),"px)");break;case"center":if(this.options.rtl){const t=-1*Math.max((a-r)/2,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((a-r)/2,0),"px)");break;default:if(s=this.overflow?n>0?Math.max(-i,0):-r:i<0?-i:0,this.options.rtl){const t=-1*s;this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(s,"px)")}}repositionY(){const t=this.options.orientation.item,e=this.dom.box;e.style.top="".concat("top"==t?this.top:this.parent.height-this.top-this.height,"px")}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){const t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){const t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}}SC.prototype.baseClassName="vis-item vis-range";class CC extends xC{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}}isVisible(t){return this.data.start<t.end&&this.data.end>t.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);const t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(t){var e,i,n,o;let s;const r=[ll(e=this._createDomElement).call(e,this),ll(i=this._appendDomElement).call(i,this),ll(n=this._updateDirtyDomComponents).call(n,this),()=>{var t;this.dirty&&(s=ll(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&ll(t=this._updateDomComponentsSizes).call(t,this)(s)},ll(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return kl(r).call(r,e=>{t=e()}),t}}repositionY(t){let e;const i=this.options.orientation.item;if(void 0!==this.data.subgroup){const t=this.data.subgroup;this.dom.box.style.height="".concat(this.parent.subgroups[t].height,"px"),this.dom.box.style.top="".concat("top"==i?this.parent.top+this.parent.subgroups[t].top:this.parent.top+this.parent.height-this.parent.subgroups[t].top-this.parent.subgroups[t].height,"px"),this.dom.box.style.bottom=""}else this.parent instanceof wC?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom="bottom"==i?"0":"",this.dom.box.style.top="top"==i?"0":""):(e=this.parent.height,this.dom.box.style.top="".concat(this.parent.top,"px"),this.dom.box.style.bottom="");this.dom.box.style.height="".concat(e,"px")}}CC.prototype.baseClassName="vis-item vis-background",CC.prototype.stack=!1,CC.prototype.show=SC.prototype.show,CC.prototype.hide=SC.prototype.hide,CC.prototype.repositionX=SC.prototype.repositionX;class TC{constructor(t,e){this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(t,e){this.x=hc(t),this.y=hc(e)}setText(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=wk.xss(t)}show(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,r=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){let t=!1,n=!0;"flip"==this.overflowMethod&&(this.y-e<this.padding&&(n=!1),this.x+i>o-this.padding&&(t=!0)),s=t?this.x-i:this.x,r=n?this.y-e:this.y}else(r=this.y-e)+e+this.padding>n&&(r=n-e-this.padding),r<this.padding&&(r=this.padding),(s=this.x)+i+this.padding>o&&(s=o-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=r+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}}var MC,OC,EC,PC,IC,NC,LC,AC,FC,RC={};function jC(){return EC?OC:(EC=1,function(){if(MC)return RC;MC=1;var t=Pi(),e=yo().every;t({target:"Array",proto:!0,forced:!dl()("every")},{every:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),OC=Dr()("Array","every"))}function YC(){if(IC)return PC;IC=1;var t=Gt(),e=jC(),i=Array.prototype;return PC=function(n){var o=n.every;return n===i||t(i,n)&&o===i.every?e:o},PC}function HC(){return LC?NC:(LC=1,NC=YC())}var zC=i(FC?AC:(FC=1,AC=HC()));class GC extends xC{constructor(t,e,i){if(super(t,e,uh({},{fitOnDoubleClick:!0},i,{editable:!1})),this.props={content:{width:0,height:0}},!t||null==t.uiItems)throw new Error('Property "uiItems" missing in item '+t.id);this.id=wD(),this.group=t.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(t){this.detach(),this.data.uiItems=t,this._setupRange(),this.attach()}isVisible(t){const e=this.data.end?this.data.end-this.data.start:0,i=this.width*t.getMillisecondsPerPixel(),n=Math.max(this.data.start.getTime()+e,this.data.start.getTime()+i);return this.data.start<t.end&&n>t.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(t){var e,i,n,o,s,r,a,l,h=[ll(e=this._createDomElement).call(e,this),ll(i=this._appendDomElement).call(i,this),ll(n=this._updateDirtyDomComponents).call(n,this),ll(o=function(){this.dirty&&(a=this._getDomComponentsSizes())}).call(o,this),ll(s=function(){var t;this.dirty&&ll(t=this._updateDomComponentsSizes).call(t,this)(a)}).call(s,this),ll(r=this._repaintDomAdditionals).call(r,this)];return t?h:(kl(h).call(h,function(t){l=t()}),l)}show(){this.displayed||this.redraw()}hide(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),this.options.showStipes&&(t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot)),this.displayed=!1}}repositionX(){let t=this.conversion.toScreen(this.data.start),e=this.data.end?this.conversion.toScreen(this.data.end):0;if(e)this.repositionXWithRanges(t,e);else{let e=void 0===this.data.align?this.options.align:this.data.align;this.repositionXWithoutRanges(t,e)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?"block":"none",this.dom.dot.style.display=this._isStipeVisible()?"block":"none",this._isStipeVisible()&&this.repositionStype(t,e))}repositionStype(t,e){this.dom.line.style.display="block",this.dom.dot.style.display="block";const i=this.dom.line.offsetWidth,n=this.dom.dot.offsetWidth;if(e){const o=i+t+(e-t)/2,s=o-n/2,r=this.options.rtl?-1*o:o,a=this.options.rtl?-1*s:s;this.dom.line.style.transform="translateX(".concat(r,"px)"),this.dom.dot.style.transform="translateX(".concat(a,"px)")}else{const e=this.options.rtl?-1*t:t,i=this.options.rtl?-1*(t-n/2):t-n/2;this.dom.line.style.transform="translateX(".concat(e,"px)"),this.dom.dot.style.transform="translateX(".concat(i,"px)")}}repositionXWithoutRanges(t,e){"right"==e?this.options.rtl?(this.right=t-this.width,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width,this.dom.box.style.left=this.left+"px"):"left"==e?this.options.rtl?(this.right=t,this.dom.box.style.right=this.right+"px"):(this.left=t,this.dom.box.style.left=this.left+"px"):this.options.rtl?(this.right=t-this.width/2,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width/2,this.dom.box.style.left=this.left+"px")}repositionXWithRanges(t,e){let i=Math.round(Math.max(e-t+.5,1));this.options.rtl?this.right=t:this.left=t,this.width=Math.max(i,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=i+"px"}repositionY(){var t=this.options.orientation.item,e=this.dom.box;if(e.style.top="top"==t?(this.top||0)+"px":(this.parent.height-this.top-this.height||0)+"px",this.options.showStipes){if("top"==t)this.dom.line.style.top="0",this.dom.line.style.height=this.parent.top+this.top+1+"px",this.dom.line.style.bottom="";else{var i=this.parent.itemSet.props.height,n=i-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=i-n+"px",this.dom.line.style.bottom="0"}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+"px"}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){var t;for(let t of this.data.uiItems)t.cluster=this;this.data.items=va(t=this.data.uiItems).call(t,t=>t.data),this.attached=!0,this.dirty=!0}detach(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.hasItems()){for(let t of this.data.uiItems)delete t.cluster;this.attached=!1,t&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){var t,e,i;const n=va(t=this.data.uiItems).call(t,t=>({start:t.data.start.valueOf(),end:t.data.end?t.data.end.valueOf():t.data.start.valueOf()}));this.data.min=Math.min(...va(n).call(n,t=>Math.min(t.start,t.end||t.start))),this.data.max=Math.max(...va(n).call(n,t=>Math.max(t.start,t.end||t.start)));const o=va(e=this.data.uiItems).call(e,t=>t.center),s=Oy(o).call(o,(t,e)=>t+e,0)/this.data.uiItems.length;Yx(i=this.data.uiItems).call(i,t=>t.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(s),this.data.end=null)}_getUiItems(){var t;return this.data.uiItems&&this.data.uiItems.length?Od(t=this.data.uiItems).call(t,t=>t.cluster===this):[]}_createDomElement(){if(!this.dom){var t;if(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-cluster-line",this.dom.line.style.display="none",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-cluster-dot",this.dom.dot.style.display="none"),this.options.fitOnDoubleClick)this.dom.box.ondblclick=ll(t=GC.prototype._onDoubleClick).call(t,this);this.dom.box["vis-item"]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}const t=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+t,this.options.showStipes&&(this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":""),this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")),this.data.end&&(this.dom.content.style.maxWidth="none")}}_getDomComponentsSizes(){const t={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(t.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},t.line={width:this.dom.line.offsetWidth}),t}_updateDomComponentsSizes(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.data.end?this.minWidth=t.box.width:this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){const t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}_fit(){if(this.emitter){const{fitStart:t,fitEnd:e}=this._getFitRange(),i={start:new Date(t),end:new Date(e),animation:!0};this.emitter.emit("fit",i)}}_getItemData(){return this.data}}GC.prototype.baseClassName="vis-item vis-range vis-cluster";const WC="__ungrouped__";class BC{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new GC(t,e,i)}setItems(t,e){this.items=t||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(t,e,i){let{maxItems:n,clusterCriteria:o}="boolean"==typeof i?{}:i;o||(o=()=>!0),n=n||1;let s=-1,r=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),r=Math.abs(Math.pow(2,s))}if(this.dataChanged){const t=s!=this.cacheLevel;(!this.applyOnChangedLevel||t)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;let a=this.cache[s];if(!a){a=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;const s=this.groups[e],l=s.length;let h=0;for(;h<l;){let e=s[h],l=1,d=h-1;for(;d>=0&&e.center-s[d].center<r/2;)!s[d].cluster&&o(e.data,s[d].data)&&l++,d--;let c=h+1;for(;c<s.length&&s[c].center-e.center<r/2;)o(e.data,s[c].data)&&l++,c++;let u=a.length-1;for(;u>=0&&e.center-a[u].center<r;)e.group==a[u].group&&o(e.data,a[u].data)&&l++,u--;if(l>n){const r=l-n+1,d=[];let c=h;for(;d.length<r&&c<s.length;)o(s[h].data,s[c].data)&&d.push(s[c]),c++;const u=this.itemSet.getGroupId(e.data),p=this.itemSet.groups[u]||this.itemSet.groups[WC];let m=this._getClusterForItems(d,p,t,i);a.push(m),h+=r}else delete e.cluster,h+=1}}this.cache[s]=a}return a}_filterData(){const t={};this.groups=t;for(const e of Xd(this.items)){const i=e.parent?e.parent.groupId:"";let n=t[i];n||(n=[],t[i]=n),n.push(e),e.data.start&&(e.data.end?e.center=(e.data.start.valueOf()+e.data.end.valueOf())/2:e.center=e.data.start.valueOf())}for(let i in t){var e;Object.prototype.hasOwnProperty.call(t,i)&&Cx(e=t[i]).call(e,(t,e)=>t.center-e.center)}this.dataChanged=!1}_getClusterForItems(t,e,i,n){var o;const s=va(o=i||[]).call(o,t=>{var e;return{cluster:t,itemsIds:new jw(va(e=t.data.uiItems).call(e,t=>t.id))}});let r;if(s.length)for(let e of s)if(e.itemsIds.size===t.length&&zC(t).call(t,t=>e.itemsIds.has(t.id))){r=e.cluster;break}if(r)return r.setUiItems(t),r.group!==e&&(r.group&&r.group.remove(r),e&&(e.add(r),r.group=e)),r;let a=n.titleTemplate||"";const l={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},h=a.replace(/{count}/,t.length),d='<div title="'+h+'">'+t.length+"</div>",c=uh({},n,this.itemSet.options),u={content:d,title:h,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return r=this.createClusterItem(u,l,c),e&&(e.add(r),r.group=e),r.attach(),r}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}const VC="__ungrouped__",UC="__background__";class XC extends Fk{constructor(t,e){super(),this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap(t,e,i){const n=e.order;e.order=t.order,t.order=n},groupOrder:"order",selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:xS.snap,onDropObjectOnItem(t,e,i){i(e)},onAdd(t,e){e(t)},onUpdate(t,e){e(t)},onMove(t,e){e(t)},onRemove(t,e){e(t)},onMoving(t,e){e(t)},onAddGroup(t,e){e(t)},onMoveGroup(t,e){e(t)},onRemoveGroup(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},this.options=wk.extend({},this.defaultOptions),this.options.rtl=e.rtl,this.options.onTimeout=e.onTimeout,this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;const i=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(t,e,n){i._onAdd(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},update(t,e,n){i._onUpdate(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},remove(t,e,n){i._onRemove(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()}},this.groupListeners={add(t,e,n){if(i._onAddGroups(e.items),i.groupsData&&i.groupsData.length>0){var o;const t=i.groupsData.getDataSet();kl(o=t.get()).call(o,e=>{if(e.nestedGroups){var i;0!=e.showNested&&(e.showNested=!0);let o=[];kl(i=e.nestedGroups).call(i,i=>{const n=t.get(i);n&&(n.nestedInGroup=e.id,0==e.showNested&&(n.visible=!1),o=fd(o).call(o,n))}),t.update(o,n)}})}},update(t,e,n){i._onUpdateGroups(e.items)},remove(t,e,n){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(e),this.clusters=[]}_create(){var t,e,i,n,o,s,r,a,l,h,d,c,u,p,m;const f=document.createElement("div");f.className="vis-itemset",f["vis-itemset"]=this,this.dom.frame=f;const g=document.createElement("div");g.className="vis-background",f.appendChild(g),this.dom.background=g;const v=document.createElement("div");v.className="vis-foreground",f.appendChild(v),this.dom.foreground=v;const y=document.createElement("div");y.className="vis-axis",this.dom.axis=y;const b=document.createElement("div");b.className="vis-labelset",this.dom.labelSet=b,this._updateUngrouped();const _=new wC(UC,null,this);_.show(),this.groups[UC]=_,this.hammer=new _S(this.body.dom.centerContainer),this.hammer.on("hammer.input",t=>{t.isFirst&&this._onTouch(t)}),this.hammer.on("panstart",ll(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",ll(e=this._onDrag).call(e,this)),this.hammer.on("panend",ll(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:_S.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",ll(n=this._onSelectItem).call(n,this)),this.hammer.on("press",ll(o=this._onMultiSelectItem).call(o,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",ll(s=this._onAddItem).call(s,this)),this.options.rtl?this.groupHammer=new _S(this.body.dom.rightContainer):this.groupHammer=new _S(this.body.dom.leftContainer),this.groupHammer.on("tap",ll(r=this._onGroupClick).call(r,this)),this.groupHammer.on("panstart",ll(a=this._onGroupDragStart).call(a,this)),this.groupHammer.on("panmove",ll(l=this._onGroupDrag).call(l,this)),this.groupHammer.on("panend",ll(h=this._onGroupDragEnd).call(h,this)),this.groupHammer.get("pan").set({threshold:5,direction:_S.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",ll(d=this._onMouseOver).call(d,this)),this.body.dom.centerContainer.addEventListener("mouseout",ll(c=this._onMouseOut).call(c,this)),this.body.dom.centerContainer.addEventListener("mousemove",ll(u=this._onMouseMove).call(u,this)),this.body.dom.centerContainer.addEventListener("contextmenu",ll(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener("mousewheel",ll(m=this._onMouseWheel).call(m,this)),this.show()}setOptions(t){if(t){var e,i;const n=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];wk.selectiveExtend(n,this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"==typeof t.itemsAlwaysDraggable&&(wk.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,t.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"sequentialSelection"in t&&"boolean"==typeof t.sequentialSelection&&(this.options.sequentialSelection=t.sequentialSelection),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"==typeof t.orientation&&"item"in t.orientation&&(this.options.orientation.item=t.orientation.item)),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin,this.options.margin.item.vertical=t.margin):"object"==typeof t.margin&&(wk.selectiveExtend(["axis"],this.options.margin,t.margin),"item"in t.margin&&("number"==typeof t.margin.item?(this.options.margin.item.horizontal=t.margin.item,this.options.margin.item.vertical=t.margin.item):"object"==typeof t.margin.item&&wk.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),kl(e=["locale","locales"]).call(e,e=>{e in t&&(this.options[e]=t[e])}),"editable"in t&&("boolean"==typeof t.editable?(this.options.editable.updateTime=t.editable,this.options.editable.updateGroup=t.editable,this.options.editable.add=t.editable,this.options.editable.remove=t.editable,this.options.editable.overrideItems=!1):"object"==typeof t.editable&&wk.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,t.editable)),"groupEditable"in t&&("boolean"==typeof t.groupEditable?(this.options.groupEditable.order=t.groupEditable,this.options.groupEditable.add=t.groupEditable,this.options.groupEditable.remove=t.groupEditable):"object"==typeof t.groupEditable&&wk.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));const o=e=>{const i=t[e];if(i){var n;if("function"!=typeof i)throw new Error(fd(n="option ".concat(e," must be a function ")).call(n,e,"(item, callback)"));this.options[e]=i}};kl(i=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(i,o),t.cluster?(uh(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new BC(this)),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}markDirty(t){this.groupIds=[],t&&(t.refreshItems&&kl(wk).call(wk,this.items,t=>{t.dirty=!0,t.displayed&&t.redraw()}),t.restackGroups&&kl(wk).call(wk,this.groups,(t,e)=>{e!==UC&&(t.stackDirty=!0)}))}destroy(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}hide(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}show(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}setPopupTimer(t){if(this.clearPopupTimer(),t){const e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=Lu(function(){t.show()},e)}}clearPopupTimer(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(t){var e;null==t&&(t=[]),sa(t)||(t=[t]);const i=Od(e=this.selection).call(e,e=>-1===wc(t).call(t,e));for(let t of i){const e=this.getItemById(t);e&&e.unselect()}this.selection=[...t];for(let e of t){const t=this.getItemById(e);t&&t.select()}}getSelection(){var t;return fd(t=this.selection).call(t,[])}getVisibleItems(){const t=this.body.range.getRange();let e,i;this.options.rtl?(e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end)):(i=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end));const n=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const o=this.groups[t],s=o.isVisible?o.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&n.push(t.id):t.left<e&&t.left+t.width>i&&n.push(t.id)}return n}getItemsAtCurrentTime(t){let e,i;this.options.rtl?(e=this.body.util.toScreen(t),i=this.body.util.toScreen(t)):(i=this.body.util.toScreen(t),e=this.body.util.toScreen(t));const n=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const o=this.groups[t],s=o.isVisible?o.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&n.push(t.id):t.left<e&&t.left+t.width>i&&n.push(t.id)}return n}getVisibleGroups(){const t=[];for(const e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;this.groups[e].isVisible&&t.push(e)}return t}getItemById(t){var e;return this.items[t]||oC(e=this.clusters).call(e,e=>e.id===t)}_deselect(t){const e=this.selection;for(let i=0,n=e.length;i<n;i++)if(e[i]==t){oh(e).call(e,i,1);break}}redraw(){const t=this.options.margin,e=this.body.range,i=wk.option.asSize,n=this.options,o=n.orientation.item;let s=!1;const r=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,r.className="vis-itemset",this.options.cluster&&this._clusterItems(),s=this._orderGroups()||s;const a=e.end-e.start,l=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,h=e.start!=this.lastRangeStart,d=n.stack!=this.lastStack,c=n.stackSubgroups!=this.lastStackSubgroups,u=l||h||d||c;this.lastVisibleInterval=a,this.lastRangeStart=e.start,this.lastStack=n.stack,this.lastStackSubgroups=n.stackSubgroups,this.props.lastWidth=this.props.width;const p=this._firstGroup(),m={item:t.item,axis:t.axis},f={item:t.item,axis:t.item.vertical/2};let g=0;const v=t.axis+t.item.vertical;this.groups[UC].redraw(e,f,u);const y={};let b=0;kl(wk).call(wk,this.groups,(t,i)=>{if(i===UC)return;const n=t==p?m:f;y[i]=t.redraw(e,n,u,!0),b=y[i].length});if(b>0){const t={};for(let e=0;e<b;e++)kl(wk).call(wk,y,(i,n)=>{t[n]=i[e]()});kl(wk).call(wk,this.groups,(e,i)=>{if(i===UC)return;const n=t[i];s=n||s,g+=e.height}),g=Math.max(g,v)}return g=Math.max(g,v),r.style.height=i(g),this.props.width=r.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==o?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",this.hammer.get("press").set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,s=this._isResized()||s,s}_firstGroup(){const t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[VC]||null}_updateUngrouped(){let t,e,i=this.groups[VC];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[VC],this.items){if(!Object.prototype.hasOwnProperty.call(this.items,e))continue;t=this.items[e],t.parent&&t.parent.remove(t);const i=this.getGroupId(t.data),n=this.groups[i];n&&n.add(t)||t.hide()}}else if(!i){const n=null,o=null;for(e in i=new _C(n,o,this),this.groups[VC]=i,this.items)Object.prototype.hasOwnProperty.call(this.items,e)&&(t=this.items[e],i.add(t));i.show()}}getLabelSet(){return this.dom.labelSet}setItems(t){this.itemsSettingTime=new Date;const e=this;let i;const n=this.itemsData;if(t){if(!pk(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=vk(t)}else this.itemsData=null;if(n&&(kl(wk).call(wk,this.itemListeners,(t,e)=>{n.off(e,t)}),n.dispose(),i=n.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;kl(wk).call(wk,this.itemListeners,(i,n)=>{e.itemsData.on(n,i,t)}),i=this.itemsData.getIds(),this._onAdd(i),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})}getItems(){return null!=this.itemsData?this.itemsData.rawDS:null}setGroups(t){const e=this;let i;if(this.groupsData&&(kl(wk).call(wk,this.groupListeners,(t,i)=>{e.groupsData.off(i,t)}),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!pk(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var n;const t=this.groupsData.getDataSet();kl(n=t.get()).call(n,e=>{var i;e.nestedGroups&&kl(i=e.nestedGroups).call(i,i=>{const n=t.get(i);n.nestedInGroup=e.id,0==e.showNested&&(n.visible=!1),t.update(n)})});const o=this.id;kl(wk).call(wk,this.groupListeners,(t,i)=>{e.groupsData.on(i,t,o)}),i=this.groupsData.getIds(),this._onAddGroups(i)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit("_change",{queue:!0})}getGroups(){return this.groupsData}removeItem(t){const e=this.itemsData.get(t);e&&this.options.onRemove(e,e=>{e&&this.itemsData.remove(t)})}_getType(t){return t.type||this.options.type||(t.end?"range":"box")}getGroupId(t){return"background"==this._getType(t)&&null==t.group?UC:this.groupsData?t.group:VC}_onUpdate(t){const e=this;kl(t).call(t,t=>{const i=e.itemsData.get(t);let n=e.items[t];const o=i?e._getType(i):null,s=XC.types[o];let r;if(n&&(s&&n instanceof s?e._updateItem(n,i):(r=n.selected,e._removeItem(n),n=null)),!n&&i){if(!s)throw new TypeError('Unknown item type "'.concat(o,'"'));n=new s(i,e.conversion,e.options),n.id=t,e._addItem(n),r&&(this.selection.push(t),n.select())}}),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit("_change",{queue:!0})}_onRemove(t){let e=0;const i=this;kl(t).call(t,t=>{const n=i.items[t];n&&(e++,i._removeItem(n))}),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}_order(){kl(wk).call(wk,this.groups,t=>{t.order()})}_onUpdateGroups(t){this._onAddGroups(t)}_onAddGroups(t){const e=this;kl(t).call(t,t=>{const i=e.groupsData.get(t);let n=e.groups[t];if(n)n.setData(i);else{if(t==VC||t==UC)throw new Error("Illegal group id. ".concat(t," is a reserved id."));const o=qc(e.options);wk.extend(o,{height:null}),n=new _C(t,i,e),e.groups[t]=n;for(const i in e.items){if(!Object.prototype.hasOwnProperty.call(e.items,i))continue;const o=e.items[i];o.data.group==t&&n.add(o)}n.order(),n.show()}}),this.body.emitter.emit("_change",{queue:!0})}_onRemoveGroups(t){kl(t).call(t,t=>{const e=this.groups[t];e&&(e.dispose(),delete this.groups[t])}),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit("_change",{queue:!0})}_orderGroups(){if(this.groupsData){let t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);const e=!wk.equalArray(t,this.groupIds);if(e){const e=this.groups;kl(t).call(t,t=>{e[t].hide()}),kl(t).call(t,t=>{e[t].show()}),this.groupIds=t}return e}return!1}_orderNestedGroups(t){return function t(e,i){let n=[];return kl(i).call(i,i=>{n.push(i);if(e.groupsData.get(i).nestedGroups){var o;const s=va(o=e.groupsData.get({filter:t=>t.nestedInGroup==i,order:e.options.groupOrder})).call(o,t=>t.id);n=fd(n).call(n,t(e,s))}}),n}(this,Od(t).call(t,t=>!this.groupsData.get(t).nestedInGroup))}_addItem(t){this.items[t.id]=t;const e=this.getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)}_updateItem(t,e){t.setData(e);const i=this.getGroupId(t.data),n=this.groups[i];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}_removeItem(t){var e,i;t.hide(),delete this.items[t.id];const n=wc(e=this.selection).call(e,t.id);-1!=n&&oh(i=this.selection).call(i,n,1),t.parent&&t.parent.remove(t),null!=this.popup&&this.popup.hide()}_constructByEndArray(t){const e=[];for(let i=0;i<t.length;i++)t[i]instanceof SC&&e.push(t[i]);return e}_onTouch(t){this.touchParams.item=this.itemFromTarget(t),this.touchParams.dragLeftItem=t.target.dragLeftItem||!1,this.touchParams.dragRightItem=t.target.dragRightItem||!1,this.touchParams.itemProps=null}_getGroupIndex(t){for(let e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e}_onDragStart(t){if(this.touchParams.itemIsDragging)return;const e=this.touchParams.item||null,i=this;let n;if(e&&(e.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=e.editable&&!e.editable.updateTime&&!e.editable.updateGroup&&!this.options.editable.overrideItems)return;const o=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=e,o)n={item:o,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[n];else if(s)n={item:s,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[n];else if(this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey))this._onDragStartAddItem(t);else{this.groupIds.length<1&&this.redraw();const n=this._getGroupIndex(e.data.group),o=this.options.itemsAlwaysDraggable.item&&!e.selected?[e.id]:this.getSelection();this.touchParams.itemProps=va(o).call(o,e=>{const o=i.items[e],s=i._getGroupIndex(o.data.group);return{item:o,initialX:t.center.x,groupOffset:n-s,data:this._cloneItemData(o.data)}})}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}_onDragStartAddItem(t){const e=this.options.snap||null,i=this.dom.frame.getBoundingClientRect(),n=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,o=this.body.util.toTime(n),s=this.body.util.getScale(),r=this.body.util.getStep(),a=e?e(o,s,r):o,l={type:"range",start:a,end:a,content:"new item"},h=wD();l[this.itemsData.idProp]=h;const d=this.groupFromTarget(t);d&&(l.group=d.groupId);const c=new SC(l,this.conversion,this.options);c.id=h,c.data=this._cloneItemData(l),this._addItem(c),this.touchParams.selectedItem=c;const u={item:c,initialX:t.center.x,data:c.data};this.options.rtl?u.dragLeft=!0:u.dragRight=!0,this.touchParams.itemProps=[u],t.stopPropagation()}_onDrag(t){if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.center.x-i.left+e.offsetLeft,t.center.y-i.top+e.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var e;t.stopPropagation();const i=this,n=this.options.snap||null,o=this.body.dom.root.offsetLeft,s=this.options.rtl?o+this.body.domProps.right.width:o+this.body.domProps.left.width,r=this.body.util.getScale(),a=this.body.util.getStep(),l=this.touchParams.selectedItem,h=(this.options.editable.overrideItems||null==l.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=l.editable&&l.editable.updateGroup;let d=null;if(h&&l&&null!=l.data.group){const e=i.groupFromTarget(t);e&&(d=this._getGroupIndex(e.groupId))}kl(e=this.touchParams.itemProps).call(e,e=>{const o=i.body.util.toTime(t.center.x-s),c=i.body.util.toTime(e.initialX-s);let u,p,m,f,g;u=this.options.rtl?-(o-c):o-c;let v=this._cloneItemData(e.item.data);if(null!=e.item.editable&&!e.item.editable.updateTime&&!e.item.editable.updateGroup&&!i.options.editable.overrideItems)return;if((this.options.editable.overrideItems||null==l.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=l.editable&&l.editable.updateTime)if(e.dragLeft)this.options.rtl?null!=v.end&&(m=wk.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=n?n(g,r,a):g):null!=v.start&&(p=wk.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=n?n(f,r,a):f);else if(e.dragRight)this.options.rtl?null!=v.start&&(p=wk.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=n?n(f,r,a):f):null!=v.end&&(m=wk.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=n?n(g,r,a):g);else if(null!=v.start)if(p=wk.convert(e.data.start,"Date").valueOf(),f=new Date(p+u),null!=v.end){m=wk.convert(e.data.end,"Date");const t=m.valueOf()-p.valueOf();v.start=n?n(f,r,a):f,v.end=new Date(v.start.valueOf()+t)}else v.start=n?n(f,r,a):f;if(h&&!e.dragLeft&&!e.dragRight&&null!=d&&null!=v.group){let t=d-e.groupOffset;t=Math.max(0,t),t=Math.min(i.groupIds.length-1,t),v.group=i.groupIds[t]}v=this._cloneItemData(v),i.options.onMoving(v,t=>{t&&e.item.setData(this._cloneItemData(t,"Date"))})}),this.body.emitter.emit("_change")}}_moveToGroup(t,e){const i=this.groups[e];if(i&&i.groupId!=t.data.group){const e=t.parent;e.remove(t),e.order(),t.data.group=i.groupId,i.add(t),i.order()}}_onDragEnd(t){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();const e=this,i=this.touchParams.itemProps;this.touchParams.itemProps=null,kl(i).call(i,t=>{const i=t.item.id;if(null!=e.itemsData.get(i)){const n=this._cloneItemData(t.item.data);e.options.onMove(n,n=>{n?(n[this.itemsData.idProp]=i,this.itemsData.update(n)):(t.item.setData(t.data),e.body.emitter.emit("_change"))})}else e.options.onAdd(t.item.data,i=>{e._removeItem(t.item),i&&e.itemsData.add(i),e.body.emitter.emit("_change")})})}}_onGroupClick(t){const e=this.groupFromTarget(t);Lu(()=>{this.toggleGroupShowNested(e)},1)}toggleGroupShowNested(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!t||!t.nestedGroups)return;const i=this.groupsData.getDataSet();t.showNested=null!=e?!!e:!t.showNested;let n=i.get(t.groupId);n.showNested=t.showNested;let o=t.nestedGroups,s=o;for(;s.length>0;){let t=s;s=[];for(let e=0;e<t.length;e++){let n=i.get(t[e]);n.nestedGroups&&(s=fd(s).call(s,n.nestedGroups))}s.length>0&&(o=fd(o).call(o,s))}var r;if(n.showNested){var a=i.get(n.nestedGroups);for(let t=0;t<a.length;t++){let e=a[t];e.nestedGroups&&e.nestedGroups.length>0&&(null==e.showNested||1==e.showNested)&&a.push(...i.get(e.nestedGroups))}r=va(a).call(a,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t})}else{var l;r=va(l=i.get(o)).call(l,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t})}i.update(fd(r).call(r,n)),n.showNested?(wk.removeClassName(t.dom.label,"collapsed"),wk.addClassName(t.dom.label,"expanded")):(wk.removeClassName(t.dom.label,"expanded"),wk.addClassName(t.dom.label,"collapsed"))}toggleGroupDragClassName(t){t.dom.label.classList.toggle("vis-group-is-dragging"),t.dom.foreground.classList.toggle("vis-group-is-dragging")}_onGroupDragStart(t){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(t),this.groupTouchParams.group&&(t.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}_onGroupDrag(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this.groupsData.getDataSet(),i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){const e=i.top<this.groupTouchParams.group.top,n=t.center?t.center.y:t.clientY,o=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(e){if(o.top+s<n)return}else{const t=i.height;if(o.top+t-s>n)return}}if(i&&i!=this.groupTouchParams.group){const t=e.get(i.groupId),n=e.get(this.groupTouchParams.group.groupId);n&&t&&(this.options.groupOrderSwap(n,t,e),e.update(n),e.update(t));const o=e.getIds({order:this.options.groupOrder});if(!wk.equalArray(o,this.groupTouchParams.originalOrder)){const t=this.groupTouchParams.originalOrder,i=this.groupTouchParams.group.groupId,n=Math.min(t.length,o.length);let s=0,r=0,a=0;for(;s<n;){for(;s+r<n&&s+a<n&&o[s+r]==t[s+a];)s++;if(s+r>=n)break;if(o[s+r]==i)r=1;else if(t[s+a]==i)a=1;else{const i=wc(o).call(o,t[s+a]),n=e.get(o[s+r]),l=e.get(t[s+a]);this.options.groupOrderSwap(n,l,e),e.update(n),e.update(l);const h=o[s+r];o[s+r]=t[s+a],o[i]=h,s++}}}}}}_onGroupDragEnd(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this,i=e.groupTouchParams.group.groupId,n=e.groupsData.getDataSet(),o=wk.extend({},n.get(i));e.options.onMoveGroup(o,t=>{if(t)t[n._idProp]=i,n.update(t);else{const t=n.getIds({order:e.options.groupOrder});if(!wk.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,o=Math.min(i.length,t.length);let s=0;for(;s<o;){for(;s<o&&t[s]==i[s];)s++;if(s>=o)break;const r=wc(t).call(t,i[s]),a=n.get(t[s]),l=n.get(i[s]);e.options.groupOrderSwap(a,l,n),n.update(a),n.update(l);const h=t[s];t[s]=i[s],t[r]=h,s++}}}}),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(t){if(!this.options.selectable)return;const e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);const n=this.getSelection(),o=this.itemFromTarget(t),s=o&&o.selectable?[o.id]:[];this.setSelection(s);const r=this.getSelection();(r.length>0||n.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}_onMouseOver(t){const e=this.itemFromTarget(t);if(!e)return;if(e===this.itemFromRelatedTarget(t))return;const i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new TC(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);const e=this.body.dom.centerContainer,n=e.getBoundingClientRect();this.popup.setPosition(t.clientX-n.left+e.offsetLeft,t.clientY-n.top+e.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}_onMouseOut(t){const e=this.itemFromTarget(t);if(!e)return;e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}_onMouseMove(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.clientX-i.left+e.offsetLeft,t.clientY-i.top+e.offsetTop),this.popup.show()}}_onMouseWheel(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}_onUpdateItem(t){if(!this.options.selectable)return;if(!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;const e=this;if(t){const i=e.itemsData.get(t.id);this.options.onUpdate(i,t=>{t&&e.itemsData.update(t)})}}_onDropObjectOnItem(t){const e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}_onAddItem(t){if(!this.options.selectable)return;if(!this.options.editable.add)return;const e=this,i=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),o=this.options.rtl?n.right-t.center.x:t.center.x-n.left,s=this.body.util.toTime(o),r=this.body.util.getScale(),a=this.body.util.getStep();let l,h;"drop"==t.type?(h=JSON.parse(t.dataTransfer.getData("text")),h.content=h.content?h.content:"new item",h.start=h.start?h.start:i?i(s,r,a):s,h.type=h.type||"box",h[this.itemsData.idProp]=h.id||wD(),"range"!=h.type||h.end||(l=this.body.util.toTime(o+this.props.width/5),h.end=i?i(l,r,a):l)):(h={start:i?i(s,r,a):s,content:"new item"},h[this.itemsData.idProp]=wD(),"range"===this.options.type&&(l=this.body.util.toTime(o+this.props.width/5),h.end=i?i(l,r,a):l));const d=this.groupFromTarget(t);d&&(h.group=d.groupId),h=this._cloneItemData(h),this.options.onAdd(h,i=>{i&&(e.itemsData.add(i),"drop"==t.type&&e.setSelection([i.id]))})}_onMultiSelectItem(t){if(!this.options.selectable)return;const e=this.itemFromTarget(t);if(e){let i=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){const t=this.itemsData.get(e.id).group;let n;this.options.multiselectPerGroup&&i.length>0&&(n=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&null!=n&&n!=t||i.push(e.id);const o=XC._getItemRange(this.itemsData.get(i));if(!this.options.multiselectPerGroup||n==t){i=[];for(const t in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,t))continue;const e=this.items[t],s=e.data.start,r=void 0!==e.data.end?e.data.end:s;!(s>=o.min&&r<=o.max)||this.options.multiselectPerGroup&&n!=this.itemsData.get(e.id).group||e instanceof CC||i.push(e.id)}}}else{const t=wc(i).call(i,e.id);-1==t?i.push(e.id):oh(i).call(i,t,1)}const n=Od(i).call(i,t=>this.getItemById(t).selectable);this.setSelection(n),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}static _getItemRange(t){let e=null,i=null;return kl(t).call(t,t=>{(null==i||t.start<i)&&(i=t.start),null!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}}itemFromElement(t){let e=t;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"vis-item"))return e["vis-item"];e=e.parentNode}return null}itemFromTarget(t){return this.itemFromElement(t.target)}itemFromRelatedTarget(t){return this.itemFromElement(t.relatedTarget)}groupFromTarget(t){const e=t.center?t.center.y:t.clientY;let i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(let t=0;t<i.length;t++){const n=i[t],o=this.groups[n],s=o.dom.foreground,r=s.getBoundingClientRect();if(e>=r.top&&e<r.top+s.offsetHeight)return o;if("top"===this.options.orientation.item){if(t===this.groupIds.length-1&&e>r.top)return o}else if(0===t&&e<r.top+s.offset)return o}return null}static itemSetFromTarget(t){let e=t.target;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"vis-itemset"))return e["vis-itemset"];e=e.parentNode}return null}_cloneItemData(t,e){const i=wk.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=wk.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=wk.convert(i.end,e&&e.end||"Date")),i}_clusterItems(){if(!this.options.cluster)return;const{scale:t}=this.body.range.conversion(this.body.domProps.center.width),e=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=e){if(this._detachAllClusters(),e){for(let t of e)t.attach();this.clusters=e}this._updateClusters(e)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let t of this.clusters)t.detach()}_updateClusters(t){if(this.clusters&&this.clusters.length){var e;const o=new jw(va(t).call(t,t=>t.id)),s=Od(e=this.clusters).call(e,t=>!o.has(t.id));let r=!1;for(let t of s){var i;const e=wc(i=this.selection).call(i,t.id);var n;if(-1!==e)t.unselect(),oh(n=this.selection).call(n,e,1),r=!0}if(r){const t=this.getSelection();this.body.emitter.emit("select",{items:t,event:event})}}this.clusters=t||[]}}XC.types={background:CC,box:DC,range:SC,point:kC},XC.prototype._onAdd=XC.prototype._onUpdate;let qC,ZC=!1,KC="background: #FFeeee; color: #dd0000";class $C{constructor(){}static validate(t,e,i){ZC=!1,qC=e;let n=e;return void 0!==i&&(n=e[i]),$C.parse(t,n,[]),ZC}static parse(t,e,i){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&$C.check(n,t,e,i)}static check(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)return void $C.getSuggestion(t,i,n);let o=t,s=!0;void 0===i[t]&&void 0!==i.__any__&&(o="__any__",s="object"===$C.getType(e[t]));let r=i[o];s&&void 0!==r.__type__&&(r=r.__type__),$C.checkFields(t,e,i,o,r,n)}static checkFields(t,e,i,n,o,s){let r=function(e){console.log("%c"+e+$C.printLocation(s,t),KC)},a=$C.getType(e[t]),l=o[a];void 0!==l?"array"===$C.getType(l)&&-1===wc(l).call(l,e[t])?(r('Invalid option detected in "'+t+'". Allowed values are:'+$C.print(l)+' not "'+e[t]+'". '),ZC=!0):"object"===a&&"__any__"!==n&&(s=wk.copyAndExtendArray(s,t),$C.parse(e[t],i[n],s)):void 0===o.any&&(r('Invalid type received for "'+t+'". Expected: '+$C.print(Ma(o))+". Received ["+a+'] "'+e[t]+'"'),ZC=!0)}static getType(t){var e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":sa(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(t,e,i){let n,o=$C.findInOptions(t,e,i,!1),s=$C.findInOptions(t,qC,[],!0);n=void 0!==o.indexMatch?" in "+$C.printLocation(o.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+$C.printLocation(o.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+$C.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+$C.printLocation(o.path,t):". Did you mean one of these: "+$C.print(Ma(e))+$C.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+n,KC),ZC=!0}static findInOptions(t,e,i){let n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[],l=t.toLowerCase();for(let d in e){if(!Object.prototype.hasOwnProperty.call(e,d))continue;let c;if(void 0!==e[d].__type__&&!0===o){let o=$C.findInOptions(t,e[d],wk.copyAndExtendArray(i,d));s>o.distance&&(r=o.closestMatch,a=o.path,s=o.distance,n=o.indexMatch)}else{var h;-1!==wc(h=d.toLowerCase()).call(h,l)&&(n=d),c=$C.levenshteinDistance(t,d),s>c&&(r=d,a=wk.copyArray(i),s=c)}}return{closestMatch:r,path:a,distance:s,indexMatch:n}}static printLocation(t,e){let i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)i+=" ";i+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)i+=" ";i+=e+"\n";for(let e=0;e<t.length+1;e++){for(let n=0;n<t.length-e;n++)i+=" ";i+="}\n"}return i+"\n\n"}static print(t){return lu(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,n,o=[];for(i=0;i<=e.length;i++)o[i]=[i];for(n=0;n<=t.length;n++)o[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)==t.charAt(n-1)?o[i][n]=o[i-1][n-1]:o[i][n]=Math.min(o[i-1][n-1]+1,Math.min(o[i][n-1]+1,o[i-1][n]+1));return o[e.length][t.length]}}let JC="string",QC="boolean",tT="number",eT="array",iT="date",nT="object",oT="moment",sT={configure:{enabled:{boolean:QC},filter:{boolean:QC,function:"function"},container:{dom:"dom"},__type__:{object:nT,boolean:QC,function:"function"}},align:{string:JC},alignCurrentTime:{string:JC,undefined:"undefined"},rtl:{boolean:QC,undefined:"undefined"},rollingMode:{follow:{boolean:QC},offset:{number:tT,undefined:"undefined"},__type__:{object:nT}},onTimeout:{timeoutMs:{number:tT},callback:{function:"function"},__type__:{object:nT}},verticalScroll:{boolean:QC,undefined:"undefined"},horizontalScroll:{boolean:QC,undefined:"undefined"},autoResize:{boolean:QC},throttleRedraw:{number:tT},clickToUse:{boolean:QC},dataAttributes:{string:JC,array:eT},editable:{add:{boolean:QC,undefined:"undefined"},remove:{boolean:QC,undefined:"undefined"},updateGroup:{boolean:QC,undefined:"undefined"},updateTime:{boolean:QC,undefined:"undefined"},overrideItems:{boolean:QC,undefined:"undefined"},__type__:{boolean:QC,object:nT}},end:{number:tT,date:iT,string:JC,moment:oT},format:{minorLabels:{millisecond:{string:JC,undefined:"undefined"},second:{string:JC,undefined:"undefined"},minute:{string:JC,undefined:"undefined"},hour:{string:JC,undefined:"undefined"},weekday:{string:JC,undefined:"undefined"},day:{string:JC,undefined:"undefined"},week:{string:JC,undefined:"undefined"},month:{string:JC,undefined:"undefined"},year:{string:JC,undefined:"undefined"},__type__:{object:nT,function:"function"}},majorLabels:{millisecond:{string:JC,undefined:"undefined"},second:{string:JC,undefined:"undefined"},minute:{string:JC,undefined:"undefined"},hour:{string:JC,undefined:"undefined"},weekday:{string:JC,undefined:"undefined"},day:{string:JC,undefined:"undefined"},week:{string:JC,undefined:"undefined"},month:{string:JC,undefined:"undefined"},year:{string:JC,undefined:"undefined"},__type__:{object:nT,function:"function"}},__type__:{object:nT}},moment:{function:"function"},groupHeightMode:{string:JC},groupOrder:{string:JC,function:"function"},groupEditable:{add:{boolean:QC,undefined:"undefined"},remove:{boolean:QC,undefined:"undefined"},order:{boolean:QC,undefined:"undefined"},__type__:{boolean:QC,object:nT}},groupOrderSwap:{function:"function"},height:{string:JC,number:tT},hiddenDates:{start:{date:iT,number:tT,string:JC,moment:oT},end:{date:iT,number:tT,string:JC,moment:oT},repeat:{string:JC},__type__:{object:nT,array:eT}},itemsAlwaysDraggable:{item:{boolean:QC,undefined:"undefined"},range:{boolean:QC,undefined:"undefined"},__type__:{boolean:QC,object:nT}},limitSize:{boolean:QC},locale:{string:JC},locales:{__any__:{any:"any"},__type__:{object:nT}},longSelectPressTime:{number:tT},margin:{axis:{number:tT},item:{horizontal:{number:tT,undefined:"undefined"},vertical:{number:tT,undefined:"undefined"},__type__:{object:nT,number:tT}},__type__:{object:nT,number:tT}},max:{date:iT,number:tT,string:JC,moment:oT},maxHeight:{number:tT,string:JC},maxMinorChars:{number:tT},min:{date:iT,number:tT,string:JC,moment:oT},minHeight:{number:tT,string:JC},moveable:{boolean:QC},multiselect:{boolean:QC},multiselectPerGroup:{boolean:QC},onAdd:{function:"function"},onDropObjectOnItem:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},onInitialDrawComplete:{function:"function"},order:{function:"function"},orientation:{axis:{string:JC,undefined:"undefined"},item:{string:JC,undefined:"undefined"},__type__:{string:JC,object:nT}},selectable:{boolean:QC},sequentialSelection:{boolean:QC},showCurrentTime:{boolean:QC},showMajorLabels:{boolean:QC},showMinorLabels:{boolean:QC},showWeekScale:{boolean:QC},stack:{boolean:QC},stackSubgroups:{boolean:QC},cluster:{maxItems:{number:tT,undefined:"undefined"},titleTemplate:{string:JC,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:QC,undefined:"undefined"},fitOnDoubleClick:{boolean:QC,undefined:"undefined"},__type__:{boolean:QC,object:nT}},snap:{function:"function",null:"null"},start:{date:iT,number:tT,string:JC,moment:oT},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:JC,function:"function"},showTooltips:{boolean:QC},tooltip:{followMouse:{boolean:QC},overflowMethod:{string:["cap","flip","none"]},delay:{number:tT},template:{function:"function"},__type__:{object:nT}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:QC,object:nT}},timeAxis:{scale:{string:JC,undefined:"undefined"},step:{number:tT,undefined:"undefined"},__type__:{object:nT}},type:{string:JC},width:{string:JC,number:tT},preferZoom:{boolean:QC},zoomable:{boolean:QC},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:tT},zoomMax:{number:tT},zoomMin:{number:tT},xss:{disabled:{boolean:QC},filterOptions:{__any__:{any:"any"},__type__:{object:nT}},__type__:{object:nT}},__type__:{object:nT}},rT={global:{align:["center","left","right"],alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},groupHeightMode:["auto","fixed","fitItems"],groupsDraggable:!1,height:"",locale:"",longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","shiftKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}};var aT={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};class lT{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return aT[t]}setColor(t){let e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var n=this._isColorString(t);if(void 0!==n&&(t=n),!0===wk.isString(t)){if(!0===wk.isValidRGB(t)){let i=t.substr(4).substr(0,t.length-5).split(",");e={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===wk.isValidRGBA(t)){let i=t.substr(5).substr(0,t.length-6).split(",");e={r:i[0],g:i[1],b:i[2],a:i[3]}}else if(!0===wk.isValidHex(t)){let i=wk.hexToRGB(t);e={r:i.r,g:i.g,b:i.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){let i=void 0!==t.a?t.a:"1.0";e={r:t.r,g:t.g,b:t.b,a:i}}if(void 0===e)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+lu(t));this._setColor(e,i)}}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=wk.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Lu(()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=wk.extend({},t)),this.color=t;let e=wk.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),s=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){let e=wk.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=wk.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=wk.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),zu(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var o=this;this.opacityRange.onchange=function(){o._setOpacity(this.value)},this.opacityRange.oninput=function(){o._setOpacity(this.value)},this.brightnessRange.onchange=function(){o._setBrightness(this.value)},this.brightnessRange.oninput=function(){o._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=ll(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=ll(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=ll(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=ll(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new _S(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),wS(this.hammer,t=>{this._moveSelector(t)}),this.hammer.on("tap",t=>{this._moveSelector(t)}),this.hammer.on("panstart",t=>{this._moveSelector(t)}),this.hammer.on("panmove",t=>{this._moveSelector(t)}),this.hammer.on("panend",t=>{this._moveSelector(t)})}_generateHueCircle(){if(!1===this.generated){let t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let e,i,n,o,s=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,s,r),this.centerCoordinates={x:.5*s,y:.5*r},this.r=.49*s;let a,l=2*Math.PI/360,h=1/360,d=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(l*n),i=this.centerCoordinates.y+o*Math.cos(l*n),a=wk.HSVToRGB(n*h,o*d,1),t.fillStyle="rgb("+a.r+","+a.g+","+a.b+")",t.fillRect(e-.5,i-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,s,r)}this.generated=!0}_moveSelector(t){let e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=n-o,l=Math.atan2(r,a),h=.98*Math.min(Math.sqrt(r*r+a*a),s),d=Math.cos(l)*h+o,c=Math.sin(l)*h+s;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";let u=l/(2*Math.PI);u=u<0?u+1:u;let p=h/this.r,m=wk.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;let f=wk.HSVToRGB(m.h,m.s,m.v);f.a=this.color.a,this.color=f,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}class hT{constructor(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},wk.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new lT(n),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(sa(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==Od(t)&&(this.options.filter=Od(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===Od(this.options)&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let t=Od(this.options),e=0,i=!1;for(let n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):!0!==t&&-1===wc(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}_clean(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t){if(!0===this.allowCreation){let o=document.createElement("div");o.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return kl(i).call(i,t=>{o.appendChild(t)}),this.domElements.push(o),this.domElements.length}return 0}_makeHeader(t){let e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=wk.xss(t),this._makeItem([],e)}_makeLabel(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?wk.xss("<i><b>"+t+":</b></i>"):wk.xss(t+":"),n}_makeDropdown(t,e,i){let n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==wc(t).call(t,e)&&(o=wc(t).call(t,e));for(let e=0;e<t.length;e++){let i=document.createElement("option");i.value=t[e],e===o&&(i.selected="selected"),i.innerHTML=t[e],n.appendChild(i)}let s=this;n.onchange=function(){s._update(this.value,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeRange(t,e,i){let n=t[0],o=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=s}catch(t){}a.step=r;let l="",h=0;if(void 0!==e){let t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),h=a.min,l="range increased"):e/t<o&&(a.min=Math.ceil(e/t),h=a.min,l="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),h=a.max,l="range increased"),a.value=e}else a.value=n;let d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=Number(a.value);var c=this;a.onchange=function(){d.value=this.value,c._update(Number(this.value),i)},a.oninput=function(){d.value=this.value};let u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,d);""!==l&&this.popupHistory[p]!==h&&(this.popupHistory[p]=h,this._setupPopup(l,p))}_makeButton(){if(!0===this.options.showButton){let t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){let i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerHTML=wk.xss(t),i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){let t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Lu(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Lu(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));let o=this;n.onchange=function(){o._update(this.checked,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeTextInput(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});let o=this;n.onchange=function(){o._update(this.value,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeColorField(t,e,i){let n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{let n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)}),this.colorPicker.setCloseCallback(()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}})}_handleObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=Od(this.options),s=!1;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;n=!0;let a=t[r],l=wk.copyAndExtendArray(e,r);if("function"==typeof o&&(n=o(r,e),!1===n&&!sa(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i)),!1!==n){s=!0;let t=this._getValue(l);if(sa(a))this._handleArray(a,t,l);else if("string"==typeof a)this._makeTextInput(a,t,l);else if("boolean"==typeof a)this._makeCheckbox(a,t,l);else if(a instanceof Object){let t=!0;if(-1!==wc(e).call(e,"physics")&&this.moduleOptions.physics.solver!==r&&(t=!1),!0===t)if(void 0!==a.enabled){let t=wk.copyAndExtendArray(l,"enabled"),e=this._getValue(t);if(!0===e){let t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}else this._makeCheckbox(a,e,l)}else{let t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}}else console.error("dont know how to handle",a,r,l)}}return s}_handleArray(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}_update(t,e){let i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===n[e[i]]&&(n[e[i]]={}),i!==e.length-1?n=n[e[i]]:n[e[i]]=t);return i}_printOptions(){let t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+lu(t,null,2)+"</pre>"}getOptions(){let t={};for(var e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}class dT extends WS{constructor(t,e,i,n){var o,s,r,a,l,h,d;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof dT))throw new SyntaxError("Constructor must be called with the new operator");if(!sa(i)&&!pk(i)&&i instanceof Object){const t=n;n=i,i=t}n&&n.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');const c=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:LD},this.options=wk.deepExtend({},this.defaultOptions),n&&wk.setupXSSProtection(n.xss),this._create(t),!n||n&&void 0===n.rtl){let t;this.dom.root.style.visibility="hidden";let e=this.dom.root;for(;!t&&e;)t=window.getComputedStyle(e,null).direction,e=e.parentElement;this.options.rtl=t&&"rtl"==t.toLowerCase()}else this.options.rtl=n.rtl;n&&(n.rollingMode&&(this.options.rollingMode=n.rollingMode),n.onInitialDrawComplete&&(this.options.onInitialDrawComplete=n.onInitialDrawComplete),n.onTimeout&&(this.options.onTimeout=n.onTimeout),n.loadingScreenTemplate&&(this.options.loadingScreenTemplate=n.loadingScreenTemplate));const u=document.createElement("div");if(this.options.loadingScreenTemplate){var p;const t=ll(p=this.options.loadingScreenTemplate).call(p,this),e=t(this.dom.loadingScreen);e instanceof Object&&!(e instanceof Element)?t(u):e instanceof Element?(u.innerHTML="",u.appendChild(e)):null!=e&&(u.innerHTML=wk.xss(e))}function m(t,e){c.hasListeners(t)&&c.emit(t,c.getEventProperties(e))}this.dom.loadingScreen.appendChild(u),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:ll(o=this.on).call(o,this),off:ll(s=this.off).call(s,this),emit:ll(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>c.timeAxis.step.scale,getStep:()=>c.timeAxis.step.step,toScreen:ll(a=c._toScreen).call(a,c),toGlobalScreen:ll(l=c._toGlobalScreen).call(l,c),toTime:ll(h=c._toTime).call(h,c),toGlobalTime:ll(d=c._toGlobalTime).call(d,c)}},this.range=new mS(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new DS(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new BS(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new XC(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.dom.root.onclick=t=>m("click",t),this.dom.root.ondblclick=t=>m("doubleClick",t),this.dom.root.oncontextmenu=t=>m("contextmenu",t),this.dom.root.onmouseover=t=>m("mouseOver",t),window.PointerEvent?(this.dom.root.onpointerdown=t=>m("mouseDown",t),this.dom.root.onpointermove=t=>m("mouseMove",t),this.dom.root.onpointerup=t=>m("mouseUp",t)):(this.dom.root.onmousemove=t=>m("mouseMove",t),this.dom.root.onmousedown=t=>m("mouseDown",t),this.dom.root.onmouseup=t=>m("mouseUp",t)),this.initialFitDone=!1,this.on("changed",()=>{if(null!=c.itemsData){if(!c.initialFitDone&&!c.options.rollingMode)if(c.initialFitDone=!0,null!=c.options.start||null!=c.options.end){if(null==c.options.start||null==c.options.end)var t=c.getItemRange();const e=null!=c.options.start?c.options.start:t.min,i=null!=c.options.end?c.options.end:t.max;c.setWindow(e,i,{animation:!1})}else c.fit({animation:!1});c.initialDrawDone||!c.initialRangeChangeDone&&(c.options.start||c.options.end)&&!c.options.rollingMode||(c.initialDrawDone=!0,c.itemSet.initialDrawDone=!0,c.dom.root.style.visibility="visible",c.dom.loadingScreen.parentNode.removeChild(c.dom.loadingScreen),c.options.onInitialDrawComplete&&Lu(()=>c.options.onInitialDrawComplete(),0))}}),this.on("destroyTimeline",()=>{c.destroy()}),n&&this.setOptions(n),this.body.emitter.on("fit",t=>{this._onFit(t),this.redraw()}),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}_createConfigurator(){return new hT(this,this.dom.container,rT)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===$C.validate(t,sT)&&console.log("%cErrors have been found in the supplied options object.",KC),WS.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;const e=this.itemsData;if(e){const t=this.getSelection();this.setItems(null),this.setItems(e.rawDS),this.setSelection(t)}}}setItems(t){let e;this.itemsDone=!1,e=t?pk(t)?vk(t):vk(new ED(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.itemSet&&this.itemSet.setItems(null!=e?e.rawDS:null)}setGroups(t){let e;const i=t=>!1!==t.visible;t?(sa(t)&&(t=new ED(t)),e=new PD(t,{filter:i})):e=null,null!=this.groupsData&&"function"==typeof this.groupsData.setData&&this.groupsData.setData(null),this.groupsData=e,this.itemSet.setGroups(e)}setData(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)}setSelection(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(t,e){if(!this.itemsData||null==t)return;const i=sa(t)?t:[t],n=this.itemsData.get(i);let o=null,s=null;if(kl(n).call(n,t=>{const e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===o||e<o)&&(o=e),(null===s||i>s)&&(s=i)}),null!==o&&null!==s){const t=this,n=this.itemSet.items[i[0]];let r=-1*this._getScrollTop(),a=null;const l=(e,i,o)=>{const s=pT(t,n);if(!1===s)return;if(a||(a=s),a.itemTop==s.itemTop&&!a.shouldScroll)return;a.itemTop!=s.itemTop&&s.shouldScroll&&(a=s,r=-1*t._getScrollTop());const l=r,h=a.scrollOffset,d=o?h:l+(h-l)*e;t._setScrollTop(-d),i||t._redraw()},h=()=>{const e=pT(t,n);e.shouldScroll&&e.itemTop!=a.itemTop&&(t._setScrollTop(-e.scrollOffset),t._redraw())},d=()=>{h(),Lu(h,100)},c=!e||void 0===e.zoom||e.zoom,u=(o+s)/2,p=c?1.1*(s-o):Math.max(this.range.end-this.range.start,1.1*(s-o)),m=!e||void 0===e.animation||e.animation;m||(a={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.stopRolling(),this.range.setRange(u-p/2,u+p/2,{animation:m},d,l)}}fit(t,e){const i=!t||void 0===t.animation||t.animation;let n;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(n=this.getDataRange(),this.moveTo(n.min.valueOf(),{animation:i},e)):(n=this.getItemRange(),this.range.setRange(n.min,n.max,{animation:i},e))}getItemRange(){const t=this.getDataRange();let e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,n=null,o=null;if(null!=e&&null!=i){let t=i-e;t<=0&&(t=10);const s=t/this.props.center.width,r={};let a=0;kl(wk).call(wk,this.itemSet.items,(t,e)=>{if(t.groupShowing){const i=!0;r[e]=t.redraw(i),a=r[e].length}});if(a>0)for(let t=0;t<a;t++)kl(wk).call(wk,r,e=>{e[t]()});if(kl(wk).call(wk,this.itemSet.items,t=>{const r=cT(t),a=uT(t);let l,h;this.options.rtl?(l=r-(t.getWidthRight()+10)*s,h=a+(t.getWidthLeft()+10)*s):(l=r-(t.getWidthLeft()+10)*s,h=a+(t.getWidthRight()+10)*s),l<e&&(e=l,n=t),h>i&&(i=h,o=t)}),n&&o){const s=n.getWidthLeft()+10,r=o.getWidthRight()+10,a=this.props.center.width-s-r;a>0&&(this.options.rtl?(e=cT(n)-r*t/a,i=uT(o)+s*t/a):(e=cT(n)-s*t/a,i=uT(o)+r*t/a))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}getDataRange(){let t=null,e=null;var i;this.itemsData&&kl(i=this.itemsData).call(i,i=>{const n=wk.convert(i.start,"Date").valueOf(),o=wk.convert(null!=i.end?i.end:i.start,"Date").valueOf();(null===t||n<t)&&(t=n),(null===e||o>e)&&(e=o)});return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}}getEventProperties(t){const e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=this.dom.centerContainer.getBoundingClientRect(),o=this.options.rtl?n.right-e:e-n.left,s=i-n.top,r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),l=GS.customTimeFromTarget(t),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),c=this.body.util.getStep(),u=this._toTime(o),p=h?h(u,d,c):u,m=wk.getTarget(t);let f=null;return null!=r?f="item":null!=l?f="custom-time":wk.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&wk.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":wk.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":wk.hasParent(m,this.currentTime.bar)?f="current-time":wk.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:r?r.id:null,isCluster:!!r&&!!r.isCluster,items:r?r.items||[]:null,group:a?a.groupId:null,customTime:l?l.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:s,time:u,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}_redraw(){WS.prototype._redraw.call(this)}_onFit(t){const{start:e,end:i,animation:n}=t;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}function cT(t){return wk.convert(t.data.start,"Date").valueOf()}function uT(t){const e=null!=t.data.end?t.data.end:t.data.start;return wk.convert(e,"Date").valueOf()}function pT(t,e){if(!e.parent)return!1;const i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,n=t.props.center.height,o=e.parent;let s=o.top,r=!0;const a=t.timeAxis.options.orientation.axis,l=()=>"bottom"==a?o.height-e.top-e.height:e.top,h=-1*t._getScrollTop(),d=s+l(),c=e.height;return d<h?s+i<=s+l()+c&&(s+=l()-t.itemSet.options.margin.item.vertical):d+c>h+i?s+=l()+c-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,n-i),{shouldScroll:r,scrollOffset:s,itemTop:d}}class mT{constructor(t,e,i,n,o,s){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=o,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=n,this.formattingFunction=a,i||n){const t=this,e=e=>{const i=e-e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx]);return e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx])>t.magnitudefactor*t.minorSteps[t.minorStepIdx]*.5?i+t.magnitudefactor*t.minorSteps[t.minorStepIdx]:i};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=e(this._start)),n&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=e(this._end)),this.determineScale()}}setCharHeight(t){this.majorCharHeight=t}setHeight(t){this.containerHeight=t}determineScale(){const t=this._end-this._start;this.scale=this.containerHeight/t;const e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);let n=0;i<0&&(n=i);let o=!1;for(let t=n;Math.abs(t)<=Math.abs(i);t++){this.magnitudefactor=Math.pow(10,t);for(let t=0;t<this.minorSteps.length;t++){if(this.magnitudefactor*this.minorSteps[t]>=e){o=!0,this.minorStepIdx=t;break}}if(!0===o)break}}is_major(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){const t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}formatValue(t){let e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?"".concat(e):"string"==typeof e?e:t.toPrecision(5)}getLines(){const t=[],e=this.getStep(),i=(e-this._start%e)%e;for(let n=this._start+i;this._end-n>1e-5;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t}followScale(t){const e=this.minorStepIdx,i=this._start,n=this._end,o=this,s=()=>{o.magnitudefactor*=2},r=()=>{o.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||s(),s()):(this.minorStepIdx=2,1==e||r(),r()));const a=t.convertValue(0),l=t.getStep()*t.scale;let h=!1,d=0;for(;!h&&d++<5;){this.scale=l/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);const e=this.containerHeight/this.scale;this._start=i,this._end=this._start+e;const o=this._end*this.scale,d=this.magnitudefactor*this.majorSteps[this.minorStepIdx],c=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){const t=a-o;this._end+=t/this.scale,this._start=this._end-e}else this.autoScaleStart?(this._start-=c/this.scale,this._end=this._start+e):(this._start+=d-c/this.scale,this._end=this._start+e);if(!this.autoScaleEnd&&this._end>n+1e-5)r(),h=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){r(),h=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e<n-i?(s(),h=!1):h=!0}}}convertValue(t){return this.containerHeight-(t-this._start)*this.scale}screenToValue(t){return(this.containerHeight-t)/this.scale+this._start}}class fT extends Fk{constructor(t,e,i,n){super(),this.id=wD(),this.body=t,this.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:t=>"".concat(Ak(t.toPrecision(3))),title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>"".concat(Ak(t.toPrecision(3))),title:{text:void 0,style:void 0}}},this.linegraphOptions=n,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=wk.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number("".concat(this.options.width).replace("px","")),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),null==this.scale&&this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};const o=this;this.body.emitter.on("verticalDrag",()=>{o.dom.lineContainer.style.top="".concat(o.body.domProps.scrollTop,"px")})}addGroup(t,e){Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1}updateGroup(t,e){Object.prototype.hasOwnProperty.call(this.groups,t)||(this.amountOfGroups+=1),this.groups[t]=e}removeGroup(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)}setOptions(t){if(t){let e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);const i=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];wk.selectiveDeepExtend(i,this.options,t),this.minWidth=Number("".concat(this.options.width).replace("px","")),!0===e&&this.dom.frame&&(this.hide(),this.show())}}_create(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.dom.lineContainer.style.visibility="visible",this.dom.lineContainer.style.display="block",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)}_redrawGroupIcons(){let t;Cf(this.svgElements);const e=this.options.iconWidth;let i=11.5;t="left"===this.options.orientation?4:this.width-e-4;const n=Ma(this.groups);Cx(n).call(n,(t,e)=>t<e?-1:1);for(const o of n)!0!==this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&!0!==this.linegraphOptions.visibility[o]||(this.groups[o].getLegend(e,15,this.framework,t,i),i+=19);Tf(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){!1===this.iconsRemoved&&(Cf(this.svgElements),Tf(this.svgElements),this.iconsRemoved=!0)}show(){this.hidden=!1,this.dom.frame.parentNode||("left"===this.options.orientation?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display="block"}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display="none"}setRange(t,e){this.range.start=t,this.range.end=e}redraw(){let t=!1,e=0;this.dom.lineContainer.style.top="".concat(this.body.domProps.scrollTop,"px");for(const t in this.groups)Object.prototype.hasOwnProperty.call(this.groups,t)&&(!0!==this.groups[t].visible||void 0!==this.linegraphOptions.visibility[t]&&!0!==this.linegraphOptions.visibility[t]||e++);if(0===this.amountOfGroups||0===e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height="".concat(this.height,"px"),this.width=!0===this.options.visible?Number("".concat(this.options.width).replace("px","")):0;const e=this.props,i=this.dom.frame;i.className="vis-data-axis",this._calculateCharSize();const n=this.options.orientation,o=this.options.showMinorLabels,s=this.options.showMajorLabels,r=this.body.dom.backgroundHorizontal.offsetWidth;e.minorLabelHeight=o?e.minorCharHeight:0,e.majorLabelHeight=s?e.majorCharHeight:0,e.minorLineWidth=r-this.lineOffset-this.width+2*this.options.minorLinesOffset,e.minorLineHeight=1,e.majorLineWidth=r-this.lineOffset-this.width+2*this.options.majorLinesOffset,e.majorLineHeight=1,"left"===n?(i.style.top="0",i.style.left="0",i.style.bottom="",i.style.width="".concat(this.width,"px"),i.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(i.style.top="",i.style.bottom="0",i.style.left="0",i.style.width="".concat(this.width,"px"),i.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),t=this._redrawLabels(),t=this._isResized()||t,!0===this.options.icons?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(n)}return t}_redrawLabels(){let t=!1;Cf(this.DOMelements.lines),Cf(this.DOMelements.labels);const e=this.options.orientation,i=null!=this.options[e].range?this.options[e].range:{};let n=!0;null!=i.max&&(this.range.end=i.max,n=!1);let o=!0;null!=i.min&&(this.range.start=i.min,o=!1),this.scale=new mT(this.range.start,this.range.end,o,n,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[e].format),!1===this.master&&null!=this.masterAxis?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display="none"):this.dom.lineContainer.style.display="block",this.maxLabelSize=0;const s=this.scale.getLines();kl(s).call(s,t=>{const i=t.y,n=t.major;this.options.showMinorLabels&&!1===n&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-minor",this.props.minorCharHeight),n&&i>=0&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-major",this.props.majorCharHeight),!0===this.master&&(n?this._redrawLine(i,e,"vis-grid vis-horizontal vis-major",this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(i,e,"vis-grid vis-horizontal vis-minor",this.options.minorLinesOffset,this.props.minorLineWidth))});let r=0;void 0!==this.options[e].title&&void 0!==this.options[e].title.text&&(r=this.props.titleCharHeight);const a=!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-a&&!0===this.options.visible?(this.width=this.maxLabelSize+a,this.options.width="".concat(this.width,"px"),Tf(this.DOMelements.lines),Tf(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-a&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+a),this.options.width="".concat(this.width,"px"),Tf(this.DOMelements.lines),Tf(this.DOMelements.labels),this.redraw(),t=!0):(Tf(this.DOMelements.lines),Tf(this.DOMelements.labels),t=!1),t}convertValue(t){return this.scale.convertValue(t)}screenToValue(t){return this.scale.screenToValue(t)}_redrawLabel(t,e,i,n,o){const s=Ef("div",this.DOMelements.labels,this.dom.frame);s.className=n,s.innerHTML=wk.xss(e),"left"===i?(s.style.left="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="right"):(s.style.right="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="left"),s.style.top="".concat(t-.5*o+this.options.labelOffsetY,"px"),e+="";const r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*r&&(this.maxLabelSize=e.length*r)}_redrawLine(t,e,i,n,o){if(!0===this.master){const s=Ef("div",this.DOMelements.lines,this.dom.lineContainer);s.className=i,s.innerHTML="","left"===e?s.style.left="".concat(this.width-n,"px"):s.style.right="".concat(this.width-n,"px"),s.style.width="".concat(o,"px"),s.style.top="".concat(t,"px")}}_redrawTitle(t){if(Cf(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){const e=Ef("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t),e.innerHTML=wk.xss(this.options[t].title.text),void 0!==this.options[t].title.style&&wk.addCssText(e,this.options[t].title.style),"left"===t?e.style.left="".concat(this.props.titleCharHeight,"px"):e.style.right="".concat(this.props.titleCharHeight,"px"),e.style.width="".concat(this.height,"px")}Tf(this.DOMelements.title)}_calculateCharSize(){if(!("minorCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-minor vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.minorCharHeight=e.clientHeight,this.props.minorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("majorCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-major vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.majorCharHeight=e.clientHeight,this.props.majorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("titleCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-title vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.titleCharHeight=e.clientHeight,this.props.titleCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}}}function gT(t,e){}function vT(t,e){return{style:(e=void 0===e?{}:e).style||t.options.drawPoints.style,styles:e.styles||t.options.drawPoints.styles,size:e.size||t.options.drawPoints.size,className:e.className||t.className}}function yT(t,e){}function bT(t,e){}function _T(t,e,i,n){this.id=e;this.options=wk.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=n,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}function wT(t,e,i,n){this.body=t,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},this.side=i,this.options=wk.extend({},this.defaultOptions),this.linegraphOptions=n,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(e)}gT.draw=function(t,e,i,n){n=n||0;for(var o=function(t,e){var i=void 0;t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(i=t.options.drawPoints.onRender);e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(i=e.group.options.drawPoints.onRender);return i}(i,e),s=0;s<t.length;s++)if(o){var r=o(t[s],e);!0!==r&&"object"!=typeof r||Pf(t[s].screen_x+n,t[s].screen_y,vT(e,r),i.svgElements,i.svg,t[s].label)}else Pf(t[s].screen_x+n,t[s].screen_y,vT(e),i.svgElements,i.svg,t[s].label)},gT.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=Of("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline"),Pf(e+.5*n,i,vT(t),s.svgElements,s.svg)},yT.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=Of("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline");var l=Math.round(.3*n),h=t.options.barChart.width/l,d=Math.round(.4*o),c=Math.round(.75*o),u=Math.round((n-2*l)/3);if(If(e+.5*l+u,i+r-d-1,l,d,t.className+" vis-bar",s.svgElements,s.svg,t.style),If(e+1.5*l+u+2,i+r-c-1,l,c,t.className+" vis-bar",s.svgElements,s.svg,t.style),1==t.options.drawPoints.enabled){var p={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/h,className:t.className};Pf(e+.5*l+u,i+r-d-1,p,s.svgElements,s.svg),Pf(e+1.5*l+u+2,i+r-c-1,p,s.svgElements,s.svg)}},yT.draw=function(t,e,i){var n,o,s,r,a,l,h=[],d={},c=0;for(a=0;a<t.length;a++)if("bar"===(r=i.groups[t[a]]).options.style&&!0===r.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(l=0;l<e[t[a]].length;l++)h.push({screen_x:e[t[a]][l].screen_x,screen_end:e[t[a]][l].screen_end,screen_y:e[t[a]][l].screen_y,x:e[t[a]][l].x,end:e[t[a]][l].end,y:e[t[a]][l].y,groupId:t[a],label:e[t[a]][l].label}),c+=1;if(0!==c)for(Cx(h).call(h,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}),yT._getDataIntersections(d,h),a=0;a<h.length;a++){var u=null!=(r=i.groups[h[a].groupId]).options.barChart.minWidth?r.options.barChart.minWidth:.1*r.options.barChart.width,p=0;if(void 0===d[o=h[a].screen_x])a+1<h.length&&(n=Math.abs(h[a+1].screen_x-o)),s=yT._getSafeDrawData(n,r,u);else{var m=a+(d[o].amount-d[o].resolved);m<h.length&&(n=Math.abs(h[m].screen_x-o)),s=yT._getSafeDrawData(n,r,u),d[o].resolved+=1,!0===r.options.stack&&!0!==r.options.excludeFromStacking?h[a].screen_y<r.zeroPosition?(p=d[o].accumulatedNegative,d[o].accumulatedNegative+=r.zeroPosition-h[a].screen_y):(p=d[o].accumulatedPositive,d[o].accumulatedPositive+=r.zeroPosition-h[a].screen_y):!0===r.options.barChart.sideBySide&&(s.width=s.width/d[o].amount,s.offset+=d[o].resolved*s.width-.5*s.width*(d[o].amount+1))}let t=s.width,e=h[a].screen_x;if(null!=h[a].screen_end?(t=h[a].screen_end-h[a].screen_x,e+=.5*t):e+=s.offset,If(e,h[a].screen_y-p,t,r.zeroPosition-h[a].screen_y,r.className+" vis-bar",i.svgElements,i.svg,r.style),!0===r.options.drawPoints.enabled){let t={screen_x:h[a].screen_x,screen_y:h[a].screen_y-p,x:h[a].x,y:h[a].y,groupId:h[a].groupId,label:h[a].label};gT.draw([t],r,i,s.offset)}}},yT._getDataIntersections=function(t,e){for(var i,n=0;n<e.length;n++)n+1<e.length&&(i=Math.abs(e[n+1].screen_x-e[n].screen_x)),n>0&&(i=Math.min(i,Math.abs(e[n-1].screen_x-e[n].screen_x))),0===i&&(void 0===t[e[n].screen_x]&&(t[e[n].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[n].screen_x].amount+=1)},yT._getSafeDrawData=function(t,e,i){var n,o;return t<e.options.barChart.width&&t>0?(n=t<i?i:t,o=0,"left"===e.options.barChart.align?o-=.5*t:"right"===e.options.barChart.align&&(o+=.5*t)):(n=e.options.barChart.width,o=0,"left"===e.options.barChart.align?o-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(o+=.5*e.options.barChart.width)),{width:n,offset:o}},yT.getStackedYRange=function(t,e,i,n,o){if(t.length>0){Cx(t).call(t,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x});var s={};yT._getDataIntersections(s,t),e[n]=yT._getStackedYRange(s,t),e[n].yAxisOrientation=o,i.push(n)}},yT._getStackedYRange=function(t,e){for(var i,n=e[0].screen_y,o=e[0].screen_y,s=0;s<e.length;s++)void 0===t[i=e[s].screen_x]?(n=n>e[s].screen_y?e[s].screen_y:n,o=o<e[s].screen_y?e[s].screen_y:o):e[s].screen_y<0?t[i].accumulatedNegative+=e[s].screen_y:t[i].accumulatedPositive+=e[s].screen_y;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n=(n=n>t[r].accumulatedNegative?t[r].accumulatedNegative:n)>t[r].accumulatedPositive?t[r].accumulatedPositive:n,o=(o=o<t[r].accumulatedNegative?t[r].accumulatedNegative:o)<t[r].accumulatedPositive?t[r].accumulatedPositive:o);return{min:n,max:o}},bT.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?bT._catmullRom(t,e):bT._linear(t)}},bT.drawIcon=function(t,e,i,n,o,s){var r,a,l=.5*o,h=Of("rect",s.svgElements,s.svg);(h.setAttributeNS(null,"x",e),h.setAttributeNS(null,"y",i-l),h.setAttributeNS(null,"width",n),h.setAttributeNS(null,"height",2*l),h.setAttributeNS(null,"class","vis-outline"),(r=Of("path",s.svgElements,s.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&r.setAttributeNS(null,"style",t.style),r.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=Of("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-l)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-l)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+l)+" L"+(e+n)+","+(i+l)+"L"+(e+n)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&Pf(e+.5*n,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},s.svgElements,s.svg)},bT.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o,s=Number(n.svg.style.height.replace("px","")),r=Of("path",n.svgElements,n.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var l=0;l="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),o="group"==e.options.shaded.orientation&&null!=i&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+l+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",o)}},bT.draw=function(t,e,i){if(null!=t&&null!=t){var n=Of("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className),void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C"),n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}},bT.serializePath=function(t,e,i){if(t.length<2)return"";var n,o=e;if(i)for(n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(n=1;n<t.length;n++)o+=t[n][0]+","+t[n][1]+" ";return o},bT._catmullRomUniform=function(t){var e,i,n,o,s,r,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var l=1/6,h=t.length,d=0;d<h-1;d++)e=0==d?t[0]:t[d-1],i=t[d],n=t[d+1],o=d+2<h?t[d+2]:n,s={screen_x:(-e.screen_x+6*i.screen_x+n.screen_x)*l,screen_y:(-e.screen_y+6*i.screen_y+n.screen_y)*l},r={screen_x:(i.screen_x+6*n.screen_x-o.screen_x)*l,screen_y:(i.screen_y+6*n.screen_y-o.screen_y)*l},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([n.screen_x,n.screen_y]);return a},bT._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var n,o,s,r,a,l,h,d,c,u,p,m,f,g,v,y,b,_,w,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var D=t.length,k=0;k<D-1;k++)n=0==k?t[0]:t[k-1],o=t[k],s=t[k+1],r=k+2<D?t[k+2]:s,h=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2)),d=Math.sqrt(Math.pow(o.screen_x-s.screen_x,2)+Math.pow(o.screen_y-s.screen_y,2)),c=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),g=Math.pow(c,i),y=Math.pow(c,2*i),v=Math.pow(d,i),b=Math.pow(d,2*i),w=Math.pow(h,i),u=2*(_=Math.pow(h,2*i))+3*w*v+b,p=2*y+3*g*v+b,(m=3*w*(w+v))>0&&(m=1/m),(f=3*g*(g+v))>0&&(f=1/f),a={screen_x:(-b*n.screen_x+u*o.screen_x+_*s.screen_x)*m,screen_y:(-b*n.screen_y+u*o.screen_y+_*s.screen_y)*m},l={screen_x:(y*o.screen_x+p*s.screen_x-b*r.screen_x)*f,screen_y:(y*o.screen_y+p*s.screen_y-b*r.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=o),0==l.screen_x&&0==l.screen_y&&(l=s),x.push([a.screen_x,a.screen_y]),x.push([l.screen_x,l.screen_y]),x.push([s.screen_x,s.screen_y]);return x},bT._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},_T.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==Cx(this.options)&&wk.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},_T.prototype.getItems=function(){return this.itemsData},_T.prototype.setZeroPosition=function(t){this.zeroPosition=t},_T.prototype.setOptions=function(t){if(void 0!==t){wk.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),wk.mergeOptions(this.options,t,"interpolation"),wk.mergeOptions(this.options,t,"drawPoints"),wk.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==typeof t.interpolation&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},_T.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},_T.prototype.getLegend=function(t,e,i,n,o){null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]});switch(null!=n&&null!=n||(n=0),null!=o&&null!=o||(o=.5*e),this.options.style){case"line":bT.drawIcon(this,n,o,t,e,i);break;case"points":case"point":gT.drawIcon(this,n,o,t,e,i);break;case"bar":yT.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},_T.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;n<t.length;n++)e=e>t[n].y?t[n].y:e,i=i<t[n].y?t[n].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},wT.prototype=new Fk,wT.prototype.clear=function(){this.groups={},this.amountOfGroups=0},wT.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1)},wT.prototype.updateGroup=function(t,e){this.groups[t]=e},wT.prototype.removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)},wT.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-legend",this.dom.frame.style.position="absolute",this.dom.frame.style.top="10px",this.dom.frame.style.display="block",this.dom.textArea=document.createElement("div"),this.dom.textArea.className="vis-legend-text",this.dom.textArea.style.position="relative",this.dom.textArea.style.top="0px",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.width=this.options.iconSize+5+"px",this.svg.style.height="100%",this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},wT.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},wT.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},wT.prototype.setOptions=function(t){wk.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},wT.prototype.redraw=function(){var t=0,e=Ma(this.groups);Cx(e).call(e,function(t,e){return t<e?-1:1});for(var i=0;i<e.length;i++){var n=e[i];1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||t++}if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{if(this.show(),"top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position?(this.dom.frame.style.left="4px",this.dom.frame.style.textAlign="left",this.dom.textArea.style.textAlign="left",this.dom.textArea.style.left=this.options.iconSize+15+"px",this.dom.textArea.style.right="",this.svg.style.left="0px",this.svg.style.right=""):(this.dom.frame.style.right="4px",this.dom.frame.style.textAlign="right",this.dom.textArea.style.textAlign="right",this.dom.textArea.style.right=this.options.iconSize+15+"px",this.dom.textArea.style.left="",this.svg.style.right="0px",this.svg.style.left=""),"top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.bottom="";else{var o=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+o+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px",this.drawLegendIcons());var s="";for(i=0;i<e.length;i++)n=e[i],1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||(s+=this.groups[n].content+"<br />");this.dom.textArea.innerHTML=wk.xss(s),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},wT.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Ma(this.groups);Cx(t).call(t,function(t,e){return t<e?-1:1}),Mf(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),n=i,o=this.options.iconSize,s=.75*this.options.iconSize,r=i+.5*s+3;this.svg.style.width=o+5+i+"px";for(var a=0;a<t.length;a++){var l=t[a];1!=this.groups[l].visible||void 0!==this.linegraphOptions.visibility[l]&&1!=this.linegraphOptions.visibility[l]||(this.groups[l].getLegend(o,s,this.framework,n,r),r+=s+this.options.iconSpacing)}}};var xT="__ungrouped__";function DT(t,e){this.id=wD(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=wk.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,n){i._onAdd(e.items)},update:function(t,e,n){i._onUpdate(e.items)},remove:function(t,e,n){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,n){i._onAddGroups(e.items)},update:function(t,e,n){i._onUpdateGroups(e.items)},remove:function(t,e,n){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){i.svg.style.left=wk.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}DT.prototype=new Fk,DT.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new fT(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new fT(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new wT(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new wT(this.body,this.options.legend,"right",this.options.groups),this.show()},DT.prototype.setOptions=function(t){if(t){void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&hc((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),wk.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),wk.mergeOptions(this.options,t,"interpolation"),wk.mergeOptions(this.options,t,"drawPoints"),wk.mergeOptions(this.options,t,"shaded"),wk.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==typeof t.interpolation&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5)),this.yAxisLeft&&void 0!==t.dataAxis&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&void 0!==t.legend&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),Object.prototype.hasOwnProperty.call(this.groups,xT)&&this.groups[xT].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},DT.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},DT.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},DT.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!pk(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=vk(t)}else this.itemsData=null;if(n&&(kl(wk).call(wk,this.itemListeners,function(t,e){n.off(e,t)}),n.dispose(),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;kl(wk).call(wk,this.itemListeners,function(t,e){i.itemsData.on(e,t,o)}),e=this.itemsData.getIds(),this._onAdd(e)}},DT.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){kl(wk).call(wk,this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null;for(var n=0;n<e.length;n++)this._removeGroup(e[n])}if(t){if(!pk(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;kl(wk).call(wk,this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}},DT.prototype._onUpdate=function(t){this._updateAllGroupData(t)},DT.prototype._onAdd=function(t){this._onUpdate(t)},DT.prototype._onRemove=function(t){this._onUpdate(t)},DT.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},DT.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},DT.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this._removeGroup(t[e]);this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})},DT.prototype._removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&("right"==this.groups[t].options.yAxisOrientation?(this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t),this.legendLeft.redraw()),delete this.groups[t])},DT.prototype._updateGroup=function(t,e){Object.prototype.hasOwnProperty.call(this.groups,e)?(this.groups[e].update(t),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.updateGroup(e,this.groups[e]),this.legendRight.updateGroup(e,this.groups[e]),this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e)):(this.yAxisLeft.updateGroup(e,this.groups[e]),this.legendLeft.updateGroup(e,this.groups[e]),this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e))):(this.groups[e]=new _T(t,e,this.options,this.groupsUsingDefaultStyles),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.addGroup(e,this.groups[e]),this.legendRight.addGroup(e,this.groups[e])):(this.yAxisLeft.addGroup(e,this.groups[e]),this.legendLeft.addGroup(e,this.groups[e]))),this.legendLeft.redraw(),this.legendRight.redraw()},DT.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},n=this.itemsData.get(),o=this.itemsData.idProp,s={};t&&va(t).call(t,function(t){s[t]=t});for(var r={},a=0;a<n.length;a++){var l=n[a],h=l.group;null==h&&(h=xT),Object.prototype.hasOwnProperty.call(r,h)?r[h]++:r[h]=1}var d={};if(!e&&t)for(h in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,h)){var c=(f=this.groups[h]).getItems();i[h]=Od(c).call(c,function(t){return d[t[o]]=t[o],t[o]!==s[t[o]]});var u=r[h];r[h]-=i[h].length,i[h].length<u&&(i[h][u-1]={})}for(a=0;a<n.length;a++)if(null==(h=(l=n[a]).group)&&(h=xT),e||!t||l[o]===s[l[o]]||!Object.prototype.hasOwnProperty.call(d,l[o])){Object.prototype.hasOwnProperty.call(i,h)||(i[h]=new Array(r[h]));var p=wk.bridgeObject(l);p.x=wk.convert(l.x,"Date"),p.end=wk.convert(l.end,"Date"),p.orginalY=l.y,p.y=Number(l.y),p[o]=l[o];var m=i[h].length-r[h]--;i[h][m]=p}for(h in this.groups)Object.prototype.hasOwnProperty.call(this.groups,h)&&!Object.prototype.hasOwnProperty.call(i,h)&&(i[h]=new Array(0));for(h in i)if(Object.prototype.hasOwnProperty.call(i,h))if(0==i[h].length)Object.prototype.hasOwnProperty.call(this.groups,h)&&this._removeGroup(h);else{var f=void 0;null!=this.groupsData&&(f=this.groupsData.get(h)),null==f&&(f={id:h,content:this.options.defaultGroup+h}),this._updateGroup(f,h),this.groups[h].setItems(i[h])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},DT.prototype.redraw=function(){var t=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,t=this._isResized()||t;var e,i=this.body.range.end-this.body.range.start,n=i!=this.lastVisibleInterval;(this.lastVisibleInterval=i,1==t)&&(this.svg.style.width=wk.option.asSize(3*this.props.width),this.svg.style.left=wk.option.asSize(-this.props.width),-1==wc(e=this.options.height+"").call(e,"%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0));if(1==this.updateSVGheight?(this.options.graphHeight!=this.props.height+"px"&&(this.options.graphHeight=this.props.height+"px",this.svg.style.height=this.props.height+"px"),this.updateSVGheight=!1):this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",1==t||1==n||1==this.abortedGraphUpdate||1==this.forceGraphUpdate)t=this._updateGraph()||t,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+"px";else if(0!=this.lastStart){var o=this.body.range.start-this.lastStart,s=this.body.range.end-this.body.range.start;if(0!=this.props.width){var r=o*(this.props.width/s);this.svg.style.left=-this.props.width-r+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},DT.prototype._getSortedGroupIds=function(){var t=[];for(var e in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,e)){var i=this.groups[e];1!=i.visible||void 0!==this.options.groups.visibility[e]&&1!=this.options.groups.visibility[e]||t.push({id:e,zIndex:i.options.zIndex})}wk.insertSort(t,function(t,e){var i=t.zIndex,n=e.zIndex;return void 0===i&&(i=0),void 0===n&&(n=0),i==n?0:i<n?-1:1});for(var n=new Array(t.length),o=0;o<t.length;o++)n[o]=t[o].id;return n},DT.prototype._updateGraph=function(){if(Cf(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},n=this.body.util.toGlobalTime(-this.body.domProps.root.width),o=this.body.util.toGlobalTime(2*this.body.domProps.root.width),s=this._getSortedGroupIds();if(s.length>0){var r={};for(this._getRelevantData(s,r,n,o),this._applySampling(s,r),e=0;e<s.length;e++)this._convertXcoordinates(r[s[e]]);if(this._getYRanges(s,r,i),1==this._updateYAxis(s,i))return Tf(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<s.length;e++)t=this.groups[s[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(r[t.id],r[a.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==a.options.shaded.orientation?(a.options.shaded.orientation="group",a.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=a.id))),a=t)),this._convertYcoordinates(r[s[e]],t);var l={};for(e=0;e<s.length;e++)if("line"===(t=this.groups[s[e]]).options.style&&1==t.options.shaded.enabled){var h=r[s[e]];if(null==h||0==h.length)continue;if(Object.prototype.hasOwnProperty.call(l,s[e])||(l[s[e]]=bT.calcPath(h,t)),"group"===t.options.shaded.orientation){var d=t.options.shaded.groupId;if(-1===wc(s).call(s,d)){console.log(t.id+": Unknown shading group target given:"+d);continue}Object.prototype.hasOwnProperty.call(l,d)||(l[d]=bT.calcPath(r[d],this.groups[d])),bT.drawShading(l[s[e]],t,l[d],this.framework)}else bT.drawShading(l[s[e]],t,void 0,this.framework)}for(yT.draw(s,r,this.framework),e=0;e<s.length;e++)if(t=this.groups[s[e]],r[s[e]].length>0)switch(t.options.style){case"line":Object.prototype.hasOwnProperty.call(l,s[e])||(l[s[e]]=bT.calcPath(r[s[e]],t)),bT.draw(l[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||gT.draw(r[s[e]],t,this.framework)}}}return Tf(this.svgElements),!1},DT.prototype._stack=function(t,e){var i,n,o,s,r;i=0;for(var a=0;a<t.length;a++){s=void 0,r=void 0;for(var l=i;l<e.length;l++){if(e[l].x===t[a].x){s=e[l],r=e[l],i=l;break}if(e[l].x>t[a].x){r=e[l],s=0==l?r:e[l-1],i=l;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),n=r.x-s.x,o=r.y-s.y,t[a].y=0==n?t[a].orginalY+r.y:t[a].orginalY+o/n*(t[a].x-s.x)+s.y}},DT.prototype._getRelevantData=function(t,e,i,n){var o,s,r,a;if(t.length>0)for(s=0;s<t.length;s++){var l=(o=this.groups[t[s]]).getItems();if(1==Cx(o.options)){var h=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},d=Math.max(0,wk.binarySearchValue(l,i,"x","before",h)),c=Math.min(l.length,wk.binarySearchValue(l,n,"x","after",h)+1);c<=0&&(c=l.length);var u=new Array(c-d);for(r=d;r<c;r++)a=o.itemsData[r],u[r-d]=a;e[t[s]]=u}else e[t[s]]=o.itemsData}},DT.prototype._applySampling=function(t,e){if(t.length>0)for(var i=0;i<t.length;i++)if(1==this.groups[t[i]].options.sampling){var n=e[t[i]];if(n.length>0){var o,s=n.length,r=s/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(r)));for(var a=new Array(s),l=0;l<s;l+=o){a[Math.round(l/o)]=n[l]}e[t[i]]=oh(a).call(a,0,Math.round(s/o))}}},DT.prototype._getYRanges=function(t,e,i){var n,o,s,r,a=[],l=[];if(t.length>0){for(s=0;s<t.length;s++)n=e[t[s]],r=this.groups[t[s]].options,n.length>0&&(o=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=fd(a).call(a,n):l=fd(l).call(l,n):i[t[s]]=o.getYRange(n,t[s]));yT.getStackedYRange(a,i,t,"__barStackLeft","left"),yT.getStackedYRange(l,i,t,"__barStackRight","right")}},DT.prototype._updateYAxis=function(t,e){var i,n,o=!1,s=!1,r=!1,a=1e9,l=1e9,h=-1e9,d=-1e9;if(t.length>0){for(var c=0;c<t.length;c++){var u=this.groups[t[c]];u&&"right"!=u.options.yAxisOrientation?(s=!0,a=1e9,h=-1e9):u&&u.options.yAxisOrientation&&(r=!0,l=1e9,d=-1e9)}for(c=0;c<t.length;c++)Object.prototype.hasOwnProperty.call(e,t[c])&&!0!==e[t[c]].ignore&&(i=e[t[c]].min,n=e[t[c]].max,"right"!=e[t[c]].yAxisOrientation?(s=!0,a=a>i?i:a,h=h<n?n:h):(r=!0,l=l>i?i:l,d=d<n?n:d));1==s&&this.yAxisLeft.setRange(a,h),1==r&&this.yAxisRight.setRange(l,d)}o=this._toggleAxisVisiblity(s,this.yAxisLeft)||o,o=this._toggleAxisVisiblity(r,this.yAxisRight)||o,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==r?this.yAxisRight.width:0,o=this.yAxisLeft.redraw()||o,o=this.yAxisRight.redraw()||o):o=this.yAxisRight.redraw()||o;var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(c=0;c<p.length;c++)-1!=wc(t).call(t,p[c])&&oh(t).call(t,wc(t).call(t,p[c]),1);return o},DT.prototype._toggleAxisVisiblity=function(t,e){var i=!1;return 0==t?e.dom.frame.parentNode&&0==e.hidden&&(e.hide(),i=!0):e.dom.frame.parentNode||1!=e.hidden||(e.show(),i=!0),i},DT.prototype._convertXcoordinates=function(t){for(var e=this.body.util.toScreen,i=0;i<t.length;i++)t[i].screen_x=e(t[i].x)+this.props.width,t[i].screen_y=t[i].y,null!=t[i].end?t[i].screen_end=e(t[i].end)+this.props.width:t[i].screen_end=void 0},DT.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,n=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var o=0;o<t.length;o++)t[o].screen_y=Math.round(i.convertValue(t[o].y));e.setZeroPosition(Math.min(n,i.convertValue(0)))};let kT="string",ST="boolean",CT="number",TT="date",MT="object",OT="moment",ET={configure:{enabled:{boolean:ST},filter:{boolean:ST,function:"function"},container:{dom:"dom"},__type__:{object:MT,boolean:ST,function:"function"}},alignCurrentTime:{string:kT,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:kT},sort:{boolean:ST},sampling:{boolean:ST},stack:{boolean:ST},graphHeight:{string:kT,number:CT},shaded:{enabled:{boolean:ST},orientation:{string:["bottom","top","zero","group"]},groupId:{object:MT},__type__:{boolean:ST,object:MT}},style:{string:["line","bar","points"]},barChart:{width:{number:CT},minWidth:{number:CT},sideBySide:{boolean:ST},align:{string:["left","center","right"]},__type__:{object:MT}},interpolation:{enabled:{boolean:ST},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:CT},__type__:{object:MT,boolean:ST}},drawPoints:{enabled:{boolean:ST},onRender:{function:"function"},size:{number:CT},style:{string:["square","circle"]},__type__:{object:MT,boolean:ST,function:"function"}},dataAxis:{showMinorLabels:{boolean:ST},showMajorLabels:{boolean:ST},showWeekScale:{boolean:ST},icons:{boolean:ST},width:{string:kT,number:CT},visible:{boolean:ST},alignZeros:{boolean:ST},left:{range:{min:{number:CT,undefined:"undefined"},max:{number:CT,undefined:"undefined"},__type__:{object:MT}},format:{function:"function"},title:{text:{string:kT,number:CT,undefined:"undefined"},style:{string:kT,undefined:"undefined"},__type__:{object:MT}},__type__:{object:MT}},right:{range:{min:{number:CT,undefined:"undefined"},max:{number:CT,undefined:"undefined"},__type__:{object:MT}},format:{function:"function"},title:{text:{string:kT,number:CT,undefined:"undefined"},style:{string:kT,undefined:"undefined"},__type__:{object:MT}},__type__:{object:MT}},__type__:{object:MT}},legend:{enabled:{boolean:ST},icons:{boolean:ST},left:{visible:{boolean:ST},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:MT}},right:{visible:{boolean:ST},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:MT}},__type__:{object:MT,boolean:ST}},groups:{visibility:{any:"any"},__type__:{object:MT}},autoResize:{boolean:ST},throttleRedraw:{number:CT},clickToUse:{boolean:ST},end:{number:CT,date:TT,string:kT,moment:OT},format:{minorLabels:{millisecond:{string:kT,undefined:"undefined"},second:{string:kT,undefined:"undefined"},minute:{string:kT,undefined:"undefined"},hour:{string:kT,undefined:"undefined"},weekday:{string:kT,undefined:"undefined"},day:{string:kT,undefined:"undefined"},week:{string:kT,undefined:"undefined"},month:{string:kT,undefined:"undefined"},quarter:{string:kT,undefined:"undefined"},year:{string:kT,undefined:"undefined"},__type__:{object:MT}},majorLabels:{millisecond:{string:kT,undefined:"undefined"},second:{string:kT,undefined:"undefined"},minute:{string:kT,undefined:"undefined"},hour:{string:kT,undefined:"undefined"},weekday:{string:kT,undefined:"undefined"},day:{string:kT,undefined:"undefined"},week:{string:kT,undefined:"undefined"},month:{string:kT,undefined:"undefined"},quarter:{string:kT,undefined:"undefined"},year:{string:kT,undefined:"undefined"},__type__:{object:MT}},__type__:{object:MT}},moment:{function:"function"},height:{string:kT,number:CT},hiddenDates:{start:{date:TT,number:CT,string:kT,moment:OT},end:{date:TT,number:CT,string:kT,moment:OT},repeat:{string:kT},__type__:{object:MT,array:"array"}},locale:{string:kT},locales:{__any__:{any:"any"},__type__:{object:MT}},max:{date:TT,number:CT,string:kT,moment:OT},maxHeight:{number:CT,string:kT},maxMinorChars:{number:CT},min:{date:TT,number:CT,string:kT,moment:OT},minHeight:{number:CT,string:kT},moveable:{boolean:ST},multiselect:{boolean:ST},orientation:{string:kT},showCurrentTime:{boolean:ST},showMajorLabels:{boolean:ST},showMinorLabels:{boolean:ST},showWeekScale:{boolean:ST},snap:{function:"function",null:"null"},start:{date:TT,number:CT,string:kT,moment:OT},timeAxis:{scale:{string:kT,undefined:"undefined"},step:{number:CT,undefined:"undefined"},__type__:{object:MT}},width:{string:kT,number:CT},zoomable:{boolean:ST},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:CT},zoomMin:{number:CT},zIndex:{number:CT},__type__:{object:MT}},PT={global:{alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",quarter:"[Q]Q",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",quarter:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function IT(t,e,i,n){var o,s,r,a,l,h,d;if(!sa(i)&&!pk(i)&&i instanceof Object){var c=n;n=i,i=c}n&&n.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var u=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:LD,width:null,height:null,maxHeight:null,minHeight:null},this.options=wk.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:ll(o=this.on).call(o,this),off:ll(s=this.off).call(s,this),emit:ll(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>u.timeAxis.step.scale,getStep:()=>u.timeAxis.step.step,toScreen:ll(a=u._toScreen).call(a,u),toGlobalScreen:ll(l=u._toGlobalScreen).call(l,u),toTime:ll(h=u._toTime).call(h,u),toGlobalTime:ll(d=u._toGlobalTime).call(d,u)}},this.range=new mS(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new DS(this.body),this.components.push(this.timeAxis),this.currentTime=new BS(this.body),this.components.push(this.currentTime),this.linegraph=new DT(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){u.emit("click",u.getEventProperties(t))}),this.on("doubletap",function(t){u.emit("doubleClick",u.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){u.emit("contextmenu",u.getEventProperties(t))},this.initialFitDone=!1,this.on("changed",function(){if(null!=u.itemsData){if(!u.initialFitDone&&!u.options.rollingMode)if(u.initialFitDone=!0,null!=u.options.start||null!=u.options.end){if(null==u.options.start||null==u.options.end)var t=u.getItemRange();var e=null!=u.options.start?u.options.start:t.min,i=null!=u.options.end?u.options.end:t.max;u.setWindow(e,i,{animation:!1})}else u.fit({animation:!1});u.initialDrawDone||!u.initialRangeChangeDone&&(u.options.start||u.options.end)&&!u.options.rollingMode||(u.initialDrawDone=!0,u.dom.root.style.visibility="visible",u.dom.loadingScreen.parentNode.removeChild(u.dom.loadingScreen),u.options.onInitialDrawComplete&&Lu(()=>u.options.onInitialDrawComplete(),0))}}),n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}IT.prototype=new WS,IT.prototype.setOptions=function(t){!0===$C.validate(t,ET)&&console.log("%cErrors have been found in the supplied options object.",KC),WS.prototype.setOptions.call(this,t)},IT.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?pk(t)?vk(t):vk(new ED(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),i)if(null!=this.options.start||null!=this.options.end){var n=null!=this.options.start?this.options.start:null,o=null!=this.options.end?this.options.end:null;this.setWindow(n,o,{animation:!1})}else this.fit({animation:!1})},IT.prototype.setGroups=function(t){var e;e=t?pk(t)?t:new ED(t):null,this.groupsData=e,this.linegraph.setGroups(e)},IT.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},IT.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]&&(this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]))},IT.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(Object.prototype.hasOwnProperty.call(this.linegraph.groups,i)&&!0===this.linegraph.groups[i].visible)for(var n=0;n<this.linegraph.groups[i].itemsData.length;n++){var o=this.linegraph.groups[i].itemsData[n],s=wk.convert(o.x,"Date").valueOf();t=null==t||t>s?s:t,e=null==e||e<s?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},IT.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=e-wk.getAbsoluteLeft(this.dom.centerContainer),o=i-wk.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(n),r=GS.customTimeFromTarget(t),a=wk.getTarget(t),l=null;wk.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&wk.hasParent(a,this.timeAxis2.dom.foreground)?l="axis":wk.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||wk.hasParent(a,this.linegraph.yAxisRight.dom.frame)?l="data-axis":wk.hasParent(a,this.linegraph.legendLeft.dom.frame)||wk.hasParent(a,this.linegraph.legendRight.dom.frame)?l="legend":null!=r?l="custom-time":wk.hasParent(a,this.currentTime.bar)?l="current-time":wk.hasParent(a,this.dom.center)&&(l="background");var h=[],d=this.linegraph.yAxisLeft,c=this.linegraph.yAxisRight;return!d.hidden&&this.itemsData.length>0&&h.push(d.screenToValue(o)),!c.hidden&&this.itemsData.length>0&&h.push(c.screenToValue(o)),{event:t,customTime:r?r.options.id:null,what:l,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:s,value:h}},IT.prototype._createConfigurator=function(){return new hT(this,this.dom.container,PT)},console.warn(["This build has been deprecated.","","In case you are importing this through a URL it will result in a 404 eventually.","In case you are importing this through Node it will be replaced by the peer build eventually.","","Please use the peer or standalone build instead.","Peer: https://visjs.github.io/vis-timeline/examples/timeline/peer-build.html","Standalone: https://visjs.github.io/vis-timeline/examples/timeline/standalone-build.html"].join("\n"));const NT=Nf();LD.locale(NT);const LT={Core:WS,DateUtil:pS,Range:mS,stack:yC,TimeStep:xS,components:{items:{Item:xC,BackgroundItem:CC,BoxItem:DC,ClusterItem:GC,PointItem:kC,RangeItem:SC},BackgroundGroup:wC,Component:Fk,CurrentTime:BS,CustomTime:GS,DataAxis:fT,DataScale:mT,GraphGroup:_T,Group:_C,ItemSet:XC,Legend:wT,LineGraph:DT,TimeAxis:DS}};var AT={util:Sf,DOMutil:Hf,DataSet:ED,DataView:PD,Queue:TD,Timeline:dT,Graph2d:IT,timeline:LT,moment:LD,Hammer:_S,keycharm:SS};t.DOMutil=Hf,t.DataSet=ED,t.DataView=PD,t.Graph2d=IT,t.Hammer=_S,t.Queue=TD,t.Timeline=dT,t.default=AT,t.keycharm=SS,t.moment=LD,t.timeline=LT,t.util=Sf,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=vis-timeline-graph2d.min.js.map