UNPKG

vis-timeline

Version:

Create a fully customizable, interactive timeline with items and ranges.

35 lines • 425 kB
/**
 * vis-timeline and vis-graph2d
 * https://visjs.github.io/vis-timeline/
 *
 * Create a fully customizable, interactive timeline with items and ranges.
 *
 * @version 8.5.6
 * @date    2026-10-26T17:18:22.159Z
 *
 * @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,require("moment"),require("vis-data/peer/umd/vis-data.js")):"function"==typeof define&&define.amd?define(["exports","moment","vis-data/peer/umd/vis-data.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vis=t.vis||{},t.moment,t.vis)}(this,function(t,e,i){function n(t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].redundant=t[e].used,t[e].used=[])}function o(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 r(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 s(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),i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o}function a(t,e,i,n,o,s){var a;if("circle"==i.style?((a=r("circle",n,o)).setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",e),a.setAttributeNS(null,"r",.5*i.size)):((a=r("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),a.setAttributeNS(null,"y",e-.5*i.size),a.setAttributeNS(null,"width",i.size),a.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&a.setAttributeNS(null,"style",i.styles),a.setAttributeNS(null,"class",i.className+" vis-point"),s){var h=r("text",n,o);s.xOffset&&(t+=s.xOffset),s.yOffset&&(e+=s.yOffset),s.content&&(h.textContent=s.content),s.className&&h.setAttributeNS(null,"class",s.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",e)}return a}function h(t,e,i,n,o,s,a,h){if(0!=n){n<0&&(e-=n*=-1);var l=r("rect",s,a);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),h&&l.setAttributeNS(null,"style",h)}}var l,c,d,u,p,m,f,g,v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function y(){return c?l:(c=1,l=function(t){try{return!!t()}catch(t){return!0}})}function w(){return u?d:(u=1,d=!y()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function _(){if(m)return p;m=1;var t=w(),e=Function.prototype,i=e.call,n=t&&e.bind.bind(i,i);return p=t?n:function(t){return function(){return i.apply(t,arguments)}},p}function x(){return g?f:(g=1,f=_()({}.isPrototypeOf))}var C,S,D,k,T,O,E,I,P,A,M={};function N(){if(S)return C;S=1;var t=function(t){return t&&t.Math===Math&&t};return C=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof v&&v)||t("object"==typeof C&&C)||function(){return this}()||Function("return this")()}function F(){if(k)return D;k=1;var t=w(),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 R(){if(O)return T;O=1;var t=_(),e=t({}.toString),i=t("".slice);return T=function(t){return i(e(t),8,-1)},T}function L(){if(I)return E;I=1;var t=R(),e=_();return E=function(i){if("Function"===t(i))return e(i)}}function j(){if(A)return P;A=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 z,B,H,G,W={};function Y(){return B?z:(B=1,z=!y()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function V(){if(G)return H;G=1;var t=w(),e=Function.prototype.call;return H=t?e.bind(e):function(){return e.apply(e,arguments)},H}var U,X,q,K,$,J,Z,Q,tt,et,it,nt,ot,rt,st,at,ht,lt,ct,dt,ut,pt,mt,ft,gt,vt,bt,yt,wt,_t,xt,Ct,St,Dt,kt,Tt={};function Ot(){if(U)return Tt;U=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,i=e&&!t.call({1:2},1);return Tt.f=i?function(t){var i=e(this,t);return!!i&&i.enumerable}:t,Tt}function Et(){return q?X:(q=1,X=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function It(){if($)return K;$=1;var t=_(),e=y(),i=R(),n=Object,o=t("".split);return K=e(function(){return!n("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?o(t,""):n(t)}:n,K}function Pt(){return Z||(Z=1,J=function(t){return null==t}),J}function At(){if(tt)return Q;tt=1;var t=Pt(),e=TypeError;return Q=function(i){if(t(i))throw new e("Can't call method on "+i);return i},Q}function Mt(){if(it)return et;it=1;var t=It(),e=At();return et=function(i){return t(e(i))},et}function Nt(){if(ot)return nt;ot=1;var t=j();return nt=function(e){return"object"==typeof e?null!==e:t(e)},nt}function Ft(){return st?rt:(st=1,rt={})}function Rt(){if(ht)return at;ht=1;var t=Ft(),e=N(),i=j(),n=function(t){return i(t)?t:void 0};return at=function(i,o){return arguments.length<2?n(t[i])||n(e[i]):t[i]&&t[i][o]||e[i]&&e[i][o]},at}function Lt(){if(ct)return lt;ct=1;var t=N().navigator,e=t&&t.userAgent;return lt=e?String(e):""}function jt(){if(ut)return dt;ut=1;var t,e,i=N(),n=Lt(),o=i.process,r=i.Deno,s=o&&o.versions||r&&r.version,a=s&&s.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]),dt=e}function zt(){if(mt)return pt;mt=1;var t=jt(),e=y(),i=N().String;return pt=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}),pt}function Bt(){return gt?ft:(gt=1,ft=zt()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Ht(){if(bt)return vt;bt=1;var t=Rt(),e=j(),i=x(),n=Object;return vt=Bt()?function(t){return"symbol"==typeof t}:function(o){var r=t("Symbol");return e(r)&&i(r.prototype,n(o))},vt}function Gt(){if(wt)return yt;wt=1;var t=String;return yt=function(e){try{return t(e)}catch(t){return"Object"}}}function Wt(){if(xt)return _t;xt=1;var t=j(),e=Gt(),i=TypeError;return _t=function(n){if(t(n))return n;throw new i(e(n)+" is not a function")}}function Yt(){if(St)return Ct;St=1;var t=Wt(),e=Pt();return Ct=function(i,n){var o=i[n];return e(o)?void 0:t(o)}}function Vt(){if(kt)return Dt;kt=1;var t=V(),e=j(),i=Nt(),n=TypeError;return Dt=function(o,r){var s,a;if("string"===r&&e(s=o.toString)&&!i(a=t(s,o)))return a;if(e(s=o.valueOf)&&!i(a=t(s,o)))return a;if("string"!==r&&e(s=o.toString)&&!i(a=t(s,o)))return a;throw new n("Can't convert object to primitive value")}}var Ut,Xt,qt,Kt,$t,Jt,Zt,Qt,te,ee,ie,ne,oe,re,se,ae,he,le,ce,de,ue,pe,me,fe,ge,ve,be,ye,we={exports:{}};function _e(){return Xt?Ut:(Xt=1,Ut=!0)}function xe(){if(Kt)return qt;Kt=1;var t=N(),e=Object.defineProperty;return qt=function(i,n){try{e(t,i,{value:n,configurable:!0,writable:!0})}catch(e){t[i]=n}return n}}function Ce(){if($t)return we.exports;$t=1;var t=_e(),e=N(),i=xe(),n="__core-js_shared__",o=we.exports=e[n]||i(n,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),we.exports}function Se(){if(Zt)return Jt;Zt=1;var t=Ce();return Jt=function(e,i){return t[e]||(t[e]=i||{})}}function De(){if(te)return Qt;te=1;var t=At(),e=Object;return Qt=function(i){return e(t(i))}}function ke(){if(ie)return ee;ie=1;var t=_(),e=De(),i=t({}.hasOwnProperty);return ee=Object.hasOwn||function(t,n){return i(e(t),n)},ee}function Te(){if(oe)return ne;oe=1;var t=_(),e=0,i=Math.random(),n=t(1.1.toString);return ne=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++e+i,36)}}function Oe(){if(se)return re;se=1;var t=N(),e=Se(),i=ke(),n=Te(),o=zt(),r=Bt(),s=t.Symbol,a=e("wks"),h=r?s.for||s:s&&s.withoutSetter||n;return re=function(t){return i(a,t)||(a[t]=o&&i(s,t)?s[t]:h("Symbol."+t)),a[t]}}function Ee(){if(he)return ae;he=1;var t=V(),e=Nt(),i=Ht(),n=Yt(),o=Vt(),r=TypeError,s=Oe()("toPrimitive");return ae=function(a,h){if(!e(a)||i(a))return a;var l,c=n(a,s);if(c){if(void 0===h&&(h="default"),l=t(c,a,h),!e(l)||i(l))return l;throw new r("Can't convert object to primitive value")}return void 0===h&&(h="number"),o(a,h)}}function Ie(){if(ce)return le;ce=1;var t=Ee(),e=Ht();return le=function(i){var n=t(i,"string");return e(n)?n:n+""}}function Pe(){if(ue)return de;ue=1;var t=N(),e=Nt(),i=t.document,n=e(i)&&e(i.createElement);return de=function(t){return n?i.createElement(t):{}},de}function Ae(){if(me)return pe;me=1;var t=Y(),e=y(),i=Pe();return pe=!t&&!e(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})}function Me(){if(fe)return W;fe=1;var t=Y(),e=V(),i=Ot(),n=Et(),o=Mt(),r=Ie(),s=ke(),a=Ae(),h=Object.getOwnPropertyDescriptor;return W.f=t?h:function(t,l){if(t=o(t),l=r(l),a)try{return h(t,l)}catch(t){}if(s(t,l))return n(!e(i.f,t,l),t[l])},W}function Ne(){if(ve)return ge;ve=1;var t=y(),e=j(),i=/#|\.prototype\./,n=function(i,n){var h=r[o(i)];return h===a||h!==s&&(e(n)?t(n):!!n)},o=n.normalize=function(t){return String(t).replace(i,".").toLowerCase()},r=n.data={},s=n.NATIVE="N",a=n.POLYFILL="P";return ge=n}function Fe(){if(ye)return be;ye=1;var t=L(),e=Wt(),i=w(),n=t(t.bind);return be=function(t,o){return e(t),void 0===o?t:i?n(t,o):function(){return t.apply(o,arguments)}},be}var Re,Le,je,ze,Be,He,Ge,We,Ye,Ve,Ue,Xe,qe,Ke,$e,Je,Ze,Qe,ti,ei,ii,ni,oi,ri,si={};function ai(){return Le?Re:(Le=1,Re=Y()&&y()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function hi(){if(ze)return je;ze=1;var t=Nt(),e=String,i=TypeError;return je=function(n){if(t(n))return n;throw new i(e(n)+" is not an object")}}function li(){if(Be)return si;Be=1;var t=Y(),e=Ae(),i=ai(),n=hi(),o=Ie(),r=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,h="enumerable",l="configurable",c="writable";return si.f=t?i?function(t,e,i){if(n(t),e=o(e),n(i),"function"==typeof t&&"prototype"===e&&"value"in i&&c in i&&!i[c]){var r=a(t,e);r&&r[c]&&(t[e]=i.value,i={configurable:l in i?i[l]:r[l],enumerable:h in i?i[h]:r[h],writable:!1})}return s(t,e,i)}:s:function(t,i,a){if(n(t),i=o(i),n(a),e)try{return s(t,i,a)}catch(t){}if("get"in a||"set"in a)throw new r("Accessors not supported");return"value"in a&&(t[i]=a.value),t},si}function ci(){if(Ge)return He;Ge=1;var t=Y(),e=li(),i=Et();return He=t?function(t,n,o){return e.f(t,n,i(1,o))}:function(t,e,i){return t[e]=i,t},He}function di(){if(Ye)return We;Ye=1;var t=N(),e=F(),i=L(),n=j(),o=Me().f,r=Ne(),s=Ft(),a=Fe(),h=ci(),l=ke(),c=function(t){var i=function(n,o,r){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,r)}return e(t,this,arguments)};return i.prototype=t.prototype,i};return We=function(e,d){var u,p,m,f,g,v,b,y,w,_=e.target,x=e.global,C=e.stat,S=e.proto,D=x?t:C?t[_]:t[_]&&t[_].prototype,k=x?s:s[_]||h(s,_,{})[_],T=k.prototype;for(f in d)p=!(u=r(x?f:_+(C?".":"#")+f,e.forced))&&D&&l(D,f),v=k[f],p&&(b=e.dontCallGetSet?(w=o(D,f))&&w.value:D[f]),g=p&&b?b:d[f],(u||S||typeof v!=typeof g)&&(y=e.bind&&p?a(g,t):e.wrap&&p?c(g):S&&n(g)?i(g):g,(e.sham||g&&g.sham||v&&v.sham)&&h(y,"sham",!0),h(k,f,y),S&&(l(s,m=_+"Prototype")||h(s,m,{}),h(s[m],f,g),e.real&&T&&(u||!T[f])&&h(T,f,g)))}}function ui(){return Ue?Ve:(Ue=1,Ve=_()([].slice))}function pi(){if(qe)return Xe;qe=1;var t=_(),e=Wt(),i=Nt(),n=ke(),o=ui(),r=w(),s=Function,a=t([].concat),h=t([].join),l={};return Xe=r?s.bind:function(t){var r=e(this),c=r.prototype,d=o(arguments,1),u=function(){var e=a(d,o(arguments));return this instanceof u?function(t,e,i){if(!n(l,e)){for(var o=[],r=0;r<e;r++)o[r]="a["+r+"]";l[e]=s("C,a","return new C("+h(o,",")+")")}return l[e](t,i)}(r,e.length,e):r.apply(t,e)};return i(c)&&(u.prototype=c),u},Xe}function mi(){if(Je)return $e;Je=1;var t=N(),e=Ft();return $e=function(i,n){var o=e[i+"Prototype"],r=o&&o[n];if(r)return r;var s=t[i],a=s&&s.prototype;return a&&a[n]}}function fi(){return Qe?Ze:(Qe=1,function(){if(Ke)return M;Ke=1;var t=di(),e=pi();t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e})}(),Ze=mi()("Function","bind"))}function gi(){if(ei)return ti;ei=1;var t=x(),e=fi(),i=Function.prototype;return ti=function(n){var o=n.bind;return n===i||t(i,n)&&o===i.bind?e:o},ti}function vi(){return ni?ii:(ni=1,ii=gi())}var bi,yi,wi,_i,xi=b(ri?oi:(ri=1,oi=vi()));function Ci(){if(yi)return bi;yi=1;var t={};return t[Oe()("toStringTag")]="z",bi="[object z]"===String(t)}function Si(){if(_i)return wi;_i=1;var t=Ci(),e=j(),i=R(),n=Oe()("toStringTag"),o=Object,r="Arguments"===i(function(){return arguments}());return wi=t?i:function(t){var s,a,h;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(s=o(t),n))?a:r?i(s):"Object"===(h=i(s))&&e(s.callee)?"Arguments":h},wi}var Di,ki,Ti,Oi,Ei,Ii,Pi,Ai,Mi,Ni,Fi,Ri,Li,ji,zi,Bi,Hi,Gi,Wi,Yi,Vi,Ui,Xi,qi,Ki,$i,Ji,Zi,Qi,tn,en,nn,on,rn,sn,an={};function hn(){if(ki)return Di;ki=1;var t=Math.ceil,e=Math.floor;return Di=Math.trunc||function(i){var n=+i;return(n>0?e:t)(n)}}function ln(){if(Oi)return Ti;Oi=1;var t=hn();return Ti=function(e){var i=+e;return i!=i||0===i?0:t(i)},Ti}function cn(){if(Ii)return Ei;Ii=1;var t=ln(),e=Math.min;return Ei=function(i){var n=t(i);return n>0?e(n,9007199254740991):0}}function dn(){if(Ai)return Pi;Ai=1;var t=cn();return Pi=function(e){return t(e.length)}}function un(){if(Ni)return Mi;Ni=1;var t=R();return Mi=Array.isArray||function(e){return"Array"===t(e)}}function pn(){if(Ri)return Fi;Ri=1;var t=_(),e=j(),i=Ce(),n=t(Function.toString);return e(i.inspectSource)||(i.inspectSource=function(t){return n(t)}),Fi=i.inspectSource}function mn(){if(ji)return Li;ji=1;var t=_(),e=y(),i=j(),n=Si(),o=Rt(),r=pn(),s=function(){},a=o("Reflect","construct"),h=/^\s*(?:class|function)\b/,l=t(h.exec),c=!h.test(s),d=function(t){if(!i(t))return!1;try{return a(s,[],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 c||!!l(h,r(t))}catch(t){return!0}};return u.sham=!0,Li=!a||e(function(){var t;return d(d.call)||!d(Object)||!d(function(){t=!0})||t})?u:d}function fn(){if(Bi)return zi;Bi=1;var t=un(),e=mn(),i=Nt(),n=Oe()("species"),o=Array;return zi=function(r){var s;return t(r)&&(s=r.constructor,(e(s)&&(s===o||t(s.prototype))||i(s)&&null===(s=s[n]))&&(s=void 0)),void 0===s?o:s}}function gn(){if(Gi)return Hi;Gi=1;var t=fn();return Hi=function(e,i){return new(t(e))(0===i?0:i)}}function vn(){if(Yi)return Wi;Yi=1;var t=Y(),e=li(),i=Et();return Wi=function(n,o,r){t?e.f(n,o,i(0,r)):n[o]=r},Wi}function bn(){if(Ui)return Vi;Ui=1;var t=Fe(),e=It(),i=De(),n=dn(),o=gn(),r=vn(),s=function(s){var a=1===s,h=2===s,l=3===s,c=4===s,d=6===s,u=7===s,p=5===s||d;return function(m,f,g){for(var v,b,y=i(m),w=e(y),_=n(w),x=t(f,g),C=0,S=0,D=a?o(m,_):h||u?o(m,0):void 0;_>C;C++)if((p||C in w)&&(b=x(v=w[C],C,y),s))if(a)r(D,C,b);else if(b)switch(s){case 3:return!0;case 5:return v;case 6:return C;case 2:r(D,S++,v)}else switch(s){case 4:return!1;case 7:r(D,S++,v)}return d?-1:l||c?c:D}};return Vi={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}function yn(){if(qi)return Xi;qi=1;var t=y();return Xi=function(e,i){var n=[][e];return!!n&&t(function(){n.call(null,i||function(){return 1},1)})}}function wn(){if($i)return Ki;$i=1;var t=bn().forEach,e=yn()("forEach");return Ki=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},Ki}function _n(){return Qi?Zi:(Qi=1,function(){if(Ji)return an;Ji=1;var t=di(),e=wn();t({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e})}(),Zi=mi()("Array","forEach"))}function xn(){return en?tn:(en=1,tn=_n())}function Cn(){if(on)return nn;on=1;var t=Si(),e=ke(),i=x(),n=xn(),o=Array.prototype,r={DOMTokenList:!0,NodeList:!0};return nn=function(s){var a=s.forEach;return s===o||i(o,s)&&a===o.forEach||e(r,t(s))?n:a},nn}var Sn,Dn,kn,Tn,On,En,In,Pn=b(sn?rn:(sn=1,rn=Cn())),An={};function Mn(){return kn?Dn:(kn=1,function(){if(Sn)return An;Sn=1;var t=di(),e=Date,i=_()(e.prototype.getTime);t({target:"Date",stat:!0},{now:function(){return i(new e)}})}(),Dn=Ft().Date.now)}function Nn(){return On?Tn:(On=1,Tn=Mn())}var Fn,Rn,Ln,jn,zn,Bn,Hn,Gn,Wn,Yn,Vn,Un=b(In?En:(In=1,En=Nn())),Xn={};function qn(){if(Rn)return Fn;Rn=1;var t=y(),e=Oe(),i=jt(),n=e("species");return Fn=function(e){return i>=51||!t(function(){var t=[];return(t.constructor={})[n]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Fn}function Kn(){return zn?jn:(zn=1,function(){if(Ln)return Xn;Ln=1;var t=di(),e=bn().filter;t({target:"Array",proto:!0,forced:!qn()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),jn=mi()("Array","filter"))}function $n(){if(Hn)return Bn;Hn=1;var t=x(),e=Kn(),i=Array.prototype;return Bn=function(n){var o=n.filter;return n===i||t(i,n)&&o===i.filter?e:o},Bn}function Jn(){return Wn?Gn:(Wn=1,Gn=$n())}var Zn,Qn,to,eo,io,no,oo,ro,so,ao,ho,lo,co,uo,po=b(Vn?Yn:(Vn=1,Yn=Jn()));function mo(){return Qn?Zn:(Qn=1,Zn=function(){})}function fo(){return eo?to:(eo=1,to={})}function go(){if(no)return io;no=1;var t=N(),e=j(),i=t.WeakMap;return io=e(i)&&/native code/.test(String(i))}function vo(){if(ro)return oo;ro=1;var t=Se(),e=Te(),i=t("keys");return oo=function(t){return i[t]||(i[t]=e(t))}}function bo(){return ao?so:(ao=1,so={})}function yo(){if(lo)return ho;lo=1;var t,e,i,n=go(),o=N(),r=Nt(),s=ci(),a=ke(),h=Ce(),l=vo(),c=bo(),d="Object already initialized",u=o.TypeError,p=o.WeakMap;if(n||h.state){var m=h.state||(h.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(d);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=l("state");c[f]=!0,t=function(t,e){if(a(t,f))throw new u(d);return e.facade=t,s(t,f,e),e},e=function(t){return a(t,f)?t[f]:{}},i=function(t){return a(t,f)}}return ho={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(!r(i)||(n=e(i)).type!==t)throw new u("Incompatible receiver, "+t+" required");return n}}},ho}function wo(){if(uo)return co;uo=1;var t=Y(),e=ke(),i=Function.prototype,n=t&&Object.getOwnPropertyDescriptor,o=e(i,"name"),r=o&&"something"===function(){}.name,s=o&&(!t||t&&n(i,"name").configurable);return co={EXISTS:o,PROPER:r,CONFIGURABLE:s}}var _o,xo,Co,So,Do,ko,To,Oo,Eo,Io,Po,Ao,Mo,No,Fo,Ro,Lo,jo,zo,Bo,Ho,Go,Wo,Yo,Vo,Uo,Xo,qo,Ko,$o,Jo,Zo,Qo,tr,er,ir,nr,or,rr,sr,ar,hr,lr,cr={};function dr(){if(xo)return _o;xo=1;var t=ln(),e=Math.max,i=Math.min;return _o=function(n,o){var r=t(n);return r<0?e(r+o,0):i(r,o)}}function ur(){if(So)return Co;So=1;var t=Mt(),e=dr(),i=dn(),n=function(n){return function(o,r,s){var a=t(o),h=i(a);if(0===h)return!n&&-1;var l,c=e(s,h);if(n&&r!=r){for(;h>c;)if((l=a[c++])!=l)return!0}else for(;h>c;c++)if((n||c in a)&&a[c]===r)return n||c||0;return!n&&-1}};return Co={includes:n(!0),indexOf:n(!1)}}function pr(){if(ko)return Do;ko=1;var t=_(),e=ke(),i=Mt(),n=ur().indexOf,o=bo(),r=t([].push);return Do=function(t,s){var a,h=i(t),l=0,c=[];for(a in h)!e(o,a)&&e(h,a)&&r(c,a);for(;s.length>l;)e(h,a=s[l++])&&(~n(c,a)||r(c,a));return c},Do}function mr(){return Oo?To:(Oo=1,To=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function fr(){if(Io)return Eo;Io=1;var t=pr(),e=mr();return Eo=Object.keys||function(i){return t(i,e)}}function gr(){if(Po)return cr;Po=1;var t=Y(),e=ai(),i=li(),n=hi(),o=Mt(),r=fr();return cr.f=t&&!e?Object.defineProperties:function(t,e){n(t);for(var s,a=o(e),h=r(e),l=h.length,c=0;l>c;)i.f(t,s=h[c++],a[s]);return t},cr}function vr(){return Mo?Ao:(Mo=1,Ao=Rt()("document","documentElement"))}function br(){if(Fo)return No;Fo=1;var t,e=hi(),i=gr(),n=mr(),o=bo(),r=vr(),s=Pe(),a="prototype",h="script",l=vo()("IE_PROTO"),c=function(){},d=function(t){return"<"+h+">"+t+"</"+h+">"},u=function(t){t.write(d("")),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=s("iframe"),o="java"+h+":",i.style.display="none",r.appendChild(i),i.src=String(o),(e=i.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):u(t);for(var l=n.length;l--;)delete p[a][n[l]];return p()};return o[l]=!0,No=Object.create||function(t,n){var o;return null!==t?(c[a]=e(t),o=new c,c[a]=null,o[l]=t):o=p(),void 0===n?o:i.f(o,n)}}function yr(){return Lo?Ro:(Lo=1,Ro=!y()(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}function wr(){if(zo)return jo;zo=1;var t=ke(),e=j(),i=De(),n=vo(),o=yr(),r=n("IE_PROTO"),s=Object,a=s.prototype;return jo=o?s.getPrototypeOf:function(n){var o=i(n);if(t(o,r))return o[r];var h=o.constructor;return e(h)&&o instanceof h?h.prototype:o instanceof s?a:null},jo}function _r(){if(Ho)return Bo;Ho=1;var t=ci();return Bo=function(e,i,n,o){return o&&o.enumerable?e[i]=n:t(e,i,n),e}}function xr(){if(Wo)return Go;Wo=1;var t,e,i,n=y(),o=j(),r=Nt(),s=br(),a=wr(),h=_r(),l=Oe(),c=_e(),d=l("iterator"),u=!1;return[].keys&&("next"in(i=[].keys())?(e=a(a(i)))!==Object.prototype&&(t=e):u=!0),!r(t)||n(function(){var e={};return t[d].call(e)!==e})?t={}:c&&(t=s(t)),o(t[d])||h(t,d,function(){return this}),Go={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:u}}function Cr(){if(Vo)return Yo;Vo=1;var t=Ci(),e=Si();return Yo=t?{}.toString:function(){return"[object "+e(this)+"]"}}function Sr(){if(Xo)return Uo;Xo=1;var t=Ci(),e=li().f,i=ci(),n=ke(),o=Cr(),r=Oe()("toStringTag");return Uo=function(s,a,h,l){var c=h?s:s&&s.prototype;c&&(n(c,r)||e(c,r,{configurable:!0,value:a}),l&&!t&&i(c,"toString",o))},Uo}function Dr(){if(Ko)return qo;Ko=1;var t=xr().IteratorPrototype,e=br(),i=Et(),n=Sr(),o=fo(),r=function(){return this};return qo=function(s,a,h,l){var c=a+" Iterator";return s.prototype=e(t,{next:i(+!l,h)}),n(s,c,!1,!0),o[c]=r,s}}function kr(){if(Jo)return $o;Jo=1;var t=_(),e=Wt();return $o=function(i,n,o){try{return t(e(Object.getOwnPropertyDescriptor(i,n)[o]))}catch(t){}},$o}function Tr(){if(Qo)return Zo;Qo=1;var t=Nt();return Zo=function(e){return t(e)||null===e}}function Or(){if(er)return tr;er=1;var t=Tr(),e=String,i=TypeError;return tr=function(n){if(t(n))return n;throw new i("Can't set "+e(n)+" as a prototype")}}function Er(){if(nr)return ir;nr=1;var t=kr(),e=Nt(),i=At(),n=Or();return ir=Object.setPrototypeOf||("__proto__"in{}?function(){var o,r=!1,s={};try{(o=t(Object.prototype,"__proto__","set"))(s,[]),r=s instanceof Array}catch(t){}return function(t,s){return i(t),n(s),e(t)?(r?o(t,s):t.__proto__=s,t):t}}():void 0)}function Ir(){if(rr)return or;rr=1;var t=di(),e=V(),i=_e(),n=wo(),o=j(),r=Dr(),s=wr(),a=Er(),h=Sr(),l=ci(),c=_r(),d=Oe(),u=fo(),p=xr(),m=n.PROPER,f=n.CONFIGURABLE,g=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,b=d("iterator"),y="keys",w="values",_="entries",x=function(){return this};return or=function(n,d,p,C,S,D,k){r(p,d,C);var T,O,E,I=function(t){if(t===S&&F)return F;if(!v&&t&&t in M)return M[t];switch(t){case y:case w:case _:return function(){return new p(this,t)}}return function(){return new p(this)}},P=d+" Iterator",A=!1,M=n.prototype,N=M[b]||M["@@iterator"]||S&&M[S],F=!v&&N||I(S),R="Array"===d&&M.entries||N;if(R&&(T=s(R.call(new n)))!==Object.prototype&&T.next&&(i||s(T)===g||(a?a(T,g):o(T[b])||c(T,b,x)),h(T,P,!0,!0),i&&(u[P]=x)),m&&S===w&&N&&N.name!==w&&(!i&&f?l(M,"name",w):(A=!0,F=function(){return e(N,this)})),S)if(O={values:I(w),keys:D?F:I(y),entries:I(_)},k)for(E in O)(v||A||!(E in M))&&c(M,E,O[E]);else t({target:d,proto:!0,forced:v||A},O);return i&&!k||M[b]===F||c(M,b,F,{name:S}),u[d]=F,O}}function Pr(){return ar?sr:(ar=1,sr=function(t,e){return{value:t,done:e}})}function Ar(){if(lr)return hr;lr=1;var t=Mt(),e=mo(),i=fo(),n=yo(),o=li().f,r=Ir(),s=Pr(),a=_e(),h=Y(),l="Array Iterator",c=n.set,d=n.getterFor(l);hr=r(Array,"Array",function(e,i){c(this,{type:l,target:t(e),index:0,kind:i})},function(){var t=d(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=null,s(void 0,!0);switch(t.kind){case"keys":return s(i,!1);case"values":return s(e[i],!1)}return s([i,e[i]],!1)},"values");var u=i.Arguments=i.Array;if(e("keys"),e("values"),e("entries"),!a&&h&&"values"!==u.name)try{o(u,"name",{value:"values"})}catch(t){}return hr}var Mr,Nr={},Fr={exports:{}},Rr={};function Lr(){if(Mr)return Rr;Mr=1;var t=pr(),e=mr().concat("length","prototype");return Rr.f=Object.getOwnPropertyNames||function(i){return t(i,e)},Rr}var jr,zr,Br,Hr,Gr,Wr,Yr,Vr,Ur,Xr,qr,Kr,$r,Jr,Zr,Qr,ts,es,is,ns,os,rs,ss,as,hs,ls,cs,ds,us,ps,ms,fs,gs={};function vs(){if(jr)return gs;jr=1;var t=R(),e=Mt(),i=Lr().f,n=ui(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return gs.f=function(r){return o&&"Window"===t(r)?function(t){try{return i(t)}catch(t){return n(o)}}(r):i(e(r))},gs}function bs(){return Br?zr:(Br=1,zr=y()(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}function ys(){if(Gr)return Hr;Gr=1;var t=y(),e=Nt(),i=R(),n=bs(),o=Object.isExtensible,r=t(function(){});return Hr=r||n?function(t){return!!e(t)&&((!n||"ArrayBuffer"!==i(t))&&(!o||o(t)))}:o,Hr}function ws(){return Yr?Wr:(Yr=1,Wr=!y()(function(){return Object.isExtensible(Object.preventExtensions({}))}))}function _s(){if(Vr)return Fr.exports;Vr=1;var t=di(),e=_(),i=bo(),n=Nt(),o=ke(),r=li().f,s=Lr(),a=vs(),h=ys(),l=Te(),c=ws(),d=!1,u=l("meta"),p=0,m=function(t){r(t,u,{value:{objectID:"O"+p++,weakData:{}}})},f=Fr.exports={enable:function(){f.enable=function(){},d=!0;var i=s.f,n=e([].splice),o={};o[u]=1,i(o).length&&(s.f=function(t){for(var e=i(t),o=0,r=e.length;o<r;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(!h(t))return"F";if(!e)return"E";m(t)}return t[u].objectID},getWeakData:function(t,e){if(!o(t,u)){if(!h(t))return!0;if(!e)return!1;m(t)}return t[u].weakData},onFreeze:function(t){return c&&d&&h(t)&&!o(t,u)&&m(t),t}};return i[u]=!0,Fr.exports}function xs(){if(Xr)return Ur;Xr=1;var t=Oe(),e=fo(),i=t("iterator"),n=Array.prototype;return Ur=function(t){return void 0!==t&&(e.Array===t||n[i]===t)},Ur}function Cs(){if(Kr)return qr;Kr=1;var t=Si(),e=Yt(),i=Pt(),n=fo(),o=Oe()("iterator");return qr=function(r){if(!i(r))return e(r,o)||e(r,"@@iterator")||n[t(r)]},qr}function Ss(){if(Jr)return $r;Jr=1;var t=V(),e=Wt(),i=hi(),n=Gt(),o=Cs(),r=TypeError;return $r=function(s,a){var h=arguments.length<2?o(s):a;if(e(h))return i(t(h,s));throw new r(n(s)+" is not iterable")},$r}function Ds(){if(Qr)return Zr;Qr=1;var t=V(),e=hi(),i=Yt();return Zr=function(n,o,r){var s,a;e(n);try{if(!(s=i(n,"return"))){if("throw"===o)throw r;return r}s=t(s,n)}catch(t){a=!0,s=t}if("throw"===o)throw r;if(a)throw s;return e(s),r},Zr}function ks(){if(es)return ts;es=1;var t=Fe(),e=V(),i=hi(),n=Gt(),o=xs(),r=dn(),s=x(),a=Ss(),h=Cs(),l=Ds(),c=TypeError,d=function(t,e){this.stopped=t,this.result=e},u=d.prototype;return ts=function(p,m,f){var g,v,b,y,w,_,x,C=f&&f.that,S=!(!f||!f.AS_ENTRIES),D=!(!f||!f.IS_RECORD),k=!(!f||!f.IS_ITERATOR),T=!(!f||!f.INTERRUPTED),O=t(m,C),E=function(t){var e=g;return g=void 0,e&&l(e,"normal"),new d(!0,t)},I=function(t){return S?(i(t),T?O(t[0],t[1],E):O(t[0],t[1])):T?O(t,E):O(t)};if(D)g=p.iterator;else if(k)g=p;else{if(!(v=h(p)))throw new c(n(p)+" is not iterable");if(o(v)){for(b=0,y=r(p);y>b;b++)if((w=I(p[b]))&&s(u,w))return w;return new d(!1)}g=a(p,v)}for(_=D?p.next:g.next;!(x=e(_,g)).done;){var P=x.value;try{w=I(P)}catch(t){if(!g)throw t;l(g,"throw",t)}if("object"==typeof w&&w&&s(u,w))return w}return new d(!1)},ts}function Ts(){if(ns)return is;ns=1;var t=x(),e=TypeError;return is=function(i,n){if(t(n,i))return i;throw new e("Incorrect invocation")},is}function Os(){if(rs)return os;rs=1;var t=di(),e=N(),i=_s(),n=V(),o=y(),r=ci(),s=ks(),a=Ts(),h=j(),l=Nt(),c=Pt(),d=Sr(),u=li().f,p=bn().forEach,m=Y(),f=yo(),g=f.set,v=f.getterFor;return os=function(f,b,y){var w,_=-1!==f.indexOf("Map"),x=-1!==f.indexOf("Weak"),C=_?"set":"add",S=e[f],D=S&&S.prototype,k={};if(m&&h(S)&&(x||D.forEach&&!o(function(){(new S).entries().next()}))){var T=(w=b(function(t,e){g(a(t,T),{type:f,collection:new S}),c(e)||s(e,t[C],{that:t,AS_ENTRIES:_})})).prototype,O=v(f);p(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(t){var e="add"===t||"set"===t;!(t in D)||x&&"clear"===t||r(T,t,function(i,o){var r=this,s=O(r).collection;if(!e&&x&&!l(i))return"get"===t&&void 0;var a=s[t]("forEach"===t?function(t,e){n(i,o,t,e,r)}:0===i?0:i,o);return e?r:a})}),x||u(T,"size",{configurable:!0,get:function(){return O(this).collection.size}})}else w=y.getConstructor(b,f,_,C),i.enable();return d(w,f,!1,!0),k[f]=w,t({global:!0,forced:!0},k),x||y.setStrong(w,f,_),w}}function Es(){if(as)return ss;as=1;var t=li();return ss=function(e,i,n){return t.f(e,i,n)}}function Is(){if(ls)return hs;ls=1;var t=_r();return hs=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 Ps(){if(ds)return cs;ds=1;var t=Rt(),e=Es(),i=Oe(),n=Y(),o=i("species");return cs=function(i){var r=t(i);n&&r&&!r[o]&&e(r,o,{configurable:!0,get:function(){return this}})}}function As(){if(ps)return us;ps=1;var t=br(),e=Es(),i=Is(),n=Fe(),o=Ts(),r=Pt(),s=ks(),a=Ir(),h=Pr(),l=Ps(),c=Y(),d=_s().fastKey,u=yo(),p=u.set,m=u.getterFor;return us={getConstructor:function(a,h,l,u){var f=a(function(e,i){o(e,g),p(e,{type:h,index:t(null),first:null,last:null,size:0}),c||(e.size=0),r(i)||s(i,e[u],{that:e,AS_ENTRIES:l})}),g=f.prototype,v=m(h),b=function(t,e,i){var n,o,r=v(t),s=y(t,e);return s?s.value=i:(r.last=s={index:o=d(e,!0),key:e,value:i,previous:n=r.last,next:null,removed:!1},r.first||(r.first=s),n&&(n.next=s),c?r.size++:t.size++,"F"!==o&&(r.index[o]=s)),t},y=function(t,e){var i,n=v(t),o=d(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),c?e.size=0:this.size=0},delete:function(t){var e=this,i=v(e),n=y(e,t);if(n){var o=n.next,r=n.previous;delete i.index[n.index],n.removed=!0,r&&(r.next=o),o&&(o.previous=r),i.first===n&&(i.first=o),i.last===n&&(i.last=r),c?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!!y(this,t)}}),i(g,l?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(this,t=0===t?0:t,t)}}),c&&e(g,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(t,e,i){var n=e+" Iterator",o=m(e),r=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=r(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)?h("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=null,h(void 0,!0))},i?"entries":"values",!i,!0),l(e)}},us}function Ms(){return fs||(fs=1,ms||(ms=1,Os()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},As()))),Nr}var Ns,Fs,Rs,Ls,js,zs,Bs,Hs,Gs,Ws,Ys,Vs,Us,Xs,qs,Ks,$s,Js,Zs,Qs,ta,ea,ia,na={};function oa(){if(Fs)return Ns;Fs=1;var t=Gt(),e=TypeError;return Ns=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")},Ns}function ra(){return Ls||(Ls=1,Rs=function(t,e){return 1===e?function(e,i){return e[t](i)}:function(e,i,n){return e[t](i,n)}}),Rs}function sa(){if(zs)return js;zs=1;var t=Rt(),e=ra(),i=t("Set"),n=i.prototype;return js={Set:i,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:n}}function aa(){if(Hs)return Bs;Hs=1;var t=V();return Bs=function(e,i,n){for(var o,r,s=n?e:e.iterator,a=e.next;!(o=t(a,s)).done;)if(void 0!==(r=i(o.value)))return r},Bs}function ha(){if(Ws)return Gs;Ws=1;var t=aa();return Gs=function(e,i,n){return n?t(e.keys(),i,!0):e.forEach(i)},Gs}function la(){if(Vs)return Ys;Vs=1;var t=sa(),e=ha(),i=t.Set,n=t.add;return Ys=function(t){var o=new i;return e(t,function(t){n(o,t)}),o},Ys}function ca(){return Xs||(Xs=1,Us=function(t){return t.size}),Us}function da(){return Ks?qs:(Ks=1,qs=function(t){return{iterator:t,next:t.next,done:!1}})}function ua(){if(Js)return $s;Js=1;var t=Wt(),e=hi(),i=V(),n=ln(),o=da(),r="Invalid size",s=RangeError,a=TypeError,h=Math.max,l=function(e,i){this.set=e,this.size=h(i,0),this.has=t(e.has),this.keys=t(e.keys)};return l.prototype={getIterator:function(){return o(e(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},$s=function(t){e(t);var i=+t.size;if(i!=i)throw new a(r);var o=n(i);if(o<0)throw new s(r);return new l(t,o)}}function pa(){if(Qs)return Zs;Qs=1;var t=oa(),e=sa(),i=la(),n=ca(),o=ua(),r=ha(),s=aa(),a=e.has,h=e.remove;return Zs=function(e){var l=t(this),c=o(e),d=i(l);return n(d)<=c.size?r(d,function(t){c.includes(t)&&h(d,t)}):s(c.getIterator(),function(t){a(d,t)&&h(d,t)}),d}}function ma(){return ea?ta:(ea=1,ta=function(){return!1})}var fa,ga,va,ba={};function ya(){if(ga)return fa;ga=1;var t=oa(),e=sa(),i=ca(),n=ua(),o=ha(),r=aa(),s=e.Set,a=e.add,h=e.has;return fa=function(e){var l=t(this),c=n(e),d=new s;return i(l)>c.size?r(c.getIterator(),function(t){h(l,t)&&a(d,t)}):o(l,function(t){c.includes(t)&&a(d,t)}),d}}var wa,_a,xa,Ca={};function Sa(){if(_a)return wa;_a=1;var t=oa(),e=sa().has,i=ca(),n=ua(),o=ha(),r=aa(),s=Ds();return wa=function(a){var h=t(this),l=n(a);if(i(h)<=l.size)return!1!==o(h,function(t){if(l.includes(t))return!1},!0);var c=l.getIterator();return!1!==r(c,function(t){if(e(h,t))return s(c.iterator,"normal",!1)})},wa}var Da,ka,Ta,Oa={};function Ea(){if(ka)return Da;ka=1;var t=oa(),e=ca(),i=ha(),n=ua();return Da=function(o){var r=t(this),s=n(o);return!(e(r)>s.size)&&!1!==i(r,function(t){if(!s.includes(t))return!1},!0)}}var Ia,Pa,Aa,Ma={};function Na(){if(Pa)return Ia;Pa=1;var t=oa(),e=sa().has,i=ca(),n=ua(),o=aa(),r=Ds();return Ia=function(s){var a=t(this),h=n(s);if(i(a)<h.size)return!1;var l=h.getIterator();return!1!==o(l,function(t){if(!e(a,t))return r(l.iterator,"normal",!1)})},Ia}var Fa,Ra,La,ja,za,Ba={};function Ha(){if(Ra)return Fa;Ra=1;var t=oa(),e=sa(),i=la(),n=ua(),o=aa(),r=e.add,s=e.has,a=e.remove;return Fa=function(e){var h=t(this),l=n(e).getIterator(),c=i(h);return o(l,function(t){s(h,t)?a(c,t):r(c,t)}),c}}function Ga(){return ja?La:(ja=1,La=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 Wa,Ya,Va,Ua={};function Xa(){if(Ya)return Wa;Ya=1;var t=oa(),e=sa().add,i=la(),n=ua(),o=aa();return Wa=function(r){var s=t(this),a=n(r).getIterator(),h=i(s);return o(a,function(t){e(h,t)}),h},Wa}var qa,Ka,$a,Ja,Za,Qa,th,eh={};function ih(){if(Ka)return qa;Ka=1;var t=Si(),e=String;return qa=function(i){if("Symbol"===t(i))throw new TypeError("Cannot convert a Symbol value to a string");return e(i)}}function nh(){if(Ja)return $a;Ja=1;var t=_(),e=ln(),i=ih(),n=At(),o=t("".charAt),r=t("".charCodeAt),s=t("".slice),a=function(t){return function(a,h){var l,c,d=i(n(a)),u=e(h),p=d.length;return u<0||u>=p?t?"":void 0:(l=r(d,u))<55296||l>56319||u+1===p||(c=r(d,u+1))<56320||c>57343?t?o(d,u):l:t?s(d,u,u+2):c-56320+(l-55296<<10)+65536}};return $a={codeAt:a(!1),charAt:a(!0)}}function oh(){if(Za)return eh;Za=1;var t=nh().charAt,e=ih(),i=yo(),n=Ir(),o=Pr(),r="String Iterator",s=i.set,a=i.getterFor(r);return n(String,"String",function(t){s(this,{type:r,string:e(t),index:0})},function(){var e,i=a(this),n=i.string,r=i.index;return r>=n.length?o(void 0,!0):(e=t(n,r),i.index+=e.length,o(e,!1))}),eh}function rh(){return th?Qa:(th=1,Ar(),Ms(),function(){if(ia)return na;ia=1;var t=di(),e=pa(),i=y();t({target:"Set",proto:!0,real:!0,forced:!ma()("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(va)return ba;va=1;var t=di(),e=y(),i=ya();t({target:"Set",proto:!0,real:!0,forced:!ma()("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(xa)return Ca;xa=1;var t=di(),e=Sa();t({target:"Set",proto:!0,real:!0,forced:!ma()("isDisjointFrom",function(t){return!t})},{isDisjointFrom:e})}(),function(){if(Ta)return Oa;Ta=1;var t=di(),e=Ea();t({target:"Set",proto:!0,real:!0,forced:!ma()("isSubsetOf",function(t){return t})},{isSubsetOf:e})}(),function(){if(Aa)return Ma;Aa=1;var t=di(),e=Na();t({target:"Set",proto:!0,real:!0,forced:!ma()("isSupersetOf",function(t){return!t})},{isSupersetOf:e})}(),function(){if(za)return Ba;za=1;var t=di(),e=Ha(),i=Ga();t({target:"Set",proto:!0,real:!0,forced:!ma()("symmetricDifference")||!i("symmetricDifference")},{symmetricDifference:e})}(),function(){if(Va)return Ua;Va=1;var t=di(),e=Xa(),i=Ga();t({target:"Set",proto:!0,real:!0,forced:!ma()("union")||!i("union")},{union:e})}(),oh(),Qa=Ft().Set)}var sh,ah,hh,lh,ch,dh,uh,ph={};function mh(){return ah?sh:(ah=1,sh={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 fh(){if(hh)return ph;hh=1,Ar();var t=mh(),e=N(),i=Sr(),n=fo();for(var o in t)i(e[o],o),n[o]=n.Array;return ph}function gh(){if(ch)return lh;ch=1;var t=rh();return fh(),lh=t}var vh,bh,yh,wh,_h,xh,Ch,Sh,Dh,kh=b(uh?dh:(uh=1,dh=gh())),Th={};function Oh(){return yh?bh:(yh=1,function(){if(vh)return Th;vh=1;var t=di(),e=bn().map;t({target:"Array",proto:!0,forced:!qn()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),bh=mi()("Array","map"))}function Eh(){if(_h)return wh;_h=1;var t=x(),e=Oh(),i=Array.prototype;return wh=function(n){var o=n.map;return n===i||t(i,n)&&o===i.map?e:o},wh}function Ih(){return Ch?xh:(Ch=1,xh=Eh())}var Ph,Ah,Mh,Nh,Fh,Rh,Lh,jh,zh,Bh,Hh,Gh=b(Dh?Sh:(Dh=1,Sh=Ih())),Wh={};function Yh(){if(Ah)return Ph;Ah=1;var t=Y(),e=un(),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 Ph=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 Vh(){return Fh?Nh:(Fh=1,function(){if(Mh)return Wh;Mh=1;var t=di(),e=un(),i=mn(),n=Nt(),o=dr(),r=dn(),s=Mt(),a=vn(),h=Yh(),l=Oe(),c=qn(),d=ui(),u=c("slice"),p=l("species"),m=Array,f=Math.max;t({target:"Array",proto:!0,forced:!u},{slice:function(t,l){var c,u,g,v=s(this),b=r(v),y=o(t,b),w=o(void 0===l?b:l,b);if(e(v)&&(c=v.constructor,(i(c)&&(c===m||e(c.prototype))||n(c)&&null===(c=c[p]))&&(c=void 0),c===m||void 0===c))return d(v,y,w);for(u=new(void 0===c?m:c)(f(w-y,0)),g=0;y<w;y++,g++)y in v&&a(u,g,v[y]);return h(u,g),u}})}(),Nh=mi()("Array","slice"))}function Uh(){if(Lh)return Rh;Lh=1;var t=x(),e=Vh(),i=Array.prototype;return Rh=function(n){var o=n.slice;return n===i||t(i,n)&&o===i.slice?e:o},Rh}function Xh(){return zh?jh:(zh=1,jh=Uh())}var qh,Kh,$h,Jh,Zh,Qh,tl,el=b(Hh?Bh:(Hh=1,Bh=Xh())),il={};function nl(){return $h?Kh:($h=1,function(){if(qh)return il;qh=1;var t=di(),e=De(),i=fr();t({target:"Object",stat:!0,forced:y()(function(){i(1)})},{keys:function(t){return i(e(t))}})}(),Kh=Ft().Object.keys)}function ol(){return Zh?Jh:(Zh=1,Jh=nl())}var rl,sl,al,hl=b(tl?Qh:(tl=1,Qh=ol())),ll={};function cl(){return al?sl:(al=1,function(){if(rl)return ll;rl=1;var t=di(),e=ur().includes,i=y(),n=mo(),o=i(function(){return!Array(1).includes()}),r=i(function(){return[,1].includes(void 0,1)});t({target:"Array",proto:!0,forced:o||r},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")}(),sl=mi()("Array","includes"))}var dl,ul,pl,ml,fl,gl,vl,bl,yl,wl,_l,xl,Cl,Sl,Dl,kl={};function Tl(){if(ul)return dl;ul=1;var t=Nt(),e=R(),i=Oe()("match");return dl=function(n){var o;return t(n)&&(void 0!==(o=n[i])?!!o:"RegExp"===e(n))},dl}function Ol(){if(ml)return pl;ml=1;var t=Tl(),e=TypeError;return pl=function(i){if(t(i))throw new e("The method doesn't accept regular expressions");return i},pl}function El(){if(gl)return fl;gl=1;var t=Oe()("match");return fl=function(e){var i=/./;try{"/./"[e](i)}catch(n){try{return i[t]=!1,"/./"[e](i)}catch(t){}}return!1}}function Il(){return yl?bl:(yl=1,function(){if(vl)return kl;vl=1;var t=di(),e=_(),i=Ol(),n=At(),o=ih(),r=El(),s=e("".indexOf);t({target:"String",proto:!0,forced:!r("includes")},{includes:function(t){return!!~s(o(n(this)),o(i(t)),arguments.length>1?arguments[1]:void 0)}})}(),bl=mi()("String","includes"))}function Pl(){if(_l)return wl;_l=1;var t=x(),e=cl(),i=Il(),n=Array.prototype,o=String.prototype;return wl=function(r){var s=r.includes;return r===n||t(n,r)&&s===n.includes?e:"string"==typeof r||r===o||t(o,r)&&s===o.includes?i:s},wl}function Al(){return Cl?xl:(Cl=1,xl=Pl())}var Ml,Nl,Fl,Rl,Ll,jl,zl,Bl,Hl,Gl,Wl,Yl,Vl,Ul,Xl,ql,Kl,$l,Jl,Zl=b(Dl?Sl:(Dl=1,Sl=Al())),Ql={};function tc(){if(Nl)return Ml;Nl=1;var t=Gt(),e=TypeError;return Ml=function(i,n){if(!delete i[n])throw new e("Cannot delete property "+t(n)+" of "+t(i))}}function ec(){if(Rl)return Fl;Rl=1;var t=ui(),e=Math.floor,i=function(n,o){var r=n.length;if(r<8)for(var s,a,h=1;h<r;){for(a=h,s=n[h];a&&o(n[a-1],s)>0;)n[a]=n[--a];a!==h++&&(n[a]=s)}else for(var l=e(r/2),c=i(t(n,0,l),o),d=i(t(n,l),o),u=c.length,p=d.length,m=0,f=0;m<u||f<p;)n[m+f]=m<u&&f<p?o(c[m],d[f])<=0?c[m++]:d[f++]:m<u?c[m++]:d[f++];return n};return Fl=i}function ic(){if(jl)return Ll;jl=1;var t=Lt().match(/firefox\/(\d+)/i);return Ll=!!t&&+t[1]}function nc(){return Bl?zl:(Bl=1,zl=/MSIE|Trident/.test(Lt()))}function oc(){if(Gl)return Hl;Gl=1;var t=Lt().match(/AppleWebKit\/(\d+)\./);return Hl=!!t&&+t[1]}function rc(){if(Wl)return Ql;Wl=1;var t=di(),e=_(),i=Wt(),n=De(),o=dn(),r=tc(),s=ih(),a=y(),h=ec(),l=yn(),c=ic(),d=nc(),u=jt(),p=oc(),m=[],f=e(m.sort),g=e(m.push),v=a(function(){m.sort(void 0)}),b=a(function(){m.sort(null)}),w=l("sort"),x=!a(function(){if(u)return u<70;if(!(c&&c>3)){if(d)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||!b||!w||!x},{sort:function(t){void 0!==t&&i(t);var e=n(this);if(x)return void 0===t?f(e):f(e,t);var a,l,c=[],d=o(e);for(l=0;l<d;l++)l in e&&g(c,e[l]);for(h(c,function(t){return function(e,i){if(void 0===i)return-1;if(void 0===e)return 1;if(void 0!==t)return+t(e,i)||0;var n=s(e),o=s(i);return n===o?0:n>o?1:-1}}(t)),a=o(c),l=0;l<a;)e[l]=c[l++];for(;l<d;)r(e,l++);return e}}),Ql}function sc(){return Vl?Yl:(Vl=1,rc(),Yl=mi()("Array","sort"))}function ac(){if(Xl)return Ul;Xl=1;var t=x(),e=sc(),i=Array.prototype;return Ul=function(n){var o=n.sort;return n===i||t(i,n)&&o===i.sort?e:o},Ul}function hc(){return Kl?ql:(Kl=1,ql=ac())}var lc,cc,dc,uc,pc,mc,fc,gc,vc,bc=b(Jl?$l:(Jl=1,$l=hc())),yc={};function wc(){return dc?cc:(dc=1,function(){if(lc)return yc;lc=1;var t=di(),e=L(),i=ur().indexOf,n=yn(),o=e([].indexOf),r=!!o&&1/o([1],1,-0)<0;t({target:"Array",proto:!0,forced:r||!n("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return r?o(this,t,e)||0:i(this,t,e)}})}(),cc=mi()("Array","indexOf"))}function _c(){if(pc)return uc;pc=1;var t=x(),e=wc(),i=Array.prototype;return uc=function(n){var o=n.indexOf;return n===i||t(i,n)&&o===i.indexOf?e:o},uc}function xc(){return fc?mc:(fc=1,mc=_c())}var Cc,Sc,Dc,kc,Tc,Oc,Ec,Ic,Pc,Ac,Mc,Nc=b(vc?gc:(vc=1,gc=xc())),Fc={};function Rc(){if(Sc)return Cc;Sc=1;var t=TypeError;return Cc=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e},Cc}function Lc(){return Tc?kc:(Tc=1,function(){if(Dc)return Fc;Dc=1;var t=di(),e=De(),i=dr(),n=ln(),o=dn(),r=Yh(),s=Rc(),a=gn(),h=vn(),l=tc(),c=qn()("splice"),d=Math.max,u=Math.min;t({target:"Array",proto:!0,forced:!c},{splice:function(t,c){var p,m,f,g,v,b,y=e(this),w=o(y),_=i(t,w),x=arguments.length;for(0===x?p=m=0:1===x?(p=0,m=w-_):(p=x-2,m=u(d(n(c),0),w-_)),s(w+p-m),f=a(y,m),g=0;g<m;g++)(v=_+g)in y&&h(f,g,y[v]);if(r(f,m),p<m){for(g=_;g<w-m;g++)b=g+p,(v=g+m)in y?y[b]=y[v]:l(y,b);for(g=w;g>w-m+p;g--)l(y,g-1)}else if(p>m)for(g=w-m;g>_;g--)b=g+p-1,(v=g+m-1)in y?y[b]=y[v]:l(y,b);for(g=0;g<p;g++)y[g+_]=arguments[g+2];return r(y,w-m+p),f}})}(),kc=mi()("Array","splice"))}function jc(){if(Ec)return Oc;Ec=1;var t=x(),e=Lc(),i=Array.prototype;return Oc=function(n){var o=n.splice;return n===i||t(i,n)&&o===i.splice?e:o},Oc}function zc(){return Pc?Ic:(Pc=1,Ic=jc())}var Bc,Hc=b(Mc?Ac:(Mc=1,Ac=zc())),Gc={},Wc={},Yc={};function Vc(){return Bc||(Bc=1,Yc.f=Object.getOwnPropertySymbols),Yc}var Uc,Xc,qc,Kc,$c,Jc,Zc={};function Qc(){if(Uc)return Zc;Uc=1;var t=Oe();return Zc.f=t,Zc}function td(){if(qc)return Xc;qc=1;var t=Ft(),e=ke(),i=Qc(),n=li().f;return Xc=function(o){var r=t.Symbol||(t.Symbol={});e(r,o)||n(r,o,{value:i.f(o)})}}function ed(){if($c)return Kc;$c=1;var t=V(),e=Rt(),i=Oe(),n=_r();return Kc=function(){var o=e("Symbol"),r=o&&o.prototype,s=r&&r.valueOf,a=i("toPrimitive");r&&!r[a]&&n(r,a,function(e){return t(s,this)},{arity:1})}}var id,nd,od,rd={};function sd(){return nd?id:(nd=1,id=zt()&&!!Symbol.for&&!!Symbol.keyFor)}var ad,hd={};var ld,cd,dd,ud,pd,md,fd,gd={};function vd(){if(cd)return ld;cd=1;var t=Nt(),e=yo().get;return ld=function(i){if(!t(i))return!1;var n=e(i);return!!n&&"RawJSON"===n.type}}function bd(){if(ud)return dd;ud=1;var t=_(),e=ke(),i=SyntaxError,n=parseInt,o=String.fromCharCode,r=t("".charAt),s=t("".slice),a=t(/./.exec),h={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},l=/^[\da-f]{4}$/i,c=/^[\u0000-\u001F]$/;return dd=function(t,d){for(var u=!0,p="";d<t.length;){var m=r(t,d);if("\\"===m){var f=s(t,d,d+2);if(e(h,f))p+=h[f],d+=2;else{if("\\u"!==f)throw new i('Unknown escape sequence: "'+f+'"');var g=s(t,d+=2,d+4);if(!a(l,g))throw new i("Bad Unicode escape at: "+d);p+=o(n(g,16)),d+=4}}else{if('"'===m){u=!1,d++;break}if(a(c,m))throw new i("Bad control character in string literal at: "+d);p+=m,d++}}if(u)throw new i("Unterminated string at: "+d);return{value:p,end:d}}}function yd(){return md?pd:(md=1,pd=!y()(function(){var t="9007199254740993",e=JSON.rawJSON(t);return!JSON.isRawJSON(e)||JSON.stringify(e)!==t}))}function wd(){if(fd)return gd;fd=1;var t=di(),e=Rt(),i=F(),n=V(),o=_(),r=y(),s=un(),a=j(),h=vd(),l=Ht(),c=R(),d=ih(),u=ui(),p=bd(),m=Te(),f=zt(),g=yd(),v=String,b=e("JSON","stringify"),w=o(/./.exec),x=o("".charAt),C=o("".charCodeAt),S=o("".replace),D=o("".slice),k=o([].push),T=o(1.1.toString),O=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,I=/^[\uDC00-\uDFFF]$/,P=m(),A=P.length,M=!f||r(function(){var t=e("Symbol")("stringify detection");return"[null]"!==b([t])||"{}"!==b({a:t})||"{}"!==b(Object(t))}),N=r(function(){return'"\\udf06\\ud834"'!==b("\udf06\ud834")||'"\\udead"'!==b("\udead")}),L=M?function(t,e){var o=u(arguments),r=B(e);if(a(r)||void 0!==t&&!l(t))return o[1]=function(t,e){if(a(r)&&(e=n(r,this,v(t),e)),!l(e))return e},i(b,null,o)}:b,z=function(t,e,i){var n=x(i,e-1),o=x(i,e+1);return w(E,t)&&!w(I,o)||w(I,t)&&!w(E,n)?"\\u"+T(C(t,0),16):t},B=function(t){if(a(t))return t;if(s(t)){for(var e=t.length,i=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?k(i,o):"number"!=typeof o&&"Number"!==c(o)&&"String"!==c(o)||k(i,d(o))}var r=i.length,h=!0;return function(t,e){if(h)return h=!1,e;if(s(this))return e;for(var n=0;n<r;n++)if(i[n]===t)return e}}};return b&&t({target:"JSON",stat:!0,arity:3,forced:M||N||!g},{stringify:function(t,e,i){var o=B(e),r=[],s=L(t,function(t,e){var i=a(o)?n(o,this,v(t),e):e;return!g&&h(i)?P+(k(r,i.rawJSON)-1):i},i);if("string"!=typeof s)return s;if(N&&(s=S(s,O,z)),g)return s;for(var l="",c=s.length,d=0;d<c;d++){var u=x(s,d);if('"'===u){var m=p(s,++d).end-1,f=D(s,d,m);l+=D(f,0,A)===P?r[D(f,A)]:'"'+f+'"',d=m}else l+=u}return l}}),gd}var _d,xd,Cd,Sd,Dd,kd,Td,Od,Ed={};function Id(){return xd||(xd=1,function(){if(Jc)return Wc;Jc=1;var t=di(),e=N(),i=V(),n=_(),o=_e(),r=Y(),s=zt(),a=y(),h=ke(),l=x(),c=hi(),d=Mt(),u=Ie(),p=ih(),m=Et(),f=br(),g=fr(),v=Lr(),b=vs(),w=Vc(),C=Me(),S=li(),D=gr(),k=Ot(),T=_r(),O=Es(),E=Se(),I=vo(),P=bo(),A=Te(),M=Oe(),F=Qc(),R=td(),L=ed(),j=Sr(),z=yo(),B=bn().forEach,H=I("hidden"),G="Symbol",W="prototype",U=z.set,X=z.getterFor(G),q=Object[W],K=e.Symbol,$=K&&K[W],J=e.RangeError,Z=e.TypeError,Q=e.QObject,tt=C.f,et=S.f,it=b.f,nt=k.f,ot=n([].push),rt=E("symbols"),st=E("op-symbols"),at=E("wks"),ht=!Q||!Q[W]||!Q[W].findChild,lt=function(t,e,i){var n=tt(q,e);return n&&delete q[e],et(t,e,i),n&&t!==q&&et(q,e,n),t},ct=r&&a(function(){return 7!==f(et({},"a",{get:function(){return et(this,"a",{value:7}).a}})).a})?lt:et,dt=function(t,e){var i=rt[t]=f($);return U(i,{type:G,tag:t,description:e}),r||(i.description=e),i},ut=function(t,e,i){t===q&&ut(st,e,i),c(t);var n=u(e);return c(i),h(rt,n)?(("enumerable"in i?!i.enumerable:!h(t,n)||h(t,H)&&t[H][n])?(h(t,H)||et(t,H,m(1,f(null))),t[H][n]=!0):(h(t,H)&&t[H][n]&&(t[H][n]=!1),i=f(i,{enumerable:m(0,!1)})),ct(t,n,i)):et(t,n,i)},pt=function(t,e){c(t);var n=d(e),o=g(n).concat(vt(n));return B(o,function(e){r&&!i(mt,n,e)||ut(t,e,n[e])}),t},mt=function(t){var e=u(t),n=i(nt,this,e);return!(this===q&&h(rt,e)&&!h(st,e))&&(!(n||!h(this,e)||!h(rt,e)||h(this,H)&&this[H][e])||n)},ft=function(t,e){var i=d(t),n=u(e);if(i!==q||!h(rt,n)||h(st,n)){var o=tt(i,n);return!o||!h(rt,n)||h(i,H)&&i[H][n]||(o.enumerable=!0),o}},gt=function(t){var e=it(d(t)),i=[];return B(e,function(t){h(rt,t)||h(P,t)||ot(i,t)}),i},vt=function(t){var e=t===q,i=it(e?st:d(t)),n=[];return B(i,function(t){!h(rt,t)||e&&!h(q,t)||ot(n,rt[t])}),n};s||(K=function(){if(l($,this))throw new Z("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,n=A(t),o=function(t){var r=void 0===this?e:this;r===q&&i(o,st,t),h(r,H)&&h(r[H],n)&&(r[H][n]=!1);var s=m(1,t);try{ct(r,n,s)}catch(t){if(!(t instanceof J))throw t;lt(r,n,s)}};return r&&ht&&ct(q,n,{configurable:!0,set:o}),dt(n,t)},T($=K[W],"toString",function(){return X(this).tag}),T(K,"withoutSetter",function(t){return dt(A(t),t)}),k.f=mt,S.f=ut,D.f=pt,C.f=ft,v.f=b.f=gt,w.f=vt,F.f=function(t){return dt(M(t),t)},r&&(O($,"description",{configurable:!0,get:function(){return X(this).description}}),o||T(q,"propertyIsEnumerable",mt,{unsafe:!0}))),t({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:K}),B(g(at),function(t){R(t)}),t({target:G,stat:!0,forced:!s},{useSetter:function(){ht=!0},useSimple:function(){ht=!1}}),t({target:"Object",stat:!0,forced:!s,sham:!r},{create:function(t,e){return void 0===e?f(t):pt(f(t),e)},defineProperty:ut,defineProperties:pt,getOwnPropertyDescriptor:ft}),t({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:gt}),L(),j(K,G),P[H]=!0}(),function(){if(od)return rd;od=1;var t=di(),e=Rt(),i=ke(),n=ih(),o=Se(),r=sd(),s=o("string-to-symbol-registry"),a=o("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!r},{for:function(t){var o=n(t);if(i(s,o))return s[o];var r=e("Symbol")(o);return s[o]=r,a[r]=o,r}})}(),function(){if(ad)return hd;ad=1;var t=di(),e=ke(),i=Ht(),n=Gt(),o=Se(),r=sd(),s=o("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!r},{keyFor:function(t){if(!i(t))throw new TypeError(n(t)+" is not a symbol");if(e(s,t))return s[t]}})}(),wd(),function(){if(_d)return Ed;_d=1;var t=di(),e=zt(),i=y(),n=Vc(),o=De();t({target:"Object",stat:!0,forced:!e||i(function(){n.f(1)})},{getOwnPropertySymbols:function(t){var e=n.f;return e?e(o(t)):[]}})}()),Gc}function Pd(){return Sd?Cd:(Sd=1,Id(),Cd=Ft().Object.getOwnPropertySymbols)}function Ad(){return kd?Dd:(kd=1,Dd=Pd())}var Md,Nd,Fd,Rd,Ld,jd,zd=b(Od?Td:(Od=1,Td=Ad())),Bd={exports:{}},Hd={};function Gd(){if(Nd)return Bd.exports;Nd=1,function(){if(Md)return Hd;Md=1;var t=di(),e=y(),i=Mt(),n=Me().f,o=Y();t({target:"Object",stat:!0,forced:!o||e(function(){n(1)}),sham:!o},{getOwnPropertyDescriptor:function(t,e){return n(i(t),e)}})}();var t=Ft().Object,e=Bd.exports=function(e,i){return t.getOwnPropertyDescriptor(e,i)};return t.getOwnPropertyDescriptor.sham&&(e.sham=!0),Bd.exports}function Wd(){return Rd?Fd:(Rd=1,Fd=Gd())}var Yd,Vd,Ud,Xd,qd,Kd,$d,Jd,Zd,Qd=b(jd?Ld:(jd=1,Ld=Wd())),tu={};function eu(){if(Vd)return Yd;Vd=1;var t=Rt(),e=_(),i=Lr(),n=Vc(),o=hi(),r=e([].concat);return Yd=t("Reflect","ownKeys")||function(t){var e=i.f(o(t)),s=n.f;return s?r(e,s(t)):e},Yd}function iu(){return qd?Xd:(qd=1,function(){if(Ud)return tu;Ud=1;var t=di(),e=Y(),i=eu(),n=Mt(),o=Me(),r=vn();t({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(t){for(var e,s,a=n(t),h=o.f,l=i(a),c={},d=0;l.length>d;)void 0!==(s=h(a,e=l[d++]))&&r(c,e,s);return c}})}(),Xd=Ft().Object.getOwnPropertyDescriptors)}function nu(){return $d?Kd:($d=1,Kd=iu())}var ou,ru,su,au,hu,lu,cu=b(Zd?Jd:(Zd=1,Jd=nu())),du={exports:{}},uu={};function pu(){if(ou)return uu;ou=1;var t=di(),e=Y(),i=gr().f;return t({target:"Object",stat:!0,forced:Object.defineProperties!==i,sham:!e},{defineProperties:i}),uu}function mu(){if(ru)return du.exports;ru=1,pu();var t=Ft().Object,e=du.exports=function(e,i){return t.defineProperties(e,i)};return t.defineProperties.sham&&(e.sham=!0),du.exports}function fu(){return au?su:(au=1,su=mu())}var gu,vu,bu,yu,wu,_u,xu,Cu,Su,Du,ku=b(lu?hu:(lu=1,hu=fu())),Tu={exports:{}},Ou={};function Eu(){if(gu)return Ou;gu=1;var t=di(),e=Y(),i=li().f;return t({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!e},{defineProperty:i}),Ou}function Iu(){if(vu)return Tu.exports;vu=1,Eu();var t=Ft().Object,e=Tu.exports=function(e,i,n){return t.defineProperty(e,i,n)};return t.defineProperty.sham&&(e.sham=!0),Tu.exports}function Pu(){return yu?bu:(yu=1,bu=Iu())}function Au(){return _u?wu:(_u=1,wu=Pu())}function Mu(){return Cu?xu:(Cu=1,xu=Au())}function Nu(){return Du?Su:(Du=1,Su=Mu())}var Fu,Ru=b(Nu()),Lu={};function ju(){if(Fu)return Lu;Fu=1;var t=di(),e=y(),i=un(),n=Nt(),o=De(),r=dn(),s=Rc(),a=vn(),h=Yh(),l=gn(),c=qn(),d=Oe(),u=jt(),p=d("isConcatSpreadable"),m=u>=51||!e(function(){var t=[];return t[p]=!1,t.concat()[0]!==t}),f=function(t){if(!n(t))return!1;var e=t[p];return void 0!==e?!!e:i(t)};return t({target:"Array",proto:!0,arity:1,forced:!m||!c("concat")},{concat:function(t){var e,i,n,c,d,u=o(this),p=l(u,0),m=0;for(e=-1,n=arguments.length;e<n;e++)if(f(d=-1===e?u:arguments[e]))for(c=r(d),s(m+c),i=0;i<c;i++,m++)i in d&&a(p,m,d[i]);else s(m+1),a(p,m++,d);return h(p,m),p}}),Lu}var zu,Bu={};function Hu(){return zu||(zu=1,td()("asyncDispose")),Bu}var Gu;var Wu,Yu={};function Vu(){return Wu||(Wu=1,td()("dispose")),Yu}var Uu;var Xu;var qu,Ku={};function $u(){return qu||(qu=1,td()("iterator")),Ku}var Ju;var Zu;var Qu;var tp;var ep;var ip;var np,op={};function rp(){if(np)return op;np=1;var t=td(),e=ed();return t("toPrimitive"),e(),op}var sp,ap={};var hp;var lp,cp,dp,up,pp,mp={};function fp(){return dp?cp:(dp=1,ju(),Id(),Hu(),Gu||(Gu=1,td()("asyncIterator")),Vu(),Uu||(Uu=1,td()("hasInstance")),Xu||(Xu=1,td()("isConcatSpreadable")),$u(),Ju||(Ju=1,td()("match")),Zu||(Zu=1,td()("matchAll")),Qu||(Qu=1,td()("replace")),tp||(tp=1,td()("search")),ep||(ep=1,td()("species")),ip||(ip=1,td()("split")),rp(),function(){if(sp)return ap;sp=1;var t=Rt(),e=td(),i=Sr();e("toStringTag"),i(t("Symbol"),"Symbol")}(),hp||(hp=1,td()("unscopables")),function(){if(lp)return mp;lp=1;var t=N();Sr()(t.JSON,"JSON",!0)}(),cp=Ft().Symbol)}function gp(){if(pp)return up;pp=1;var t=fp();return fh(),up=t}var vp,bp={};var yp;var wp;var _p,xp,Cp;function Sp(){if(Cp)return xp;Cp=1;var t=gp();return function(){if(vp)return bp;vp=1;var t=Oe(),e=li().f,i=t("metadata"),n=Function.prototype;void 0===n[i]&&e(n,i,{value:null})}(),yp||(yp=1,Hu()),wp||(wp=1,Vu()),_p||(_p=1,td()("metadata")),xp=t}var Dp,kp,Tp;function Op(){if(kp)return Dp;kp=1;var t=Rt(),e=_(),i=t("Symbol"),n=i.keyFor,o=e(i.prototype.valueOf);return Dp=i.isRegisteredSymbol||function(t){try{return void 0!==n(o(t))}catch(t){return!1}}}var Ep,Ip,Pp;function Ap(){if(Ip)return Ep;Ip=1;for(var t=Se(),e=Rt(),i=_(),n=Ht(),o=Oe(),r=e("Symbol"),s=r.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),h=i(r.prototype.valueOf),l=t("wks"),c=0,d=a(r),u=d.length;c<u;c++)try{var p=d[c];n(r[p])&&o(p)}catch(t){}return Ep=function(t){if(s&&s(t))return!0;try{for(var e=h(t),i=0,n=a(l),o=n.length;i<o;i++)if(l[n[i]]==e)return!0}catch(t){}return!1},Ep}var Mp;var Np;var Fp;var Rp;var Lp;var jp;var zp;var Bp,Hp,Gp,Wp,Yp;function Vp(){if(Gp)return Hp;Gp=1;var t=Sp();return Tp||(Tp=1,di()({target:"Symbol",stat:!0},{isRegisteredSymbol:Op()})),Pp||(Pp=1,di()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Ap()})),Mp||(Mp=1,td()("customMatcher")),Np||(Np=1,td()("observable")),Fp||(Fp=1,di()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Op()})),Rp||(Rp=1,di()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Ap()})),Lp||(Lp=1,td()("matcher")),jp||(jp=1,td()("metadataKey")),zp||(zp=1,td()("patternMatch")),Bp||(Bp=1,td()("replaceAll")),Hp=t}function Up(){return Yp?Wp:(Yp=1,Wp=Vp())}var Xp,qp,Kp,$p,Jp,Zp,Qp,tm,em,im,nm=b(Up());function om(){return qp?Xp:(qp=1,Ar(),oh(),$u(),Xp=Qc().f("iterator"))}function rm(){if($p)return Kp;$p=1;var t=om();return fh(),Kp=t}function sm(){return Zp?Jp:(Zp=1,Jp=rm())}function am(){return tm?Qp:(tm=1,Qp=sm())}function hm(){return im?em:(im=1,em=am())}var lm,cm,dm,um,pm,mm,fm,gm,vm,bm,ym=b(hm());function wm(t){return wm="function"==typeof nm&&"symbol"==typeof ym?function(t){return typeof t}:function(t){return t&&"function"==typeof nm&&t.constructor===nm&&t!==nm.prototype?"symbol":typeof t},wm(t)}function _m(){return cm?lm:(cm=1,rp(),lm=Qc().f("toPrimitive"))}function xm(){return um?dm:(um=1,dm=_m())}function Cm(){return mm?pm:(mm=1,pm=xm())}function Sm(){return gm?fm:(gm=1,fm=Cm())}function Dm(){return bm?vm:(bm=1,vm=Sm())}var km=b(Dm());function Tm(t){var e=function(t,e){if("object"!=wm(t)||!t)return t;var i=t[km];if(void 0!==i){var n=i.call(t,e);if("object"!=wm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wm(e)?e:e+""}function Om(t,e,i){return(e=Tm(e))in t?Ru(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Em,Im,Pm,Am,Mm,Nm,Fm,Rm,Lm,jm,zm,Bm,Hm,Gm,Wm,Ym={};function Vm(){if(Im)return Em;Im=1;var t=Wt(),e=De(),i=It(),n=dn(),o=TypeError,r="Reduce of empty array with no initial value",s=function(s){return function(a,h,l,c){var d=e(a),u=i(d),p=n(d);if(t(h),0===p&&l<2)throw new o(r);var m=s?p-1:0,f=s?-1:1;if(l<2)for(;;){if(m in u){c=u[m],m+=f;break}if(m+=f,s?m<0:p<=m)throw new o(r)}for(;s?m>=0:p>m;m+=f)m in u&&(c=h(c,u[m],m,d));return c}};return Em={left:s(!1),right:s(!0)}}function Um(){if(Am)return Pm;Am=1;var t=N(),e=Lt(),i=R(),n=function(t){return e.slice(0,t.length)===t};return Pm=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 Xm(){return Nm?Mm:(Nm=1,Mm="NODE"===Um())}function qm(){return Lm?Rm:(Lm=1,function(){if(Fm)return Ym;Fm=1;var t=di(),e=Vm().left,i=yn(),n=jt();t({target:"Array",proto:!0,forced:!Xm()&&n>79&&n<83||!i("reduce")},{reduce:function(t){var i=arguments.length;return e(this,t,i,i>1?arguments[1]:void 0)}})}(),Rm=mi()("Array","reduce"))}function Km(){if(zm)return jm;zm=1;var t=x(),e=qm(),i=Array.prototype;return jm=function(n){var o=n.reduce;return n===i||t(i,n)&&o===i.reduce?e:o},jm}function $m(){return Hm?Bm:(Hm=1,Bm=Km())}var Jm,Zm,Qm=b(Wm?Gm:(Wm=1,Gm=$m()));var tf,ef,nf,of,rf,sf,af,hf,lf,cf,df,uf=b(Zm?Jm:(Zm=1,Jm=Pu()));function pf(){return nf?ef:(nf=1,tf||(tf=1,di()({target:"Array",stat:!0},{isArray:un()})),ef=Ft().Array.isArray)}function mf(){return rf?of:(rf=1,of=pf())}function ff(){return af?sf:(af=1,sf=mf())}function gf(){return lf?hf:(lf=1,hf=ff())}function vf(){return df?cf:(df=1,cf=gf())}var bf,yf,wf,_f,xf,Cf,Sf,Df,kf,Tf,Of=b(vf());function Ef(){return yf?bf:(yf=1,Ar(),oh(),bf=Cs())}function If(){if(_f)return wf;_f=1;var t=Ef();return fh(),wf=t}function Pf(){return Cf?xf:(Cf=1,xf=If())}function Af(){return Df?Sf:(Df=1,Sf=Pf())}function Mf(){return Tf?kf:(Tf=1,kf=Af())}var Nf,Ff,Rf,Lf,jf,zf,Bf,Hf,Gf,Wf,Yf,Vf,Uf,Xf=b(Mf()),qf={};function Kf(){return Rf?Ff:(Rf=1,function(){if(Nf)return qf;Nf=1;var t=di(),e=De(),i=dn(),n=Yh(),o=Rc();t({target:"Array",proto:!0,arity:1,forced:y()(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var r=e(this),s=i(r),a=arguments.length;o(s+a);for(var h=0;h<a;h++)r[s]=arguments[h],s++;return n(r,s),s}})}(),Ff=mi()("Array","push"))}function $f(){if(jf)return Lf;jf=1;var t=x(),e=Kf(),i=Array.prototype;return Lf=function(n){var o=n.push;return n===i||t(i,n)&&o===i.push?e:o},Lf}function Jf(){return Bf?zf:(Bf=1,zf=$f())}function Zf(){return Gf?Hf:(Gf=1,Hf=Jf())}function Qf(){return Yf?Wf:(Yf=1,Wf=Zf())}function tg(){return Uf?Vf:(Uf=1,Vf=Qf())}var eg,ig,ng,og,rg,sg,ag=b(tg());function hg(){return ig?eg:(ig=1,eg=Xh())}function lg(){return og?ng:(og=1,ng=hg())}function cg(){return sg?rg:(sg=1,rg=lg())}var dg,ug,pg,mg,fg,gg,vg,bg,yg,wg,_g,xg,Cg,Sg,Dg,kg,Tg,Og=b(cg()),Eg={};function Ig(){if(ug)return dg;ug=1;var t=hi(),e=Ds();return dg=function(i,n,o,r){try{return r?n(t(o)[0],o[1]):n(o)}catch(t){e(i,"throw",t)}},dg}function Pg(){if(mg)return pg;mg=1;var t=Fe(),e=V(),i=De(),n=Ig(),o=xs(),r=mn(),s=dn(),a=vn(),h=Yh(),l=Ss(),c=Cs(),d=Ds(),u=Array;return pg=function(p){var m=r(this),f=arguments.length,g=f>1?arguments[1]:void 0,v=void 0!==g;v&&(g=t(g,f>2?arguments[2]:void 0));var b,y,w,_,x,C,S=i(p),D=c(S),k=0;if(!D||this===u&&o(D))for(b=s(S),y=m?new this(b):u(b);b>k;k++)C=v?g(S[k],k):S[k],a(y,k,C);else for(y=m?new this:[],x=(_=l(S,D)).next;!(w=e(x,_)).done;k++){C=v?n(_,g,[w.value,k],!0):w.value;try{a(y,k,C)}catch(t){d(_,"throw",t)}}return h(y,k),y},pg}function Ag(){if(gg)return fg;gg=1;var t=Oe()("iterator"),e=!1;try{var i=0,n={next:function(){return{done:!!i++}},return:function(){e=!0}};n[t]=function(){return this},Array.from(n,function(){throw 2})}catch(t){}return fg=function(i,n){try{if(!n&&!e)return!1}catch(t){return!1}var o=!1;try{var r={};r[t]=function(){return{next:function(){return{done:o=!0}}}},i(r)}catch(t){}return o},fg}function Mg(){return yg?bg:(yg=1,oh(),function(){if(vg)return Eg;vg=1;var t=di(),e=Pg();t({target:"Array",stat:!0,forced:!Ag()(function(t){Array.from(t)})},{from:e})}(),bg=Ft().Array.from)}function Ng(){return _g?wg:(_g=1,wg=Mg())}function Fg(){return Cg?xg:(Cg=1,xg=Ng())}function Rg(){return Dg?Sg:(Dg=1,Sg=Fg())}function Lg(){return Tg?kg:(Tg=1,kg=Rg())}var jg,zg,Bg=b(Lg());function Hg(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Gg(t,e){return function(t){if(Of(t))return t}(t)||function(t,e){var i=null==t?null:void 0!==nm&&Xf(t)||t["@@iterator"];if(null!=i){var n,o,r,s,a=[],h=!0,l=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;h=!1}else for(;!(h=(n=r.call(i)).done)&&(ag(a).call(a,n.value),a.length!==e);h=!0);}catch(t){l=!0,o=t}finally{try{if(!h&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(t){var i;if("string"==typeof t)return Hg(t,e);var n=Og(i={}.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Bg(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hg(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Wg,Yg,Vg,Ug,Xg,qg,Kg,$g=b(zg?jg:(zg=1,jg=gp()));function Jg(){return Vg?Yg:(Vg=1,Wg||(Wg=1,di()({target:"Reflect",stat:!0},{ownKeys:eu()})),Yg=Ft().Reflect.ownKeys)}function Zg(){return Xg?Ug:(Xg=1,Ug=Jg())}var Qg,tv,ev=b(Kg?qg:(Kg=1,qg=Zg()));var iv,nv,ov,rv,sv,av,hv,lv,cv,dv=b(tv?Qg:(tv=1,Qg=mf())),uv={};function pv(){if(nv)return iv;nv=1;var t=Y(),e=_(),i=V(),n=y(),o=fr(),r=Vc(),s=Ot(),a=De(),h=It(),l=Object.assign,c=Object.defineProperty,d=e([].concat);return iv=!l||n(function(){if(t&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},i={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(t){i[t]=t}),7!==l({},e)[n]||o(l({},i)).join("")!==r})?function(e,n){for(var l=a(e),c=arguments.length,u=1,p=r.f,m=s.f;c>u;)for(var f,g=h(arguments[u++]),v=p?d(o(g),p(g)):o(g),b=v.length,y=0;b>y;)f=v[y++],t&&!i(m,g,f)||(l[f]=g[f]);return l}:l,iv}function mv(){return sv?rv:(sv=1,function(){if(ov)return uv;ov=1;var t=di(),e=pv();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}(),rv=Ft().Object.assign)}function fv(){return hv?av:(hv=1,av=mv())}var gv,vv,bv,yv,wv,_v,xv,Cv=b(cv?lv:(cv=1,lv=fv())),Sv={};function Dv(){return bv?vv:(bv=1,function(){if(gv)return Sv;gv=1;var t=di(),e=y(),i=De(),n=wr(),o=yr();t({target:"Object",stat:!0,forced:e(function(){n(1)}),sham:!o},{getPrototypeOf:function(t){return n(i(t))}})}(),vv=Ft().Object.getPrototypeOf)}function kv(){return wv?yv:(wv=1,yv=Dv())}var Tv,Ov,Ev,Iv,Pv,Av,Mv,Nv,Fv=b(xv?_v:(xv=1,_v=kv()));function Rv(){return Ov?Tv:(Ov=1,ju(),Tv=mi()("Array","concat"))}function Lv(){if(Iv)return Ev;Iv=1;var t=x(),e=Rv(),i=Array.prototype;return Ev=function(n){var o=n.concat;return n===i||t(i,n)&&o===i.concat?e:o},Ev}function jv(){return Av?Pv:(Av=1,Pv=Lv())}var zv,Bv,Hv,Gv,Wv,Yv,Vv,Uv,Xv,qv=b(Nv?Mv:(Nv=1,Mv=jv())),Kv={};function $v(){if(Bv)return zv;Bv=1;var t=Y(),e=y(),i=_(),n=wr(),o=fr(),r=Mt(),s=i(Ot().f),a=i([].push),h=t&&e(function(){var t=Object.create(null);return t[2]=2,!s(t,2)}),l=function(e){return function(i){for(var l,c=r(i),d=o(c),u=h&&null===n(c),p=d.length,m=0,f=[];p>m;)l=d[m++],t&&!(u?l in c:s(c,l))||a(f,e?[l,c[l]]:c[l]);return f}};return zv={entries:l(!0),values:l(!1)}}function Jv(){return Wv?Gv:(Wv=1,function(){if(Hv)return Kv;Hv=1;var t=di(),e=$v().values;t({target:"Object",stat:!0},{values:function(t){return e(t)}})}(),Gv=Ft().Object.values)}function Zv(){return Vv?Yv:(Vv=1,Yv=Jv())}var Qv,tb,eb,ib,nb,ob,rb,sb,ab,hb,lb,cb,db,ub=b(Xv?Uv:(Xv=1,Uv=Zv())),pb={};function mb(){return tb?Qv:(tb=1,Qv="\t\n\v\f\r                 \u2028\u2029\ufeff")}function fb(){if(ib)return eb;ib=1;var t=_(),e=At(),i=ih(),n=mb(),o=t("".replace),r=RegExp("^["+n+"]+"),s=RegExp("(^|[^"+n+"])["+n+"]+$"),a=function(t){return function(n){var a=i(e(n));return 1&t&&(a=o(a,r,"")),2&t&&(a=o(a,s,"$1")),a}};return eb={start:a(1),end:a(2),trim:a(3)}}function gb(){if(ob)return nb;ob=1;var t=N(),e=y(),i=_(),n=ih(),o=fb().trim,r=mb(),s=t.parseInt,a=t.Symbol,h=a&&a.iterator,l=/^[+-]?0x/i,c=i(l.exec),d=8!==s(r+"08")||22!==s(r+"0x16")||h&&!e(function(){s(Object(h))});return nb=d?function(t,e){var i=o(n(t));return s(i,e>>>0||(c(l,i)?16:10))}:s,nb}function vb(){return ab?sb:(ab=1,function(){if(rb)return pb;rb=1;var t=di(),e=gb();t({global:!0,forced:parseInt!==e},{parseInt:e})}(),sb=Ft().parseInt)}function bb(){return lb?hb:(lb=1,hb=vb())}var yb,wb,_b,xb,Cb,Sb,Db,kb=b(db?cb:(db=1,cb=bb())),Tb={};function Ob(){return _b?wb:(_b=1,function(){if(yb)return Tb;yb=1;var t=di(),e=$v().entries;t({target:"Object",stat:!0},{entries:function(t){return e(t)}})}(),wb=Ft().Object.entries)}function Eb(){return Cb?xb:(Cb=1,xb=Ob())}var Ib,Pb,Ab,Mb,Nb,Fb,Rb,Lb=b(Db?Sb:(Db=1,Sb=Eb()));function jb(){if(Ab)return Pb;Ab=1,Ib||(Ib=1,di()({target:"Object",stat:!0,sham:!Y()},{create:br()}));var t=Ft().Object;return Pb=function(e,i){return t.create(e,i)}}function zb(){return Nb?Mb:(Nb=1,Mb=jb())}var Bb,Hb,Gb,Wb,Yb,Vb,Ub,Xb,qb,Kb,$b,Jb,Zb,Qb=b(Rb?Fb:(Rb=1,Fb=zb())),ty={};function ey(){if(Hb)return Bb;Hb=1;var t=ln(),e=ih(),i=At(),n=RangeError,o=Math.floor;return Bb=function(r){var s=e(i(this)),a="",h=t(r);if(h<0||h===1/0)throw new n("Wrong number of repetitions");for(;h>0;(h=o(h/2))&&(s+=s))h%2&&(a+=s);return a}}function iy(){if(Wb)return Gb;Wb=1;var t=_(),e=cn(),i=ih(),n=ey(),o=At(),r=t(n),s=t("".slice),a=Math.ceil,h=function(t){return function(n,h,l){var c=i(o(n)),d=e(h),u=c.length;if(d<=u)return c;var p,m,f=void 0===l?" ":i(l);return""===f?c:((m=r(f,a((p=d-u)/f.length))).length>p&&(m=s(m,0,p)),t?c+m:m+c)}};return Gb={start:h(!1),end:h(!0)}}function ny(){if(Vb)return Yb;Vb=1;var t=_(),e=y(),i=iy().start,n=RangeError,o=isFinite,r=Math.abs,s=Date.prototype,a=s.toISOString,h=t(s.getTime),l=t(s.getUTCDate),c=t(s.getUTCFullYear),d=t(s.getUTCHours),u=t(s.getUTCMilliseconds),p=t(s.getUTCMinutes),m=t(s.getUTCMonth),f=t(s.getUTCSeconds);return Yb=e(function(){return"0385-07-25T07:06:39.999Z"!==a.call(new Date(-50000000000001))})||!e(function(){a.call(new Date(NaN))})?function(){if(!o(h(this)))throw new n("Invalid time value");var t=this,e=c(t),s=u(t),a=e<0?"-":e>9999?"+":"";return a+i(r(e),a?6:4,0)+"-"+i(m(t)+1,2,0)+"-"+i(l(t),2,0)+"T"+i(d(t),2,0)+":"+i(p(t),2,0)+":"+i(f(t),2,0)+"."+i(s,3,0)+"Z"}:a,Yb}function oy(){if(qb)return Xb;qb=1,function(){if(Ub)return ty;Ub=1;var t=di(),e=V(),i=De(),n=Ee(),o=ny(),r=R();t({target:"Date",proto:!0,forced:y()(function(){return null!==new Date(NaN).toJSON()||1!==e(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(t){var s=i(this),a=n(s,"number");return"number"!=typeof a||isFinite(a)?"toISOString"in s||"Date"!==r(s)?s.toISOString():e(o,s):null}})}(),wd();var t=Ft(),e=F();return t.JSON||(t.JSON={stringify:JSON.stringify}),Xb=function(i,n,o){return e(t.JSON.stringify,null,arguments)},Xb}function ry(){return $b?Kb:($b=1,Kb=oy())}var sy,ay,hy,ly,cy,dy=b(Zb?Jb:(Zb=1,Jb=ry())),uy={},py={};function my(){if(ay)return sy;ay=1;var t=TypeError;return sy=function(e,i){if(e<i)throw new t("Not enough arguments");return e}}function fy(){if(ly)return hy;ly=1;var t,e=N(),i=F(),n=j(),o=Um(),r=Lt(),s=ui(),a=my(),h=e.Function,l=/MSIE .\./.test(r)||"BUN"===o&&((t=e.Bun.version.split(".")).length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2]));return hy=function(t,e){var o=e?2:1;return l?function(r,l){var c=a(arguments.length,1)>o,d=n(r)?r:h(r),u=c?s(arguments,o):[],p=c?function(){i(d,this,u)}:d;return e?t(p,l):t(p)}:t},hy}var gy,vy,by,yy,wy,_y,xy={};function Cy(){return vy||(vy=1,function(){if(cy)return py;cy=1;var t=di(),e=N(),i=fy()(e.setInterval,!0);t({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i})}(),function(){if(gy)return xy;gy=1;var t=di(),e=N(),i=fy()(e.setTimeout,!0);t({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i})}()),uy}function Sy(){return yy?by:(yy=1,Cy(),by=Ft().setTimeout)}var Dy,ky,Ty,Oy,Ey,Iy,Py,Ay,My,Ny,Fy,Ry=b(_y?wy:(_y=1,wy=Sy())),Ly={};function jy(){if(ky)return Dy;ky=1;var t=De(),e=dr(),i=dn();return Dy=function(n){for(var o=t(this),r=i(o),s=arguments.length,a=e(s>1?arguments[1]:void 0,r),h=s>2?arguments[2]:void 0,l=void 0===h?r:e(h,r);l>a;)o[a++]=n;return o},Dy}function zy(){return Ey?Oy:(Ey=1,function(){if(Ty)return Ly;Ty=1;var t=di(),e=jy(),i=mo();t({target:"Array",proto:!0},{fill:e}),i("fill")}(),Oy=mi()("Array","fill"))}function By(){if(Py)return Iy;Py=1;var t=x(),e=zy(),i=Array.prototype;return Iy=function(n){var o=n.fill;return n===i||t(i,n)&&o===i.fill?e:o},Iy}function Hy(){return My?Ay:(My=1,Ay=By())}var Gy,Wy=b(Fy?Ny:(Fy=1,Ny=Hy())),Yy={exports:{}};var Vy,Uy=(Gy||(Gy=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}}(Yy)),Yy.exports),Xy=b(Uy);
/*! 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 qy(){return qy=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},qy.apply(this,arguments)}function Ky(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function $y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Vy="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 Jy,Zy=Vy,Qy=["","webkit","Moz","MS","ms","o"],tw="undefined"==typeof document?{style:{}}:document.createElement("div"),ew=Math.round,iw=Math.abs,nw=Date.now;function ow(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),r=0;r<Qy.length;){if((n=(i=Qy[r])?i+o:e)in t)return n;r++}}Jy="undefined"==typeof window?{}:window;var rw=ow(tw.style,"touchAction"),sw=void 0!==rw;var aw="compute",hw="auto",lw="manipulation",cw="none",dw="pan-x",uw="pan-y",pw=function(){if(!sw)return!1;var t={},e=Jy.CSS&&Jy.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){return t[i]=!e||Jy.CSS.supports("touch-action",i)}),t}(),mw="ontouchstart"in Jy,fw=void 0!==ow(Jy,"PointerEvent"),gw=mw&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),vw="touch",bw="mouse",yw=16,ww=24,_w=["x","y"],xw=["clientX","clientY"];function Cw(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 Sw(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Dw(t,e){return t.indexOf(e)>-1}var kw=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===aw&&(t=this.compute()),sw&&this.manager.element.style&&pw[t]&&(this.manager.element.style[rw]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Cw(this.manager.recognizers,function(e){Sw(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(Dw(t,cw))return cw;var e=Dw(t,dw),i=Dw(t,uw);return e&&i?cw:e||i?e?dw:uw:Dw(t,lw)?lw:hw}(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=Dw(n,cw)&&!pw[cw],r=Dw(n,uw)&&!pw[uw],s=Dw(n,dw)&&!pw[dw];if(o){var a=1===t.pointers.length,h=t.distance<2,l=t.deltaTime<250;if(a&&h&&l)return}if(!s||!r)return o||r&&6&i||s&&i&ww?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Tw(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Ow(t){var e=t.length;if(1===e)return{x:ew(t[0].clientX),y:ew(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:ew(i/e),y:ew(n/e)}}function Ew(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:ew(t.pointers[i].clientX),clientY:ew(t.pointers[i].clientY)},i++;return{timeStamp:nw(),pointers:e,center:Ow(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Iw(t,e,i){i||(i=_w);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function Pw(t,e,i){i||(i=_w);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function Aw(t,e){return t===e?1:iw(t)>=iw(e)?t<0?2:4:e<0?8:yw}function Mw(t,e,i){return{x:e/t||0,y:i/t||0}}function Nw(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=Ew(e)),o>1&&!i.firstMultiple?i.firstMultiple=Ew(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,h=e.center=Ow(n);e.timeStamp=nw(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=Pw(a,h),e.distance=Iw(a,h),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.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=Aw(e.deltaX,e.deltaY);var l,c,d=Mw(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=iw(d.x)>iw(d.y)?d.x:d.y,e.scale=s?(l=s.pointers,Iw((c=n)[0],c[1],xw)/Iw(l[0],l[1],xw)):1,e.rotation=s?function(t,e){return Pw(e[1],e[0],xw)+Pw(t[1],t[0],xw)}(s.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,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(8!==e.eventType&&(a>25||void 0===s.velocity)){var h=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,c=Mw(a,h,l);n=c.x,o=c.y,i=iw(c.x)>iw(c.y)?c.x:c.y,r=Aw(h,l),t.lastInterval=e}else i=s.velocity,n=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=r}(i,e);var u,p=t.element,m=e.srcEvent;Tw(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function Fw(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=1&e&&n-o===0,s=12&e&&n-o===0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,Nw(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Rw(t){return t.trim().split(/\s+/g)}function Lw(t,e,i){Cw(Rw(e),function(e){t.addEventListener(e,i,!1)})}function jw(t,e,i){Cw(Rw(e),function(e){t.removeEventListener(e,i,!1)})}function zw(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Bw=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){Sw(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Lw(this.element,this.evEl,this.domHandler),this.evTarget&&Lw(this.target,this.evTarget,this.domHandler),this.evWin&&Lw(zw(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&jw(this.element,this.evEl,this.domHandler),this.evTarget&&jw(this.target,this.evTarget,this.domHandler),this.evWin&&jw(zw(this.element),this.evWin,this.domHandler)},t}();function Hw(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 Gw={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Ww={2:vw,3:"pen",4:bw,5:"kinect"},Yw="pointerdown",Vw="pointermove pointerup pointercancel";Jy.MSPointerEvent&&!Jy.PointerEvent&&(Yw="MSPointerDown",Vw="MSPointerMove MSPointerUp MSPointerCancel");var Uw=function(t){function e(){var i,n=e.prototype;return n.evEl=Yw,n.evWin=Vw,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Ky(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Gw[n],r=Ww[t.pointerType]||t.pointerType,s=r===vw,a=Hw(e,t.pointerId,"pointerId");1&o&&(0===t.button||s)?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:r,srcEvent:t}),i&&e.splice(a,1))},e}(Bw);function Xw(t){return Array.prototype.slice.call(t,0)}function qw(t,e,i){for(var n=[],o=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];Hw(o,s)<0&&n.push(t[r]),o[r]=s,r++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}var Kw={touchstart:1,touchmove:2,touchend:4,touchcancel:8},$w=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return Ky(e,t),e.prototype.handler=function(t){var e=Kw[t.type],i=Jw.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:vw,srcEvent:t})},e}(Bw);function Jw(t,e){var i,n,o=Xw(t.touches),r=this.targetIds;if(3&e&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=Xw(t.changedTouches),a=[],h=this.target;if(n=o.filter(function(t){return Tw(t.target,h)}),1===e)for(i=0;i<n.length;)r[n[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),12&e&&delete r[s[i].identifier],i++;return a.length?[qw(n.concat(a),"identifier",!0),a]:void 0}var Zw={mousedown:1,mousemove:2,mouseup:4},Qw=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 Ky(e,t),e.prototype.handler=function(t){var e=Zw[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:bw,srcEvent:t}))},e}(Bw);function t_(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 e_(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,t_.call(this,e)):12&t&&t_.call(this,e)}function i_(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],r=Math.abs(e-o.x),s=Math.abs(i-o.y);if(r<=25&&s<=25)return!0}return!1}var n_=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===vw,r=i.pointerType===bw;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)e_.call($y($y(n)),e,i);else if(r&&i_.call($y($y(n)),i))return;n.callback(t,e,i)}},n.touch=new $w(n.manager,n.handler),n.mouse=new Qw(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return Ky(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(Bw)}();function o_(t,e,i){return!!Array.isArray(t)&&(Cw(t,i[e],i),!0)}var r_=32,s_=1;function a_(t,e){var i=e.manager;return i?i.get(t):t}function h_(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var l_=function(){function t(t){void 0===t&&(t={}),this.options=qy({enable:!0},t),this.id=s_++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return Zy(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(o_(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=a_(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return o_(t,"dropRecognizeWith",this)||(t=a_(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(o_(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Hw(e,t=a_(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(o_(t,"dropRequireFailure",this))return this;t=a_(t,this);var e=Hw(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+h_(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+h_(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=r_},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=Zy({},t);if(!Sw(this.options.enable,[this,e]))return this.reset(),void(this.state=r_);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}(),c_=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,qy({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}Ky(e,t);var i=e.prototype;return i.getTouchAction=function(){return[lw]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&r&&n){if(4!==t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||Iw(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&s?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 r_},i.failTimeout=function(){var t=this;return this._timer=setTimeout(function(){t.state=r_},this.options.interval),r_},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}(l_),d_=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qy({pointers:1},e))||this}Ky(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:r_},e}(l_);function u_(t){return t===yw?"down":8===t?"up":2===t?"left":4===t?"right":""}var p_=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,qy({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}Ky(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(uw),t&ww&&e.push(dw),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;return o&e.direction||(6&e.direction?(o=0===r?1:r<0?2:4,i=r!==this.pX,n=Math.abs(t.deltaX)):(o=0===s?1:s<0?8:yw,i=s!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return d_.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=u_(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(d_),m_=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qy({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}Ky(e,t);var i=e.prototype;return i.getTouchAction=function(){return p_.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&ww&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&iw(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=u_(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(d_),f_=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qy({event:"pinch",threshold:0,pointers:2},e))||this}Ky(e,t);var i=e.prototype;return i.getTouchAction=function(){return[cw]},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}(d_),g_=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qy({event:"rotate",threshold:0,pointers:2},e))||this}Ky(e,t);var i=e.prototype;return i.getTouchAction=function(){return[cw]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(d_),v_=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,qy({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Ky(e,t);var i=e.prototype;return i.getTouchAction=function(){return[hw]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime>i.time;if(this._input=t,!o||!n||12&t.eventType&&!r)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 r_},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=nw(),this.manager.emit(this.options.event,this._input)))},e}(l_),b_={domEvents:!1,touchAction:aw,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},y_=[[g_,{enable:!1}],[f_,{enable:!1},["rotate"]],[m_,{direction:6}],[p_,{direction:6},["swipe"]],[c_],[c_,{event:"doubletap",taps:2},["tap"]],[v_]];function w_(t,e){var i,n=t.element;n.style&&(Cw(t.options.cssProps,function(o,r){i=ow(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}var __=function(){function t(t,e){var i,n=this;this.options=Zy({},b_,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||(fw?Uw:gw?$w:mw?n_:Qw))(i,Fw),this.touchAction=new kw(this,this.options.touchAction),w_(this,!0),Cw(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 Zy(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 r=0;r<n.length;)i=n[r],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),r++}},e.get=function(t){if(t instanceof l_)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(o_(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(o_(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=Hw(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 Cw(Rw(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 Cw(Rw(t),function(t){e?i[t]&&i[t].splice(Hw(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&&w_(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),x_={touchstart:1,touchmove:2,touchend:4,touchcancel:8},C_=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 Ky(e,t),e.prototype.handler=function(t){var e=x_[t.type];if(1===e&&(this.started=!0),this.started){var i=S_.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:vw,srcEvent:t})}},e}(Bw);function S_(t,e){var i=Xw(t.touches),n=Xw(t.changedTouches);return 12&e&&(i=qw(i.concat(n),"identifier",!0)),[i,n]}function D_(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 k_=D_(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`."),T_=D_(function(t,e){return k_(t,e,!0)},"merge","Use `assign`.");function O_(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&Zy(n,i)}function E_(t,e){return function(){return t.apply(e,arguments)}}var I_=function(){var t=function(t,e){return void 0===e&&(e={}),new __(t,qy({recognizers:y_.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=yw,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=ww,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=yw,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=r_,t.Manager=__,t.Input=Bw,t.TouchAction=kw,t.TouchInput=$w,t.MouseInput=Qw,t.PointerEventInput=Uw,t.TouchMouseInput=n_,t.SingleTouchInput=C_,t.Recognizer=l_,t.AttrRecognizer=d_,t.Tap=c_,t.Pan=p_,t.Swipe=m_,t.Pinch=f_,t.Rotate=g_,t.Press=v_,t.on=Lw,t.off=jw,t.each=Cw,t.merge=T_,t.extend=k_,t.bindFn=E_,t.assign=Zy,t.inherit=O_,t.bindFn=E_,t.prefixed=ow,t.toArray=Xw,t.inArray=Hw,t.uniqueArray=qw,t.splitStr=Rw,t.boolOrFn=Sw,t.hasParent=Tw,t.addEventListeners=Lw,t.removeEventListeners=jw,t.defaults=Zy({},b_,{preset:y_}),t}();I_.defaults;const P_=$g("DELETE");function A_(){const t=M_(...arguments);return F_(t),t}function M_(){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 M_(A_(e[0],e[1]),...el(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 ev(o))Object.prototype.propertyIsEnumerable.call(o,t)&&(o[t]===P_?delete n[t]:null===n[t]||null===o[t]||"object"!=typeof n[t]||"object"!=typeof o[t]||dv(n[t])||dv(o[t])?n[t]=N_(o[t]):n[t]=M_(n[t],o[t]));return n}function N_(t){return dv(t)?Gh(t).call(t,t=>N_(t)):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):M_({},t):t}function F_(t){for(const e of hl(t))t[e]===P_?delete t[e]:"object"==typeof t[e]&&null!==t[e]&&F_(t[e])}const R_="undefined"!=typeof window?window.Hammer||I_:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function L_(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=R_(this._dom.overlay);i.on("tap",xi(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{i.destroy()});const n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Pn(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()}}Xy(L_.prototype),L_.current=null,L_.prototype.destroy=function(){this.deactivate();for(const e of Hc(t=this._cleanupQueue).call(t,0).toReversed()){var t;e()}},L_.prototype.activate=function(){L_.current&&L_.current.deactivate(),L_.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)},L_.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")},L_.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const j_=/^\/?Date\((-?\d+)/i,z_=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,B_=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,H_=/^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,G_=/^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 W_(t){return t instanceof Number||"number"==typeof t}function Y_(t){return t instanceof String||"string"==typeof t}function V_(t){return"object"==typeof t&&null!==t}function U_(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 X_=Cv;function q_(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 r in e)if(Object.prototype.hasOwnProperty.call(e,r)||!0===i)if("object"==typeof e[r]&&null!==e[r]&&Fv(e[r])===Object.prototype)void 0===t[r]?t[r]=q_({},e[r],i):"object"==typeof t[r]&&null!==t[r]&&Fv(t[r])===Object.prototype?q_(t[r],e[r],i):U_(t,e,r,n);else if(dv(e[r])){var o;t[r]=el(o=e[r]).call(o)}else U_(t,e,r,n);return t}function K_(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":dv(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function $_(t,e){return[...t,e]}function J_(t){return el(t).call(t)}const Z_=ub;const Q_={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()),Y_(t)?t:W_(t)?t+"px":e||null),asElement:(t,e)=>("function"==typeof t&&(t=t()),t||e||null)};function tx(t){let e;switch(t.length){case 3:case 4:return e=B_.exec(t),e?{r:kb(e[1]+e[1],16),g:kb(e[2]+e[2],16),b:kb(e[3]+e[3],16)}:null;case 6:case 7:return e=z_.exec(t),e?{r:kb(e[1],16),g:kb(e[2],16),b:kb(e[3],16)}:null;default:return null}}function ex(t,e,i){var n;return"#"+el(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function ix(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 nx(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 ox(t,e,i){let n,o,r;const s=Math.floor(6*t),a=6*t-s,h=i*(1-e),l=i*(1-a*e),c=i*(1-(1-a)*e);switch(s%6){case 0:n=i,o=c,r=h;break;case 1:n=l,o=i,r=h;break;case 2:n=h,o=i,r=c;break;case 3:n=h,o=l,r=i;break;case 4:n=c,o=h,r=i;break;case 5:n=i,o=h,r=l}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*r)}}function rx(t,e,i){const n=ox(t,e,i);return ex(n.r,n.g,n.b)}function sx(t){const e=tx(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return ix(e.r,e.g,e.b)}function ax(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function hx(t){return H_.test(t)}function lx(t){return G_.test(t)}function cx(t){if(null===t||"object"!=typeof t)return null;if(t instanceof Element)return t;const e=Qb(t);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==typeof t[i]&&(e[i]=cx(t[i]));return e}const dx={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 ux={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 px=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 ux[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===Y_(t)){if(!0===hx(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===lx(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===ax(t)){const i=tx(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: "+dy(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=Cv({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Ry(()=>{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=Cv({},t)),this.color=t;const e=ix(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),r=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){const e=ix(this.color.r,this.color.g,this.color.b);e.v=t/100;const i=ox(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=ix(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),Wy(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=xi(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=xi(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=xi(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=xi(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 R_(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,r,s;t.clearRect(0,0,e,i),this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;const a=2*Math.PI/360,h=1/360,l=1/this.r;let c;for(r=0;r<360;r++)for(s=0;s<this.r;s++)n=this.centerCoordinates.x+s*Math.sin(a*r),o=this.centerCoordinates.y+s*Math.cos(a*r),c=ox(r*h,s*l,1),t.fillStyle="rgb("+c.r+","+c.g+","+c.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,r=.5*this.colorPickerDiv.clientWidth,s=i-r,a=n-o,h=Math.atan2(s,a),l=.98*Math.min(Math.sqrt(s*s+a*a),r),c=Math.cos(h)*l+o,d=Math.sin(h)*l+r;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+"px";let u=h/(2*Math.PI);u=u<0?u+1:u;const p=l/this.r,m=ix(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;const f=ox(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 mx(){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(mx(...el(e).call(e,1))),t}}let fx,gx=!1;const vx="background: #FFeeee; color: #dd0000";const bx=L_,yx=px,wx=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},Cv(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new px(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(dv(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!==po(t)&&(this.options.filter=po(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===po(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=po(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===Nc(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 Pn(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(mx("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!==Nc(t).call(t,e)&&(o=Nc(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 r=this;n.onchange=function(){r._update(this.value,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeRange(t,e,i){const n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=r}catch(t){}a.step=s;let h="",l=0;if(void 0!==e){const t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<o&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>r&&1!==r&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=n;const c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;const d=this;a.onchange=function(){c.value=this.value,d._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};const u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,c);""!==h&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(h,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=Ry(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Ry(()=>{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 r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,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 r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,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 r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,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=po(this.options);let r=!1;for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)){n=!0;const a=t[s],h=$_(e,s);if("function"==typeof o&&(n=o(s,e),!1===n&&!dv(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==n){r=!0;const t=this._getValue(h);if(dv(a))this._handleArray(a,t,h);else if("string"==typeof a)this._makeTextInput(a,t,h);else if("boolean"==typeof a)this._makeCheckbox(a,t,h);else if(a instanceof Object){if(!this.hideOption(e,s,this.moduleOptions))if(void 0!==a.enabled){const t=$_(h,"enabled"),e=this._getValue(t);if(!0===e){const t=this._makeLabel(s,h,!0);this._makeItem(h,t),r=this._handleObject(a,h)||r}else this._makeCheckbox(a,e,h)}else{const t=this._makeLabel(s,h,!0);this._makeItem(h,t),r=this._handleObject(a,h)||r}}else console.error("dont know how to handle",a,s,h)}}return r}_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(mx("pre","const options = "+dy(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}},_x=R_,xx=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=kb(t),this.y=kb(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,r=0;if("flip"==this.overflowMethod){let i=!1,s=!0;this.y-t<this.padding&&(s=!1),this.x+e>n-this.padding&&(i=!0),o=i?this.x-e:this.x,r=s?this.y-t:this.y}else r=this.y-t,r+t+this.padding>i&&(r=i-t-this.padding),r<this.padding&&(r=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=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)}},Cx=vx,Sx=class t{static validate(e,i,n){gx=!1,fx=i;let o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),gx}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 r=e,s=!0;void 0===n[e]&&void 0!==n.__any__&&(r="__any__",s="object"===t.getType(i[e]));let a=n[r];s&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,r,a,o)}static checkFields(e,i,n,o,r,s){const a=function(i){console.error("%c"+i+t.printLocation(s,e),vx)},h=t.getType(i[e]),l=r[h];void 0!==l?"array"===t.getType(l)&&-1===Nc(l).call(l,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(l)+' not "'+i[e]+'". '),gx=!0):"object"===h&&"__any__"!==o&&(s=$_(s,e),t.parse(i[e],n[o],s)):void 0===r.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(hl(r))+". Received ["+h+'] "'+i[e]+'"'),gx=!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":dv(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),r=t.findInOptions(e,fx,[],!0);let s;s=void 0!==o.indexMatch?" in "+t.printLocation(o.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':r.distance<=4&&o.distance>r.distance?" in "+t.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(r.path,r.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+t.printLocation(o.path,e):". Did you mean one of these: "+t.print(hl(i))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+s,vx),gx=!0}static findInOptions(e,i,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[];const h=e.toLowerCase();let l;for(const d in i){let u;if(void 0!==i[d].__type__&&!0===o){const o=t.findInOptions(e,i[d],$_(n,d));r>o.distance&&(s=o.closestMatch,a=o.path,r=o.distance,l=o.indexMatch)}else{var c;-1!==Nc(c=d.toLowerCase()).call(c,h)&&(l=d),u=t.levenshteinDistance(e,d),r>u&&(s=d,a=J_(n),r=u)}}return{closestMatch:s,path:a,distance:r,indexMatch:l}}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 dy(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 Dx,kx,Tx,Ox,Ex,Ix,Px,Ax,Mx,Nx,Fx,Rx=Object.freeze({__proto__:null,Activator:bx,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=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),i=Gg(e,3),n=i[0],o=i[1],r=i[2],s=1;const a=()=>{const t=2091639*n+2.3283064365386963e-10*s;return n=o,o=r,r=t-(s=0|t)};return a.uint32=()=>4294967296*a(),a.fract53=()=>a()+11102230246251565e-32*(2097152*a()|0),a.algorithm="Alea",a.seed=t,a.version="0.9",a}(e.length?e:[Un()])},ColorPicker:yx,Configurator:wx,DELETE:P_,HSVToHex:rx,HSVToRGB:ox,Hammer:_x,Popup:xx,RGBToHSV:ix,RGBToHex:ex,VALIDATOR_PRINT_STYLE:Cx,Validator:Sx,addClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=qv(i).call(i,po(n).call(n,function(t){return!Zl(i).call(i,t)})),t.className=i.join(" ")},addCssText:function(t,e){const i=nx(e);for(const e of Lb(i)){var n=Gg(e,2);const i=n[0],o=n[1];t.style.setProperty(i,o)}},binarySearchCustom:function(t,e,i,n){let o=0,r=0,s=t.length-1;for(;r<=s&&o<1e4;){const a=Math.floor((r+s)/2),h=t[a],l=e(void 0===n?h[i]:h[i][n]);if(0==l)return a;-1==l?r=a+1:s=a-1,o++}return-1},binarySearchValue:function(t,e,i,n,o){let r,s,a,h,l=0,c=0,d=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};c<=d&&l<1e4;){if(h=Math.floor(.5*(d+c)),r=t[Math.max(0,h-1)][i],s=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==o(s,e))return h;if(o(r,e)<0&&o(s,e)>0)return"before"==n?Math.max(0,h-1):h;if(o(s,e)<0&&o(a,e)>0)return"before"==n?h:Math.min(t.length-1,h+1);o(s,e)<0?c=h+1:d=h-1,l++}return-1},bridgeObject:cx,copyAndExtendArray:$_,copyArray:J_,deepExtend:q_,deepObjectAssign:A_,easingFunctions:dx,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:X_,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])U_(e,i,o,n);else{const r=e[o],s=i[o];V_(r)&&V_(s)&&t(r,s,n)}},forEach:function(t,e){if(dv(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:K_,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:sx,hexToRGB:tx,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(Y_(t)){if(j_.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:W_,isObject:V_,isString:Y_,isValidHex:ax,isValidRGB:hx,isValidRGBA:lx,mergeOptions:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=function(t){return null!=t},r=function(t){return null!==t&&"object"==typeof t};if(!r(t))throw new Error("Parameter mergeTarget must be an object");if(!r(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!r(n))throw new Error("Parameter globalOptions must be an object");const s=e[i],a=r(n)&&!function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(n)?n[i]:void 0,h=a?a.enabled:void 0;if(void 0===s)return;if("boolean"==typeof s)return r(t[i])||(t[i]={}),void(t[i].enabled=s);if(null===s&&!r(t[i])){if(!o(a))return;t[i]=Qb(a)}if(!r(s))return;let l=!0;void 0!==s.enabled?l=s.enabled:void 0!==h&&(l=a.enabled),function(t,e,i){r(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=l},option:Q_,overrideOpacity:function(t,e){if(Zl(t).call(t,"rgba"))return t;if(Zl(t).call(t,"rgb")){const i=t.substr(Nc(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}{const i=tx(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"}},parseColor:function(t,e){if(Y_(t)){let e=t;if(hx(e)){var i;const t=Gh(i=e.substr(4).substr(0,e.length-5).split(",")).call(i,function(t){return kb(t)});e=ex(t[0],t[1],t[2])}if(!0===ax(e)){const t=sx(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=rx(n.h,n.s,n.v),r=rx(i.h,i.s,i.v);return{background:e,border:o,highlight:{background:r,border:o},hover:{background:r,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:Y_(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:Y_(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:Y_(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:Y_(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:function(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 A_({},t,...i)},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=po(i).call(i,function(t){return!Zl(n).call(n,t)}),t.className=i.join(" ")},removeCssText:function(t,e){const i=nx(e);for(const e of hl(i))t.style.removeProperty(e)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"==typeof e){const i=Qb(e);for(let n=0;n<t.length;n++)Object.prototype.hasOwnProperty.call(e,t[n])&&"object"==typeof e[t[n]]&&(i[t[n]]=cx(e[t[n]]));return i}return null},selectiveDeepExtend:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(dv(i))throw new TypeError("Arrays are not supported by deepExtend");for(let o=0;o<t.length;o++){const r=t[o];if(Object.prototype.hasOwnProperty.call(i,r))if(i[r]&&i[r].constructor===Object)void 0===e[r]&&(e[r]={}),e[r].constructor===Object?q_(e[r],i[r],!1,n):U_(e,i,r,n);else{if(dv(i[r]))throw new TypeError("Arrays are not supported by deepExtend");U_(e,i,r,n)}}return e},selectiveExtend:function(t,e){if(!dv(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(dv(i))throw new TypeError("Arrays are not supported by deepExtend");for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&!Zl(t).call(t,o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?q_(e[o],i[o]):U_(e,i,o,n);else if(dv(i[o])){e[o]=[];for(let t=0;t<i[o].length;t++)e[o].push(i[o][t])}else U_(e,i,o,n);return e},throttle:function(t){let e=!1;return()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,t()}))}},toArray:Z_,topMost:function(t,e){let i;dv(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)}}),Lx={exports:{}},jx={},zx={exports:{}},Bx={};function Hx(){if(Dx)return Bx;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}Dx=1;var e=/javascript\s*\:/gim;return Bx.whiteList=t(),Bx.getDefaultWhiteList=t,Bx.onAttr=function(t,e,i){},Bx.onIgnoreAttr=function(t,e,i){},Bx.safeAttrValue=function(t,i){return e.test(i)?"":i},Bx}function Gx(){return Tx?kx:(Tx=1,kx={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 Wx(){if(Px)return Ix;Px=1;var t=Hx(),e=function(){if(Ex)return Ox;Ex=1;var t=Gx();return Ox=function(e,i){";"!==(e=t.trimRight(e))[e.length-1]&&(e+=";");var n=e.length,o=!1,r=0,s=0,a="";function h(){if(!o){var n=t.trim(e.slice(r,s)),h=n.indexOf(":");if(-1!==h){var l=t.trim(n.slice(0,h)),c=t.trim(n.slice(h+1));if(l){var d=i(r,a.length,l,c,n);d&&(a+=d+"; ")}}}r=s+1}for(;s<n;s++){var l=e[s];if("/"===l&&"*"===e[s+1]){var c=e.indexOf("*/",s+2);if(-1===c)break;r=(s=c+1)+1,o=!1}else"("===l?o=!0:")"===l?o=!1:";"===l?o||h():"\n"===l&&h()}return t.trim(a)},Ox}();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 Gx(),n.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var n=this.options,o=n.whiteList,r=n.onAttr,s=n.onIgnoreAttr,a=n.safeAttrValue;return e(t,function(t,e,n,h,l){var c=o[n],d=!1;if(!0===c?d=c:"function"==typeof c?d=c(h):c instanceof RegExp&&(d=c.test(h)),!0!==d&&(d=!1),h=a(n,h)){var u,p={position:e,sourcePosition:t,source:l,isWhite:d};return d?i(u=r(n,h,p))?n+":"+h:u:i(u=s(n,h,p))?void 0:u}})},Ix=n}function Yx(){return Ax||(Ax=1,function(t,e){var i=Hx(),n=Wx();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)}(zx,zx.exports)),zx.exports}function Vx(){return Nx?Mx:(Nx=1,Mx={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 Ux(){if(Fx)return jx;Fx=1;var t=Yx().FilterCSS,e=Yx().getDefaultWhiteList,i=Vx();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 r(t){return t.replace(s,"&lt;").replace(a,"&gt;")}var s=/</g,a=/>/g,h=/"/g,l=/&quot;/g,c=/&#([a-zA-Z0-9]*);?/gim,d=/&colon;?/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(h,"&quot;")}function v(t){return t.replace(l,'"')}function b(t){return t.replace(c,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function y(t){return t.replace(d,":").replace(u," ")}function w(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 _(t){return t=w(t=y(t=b(t=v(t))))}function x(t){return t=r(t=g(t))}return jx.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"]},jx.getDefaultWhiteList=n,jx.onTag=function(t,e,i){},jx.onIgnoreTag=function(t,e,i){},jx.onTagAttr=function(t,e,i){},jx.onIgnoreTagAttr=function(t,e,i){},jx.safeAttrValue=function(t,e,n,r){if(n=_(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!==r&&(n=(r=r||o).process(n))}return n=x(n)},jx.escapeHtml=r,jx.escapeQuote=g,jx.unescapeQuote=v,jx.escapeHtmlEntities=b,jx.escapeDangerHtml5Entities=y,jx.clearNonPrintableCharacter=w,jx.friendlyAttrValue=_,jx.escapeAttrValue=x,jx.onIgnoreTagStripAll=function(){return""},jx.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var n=!Array.isArray(t),o=[],r=!1;return{onIgnoreTag:function(s,a,h){if(function(e){return!!n||-1!==i.indexOf(t,e)}(s)){if(h.isClosing){var l="[/removed]",c=h.position+10;return o.push([!1!==r?r:h.position,c]),r=!1,l}return r||(r=h.position),"[removed]"}return e(s,a,h)},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)}}},jx.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},jx.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("")},jx.attributeWrapSign='"',jx.cssFilter=o,jx.getDefaultCSSWhiteList=e,jx}var Xx,qx,Kx,$x,Jx={};function Zx(){if(Xx)return Jx;Xx=1;var t=Vx();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 r(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}}function s(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 Jx.parseTag=function(t,n,o){var r="",s=0,a=!1,h=!1,l=0,c=t.length,d="",u="";t:for(l=0;l<c;l++){var p=t.charAt(l);if(!1===a){if("<"===p){a=l;continue}}else if(!1===h){if("<"===p){r+=o(t.slice(s,l)),a=l,s=l;continue}if(">"===p||l===c-1){r+=o(t.slice(s,a)),d=e(u=t.slice(a,l+1)),r+=n(a,r.length,d,u,i(u)),s=l+1,a=!1;continue}if('"'===p||"'"===p)for(var m=1,f=t.charAt(l-m);""===f.trim()||"="===f;){if("="===f){h=p;continue t}f=t.charAt(l-++m)}}else if(p===h){h=!1;continue}}return s<c&&(r+=o(t.substr(s))),r},Jx.parseAttr=function(e,i){var h=0,l=0,c=[],d=!1,u=e.length;function p(e,o){if(!((e=(e=t.trim(e)).replace(n,"").toLowerCase()).length<1)){var r=i(e,o||"");r&&c.push(r)}}for(var m=0;m<u;m++){var f,g=e.charAt(m);if(!1!==d||"="!==g)if(!1===d||m!==l)if(/\s|\n|\t/.test(g)){if(e=e.replace(/\s|\n|\t/g," "),!1===d){if(-1===(f=o(e,m))){p(t.trim(e.slice(h,m))),d=!1,h=m+1;continue}m=f-1;continue}if(-1===(f=s(e,m-1))){p(d,a(t.trim(e.slice(h,m)))),d=!1,h=m+1;continue}}else;else{if(-1===(f=e.indexOf(g,m+1)))break;p(d,t.trim(e.slice(l+1,f))),d=!1,h=(m=f)+1}else d=e.slice(h,m),h=m+1,l='"'===e.charAt(h)||"'"===e.charAt(h)?h:r(e,m+1)}return h<e.length&&(!1===d?p(e.slice(h)):p(d,a(t.trim(e.slice(h))))),t.trim(c.join(" "))},Jx}function Qx(){if(Kx)return qx;Kx=1;var t=Yx().FilterCSS,e=Ux(),i=Zx(),n=i.parseTag,o=i.parseAttr,r=Vx();function s(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,h=a.whiteList,l=a.onTag,c=a.onIgnoreTag,d=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,c),c=v.onIgnoreTag);var b=n(t,function(t,e,i,n,a){var v={sourcePosition:t,position:e,isClosing:a,isWhite:Object.prototype.hasOwnProperty.call(h,i)},b=l(i,n,v);if(!s(b))return b;if(v.isWhite){if(v.isClosing)return"</"+i+">";var y=function(t){var e=r.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=r.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=r.trim(t.slice(0,-1))),{html:t,closing:i}}(n),w=h[i],_=o(y.html,function(t,e){var n=-1!==r.indexOf(w,t),o=d(i,t,e,n);return s(o)?n?(e=p(i,t,e,g))?t+"="+f+e+f:t:s(o=u(i,t,e,n))?void 0:o:o});return n="<"+i,_&&(n+=" "+_),y.closing&&(n+=" /"),n+=">"}return s(b=c(i,n,v))?m(n):b},m);return v&&(b=v.remove(b)),b},qx=a}var tC=($x||($x=1,function(t,e){var i=Ux(),n=Zx(),o=Qx();function r(t,e){return new o(e).process(t)}(e=t.exports=r).filterXSS=r,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)}(Lx,Lx.exports)),Lx.exports),eC=b(tC);const iC=[];for(let t=0;t<256;++t)iC.push((t+256).toString(16).slice(1));const nC=new Uint8Array(16);function oC(t,e,i){return crypto.randomUUID?crypto.randomUUID():function(t){t=t||{};const e=t.random??t.rng?.()??crypto.getRandomValues(nC);if(e.length<16)throw new Error("Random bytes length must be >= 16");return e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(t,e=0){return(iC[t[e+0]]+iC[t[e+1]]+iC[t[e+2]]+iC[t[e+3]]+"-"+iC[t[e+4]]+iC[t[e+5]]+"-"+iC[t[e+6]]+iC[t[e+7]]+"-"+iC[t[e+8]]+iC[t[e+9]]+"-"+iC[t[e+10]]+iC[t[e+11]]+iC[t[e+12]]+iC[t[e+13]]+iC[t[e+14]]+iC[t[e+15]]).toLowerCase()}(e)}(t)}function rC(t,e){var i=hl(t);if(zd){var n=zd(t);e&&(n=po(n).call(n,function(e){return Qd(t,e).enumerable})),i.push.apply(i,n)}return i}function sC(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?Pn(i=rC(Object(o),!0)).call(i,function(e){Om(t,e,o[e])}):cu?ku(t,cu(o)):Pn(n=rC(Object(o))).call(n,function(e){uf(t,e,Qd(o,e))})}return t}function aC(t){var e;if(!t)return!1;let n=null!==(e=t.idProp)&&void 0!==e?e:t._idProp;return!!n&&i.isDataViewLike(n,t)}const hC=/^\/?Date\((-?\d+)/i,lC=/^\d+$/;function cC(t,i){let n;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Y_(t)&&!isNaN(Date.parse(t))?e(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":try{return cC(t,"Moment").toDate()}catch(e){throw e instanceof TypeError?new TypeError("Cannot convert object of type "+K_(t)+" to type "+i,{cause:e}):e}case"Moment":if(W_(t))return e(t);if(t instanceof Date)return e(t.valueOf());if(e.isMoment(t))return e(t);if(Y_(t))return n=hC.exec(t),n?e(Number(n[1])):(n=lC.exec(t),e(n?Number(t):t));throw new TypeError("Cannot convert object of type "+K_(t)+" to type "+i);case"ISODate":if(W_(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(e.isMoment(t))return t.toDate().toISOString();if(Y_(t))return n=hC.exec(t),n?new Date(Number(n[1])).toISOString():e(t).format();throw new Error("Cannot convert object of type "+K_(t)+" to type ISODate");case"ASPDate":if(W_(t))return"/Date("+t+")/";if(t instanceof Date||e.isMoment(t))return"/Date("+t.valueOf()+")/";if(Y_(t)){let e;return n=hC.exec(t),e=n?new Date(Number(n[1])).valueOf():new Date(t).valueOf(),"/Date("+e+")/"}throw new Error("Cannot convert object of type "+K_(t)+" to type ASPDate");default:throw new Error("Unknown type ".concat(i))}}}function dC(t){var e,n,o,r,s,a;let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"};const l=t._idProp,c=new i.DataSet({fieldId:l}),d=Gh(e=i.createNewDataPipeFrom(t)).call(e,t=>{var e;return Qm(e=hl(t)).call(e,(e,i)=>(e[i]=cC(t[i],h[i]),e),{})}).to(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:xi(n=Pn(c)).call(n,c),get:xi(o=c.get).call(o,c),getIds:xi(r=c.getIds).call(r,c),off:xi(s=c.off).call(s,c),on:xi(a=c.on).call(a,c),get length(){return c.length},idProp:l,type:h,rawDS:t,coercedDS:c,dispose:()=>d.stop()}}const uC=t=>{const e=new eC.FilterXSS(t);return t=>"string"==typeof t?e.process(t):t},pC=t=>t;let mC=uC();const fC=sC(sC({},Rx),{},{convert:cC,setupXSSProtection:t=>{t&&(!0===t.disabled?(mC=pC,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(mC=uC(t.filterOptions)))}});uf(fC,"xss",{get:function(){return mC}});const gC=.001;function vC(t){bc(t).call(t,(t,e)=>t.data.start-e.data.start)}function bC(t){bc(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 yC(t,e,i,n){return null===SC(t,e.item,!1,t=>t.stack&&(i||null===t.top),t=>t.stack,()=>e.axis,n)}function wC(t,e,i){const n=SC(t,e.item,!1,t=>t.stack,()=>!0,t=>t.baseTop);i.height=n-i.top+.5*e.item.vertical}function _C(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 r=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||(r+=i[e].height,i[t[o].data.subgroup].top=r);t[o].top=r+.5*e.item.vertical}n||xC(t,e,i)}function xC(t,e,i){SC(ub(i).toSorted((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 CC(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 r=0;r<o.length;r++){let s=o[r];if(!Object.prototype.hasOwnProperty.call(i,s))continue;n=n||i[s].stack,i[s].top=0;for(const t in i)i[t].visible&&i[s].index>i[t].index&&(i[s].top+=i[t].height);const a=t[s];for(let t=0;t<a.length;t++)void 0!==a[t].data.subgroup&&(a[t].top=i[a[t].data.subgroup].top+.5*e.item.vertical,i[s].stack&&(a[t].baseTop=a[t].top));n&&i[s].stack&&wC(t[s],e,i[s])}}function SC(t,e,i,n,o,r,s){let a=t=>t.start,h=t=>t.end;if(!i){const i=!(!t[0]||!t[0].options.rtl);a=i?t=>t.right:t=>t.left,h=t=>a(t)+t.width+e.horizontal}const l=[],c=[];let d=null,u=0;for(const e of t)if(n(e))l.push(e);else if(o(e)){const t=a(e);null!==d&&t<d-gC&&(u=0),d=t,u=kC(c,e=>a(e)-gC>t,u),Hc(c).call(c,u,0,e),u++}d=null;let p=null;u=0;let m=0,f=0,g=0;for(;l.length>0;){const t=l.shift();t.top=r(t);const i=a(t),n=h(t);null!==d&&i<d-gC&&(m=0,f=0,u=0,p=null),(null===d||i>d+gC)&&(m=kC(c,t=>i<h(t)-gC,m)),d=i,(null===p||p<n-gC)&&(f=kC(c,t=>n<a(t)-gC,Math.max(m,f))),null!==p&&p-gC>n&&(f=TC(c,t=>n+gC>=a(t),m,f)+1),p=n;const v=OC(c,t=>i<h(t)-gC,m,f).toSorted((t,e)=>t.top-e.top);for(let i=0;i<v.length;i++){const n=v[i];DC(t,n,e)&&(t.top=n.top+n.height+e.vertical)}o(t)&&(u=kC(c,t=>a(t)-gC>i,u),Hc(c).call(c,u,0,t),u<m&&m++,u<=f&&f++,u++);const b=t.top+t.height;if(b>g&&(g=b),s&&s())return null}return g}function DC(t,e,i){return t.top-i.vertical+gC<e.top+e.height&&t.top+t.height+i.vertical-gC>e.top}function kC(t,e,i){i||(i=0);for(let n=i;n<t.length;n++)if(e(t[n]))return n;return t.length}function TC(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 OC(t,e,i,n){i||(i=0),n=n?Math.min(n,t.length):t.length;const o=[];for(let r=i;r<n;r++)e(t[r])&&o.push(t[r]);return o}var EC=Object.freeze({__proto__:null,nostack:_C,orderByEnd:bC,orderByStart:vC,stack:yC,stackSubgroups:xC,stackSubgroupsWithInnerStack:CC,substack:wC});const IC="__background__";class PC{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=xi(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?fC.xss(e):fC.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?fC.removeClassName(this.dom.inner,"vis-hidden"):fC.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),fC.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(fC.removeClassName(this.dom.label,"collapsed"),fC.addClassName(this.dom.label,"expanded")):(fC.removeClassName(this.dom.label,"expanded"),fC.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,fC.removeClassName(this.dom.label,"collapsed"),fC.removeClassName(this.dom.label,"expanded"),fC.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(fC.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?fC.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):fC.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):fC.addClassName(this.dom.label,"vis-group-level-0");const o=t&&t.className||null;o!=this.className&&(this.className&&(fC.removeClassName(this.dom.label,this.className),fC.removeClassName(this.dom.foreground,this.className),fC.removeClassName(this.dom.background,this.className),fC.removeClassName(this.dom.axis,this.className)),fC.addClassName(this.dom.label,o),fC.addClassName(this.dom.foreground,o),fC.addClassName(this.dom.background,o),fC.addClassName(this.dom.axis,o),this.className=o),this.style&&(fC.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(fC.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;Pn(fC).call(fC,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++)Pn(fC).call(fC,e,e=>{e[t]()});return!0}return!1}_calculateGroupSizeAndPosition(){const t=this.dom.foreground,e=t.offsetTop,i=t.offsetLeft,n=t.offsetWidth;this.top=e,this.right=i,this.width=n}_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(Un()-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,r,s,a,h,l;const t={byEnd:po(o=this.orderedItems.byEnd).call(o,t=>!t.isCluster),byStart:po(r=this.orderedItems.byStart).call(r,t=>!t.isCluster)},e={byEnd:[...new kh(po(s=Gh(a=this.orderedItems.byEnd).call(a,t=>t.cluster)).call(s,t=>!!t))],byStart:[...new kh(po(h=Gh(l=this.orderedItems.byStart).call(l,t=>t.cluster)).call(h,t=>!!t))]},m=()=>{var i,o;return[...this._updateItemsInRange(t,po(i=this.visibleItems).call(i,t=>!t.isCluster),n),...this._updateClustersInRange(e,po(o=this.visibleItems).call(o,t=>t.isCluster),n)]},f=t=>{let e={};for(const n in this.subgroups){var i;if(!Object.prototype.hasOwnProperty.call(this.subgroups,n))continue;const o=po(i=this.visibleItems).call(i,t=>t.data.subgroup===n);e[n]=t?o.toSorted((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){CC(f(this.itemSet.options.order),i,this.subgroups),this.visibleItems=m(),this._updateSubGroupHeights(i)}else{var c,d,u;this.visibleItems=m(),this._updateSubGroupHeights(i);const e=po(c=el(d=this.visibleItems).call(d)).call(c,t=>t.isCluster||!t.isCluster&&!t.cluster).toSorted((e,i)=>t.itemSet.options.order(e.data,i.data));this.shouldBailStackItems=yC(e,i,!0,xi(u=this._shouldBailItemsRedraw).call(u,this))}}else if(this.visibleItems=m(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){CC(f(),i,this.subgroups)}else{var p;this.shouldBailStackItems=yC(this.visibleItems,i,!0,xi(p=this._shouldBailItemsRedraw).call(p,this))}else _C(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&&Pn(fC).call(fC,this.items,t=>{t.cluster&&t.displayed&&t.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=fC.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=fC.updateProperty(this.props.label,"width",i)||t,t=fC.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==IC||i.displayed&&i.hide()}}redraw(t,e,i,n){var o,r,s,a;let h=!1;const l=this.isVisible;let c;const d=[()=>{i=this._didMarkerHeightChange.call(this)||i},xi(o=this._updateSubGroupHeights).call(o,this,e),xi(r=this._calculateGroupSizeAndPosition).call(r,this),()=>{var i;this.isVisible=xi(i=this._isGroupVisible).call(i,this)(t,e)},()=>{var n;xi(n=this._redrawItems).call(n,this)(i,l,e,t)},xi(s=this._updateSubgroupsSizes).call(s,this),()=>{var t;c=this.height=xi(t=this._calculateHeight).call(t,this)(e)},xi(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var t;h=xi(t=this._didResize).call(t,this)(h,c)},()=>{var t;xi(t=this._applyGroupHeight).call(t,this)(c)},()=>{var t;xi(t=this._updateItemsVerticalPosition).call(t,this)(e)},()=>(!this.isVisible&&this.height&&(h=!1),h)];if(n)return d;{let t;return Pn(d).call(d,e=>{t=e()}),t}}_updateSubGroupHeights(t){if(hl(this.subgroups).length>0){const e=this;this._resetSubgroups(),Pn(fC).call(fC,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?fC.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(Pn(fC).call(fC,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,Pn(fC).call(fC,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;this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups());if(!(this.itemSet.options.cluster&&!t.isCluster)&&!Zl(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,r=n-1;Pn(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(r)&&(r=e)}),t.subgroups[i].start=o,t.subgroups[i].end=new Date(r-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]});bc(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);bc(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=Nc(e=this.visibleItems).call(e,t);-1!=n&&Hc(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 r=Nc(i=o.items).call(i,t);var n;if(r>=0)Hc(n=o.items).call(n,r,1),o.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}removeFromDataSet(t){this.itemSet.removeItem(t.id)}order(){const t=fC.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},vC(this.orderedItems.byStart),bC(this.orderedItems.byEnd)}_updateItemsInRange(t,e,i){const n=[],o={};if(!this.isVisible&&void 0!==this.height&&this.groupId!=IC){for(let t=0;t<e.length;t++){var r=e[t];r.displayed&&r.hide()}return n}const s=(i.end-i.start)/4,a=i.start-s,h=i.end+s;if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],n,o,i);const l=fC.binarySearchCustom(t.byStart,t=>t<a?-1:t<=h?0:1,"data","start");this._traceVisible(l,t.byStart,n,o,t=>t.data.start<a||t.data.start>h);for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],n,o,i);this._sortVisibleItems(t.byStart,n,o);const c={};let d=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;c[t]=e.redraw(i),d=c[t].length}}if(d>0)for(let t=0;t<d;t++)Pn(fC).call(fC,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 r=t;r>=0;r--){let t=e[r];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.unshift(t))}for(let r=t+1;r<e.length;r++){let t=e[r];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 r={};let s=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;r[t]=e.redraw(i),s=r[t].length}}if(s>0)for(var a=0;a<s;a++)Pn(fC).call(fC,r,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 AC extends PC{constructor(t,e,i){super(t,e,i),this.width=0,this.height=0,this.top=0,this.left=0}redraw(t,e){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 MC{constructor(){this.options=null,this.props=null}setOptions(t){t&&fC.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}}const NC="undefined"!=typeof window&&window.moment||e,FC={current:"current",time:"time",deleteSelected:"Delete selected"},RC={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},LC={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},jC={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},zC={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},BC={current:"actual",time:"hora",deleteSelected:"Eliminar selección"},HC={current:"поточний",time:"час",deleteSelected:"Видалити обране"},GC={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},WC={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},YC={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},VC={current:"güncel",time:"zaman",deleteSelected:"Seçileni sil"},UC={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},XC={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},qC={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},KC={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},$C={en:FC,en_EN:FC,en_US:FC,it:RC,it_IT:RC,it_CH:RC,nl:LC,nl_NL:LC,nl_BE:LC,de:jC,de_DE:jC,de_CH:jC,fr:zC,fr_FR:zC,fr_CA:zC,fr_BE:zC,fr_CH:zC,es:BC,es_ES:BC,uk:HC,uk_UA:HC,ru:GC,ru_RU:GC,pl:WC,pl_PL:WC,pt:YC,pt_BR:YC,pt_PT:YC,tr:VC,tr_TR:VC,ja:UC,ja_JP:UC,lt:KC,lt_LT:KC,sv:XC,sv_SE:XC,nb:qC,nn:qC,nb_NO:qC,nn_NO:qC};class JC extends MC{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:NC,locales:$C,locale:"en"},this.options=fC.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=fC.extend({},$C,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];Pn(i=hl(this.options.locales)).call(i,t=>{this.options.locales[t]=fC.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&&fC.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(Un()+this.offset);this.options.alignCurrentTime&&(n=n.startOf(this.options.alignCurrentTime));const o=this.body.util.toScreen(n);let r=this.options.locales[this.options.locale];r||(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),r=this.options.locales.en);let s=qv(t=qv(e="".concat(r.current," ")).call(e,r.time,": ")).call(t,n.format("dddd, MMMM Do YYYY, H:mm:ss"));s=s.charAt(0).toUpperCase()+s.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=s}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=Ry(e,i)}()}stop(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(t){const e=fC.convert(t,"Date").valueOf(),i=Un();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Un()+this.offset)}}var ZC=null;function QC(t,e){var i=e||{preventDefault:!1};if(t.Manager){var n=t,o=function(t,e){var o=Object.create(i);return e&&n.assign(o,e),QC(new n(t,o),o)};return n.assign(o,n),o.Manager=function(t,e){var o=Object.create(i);return e&&n.assign(o,e),QC(new n.Manager(t,o),o)},o}var r=Object.create(t),s=t.element;function a(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=ZC;for(var n=ZC.isConnected?ZC:t.target;n&&!e;){var o=n.hammer;if(o)for(var r,s=0;s<o.length;s++)if(r=o[s]._handlers[t.type])for(var a=0;a<r.length&&!e;a++)r[a](t);n=n.parentNode}}return s.hammer||(s.hammer=[]),s.hammer.push(r),t.on("hammer.input",function(t){!0!==i.preventDefault&&i.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(ZC=t.target)}),r._handlers={},r.on=function(e,i){return a(e).forEach(function(e){var n=r._handlers[e];n||(r._handlers[e]=n=[],t.on(e,h)),n.push(i)}),r},r.off=function(e,i){return a(e).forEach(function(e){var n=r._handlers[e];n&&((n=i?n.filter(function(t){return t!==i}):[]).length>0?r._handlers[e]=n:(t.off(e,h),delete r._handlers[e]))}),r},r.emit=function(e,i){ZC=i.target,t.emit(e,i)},r.destroy=function(){var e=t.element.hammer,i=e.indexOf(r);-1!==i&&e.splice(i,1),e.length||delete t.element.hammer,r._handlers={},t.destroy()},r}const tS=function(){if("undefined"!=typeof window){return QC(window.Hammer||I_,{preventDefault:"mouse"})}return function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()}}();class eS extends MC{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={moment:NC,locales:$C,locale:"en",id:void 0,title:void 0},this.options=fC.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=fC.extend({},$C,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];Pn(i=hl(this.options.locales)).call(i,t=>{this.options.locales[t]=fC.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&&fC.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 r(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",xi(r).call(r,this),!1),o.addEventListener("DOMMouseScroll",xi(r).call(r,this),!1)):o.attachEvent("onmousewheel",xi(r).call(r,this)),n.appendChild(o),this.hammer=new tS(o),this.hammer.on("panstart",xi(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",xi(e=this._onDrag).call(e,this)),this.hammer.on("panend",xi(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:tS.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=qv(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=fC.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=fC.xss(t),this.marker.style.position="absolute",e)&&(this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",()=>{this.marker.focus()}),this.marker.addEventListener("input",xi(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(),r=this.body.util.getStep(),s=this.options.snap,a=s?s(n,o,r):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}}var iS,nS,oS,rS,sS,aS,hS,lS,cS,dS={};function uS(){if(nS)return iS;nS=1;var t=N(),e=y(),i=_(),n=ih(),o=fb().trim,r=mb(),s=i("".charAt),a=t.parseFloat,h=t.Symbol,l=h&&h.iterator,c=1/a(r+"-0")!=-1/0||l&&!e(function(){a(Object(l))});return iS=c?function(t){var e=o(n(t)),i=a(e);return 0===i&&"-"===s(e,0)?-0:i}:a,iS}function pS(){return sS?rS:(sS=1,function(){if(oS)return dS;oS=1;var t=di(),e=uS();t({global:!0,forced:parseFloat!==e},{parseFloat:e})}(),rS=Ft().parseFloat)}function mS(){return hS?aS:(hS=1,aS=pS())}var fS=b(cS?lS:(cS=1,lS=mS()));class gS{constructor(t,e,i,n,o,r){let s=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=r,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=s,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,r=()=>{o.magnitudefactor*=2},s=()=>{o.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||r(),r()):(this.minorStepIdx=2,1==e||s(),s()));const a=t.convertValue(0),h=t.getStep()*t.scale;let l=!1,c=0;for(;!l&&c++<5;){this.scale=h/(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,c=this.magnitudefactor*this.majorSteps[this.minorStepIdx],d=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-=d/this.scale,this._end=this._start+e):(this._start+=c-d/this.scale,this._end=this._start+e);if(!this.autoScaleEnd&&this._end>n+1e-5)s(),l=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){s(),l=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e<n-i?(r(),l=!1):l=!0}}}convertValue(t){return this.containerHeight-(t-this._start)*this.scale}screenToValue(t){return(this.containerHeight-t)/this.scale+this._start}}class vS extends MC{constructor(t,e,i,n){super(),this.id=oC(),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(fS(t.toPrecision(3))),title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>"".concat(fS(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=fC.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"];fC.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;n(this.svgElements);const e=this.options.iconWidth;let i=11.5;t="left"===this.options.orientation?4:this.width-e-4;const r=hl(this.groups);bc(r).call(r,(t,e)=>t<e?-1:1);for(const n of r)!0!==this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&!0!==this.linegraphOptions.visibility[n]||(this.groups[n].getLegend(e,15,this.framework,t,i),i+=19);o(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){!1===this.iconsRemoved&&(n(this.svgElements),o(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,r=this.options.showMajorLabels,s=this.body.dom.backgroundHorizontal.offsetWidth;e.minorLabelHeight=o?e.minorCharHeight:0,e.majorLabelHeight=r?e.majorCharHeight:0,e.minorLineWidth=s-this.lineOffset-this.width+2*this.options.minorLinesOffset,e.minorLineHeight=1,e.majorLineWidth=s-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;n(this.DOMelements.lines),n(this.DOMelements.labels);const e=this.options.orientation,i=null!=this.options[e].range?this.options[e].range:{};let r=!0;null!=i.max&&(this.range.end=i.max,r=!1);let s=!0;null!=i.min&&(this.range.start=i.min,s=!1),this.scale=new gS(this.range.start,this.range.end,s,r,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 a=this.scale.getLines();Pn(a).call(a,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 h=0;void 0!==this.options[e].title&&void 0!==this.options[e].title.text&&(h=this.props.titleCharHeight);const l=!0===this.options.icons?Math.max(this.options.iconWidth,h)+this.options.labelOffsetX+15:h+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&!0===this.options.visible?(this.width=this.maxLabelSize+l,this.options.width="".concat(this.width,"px"),o(this.DOMelements.lines),o(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-l&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width="".concat(this.width,"px"),o(this.DOMelements.lines),o(this.DOMelements.labels),this.redraw(),t=!0):(o(this.DOMelements.lines),o(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 r=s("div",this.DOMelements.labels,this.dom.frame);r.className=n,r.innerHTML=fC.xss(e),"left"===i?(r.style.left="-".concat(this.options.labelOffsetX,"px"),r.style.textAlign="right"):(r.style.right="-".concat(this.options.labelOffsetX,"px"),r.style.textAlign="left"),r.style.top="".concat(t-.5*o+this.options.labelOffsetY,"px"),e+="";const a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*a&&(this.maxLabelSize=e.length*a)}_redrawLine(t,e,i,n,o){if(!0===this.master){const r=s("div",this.DOMelements.lines,this.dom.lineContainer);r.className=i,r.innerHTML="","left"===e?r.style.left="".concat(this.width-n,"px"):r.style.right="".concat(this.width-n,"px"),r.style.width="".concat(o,"px"),r.style.top="".concat(t,"px")}}_redrawTitle(t){if(n(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){const e=s("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t),e.innerHTML=fC.xss(this.options[t].title.text),void 0!==this.options[t].title.style&&fC.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")}o(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 bS(){}function yS(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 wS(){}function _S(){}function xS(t,e,i,n){this.id=e;this.options=fC.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}bS.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),r=0;r<t.length;r++)if(o){var s=o(t[r],e);!0!==s&&"object"!=typeof s||a(t[r].screen_x+n,t[r].screen_y,yS(e,s),i.svgElements,i.svg,t[r].label)}else a(t[r].screen_x+n,t[r].screen_y,yS(e),i.svgElements,i.svg,t[r].label)},bS.drawIcon=function(t,e,i,n,o,s){var h=.5*o,l=r("rect",s.svgElements,s.svg);l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-h),l.setAttributeNS(null,"width",n),l.setAttributeNS(null,"height",2*h),l.setAttributeNS(null,"class","vis-outline"),a(e+.5*n,i,yS(t),s.svgElements,s.svg)},wS.drawIcon=function(t,e,i,n,o,s){var l=.5*o,c=r("rect",s.svgElements,s.svg);c.setAttributeNS(null,"x",e),c.setAttributeNS(null,"y",i-l),c.setAttributeNS(null,"width",n),c.setAttributeNS(null,"height",2*l),c.setAttributeNS(null,"class","vis-outline");var d=Math.round(.3*n),u=t.options.barChart.width/d,p=Math.round(.4*o),m=Math.round(.75*o),f=Math.round((n-2*d)/3);if(h(e+.5*d+f,i+l-p-1,d,p,t.className+" vis-bar",s.svgElements,s.svg,t.style),h(e+1.5*d+f+2,i+l-m-1,d,m,t.className+" vis-bar",s.svgElements,s.svg,t.style),1==t.options.drawPoints.enabled){var g={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/u,className:t.className};a(e+.5*d+f,i+l-p-1,g,s.svgElements,s.svg),a(e+1.5*d+f+2,i+l-m-1,g,s.svgElements,s.svg)}},wS.draw=function(t,e,i){var n,o,r,s,a,l,c=[],d={},u=0;for(a=0;a<t.length;a++)if("bar"===(s=i.groups[t[a]]).options.style&&!0===s.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++)c.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}),u+=1;if(0!==u)for(bc(c).call(c,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}),wS._getDataIntersections(d,c),a=0;a<c.length;a++){var p=null!=(s=i.groups[c[a].groupId]).options.barChart.minWidth?s.options.barChart.minWidth:.1*s.options.barChart.width,m=0;if(void 0===d[o=c[a].screen_x])a+1<c.length&&(n=Math.abs(c[a+1].screen_x-o)),r=wS._getSafeDrawData(n,s,p);else{var f=a+(d[o].amount-d[o].resolved);f<c.length&&(n=Math.abs(c[f].screen_x-o)),r=wS._getSafeDrawData(n,s,p),d[o].resolved+=1,!0===s.options.stack&&!0!==s.options.excludeFromStacking?c[a].screen_y<s.zeroPosition?(m=d[o].accumulatedNegative,d[o].accumulatedNegative+=s.zeroPosition-c[a].screen_y):(m=d[o].accumulatedPositive,d[o].accumulatedPositive+=s.zeroPosition-c[a].screen_y):!0===s.options.barChart.sideBySide&&(r.width=r.width/d[o].amount,r.offset+=d[o].resolved*r.width-.5*r.width*(d[o].amount+1))}let t=r.width,e=c[a].screen_x;if(null!=c[a].screen_end?(t=c[a].screen_end-c[a].screen_x,e+=.5*t):e+=r.offset,h(e,c[a].screen_y-m,t,s.zeroPosition-c[a].screen_y,s.className+" vis-bar",i.svgElements,i.svg,s.style),!0===s.options.drawPoints.enabled){let t={screen_x:c[a].screen_x,screen_y:c[a].screen_y-m,x:c[a].x,y:c[a].y,groupId:c[a].groupId,label:c[a].label};bS.draw([t],s,i,r.offset)}}},wS._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)},wS._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}},wS.getStackedYRange=function(t,e,i,n,o){if(t.length>0){bc(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 r={};wS._getDataIntersections(r,t),e[n]=wS._getStackedYRange(r,t),e[n].yAxisOrientation=o,i.push(n)}},wS._getStackedYRange=function(t,e){for(var i,n=e[0].screen_y,o=e[0].screen_y,r=0;r<e.length;r++)void 0===t[i=e[r].screen_x]?(n=n>e[r].screen_y?e[r].screen_y:n,o=o<e[r].screen_y?e[r].screen_y:o):e[r].screen_y<0?t[i].accumulatedNegative+=e[r].screen_y:t[i].accumulatedPositive+=e[r].screen_y;for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n=(n=n>t[s].accumulatedNegative?t[s].accumulatedNegative:n)>t[s].accumulatedPositive?t[s].accumulatedPositive:n,o=(o=o<t[s].accumulatedNegative?t[s].accumulatedNegative:o)<t[s].accumulatedPositive?t[s].accumulatedPositive:o);return{min:n,max:o}},_S.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?_S._catmullRom(t,e):_S._linear(t)}},_S.drawIcon=function(t,e,i,n,o,s){var h,l,c=.5*o,d=r("rect",s.svgElements,s.svg);(d.setAttributeNS(null,"x",e),d.setAttributeNS(null,"y",i-c),d.setAttributeNS(null,"width",n),d.setAttributeNS(null,"height",2*c),d.setAttributeNS(null,"class","vis-outline"),(h=r("path",s.svgElements,s.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&h.setAttributeNS(null,"style",t.style),h.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(l=r("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?l.setAttributeNS(null,"d","M"+e+", "+(i-c)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-c)):l.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+c)+" L"+(e+n)+","+(i+c)+"L"+(e+n)+","+i),l.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&l.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&a(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)},_S.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o,s=Number(n.svg.style.height.replace("px","")),a=r("path",n.svgElements,n.svg),h="L";1==e.options.interpolation.enabled&&(h="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,h,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,h,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,h,!1)+" V"+l+" H"+t[0][0]+" Z",a.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&a.setAttributeNS(null,"style",e.options.shaded.style),a.setAttributeNS(null,"d",o)}},_S.draw=function(t,e,i){if(null!=t&&null!=t){var n=r("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))}},_S.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},_S._catmullRomUniform=function(t){var e,i,n,o,r,s,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var h=1/6,l=t.length,c=0;c<l-1;c++)e=0==c?t[0]:t[c-1],i=t[c],n=t[c+1],o=c+2<l?t[c+2]:n,r={screen_x:(-e.screen_x+6*i.screen_x+n.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+n.screen_y)*h},s={screen_x:(i.screen_x+6*n.screen_x-o.screen_x)*h,screen_y:(i.screen_y+6*n.screen_y-o.screen_y)*h},a.push([r.screen_x,r.screen_y]),a.push([s.screen_x,s.screen_y]),a.push([n.screen_x,n.screen_y]);return a},_S._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var n,o,r,s,a,h,l,c,d,u,p,m,f,g,v,b,y,w,_,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var C=t.length,S=0;S<C-1;S++)n=0==S?t[0]:t[S-1],o=t[S],r=t[S+1],s=S+2<C?t[S+2]:r,l=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2)),c=Math.sqrt(Math.pow(o.screen_x-r.screen_x,2)+Math.pow(o.screen_y-r.screen_y,2)),d=Math.sqrt(Math.pow(r.screen_x-s.screen_x,2)+Math.pow(r.screen_y-s.screen_y,2)),g=Math.pow(d,i),b=Math.pow(d,2*i),v=Math.pow(c,i),y=Math.pow(c,2*i),_=Math.pow(l,i),u=2*(w=Math.pow(l,2*i))+3*_*v+y,p=2*b+3*g*v+y,(m=3*_*(_+v))>0&&(m=1/m),(f=3*g*(g+v))>0&&(f=1/f),a={screen_x:(-y*n.screen_x+u*o.screen_x+w*r.screen_x)*m,screen_y:(-y*n.screen_y+u*o.screen_y+w*r.screen_y)*m},h={screen_x:(b*o.screen_x+p*r.screen_x-y*s.screen_x)*f,screen_y:(b*o.screen_y+p*r.screen_y-y*s.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=o),0==h.screen_x&&0==h.screen_y&&(h=r),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([r.screen_x,r.screen_y]);return x},_S._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},xS.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==bc(this.options)&&fC.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},xS.prototype.getItems=function(){return this.itemsData},xS.prototype.setZeroPosition=function(t){this.zeroPosition=t},xS.prototype.setOptions=function(t){if(void 0!==t){fC.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),fC.mergeOptions(this.options,t,"interpolation"),fC.mergeOptions(this.options,t,"drawPoints"),fC.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))}},xS.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)},xS.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":_S.drawIcon(this,n,o,t,e,i);break;case"points":case"point":bS.drawIcon(this,n,o,t,e,i);break;case"bar":wS.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},xS.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}};class CS{constructor(t,e,i){var n;this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.defaultOptions={locales:$C,locale:"en"},this.options=fC.extend({},this.defaultOptions,i),this.options.locales=fC.extend({},$C,this.options.locales);const o=this.defaultOptions.locales[this.defaultOptions.locale];Pn(n=hl(this.options.locales)).call(n,t=>{this.options.locales[t]=fC.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(){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 tS(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",xi(t=i.parent.itemSet._onDrag).call(t,i.parent.itemSet)),this.hammerDragCenter.on("panend",xi(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 tS(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,r;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)r=xi(i=this.options.tooltipOnItemUpdateTime.template).call(i,this),o=r(this.data);else o="start: ".concat(NC(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(o+="<br> end: ".concat(NC(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=fC.xss(o)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(t){let e,i,n,o,r;const s=this._getItemData(),a=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];var h,l;this.options.visibleFrameTemplate?(r=xi(h=this.options.visibleFrameTemplate).call(h,this),o=fC.xss(r(s,a))):o="";if(a)if(o instanceof Object&&!(o instanceof Element))r(s,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=fC.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=xi(l=this.options.template).call(l,this),e=n(s,t,this.data)):e=this.data.content;if(e instanceof Object&&!(e instanceof Element))n(s,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=fC.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(dv(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=hl(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&&(fC.removeCssText(t,this.style),this.style=null),this.data.style&&(fC.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={},fC.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={},fC.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 xi(t=this.options.tooltip.template).call(t,this)(this._getItemData(),this.data)}return this.data.title}}CS.prototype.stack=!0;class SS extends CS{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 r;const s=[xi(e=this._createDomElement).call(e,this),xi(i=this._appendDomElement).call(i,this),xi(n=this._updateDirtyDomComponents).call(n,this),()=>{var t;this.dirty&&(r=xi(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&xi(t=this._updateDomComponentsSizes).call(t,this)(r)},xi(o=this._repaintDomAdditionals).call(o,this)];if(t)return s;{let t;return Pn(s).call(s,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 r,s;!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,s=this.props.content.width):(this.options.rtl?this.right=i:this.left=i,this.width=a,s=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-s,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(a-s,0),"px)");break;case"center":if(this.options.rtl){const t=-1*Math.max((a-s)/2,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((a-s)/2,0),"px)");break;default:if(r=this.overflow?n>0?Math.max(-i,0):-s:i<0?-i:0,this.options.rtl){const t=-1*r;this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(r,"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)}}SS.prototype.baseClassName="vis-item vis-range";class DS extends CS{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 r;const s=[xi(e=this._createDomElement).call(e,this),xi(i=this._appendDomElement).call(i,this),xi(n=this._updateDirtyDomComponents).call(n,this),()=>{var t;this.dirty&&(r=xi(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&xi(t=this._updateDomComponentsSizes).call(t,this)(r)},xi(o=this._repaintDomAdditionals).call(o,this)];if(t)return s;{let t;return Pn(s).call(s,e=>{t=e()}),t}}repositionY(){let t;const e=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"==e?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 AC?(t=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"==e?"0":"",this.dom.box.style.top="top"==e?"0":""):(t=this.parent.height,this.dom.box.style.top="".concat(this.parent.top,"px"),this.dom.box.style.bottom="");this.dom.box.style.height="".concat(t,"px")}}DS.prototype.baseClassName="vis-item vis-background",DS.prototype.stack=!1,DS.prototype.show=SS.prototype.show,DS.prototype.hide=SS.prototype.hide,DS.prototype.repositionX=SS.prototype.repositionX;class kS extends CS{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 r;const s=[xi(e=this._createDomElement).call(e,this),xi(i=this._appendDomElement).call(i,this),xi(n=this._updateDirtyDomComponents).call(n,this),()=>{this.dirty&&(r=this._getDomComponentsSizes())},()=>{var t;this.dirty&&xi(t=this._updateDomComponentsSizes).call(t,this)(r)},xi(o=this._repaintDomAdditionals).call(o,this)];if(t)return s;{let t;return Pn(s).call(s,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?qv(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}}var TS,OS,ES,IS,PS,AS,MS,NS,FS,RS={};function LS(){return ES?OS:(ES=1,function(){if(TS)return RS;TS=1;var t=di(),e=bn().some;t({target:"Array",proto:!0,forced:!yn()("some")},{some:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),OS=mi()("Array","some"))}function jS(){if(PS)return IS;PS=1;var t=x(),e=LS(),i=Array.prototype;return IS=function(n){var o=n.some;return n===i||t(i,n)&&o===i.some?e:o},IS}function zS(){return MS?AS:(MS=1,AS=jS())}var BS=b(FS?NS:(FS=1,NS=zS()));class HS extends CS{constructor(t,e,i){if(super(t,e,Cv({},{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=oC(),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,r,s,a,h,l=[xi(e=this._createDomElement).call(e,this),xi(i=this._appendDomElement).call(i,this),xi(n=this._updateDirtyDomComponents).call(n,this),xi(o=function(){this.dirty&&(a=this._getDomComponentsSizes())}).call(o,this),xi(r=function(){var t;this.dirty&&xi(t=this._updateDomComponentsSizes).call(t,this)(a)}).call(r,this),xi(s=this._repaintDomAdditionals).call(s,this)];return t?l:(Pn(l).call(l,function(t){h=t()}),h)}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,r=o-n/2,s=this.options.rtl?-1*o:o,a=this.options.rtl?-1*r:r;this.dom.line.style.transform="translateX(".concat(s,"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=Gh(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=Gh(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(...Gh(n).call(n,t=>Math.min(t.start,t.end||t.start))),this.data.max=Math.max(...Gh(n).call(n,t=>Math.max(t.start,t.end||t.start)));const o=Gh(e=this.data.uiItems).call(e,t=>t.center),r=Qm(o).call(o,(t,e)=>t+e,0)/this.data.uiItems.length;BS(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(r),this.data.end=null)}_getUiItems(){var t;return this.data.uiItems&&this.data.uiItems.length?po(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=xi(t=HS.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 t=this._getFitRange(),e=t.fitStart,i=t.fitEnd,n={start:new Date(e),end:new Date(i),animation:!0};this.emitter.emit("fit",n)}}_getItemData(){return this.data}}HS.prototype.baseClassName="vis-item vis-range vis-cluster";class GS extends CS{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 r;const s=[xi(e=this._createDomElement).call(e,this),xi(i=this._appendDomElement).call(i,this),xi(n=this._updateDirtyDomComponents).call(n,this),()=>{this.dirty&&(r=this._getDomComponentsSizes())},()=>{var t;this.dirty&&xi(t=this._updateDomComponentsSizes).call(t,this)(r)},xi(o=this._repaintDomAdditionals).call(o,this)];if(t)return s;{let t;return Pn(s).call(s,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?qv(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}}var WS,YS,VS,US,XS,qS,KS,$S,JS,ZS={};function QS(){return VS?YS:(VS=1,function(){if(WS)return ZS;WS=1;var t=di(),e=bn().find,i=mo(),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)}(),YS=mi()("Array","find"))}function tD(){if(XS)return US;XS=1;var t=x(),e=QS(),i=Array.prototype;return US=function(n){var o=n.find;return n===i||t(i,n)&&o===i.find?e:o},US}function eD(){return KS?qS:(KS=1,qS=tD())}var iD=b(JS?$S:(JS=1,$S=eD()));class nD{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=kb(t),this.y=kb(e)}setText(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=fC.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,r=0,s=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)),r=t?this.x-i:this.x,s=n?this.y-e:this.y}else(s=this.y-e)+e+this.padding>n&&(s=n-e-this.padding),s<this.padding&&(s=this.padding),(r=this.x)+i+this.padding>o&&(r=o-i-this.padding),r<this.padding&&(r=this.padding);this.frame.style.left=r+"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)}}var oD,rD,sD,aD,hD,lD,cD,dD,uD;function pD(){return sD?rD:(sD=1,oD||(oD=1,di()({target:"String",proto:!0},{repeat:ey()})),rD=mi()("String","repeat"))}function mD(){if(hD)return aD;hD=1;var t=x(),e=pD(),i=String.prototype;return aD=function(n){var o=n.repeat;return"string"==typeof n||n===i||t(i,n)&&o===i.repeat?e:o},aD}function fD(){return cD?lD:(cD=1,lD=mD())}var gD=b(uD?dD:(uD=1,dD=fD()));function vD(t,e,i){if(i&&!dv(i))return vD(t,e,[i]);if(e.hiddenDates=[],i&&1==dv(i)){var n;for(let n=0;n<i.length;n++)if(void 0===gD(i[n])){const o={};o.start=t(i[n].start).toDate().valueOf(),o.end=t(i[n].end).toDate().valueOf(),e.hiddenDates.push(o)}bc(n=e.hiddenDates).call(n,(t,e)=>t.start-e.start)}}function bD(t,e,i){if(i&&!dv(i))return bD(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){vD(t,e,i);const n=t(e.range.start),o=t(e.range.end),r=(e.range.end-e.range.start)/e.domProps.centerContainer.width;for(let s=0;s<i.length;s++)if(void 0!==gD(i[s])){let a=t(i[s].start),h=t(i[s].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: ".concat(i[s].start));if("Invalid Date"==h._d)throw new Error("Supplied end date is not valid: ".concat(i[s].end));if(h-a>=4*r){let t=0,r=o.clone();switch(gD(i[s])){case"daily":a.day()!=h.day()&&(t=1),a=a.dayOfYear(n.dayOfYear()).year(n.year()).subtract(7,"days"),h=h.dayOfYear(n.dayOfYear()).year(n.year()).subtract(7-t,"days"),r.add(1,"weeks");break;case"weekly":{const t=h.diff(a,"days"),e=a.day();a=a.date(n.date()).month(n.month()).year(n.year()),h=a.clone(),a=a.day(e).subtract(1,"weeks"),h=h.day(e).add(t,"days").subtract(1,"weeks"),r.add(1,"weeks");break}case"monthly":a.month()!=h.month()&&(t=1),a=a.month(n.month()).year(n.year()).subtract(1,"months"),h=h.month(n.month()).year(n.year()).subtract(1,"months").add(t,"months"),r.add(1,"months");break;case"yearly":a.year()!=h.year()&&(t=1),a=a.year(n.year()).subtract(1,"years"),h=h.year(n.year()).subtract(1,"years").add(t,"years"),r.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",gD(i[s]))}for(;a<r;)switch(e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()}),gD(i[s])){case"daily":a=a.add(1,"days"),h=h.add(1,"days");break;case"weekly":a=a.add(1,"weeks"),h=h.add(1,"weeks");break;case"monthly":a=a.add(1,"months"),h=h.add(1,"months");break;case"yearly":a=a.add(1,"y"),h=h.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",gD(i[s]))}e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()})}}yD(e);const s=ED(e.range.start,e.hiddenDates),a=ED(e.range.end,e.hiddenDates);let h=e.range.start,l=e.range.end;1==s.hidden&&(h=1==e.range.startToFront?s.startDate-1:s.endDate+1),1==a.hidden&&(l=1==e.range.endToFront?a.startDate-1:a.endDate+1),1!=s.hidden&&1!=a.hidden||e.range._applyRange(h,l)}}function yD(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,bc(e=t.hiddenDates).call(e,(t,e)=>t.start-e.start)}function wD(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 r=e.hiddenDates[t].end;if(o>=i&&o<r){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){const n=t(i),o=t(r);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 _D(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=ED(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);const r=CD(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){n=t.range.conversion(i,r);const o=SD(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=DD(t.options.moment,t.body.hiddenDates,o,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}return e=DD(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}}function xD(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=CD(t.body.hiddenDates,t.range.start,t.range.end),o=(t.range.end-t.range.start-n)*e/i,r=TD(t.body.hiddenDates,t.range,o);return new Date(r+o+t.range.start)}}function CD(t,e,i){let n=0;for(let o=0;o<t.length;o++){const r=t[o].start,s=t[o].end;r>=e&&s<i&&(n+=s-r)}return n}function SD(t,e,i){let n=0;for(let o=0;o<t.length;o++){const r=t[o].start,s=t[o].end;r>=e&&s<=i&&(n+=s-r)}return n}function DD(t,e,i,n){return n=t(n).toDate().valueOf(),n-=kD(t,e,i,n)}function kD(t,e,i,n){let o=0;n=t(n).toDate().valueOf();for(let t=0;t<e.length;t++){const r=e[t].start,s=e[t].end;r>=i.start&&s<i.end&&n>=s&&(o+=s-r)}return o}function TD(t,e,i){let n=0,o=0,r=e.start;for(let s=0;s<t.length;s++){const a=t[s].start,h=t[s].end;if(a>=e.start&&h<e.end){if(o+=a-r,r=h,o>=i)break;n+=h-a}}return n}function OD(t,e,i,n){const o=ED(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 ED(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 ID=Object.freeze({__proto__:null,convertHiddenOptions:vD,correctTimeForHidden:DD,getAccumulatedHiddenDuration:TD,getHiddenDurationBefore:kD,getHiddenDurationBeforeStart:SD,getHiddenDurationBetween:CD,getIsHidden:ED,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:yD,snapAwayFromHidden:OD,stepOverHiddenDates:wD,toScreen:_D,toTime:xD,updateHiddenDates:bD});class PD{constructor(t,e,i,n,o){this.moment=o&&o.moment||NC,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,dv(n)?this.hiddenDates=n:this.hiddenDates=null!=n?[n]:[],this.format=PD.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=fC.deepExtend({},PD.FORMAT);this.format=fC.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()):Un(),this._end=null!=e?this.moment(e.valueOf()):Un(),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(OD(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,wD(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,r=6e4,s=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),r>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),s>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=NC(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,r=[];function s(t){return t/o%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(Un(),"day")?" vis-today":t.isSame(e().add(1,"day"),"day")?" vis-tomorrow":t.isSame(e().add(-1,"day"),"day")?" vis-yesterday":""}function h(t){return t.isSame(Un(),"week")?" vis-current-week":""}function l(t){return t.isSame(Un(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":r.push(a(n)),r.push(s(n.milliseconds()));break;case"second":r.push(a(n)),r.push(s(n.seconds()));break;case"minute":r.push(a(n)),r.push(s(n.minutes()));break;case"hour":r.push(qv(t="vis-h".concat(n.hours())).call(t,4==this.step?"-h"+(n.hours()+4):"")),r.push(a(n)),r.push(s(n.hours()));break;case"weekday":r.push("vis-".concat(n.format("dddd").toLowerCase())),r.push(a(n)),r.push(h(n)),r.push(s(n.date()));break;case"day":r.push("vis-day".concat(n.date())),r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(a(n)),r.push(l(n)),r.push(this.step<=2?a(n):""),r.push(1===this.step?"vis-".concat(n.format("dddd").toLowerCase()):""),r.push(s(n.date()-1));break;case"week":r.push("vis-week".concat(n.format("w"))),r.push(h(n)),r.push(s(n.week()));break;case"month":r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(l(n)),r.push(s(n.month()));break;case"year":r.push("vis-year".concat(n.year())),r.push(function(t){return t.isSame(Un(),"year")?" vis-current-year":""}(n)),r.push(s(n.year()))}return po(r).call(r,String).join(" ")}}PD.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:""}};var AD,MD,ND,FD,RD,LD,jD,zD,BD,HD={};function GD(){return ND?MD:(ND=1,function(){if(AD)return HD;AD=1;var t=di(),e=bn().every;t({target:"Array",proto:!0,forced:!yn()("every")},{every:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),MD=mi()("Array","every"))}function WD(){if(RD)return FD;RD=1;var t=x(),e=GD(),i=Array.prototype;return FD=function(n){var o=n.every;return n===i||t(i,n)&&o===i.every?e:o},FD}function YD(){return jD?LD:(jD=1,LD=WD())}var VD=b(BD?zD:(BD=1,zD=YD()));const UD="__ungrouped__";class XD{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new HS(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 n="boolean"==typeof i?{}:i,o=n.maxItems,r=n.clusterCriteria;r||(r=()=>!0),o=o||1;let s=-1,a=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),a=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 h=this.cache[s];if(!h){h=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;const n=this.groups[e],s=n.length;let l=0;for(;l<s;){let e=n[l],s=1,c=l-1;for(;c>=0&&e.center-n[c].center<a/2;)!n[c].cluster&&r(e.data,n[c].data)&&s++,c--;let d=l+1;for(;d<n.length&&n[d].center-e.center<a/2;)r(e.data,n[d].data)&&s++,d++;let u=h.length-1;for(;u>=0&&e.center-h[u].center<a;)e.group==h[u].group&&r(e.data,h[u].data)&&s++,u--;if(s>o){const a=s-o+1,c=[];let d=l;for(;c.length<a&&d<n.length;)r(n[l].data,n[d].data)&&c.push(n[d]),d++;const u=this.itemSet.getGroupId(e.data),p=this.itemSet.groups[u]||this.itemSet.groups[UD];let m=this._getClusterForItems(c,p,t,i);h.push(m),l+=a}else delete e.cluster,l+=1}}this.cache[s]=h}return h}_filterData(){const t={};this.groups=t;for(const e of ub(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)&&bc(e=t[i]).call(e,(t,e)=>t.center-e.center)}this.dataChanged=!1}_getClusterForItems(t,e,i,n){var o;const r=Gh(o=i||[]).call(o,t=>{var e;return{cluster:t,itemsIds:new kh(Gh(e=t.data.uiItems).call(e,t=>t.id))}});let s;if(r.length)for(let e of r)if(e.itemsIds.size===t.length&&VD(t).call(t,t=>e.itemsIds.has(t.id))){s=e.cluster;break}if(s)return s.setUiItems(t),s.group!==e&&(s.group&&s.group.remove(s),e&&(e.add(s),s.group=e)),s;let a=n.titleTemplate||"";const h={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},l=a.replace(/{count}/,t.length),c='<div title="'+l+'">'+t.length+"</div>",d=Cv({},n,this.itemSet.options),u={content:c,title:l,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return s=this.createClusterItem(u,h,d),e&&(e.add(s),s.group=e),s.attach(),s}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}const qD="__ungrouped__",KD="__background__";class $D extends MC{constructor(t,e){super(),this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap(t,e){const i=e.order;e.order=t.order,t.order=i},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:PD.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=fC.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){i._onAdd(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},update(t,e){i._onUpdate(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},remove(t,e){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();Pn(o=t.get()).call(o,e=>{if(e.nestedGroups){var i;0!=e.showNested&&(e.showNested=!0);let o=[];Pn(i=e.nestedGroups).call(i,i=>{const n=t.get(i);n&&(n.nestedInGroup=e.id,0==e.showNested&&(n.visible=!1),o=qv(o).call(o,n))}),t.update(o,n)}})}},update(t,e){i._onUpdateGroups(e.items)},remove(t,e){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,r,s,a,h,l,c,d,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 b=document.createElement("div");b.className="vis-axis",this.dom.axis=b;const y=document.createElement("div");y.className="vis-labelset",this.dom.labelSet=y,this._updateUngrouped();const w=new AC(KD,null,this);w.show(),this.groups[KD]=w,this.hammer=new tS(this.body.dom.centerContainer),this.hammer.on("hammer.input",t=>{t.isFirst&&this._onTouch(t)}),this.hammer.on("panstart",xi(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",xi(e=this._onDrag).call(e,this)),this.hammer.on("panend",xi(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:tS.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",xi(n=this._onSelectItem).call(n,this)),this.hammer.on("press",xi(o=this._onMultiSelectItem).call(o,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",xi(r=this._onAddItem).call(r,this)),this.options.rtl?this.groupHammer=new tS(this.body.dom.rightContainer):this.groupHammer=new tS(this.body.dom.leftContainer),this.groupHammer.on("tap",xi(s=this._onGroupClick).call(s,this)),this.groupHammer.on("panstart",xi(a=this._onGroupDragStart).call(a,this)),this.groupHammer.on("panmove",xi(h=this._onGroupDrag).call(h,this)),this.groupHammer.on("panend",xi(l=this._onGroupDragEnd).call(l,this)),this.groupHammer.get("pan").set({threshold:5,direction:tS.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",xi(c=this._onMouseOver).call(c,this)),this.body.dom.centerContainer.addEventListener("mouseout",xi(d=this._onMouseOut).call(d,this)),this.body.dom.centerContainer.addEventListener("mousemove",xi(u=this._onMouseMove).call(u,this)),this.body.dom.centerContainer.addEventListener("contextmenu",xi(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener("mousewheel",xi(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"];fC.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&&(fC.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&&(fC.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&&fC.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),Pn(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&&fC.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&&fC.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(qv(n="option ".concat(e," must be a function ")).call(n,e,"(item, callback)"));this.options[e]=i}};Pn(i=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(i,o),t.cluster?(Cv(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new XD(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&&Pn(fC).call(fC,this.items,t=>{t.dirty=!0,t.displayed&&t.redraw()}),t.restackGroups&&Pn(fC).call(fC,this.groups,(t,e)=>{e!==KD&&(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=Ry(function(){t.show()},e)}}clearPopupTimer(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(t){var e;null==t&&(t=[]),dv(t)||(t=[t]);const i=po(e=this.selection).call(e,e=>-1===Nc(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 qv(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],r=o.isVisible?o.visibleItems:[];for(const t of r)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],r=o.isVisible?o.visibleItems:[];for(const t of r)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]||iD(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){Hc(e).call(e,i,1);break}}redraw(){const t=this.options.margin,e=this.body.range,i=fC.option.asSize,n=this.options,o=n.orientation.item;let r=!1;const s=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,s.className="vis-itemset",this.options.cluster&&this._clusterItems(),r=this._orderGroups()||r;const a=e.end-e.start,h=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,l=e.start!=this.lastRangeStart,c=n.stack!=this.lastStack,d=n.stackSubgroups!=this.lastStackSubgroups,u=h||l||c||d;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[KD].redraw(e,f,u);const b={};let y=0;Pn(fC).call(fC,this.groups,(t,i)=>{if(i===KD)return;const n=t==p?m:f;b[i]=t.redraw(e,n,u,!0),y=b[i].length});if(y>0){const t={};for(let e=0;e<y;e++)Pn(fC).call(fC,b,(i,n)=>{t[n]=i[e]()});Pn(fC).call(fC,this.groups,(e,i)=>{if(i===KD)return;const n=t[i];r=n||r,g+=e.height}),g=Math.max(g,v)}return g=Math.max(g,v),s.style.height=i(g),this.props.width=s.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,r=this._isResized()||r,r}_firstGroup(){const t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[qD]||null}_updateUngrouped(){let t,e,i=this.groups[qD];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[qD],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 PC(n,o,this),this.groups[qD]=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(!aC(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=dC(t)}else this.itemsData=null;if(n&&(Pn(fC).call(fC,this.itemListeners,(t,e)=>{n.off(e,t)}),n.dispose(),i=n.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;Pn(fC).call(fC,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&&(Pn(fC).call(fC,this.groupListeners,(t,i)=>{e.groupsData.off(i,t)}),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!aC(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();Pn(n=t.get()).call(n,e=>{var i;e.nestedGroups&&Pn(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;Pn(fC).call(fC,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?KD:this.groupsData?t.group:qD}_onUpdate(t){const e=this;Pn(t).call(t,t=>{const i=e.itemsData.get(t);let n=e.items[t];const o=i?e._getType(i):null,r=$D.types[o];let s;if(n&&(r&&n instanceof r?e._updateItem(n,i):(s=n.selected,e._removeItem(n),n=null)),!n&&i){if(!r)throw new TypeError('Unknown item type "'.concat(o,'"'));n=new r(i,e.conversion,e.options),n.id=t,e._addItem(n),s&&(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;Pn(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(){Pn(fC).call(fC,this.groups,t=>{t.order()})}_onUpdateGroups(t){this._onAddGroups(t)}_onAddGroups(t){const e=this;Pn(t).call(t,t=>{const i=e.groupsData.get(t);let n=e.groups[t];if(n)n.setData(i);else{if(t==qD||t==KD)throw new Error("Illegal group id. ".concat(t," is a reserved id."));const o=Qb(e.options);fC.extend(o,{height:null}),n=new PC(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){Pn(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=!fC.equalArray(t,this.groupIds);if(e){const e=this.groups;Pn(t).call(t,t=>{e[t].hide()}),Pn(t).call(t,t=>{e[t].show()}),this.groupIds=t}return e}return!1}_orderNestedGroups(t){return function t(e,i){let n=[];return Pn(i).call(i,i=>{n.push(i);if(e.groupsData.get(i).nestedGroups){var o;const r=Gh(o=e.groupsData.get({filter:t=>t.nestedInGroup==i,order:e.options.groupOrder})).call(o,t=>t.id);n=qv(n).call(n,t(e,r))}}),n}(this,po(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=Nc(e=this.selection).call(e,t.id);-1!=n&&Hc(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 SS&&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,r=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(r)n={item:r,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=Gh(o).call(o,e=>{const o=i.items[e],r=i._getGroupIndex(o.data.group);return{item:o,initialX:t.center.x,groupOffset:n-r,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),r=this.body.util.getScale(),s=this.body.util.getStep(),a=e?e(o,r,s):o,h={type:"range",start:a,end:a,content:"new item"},l=oC();h[this.itemsData.idProp]=l;const c=this.groupFromTarget(t);c&&(h.group=c.groupId);const d=new SS(h,this.conversion,this.options);d.id=l,d.data=this._cloneItemData(h),this._addItem(d),this.touchParams.selectedItem=d;const u={item:d,initialX:t.center.x,data:d.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,r=this.options.rtl?o+this.body.domProps.right.width:o+this.body.domProps.left.width,s=this.body.util.getScale(),a=this.body.util.getStep(),h=this.touchParams.selectedItem,l=(this.options.editable.overrideItems||null==h.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=h.editable&&h.editable.updateGroup;let c=null;if(l&&h&&null!=h.data.group){const e=i.groupFromTarget(t);e&&(c=this._getGroupIndex(e.groupId))}Pn(e=this.touchParams.itemProps).call(e,e=>{const o=i.body.util.toTime(t.center.x-r),d=i.body.util.toTime(e.initialX-r);let u,p,m,f,g;u=this.options.rtl?-(o-d):o-d;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==h.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=h.editable&&h.editable.updateTime)if(e.dragLeft)this.options.rtl?null!=v.end&&(m=fC.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=n?n(g,s,a):g):null!=v.start&&(p=fC.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=n?n(f,s,a):f);else if(e.dragRight)this.options.rtl?null!=v.start&&(p=fC.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=n?n(f,s,a):f):null!=v.end&&(m=fC.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=n?n(g,s,a):g);else if(null!=v.start)if(p=fC.convert(e.data.start,"Date").valueOf(),f=new Date(p+u),null!=v.end){m=fC.convert(e.data.end,"Date");const t=m.valueOf()-p.valueOf();v.start=n?n(f,s,a):f,v.end=new Date(v.start.valueOf()+t)}else v.start=n?n(f,s,a):f;if(l&&!e.dragLeft&&!e.dragRight&&null!=c&&null!=v.group){let t=c-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,Pn(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);Ry(()=>{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,r=o;for(;r.length>0;){let t=r;r=[];for(let e=0;e<t.length;e++){let n=i.get(t[e]);n.nestedGroups&&(r=qv(r).call(r,n.nestedGroups))}r.length>0&&(o=qv(o).call(o,r))}var s;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))}s=Gh(a).call(a,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t})}else{var h;s=Gh(h=i.get(o)).call(h,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t})}i.update(qv(s).call(s,n)),n.showNested?(fC.removeClassName(t.dom.label,"collapsed"),fC.addClassName(t.dom.label,"expanded")):(fC.removeClassName(t.dom.label,"expanded"),fC.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(),r=this.groupTouchParams.group.height;if(e){if(o.top+r<n)return}else{const t=i.height;if(o.top+t-r>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(!fC.equalArray(o,this.groupTouchParams.originalOrder)){const t=this.groupTouchParams.originalOrder,i=this.groupTouchParams.group.groupId,n=Math.min(t.length,o.length);let r=0,s=0,a=0;for(;r<n;){for(;r+s<n&&r+a<n&&o[r+s]==t[r+a];)r++;if(r+s>=n)break;if(o[r+s]==i)s=1;else if(t[r+a]==i)a=1;else{const i=Nc(o).call(o,t[r+a]),n=e.get(o[r+s]),h=e.get(t[r+a]);this.options.groupOrderSwap(n,h,e),e.update(n),e.update(h);const l=o[r+s];o[r+s]=t[r+a],o[i]=l,r++}}}}}}_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=fC.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(!fC.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,o=Math.min(i.length,t.length);let r=0;for(;r<o;){for(;r<o&&t[r]==i[r];)r++;if(r>=o)break;const s=Nc(t).call(t,i[r]),a=n.get(t[r]),h=n.get(i[r]);e.options.groupOrderSwap(a,h,n),n.update(a),n.update(h);const l=t[r];t[r]=i[r],t[s]=l,r++}}}}),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),r=o&&o.selectable?[o.id]:[];this.setSelection(r);const s=this.getSelection();(s.length>0||n.length>0)&&this.body.emitter.emit("select",{items:s,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 nD(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,r=this.body.util.toTime(o),s=this.body.util.getScale(),a=this.body.util.getStep();let h,l;"drop"==t.type?(l=JSON.parse(t.dataTransfer.getData("text")),l.content=l.content?l.content:"new item",l.start=l.start?l.start:i?i(r,s,a):r,l.type=l.type||"box",l[this.itemsData.idProp]=l.id||oC(),"range"!=l.type||l.end||(h=this.body.util.toTime(o+this.props.width/5),l.end=i?i(h,s,a):h)):(l={start:i?i(r,s,a):r,content:"new item"},l[this.itemsData.idProp]=oC(),"range"===this.options.type&&(h=this.body.util.toTime(o+this.props.width/5),l.end=i?i(h,s,a):h));const c=this.groupFromTarget(t);c&&(l.group=c.groupId),l=this._cloneItemData(l),this.options.onAdd(l,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=$D._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],r=e.data.start,s=void 0!==e.data.end?e.data.end:r;!(r>=o.min&&s<=o.max)||this.options.multiselectPerGroup&&n!=this.itemsData.get(e.id).group||e instanceof DS||i.push(e.id)}}}else{const t=Nc(i).call(i,e.id);-1==t?i.push(e.id):Hc(i).call(i,t,1)}const n=po(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 Pn(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],r=o.dom.foreground,s=r.getBoundingClientRect();if(e>=s.top&&e<s.top+r.offsetHeight)return o;if("top"===this.options.orientation.item){if(t===this.groupIds.length-1&&e>s.top)return o}else if(0===t&&e<s.top+r.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=fC.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=fC.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=fC.convert(i.end,e&&e.end||"Date")),i}_clusterItems(){if(!this.options.cluster)return;const t=this.body.range.conversion(this.body.domProps.center.width).scale,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 kh(Gh(t).call(t,t=>t.id)),r=po(e=this.clusters).call(e,t=>!o.has(t.id));let s=!1;for(let t of r){var i;const e=Nc(i=this.selection).call(i,t.id);var n;if(-1!==e)t.unselect(),Hc(n=this.selection).call(n,e,1),s=!0}if(s){const t=this.getSelection();this.body.emitter.emit("select",{items:t,event:event})}}this.clusters=t||[]}}function JD(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=fC.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)}$D.types={background:DS,box:kS,range:SS,point:GS},$D.prototype._onAdd=$D.prototype._onUpdate,JD.prototype=new MC,JD.prototype.clear=function(){this.groups={},this.amountOfGroups=0},JD.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1)},JD.prototype.updateGroup=function(t,e){this.groups[t]=e},JD.prototype.removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)},JD.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)},JD.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},JD.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},JD.prototype.setOptions=function(t){fC.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},JD.prototype.redraw=function(){var t=0,e=hl(this.groups);bc(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 r="";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]||(r+=this.groups[n].content+"<br />");this.dom.textArea.innerHTML=fC.xss(r),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},JD.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=hl(this.groups);bc(t).call(t,function(t,e){return t<e?-1:1}),n(d=this.svgElements),o(d),n(d);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),r=i,s=this.options.iconSize,a=.75*this.options.iconSize,h=i+.5*a+3;this.svg.style.width=s+5+i+"px";for(var l=0;l<t.length;l++){var c=t[l];1!=this.groups[c].visible||void 0!==this.linegraphOptions.visibility[c]&&1!=this.linegraphOptions.visibility[c]||(this.groups[c].getLegend(s,a,this.framework,r,h),h+=a+this.options.iconSpacing)}}var d};var ZD="__ungrouped__";function QD(t,e){this.id=oC(),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=fC.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){i._onAdd(e.items)},update:function(t,e){i._onUpdate(e.items)},remove:function(t,e){i._onRemove(e.items)}},this.groupListeners={add:function(t,e){i._onAddGroups(e.items)},update:function(t,e){i._onUpdateGroups(e.items)},remove:function(t,e){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=fC.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}}QD.prototype=new MC,QD.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 vS(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new vS(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new JD(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new JD(this.body,this.options.legend,"right",this.options.groups),this.show()},QD.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&&kb((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),fC.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),fC.mergeOptions(this.options,t,"interpolation"),fC.mergeOptions(this.options,t,"drawPoints"),fC.mergeOptions(this.options,t,"shaded"),fC.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,ZD)&&this.groups[ZD].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},QD.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},QD.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},QD.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!aC(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=dC(t)}else this.itemsData=null;if(n&&(Pn(fC).call(fC,this.itemListeners,function(t,e){n.off(e,t)}),n.dispose(),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;Pn(fC).call(fC,this.itemListeners,function(t,e){i.itemsData.on(e,t,o)}),e=this.itemsData.getIds(),this._onAdd(e)}},QD.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){Pn(fC).call(fC,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(!aC(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;Pn(fC).call(fC,this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}},QD.prototype._onUpdate=function(t){this._updateAllGroupData(t)},QD.prototype._onAdd=function(t){this._onUpdate(t)},QD.prototype._onRemove=function(t){this._onUpdate(t)},QD.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},QD.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},QD.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})},QD.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])},QD.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 xS(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()},QD.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},n=this.itemsData.get(),o=this.itemsData.idProp,r={};t&&Gh(t).call(t,function(t){r[t]=t});for(var s={},a=0;a<n.length;a++){var h=n[a],l=h.group;null==l&&(l=ZD),Object.prototype.hasOwnProperty.call(s,l)?s[l]++:s[l]=1}var c={};if(!e&&t)for(l in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,l)){var d=(f=this.groups[l]).getItems();i[l]=po(d).call(d,function(t){return c[t[o]]=t[o],t[o]!==r[t[o]]});var u=s[l];s[l]-=i[l].length,i[l].length<u&&(i[l][u-1]={})}for(a=0;a<n.length;a++)if(null==(l=(h=n[a]).group)&&(l=ZD),e||!t||h[o]===r[h[o]]||!Object.prototype.hasOwnProperty.call(c,h[o])){Object.prototype.hasOwnProperty.call(i,l)||(i[l]=new Array(s[l]));var p=fC.bridgeObject(h);p.x=fC.convert(h.x,"Date"),p.end=fC.convert(h.end,"Date"),p.orginalY=h.y,p.y=Number(h.y),p[o]=h[o];var m=i[l].length-s[l]--;i[l][m]=p}for(l in this.groups)Object.prototype.hasOwnProperty.call(this.groups,l)&&!Object.prototype.hasOwnProperty.call(i,l)&&(i[l]=new Array(0));for(l in i)if(Object.prototype.hasOwnProperty.call(i,l))if(0==i[l].length)Object.prototype.hasOwnProperty.call(this.groups,l)&&this._removeGroup(l);else{var f=void 0;null!=this.groupsData&&(f=this.groupsData.get(l)),null==f&&(f={id:l,content:this.options.defaultGroup+l}),this._updateGroup(f,l),this.groups[l].setItems(i[l])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},QD.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=fC.option.asSize(3*this.props.width),this.svg.style.left=fC.option.asSize(-this.props.width),-1==Nc(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,r=this.body.range.end-this.body.range.start;if(0!=this.props.width){var s=o*(this.props.width/r);this.svg.style.left=-this.props.width-s+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},QD.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})}fC.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},QD.prototype._updateGraph=function(){if(n(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},r=this.body.util.toGlobalTime(-this.body.domProps.root.width),s=this.body.util.toGlobalTime(2*this.body.domProps.root.width),a=this._getSortedGroupIds();if(a.length>0){var h={};for(this._getRelevantData(a,h,r,s),this._applySampling(a,h),e=0;e<a.length;e++)this._convertXcoordinates(h[a[e]]);if(this._getYRanges(a,h,i),1==this._updateYAxis(a,i))return o(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var l=void 0;for(e=0;e<a.length;e++)t=this.groups[a[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=l&&(this._stack(h[t.id],h[l.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==l.options.shaded.orientation?(l.options.shaded.orientation="group",l.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=l.id))),l=t)),this._convertYcoordinates(h[a[e]],t);var c={};for(e=0;e<a.length;e++)if("line"===(t=this.groups[a[e]]).options.style&&1==t.options.shaded.enabled){var d=h[a[e]];if(null==d||0==d.length)continue;if(Object.prototype.hasOwnProperty.call(c,a[e])||(c[a[e]]=_S.calcPath(d,t)),"group"===t.options.shaded.orientation){var u=t.options.shaded.groupId;if(-1===Nc(a).call(a,u)){console.log(t.id+": Unknown shading group target given:"+u);continue}Object.prototype.hasOwnProperty.call(c,u)||(c[u]=_S.calcPath(h[u],this.groups[u])),_S.drawShading(c[a[e]],t,c[u],this.framework)}else _S.drawShading(c[a[e]],t,void 0,this.framework)}for(wS.draw(a,h,this.framework),e=0;e<a.length;e++)if(t=this.groups[a[e]],h[a[e]].length>0)switch(t.options.style){case"line":Object.prototype.hasOwnProperty.call(c,a[e])||(c[a[e]]=_S.calcPath(h[a[e]],t)),_S.draw(c[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||bS.draw(h[a[e]],t,this.framework)}}}return o(this.svgElements),!1},QD.prototype._stack=function(t,e){var i,n,o,r,s;i=0;for(var a=0;a<t.length;a++){r=void 0,s=void 0;for(var h=i;h<e.length;h++){if(e[h].x===t[a].x){r=e[h],s=e[h],i=h;break}if(e[h].x>t[a].x){s=e[h],r=0==h?s:e[h-1],i=h;break}}void 0===s&&(r=e[e.length-1],s=e[e.length-1]),n=s.x-r.x,o=s.y-r.y,t[a].y=0==n?t[a].orginalY+s.y:t[a].orginalY+o/n*(t[a].x-r.x)+r.y}},QD.prototype._getRelevantData=function(t,e,i,n){var o,r,s,a;if(t.length>0)for(r=0;r<t.length;r++){var h=(o=this.groups[t[r]]).getItems();if(1==bc(o.options)){var l=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},c=Math.max(0,fC.binarySearchValue(h,i,"x","before",l)),d=Math.min(h.length,fC.binarySearchValue(h,n,"x","after",l)+1);d<=0&&(d=h.length);var u=new Array(d-c);for(s=c;s<d;s++)a=o.itemsData[s],u[s-c]=a;e[t[r]]=u}else e[t[r]]=o.itemsData}},QD.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,r=n.length,s=r/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(s)));for(var a=new Array(r),h=0;h<r;h+=o){a[Math.round(h/o)]=n[h]}e[t[i]]=Hc(a).call(a,0,Math.round(r/o))}}},QD.prototype._getYRanges=function(t,e,i){var n,o,r,s,a=[],h=[];if(t.length>0){for(r=0;r<t.length;r++)n=e[t[r]],s=this.groups[t[r]].options,n.length>0&&(o=this.groups[t[r]],!0===s.stack&&"bar"===s.style?"left"===s.yAxisOrientation?a=qv(a).call(a,n):h=qv(h).call(h,n):i[t[r]]=o.getYRange(n,t[r]));wS.getStackedYRange(a,i,t,"__barStackLeft","left"),wS.getStackedYRange(h,i,t,"__barStackRight","right")}},QD.prototype._updateYAxis=function(t,e){var i,n,o=!1,r=!1,s=!1,a=1e9,h=1e9,l=-1e9,c=-1e9;if(t.length>0){for(let e=0;e<t.length;e++){var d=this.groups[t[e]];d&&"right"!=d.options.yAxisOrientation?(r=!0,a=1e9,l=-1e9):d&&d.options.yAxisOrientation&&(s=!0,h=1e9,c=-1e9)}for(let o=0;o<t.length;o++)Object.prototype.hasOwnProperty.call(e,t[o])&&!0!==e[t[o]].ignore&&(i=e[t[o]].min,n=e[t[o]].max,"right"!=e[t[o]].yAxisOrientation?(r=!0,a=a>i?i:a,l=l<n?n:l):(s=!0,h=h>i?i:h,c=c<n?n:c));1==r&&this.yAxisLeft.setRange(a,l),1==s&&this.yAxisRight.setRange(h,c)}o=this._toggleAxisVisiblity(r,this.yAxisLeft)||o,o=this._toggleAxisVisiblity(s,this.yAxisRight)||o,1==s&&1==r?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!r,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==s?this.yAxisRight.width:0,o=this.yAxisLeft.redraw()||o,o=this.yAxisRight.redraw()||o):o=this.yAxisRight.redraw()||o;var u=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(let e=0;e<u.length;e++)-1!=Nc(t).call(t,u[e])&&Hc(t).call(t,Nc(t).call(t,u[e]),1);return o},QD.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},QD.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},QD.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)))};class tk extends MC{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:fC.extend({},PD.FORMAT),moment:NC,timeAxis:null},this.options=fC.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(fC.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),fC.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 NC.locale?NC.locale(t.locale):NC.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 r=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,s=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=r?t.minorCharHeight:0,t.majorLabelHeight=s?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,h=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),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}_repaintLabels(){const t=this.options.orientation.axis,e=fC.convert(this.body.range.start,"Number"),i=fC.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let o=n-kD(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();const r=new PD(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;const s=this.dom;let a,h,l,c,d,u;s.redundant.lines=s.lines,s.redundant.majorTexts=s.majorTexts,s.redundant.minorTexts=s.minorTexts,s.lines=[],s.majorTexts=[],s.minorTexts=[];let p,m,f,g=0,v=0;const b=1e3;let y;for(r.start(),h=r.getCurrent(),c=this.body.util.toScreen(h);r.hasNext()&&v<b;){if(v++,d=r.isMajor(),y=r.getClassName(),a=h,l=c,r.next(),h=r.getCurrent(),c=this.body.util.toScreen(h),p=g,g=c-l,"week"===r.scale)u=!0;else u=g>=.4*p;if(this.options.showMinorLabels&&u){var w=this._repaintMinorText(l,r.getLabelMinor(a),t,y);w.style.width="".concat(g,"px")}d&&this.options.showMajorLabels?(l>0&&(null==f&&(f=l),w=this._repaintMajorText(l,r.getLabelMajor(a),t,y)),m=this._repaintMajorLine(l,g,t,y)):u?m=this._repaintMinorLine(l,g,t,y):m&&(m.style.width="".concat(kb(m.style.width)+g,"px"))}if(v!==b||rk||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(b," lines.")),rk=!0),this.options.showMajorLabels){const e=this.body.util.toTime(0),i=r.getLabelMajor(e),n=i.length*(this.props.majorCharWidth||10)+10;(null==f||n<f)&&this._repaintMajorText(0,i,t,y)}Pn(fC).call(fC,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=fC.xss(e);let r="top"==i?this.props.majorLabelHeight:0;return this._setXY(o,t,r),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=fC.xss(e),o.className="vis-text vis-major ".concat(n);let r="top"==i?0:this.props.minorLabelHeight;return this._setXY(o,t,r),this.dom.majorTexts.push(o),o}_setXY(t,e,i){var n;const o=this.options.rtl?-1*e:e;t.style.transform=qv(n="translate(".concat(o,"px, ")).call(n,i,"px)")}_repaintMinorLine(t,e,i,n){var o;let r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);const s=this.props;r.style.width="".concat(e,"px"),r.style.height="".concat(s.minorLineHeight,"px");let a="top"==i?s.majorLabelHeight:this.body.domProps.top.height,h=t-s.minorLineWidth/2;return this._setXY(r,h,a),r.className=qv(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(o,n),r}_repaintMajorLine(t,e,i,n){var o;let r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);const s=this.props;r.style.width="".concat(e,"px"),r.style.height="".concat(s.majorLineHeight,"px");let a="top"==i?0:this.body.domProps.top.height,h=t-s.majorLineWidth/2;return this._setXY(r,h,a),r.className=qv(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(o,n),r}_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 ek,ik,nk,ok,rk=!1;function sk(){return ik?ek:(ik=1,Cy(),ek=Ft().setInterval)}var ak=b(ok?nk:(ok=1,nk=sk()));function hk(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}function lk(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=tS(this.dom.overlay),this.hammer.on("tap",xi(e=this._onTapOverlay).call(e,this));var n=this,o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Pn(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=function(){var t,e=window,i={},n={keydown:{},keyup:{}},o={};for(t=97;t<=122;t++)o[String.fromCharCode(t)]={code:t-97+65,shift:!1};for(t=65;t<=90;t++)o[String.fromCharCode(t)]={code:t,shift:!0};for(t=0;t<=9;t++)o[""+t]={code:48+t,shift:!1};for(t=1;t<=12;t++)o["F"+t]={code:111+t,shift:!1};for(t=0;t<=9;t++)o["num"+t]={code:96+t,shift:!1};o["num*"]={code:106,shift:!1},o["num+"]={code:107,shift:!1},o["num-"]={code:109,shift:!1},o["num/"]={code:111,shift:!1},o["num."]={code:110,shift:!1},o.left={code:37,shift:!1},o.up={code:38,shift:!1},o.right={code:39,shift:!1},o.down={code:40,shift:!1},o.space={code:32,shift:!1},o.enter={code:13,shift:!1},o.shift={code:16,shift:void 0},o.esc={code:27,shift:!1},o.backspace={code:8,shift:!1},o.tab={code:9,shift:!1},o.ctrl={code:17,shift:!1},o.alt={code:18,shift:!1},o.delete={code:46,shift:!1},o.pageup={code:33,shift:!1},o.pagedown={code:34,shift:!1},o["="]={code:187,shift:!1},o["-"]={code:189,shift:!1},o["]"]={code:221,shift:!1},o["["]={code:219,shift:!1};var r=function(t){a(t,"keydown")},s=function(t){a(t,"keyup")},a=function(t,e){if(void 0!==n[e][t.keyCode])for(var i=n[e][t.keyCode],o=0;o<i.length;o++)(void 0===i[o].shift||1==i[o].shift&&1==t.shiftKey||0==i[o].shift&&0==t.shiftKey)&&i[o].fn(t)};return i.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===o[t])throw new Error("unsupported key: "+t);void 0===n[i][o[t].code]&&(n[i][o[t].code]=[]),n[i][o[t].code].push({fn:e,shift:o[t].shift})},i.bindAll=function(t,e){for(var n in void 0===e&&(e="keydown"),o)o.hasOwnProperty(n)&&i.bind(n,t,e)},i.getKey=function(t){for(var e in o)if(o.hasOwnProperty(e)){if(1==t.shiftKey&&1==o[e].shift&&t.keyCode==o[e].code)return e;if(0==t.shiftKey&&0==o[e].shift&&t.keyCode==o[e].code)return e;if(t.keyCode==o[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},i.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===o[t])throw new Error("unsupported key: "+t);if(void 0!==e){var r=[],s=n[i][o[t].code];if(void 0!==s)for(var a=0;a<s.length;a++)s[a].fn==e&&s[a].shift==o[t].shift||r.push(n[i][o[t].code][a]);n[i][o[t].code]=r}else n[i][o[t].code]=[]},i.reset=function(){n={keydown:{},keyup:{}}},i.destroy=function(){n={keydown:{},keyup:{}},e.removeEventListener("keydown",r,!0),e.removeEventListener("keyup",s,!0)},e.addEventListener("keydown",r,!0),e.addEventListener("keyup",s,!0),i}(),this.escListener=xi(i=this.deactivate).call(i,this)}Xy(lk.prototype),lk.current=null,lk.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},lk.prototype.activate=function(){var t;lk.current&&lk.current.deactivate(),lk.current=this,this.active=!0,this.dom.overlay.style.display="none",fC.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),xi(t=this.keycharm).call(t,"esc",this.escListener)},lk.prototype.deactivate=function(){lk.current===this&&(lk.current=null),this.active=!1,this.dom.overlay.style.display="",fC.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},lk.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};class ck{_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",xi(e=this._onTouch).call(e,this)),this.on("panmove",xi(i=this._onDrag).call(i,this));const o=this;this._origRedraw=xi(n=this._redraw).call(n,this),this._redraw=fC.throttle(this._origRedraw),this.on("_change",t=>{o.itemSet&&o.itemSet.initialItemSetDrawn&&t&&1==t.queue?o._redraw():o._origRedraw()}),this.hammer=new tS(this.dom.root);const r=this.hammer.get("pinch").set({enable:!0});r&&function(t){t.getTouchAction=function(){return["pan-y"]}}(r),this.hammer.get("pan").set({threshold:5,direction:tS.DIRECTION_ALL}),this.timelineListeners={};const s=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];var a,h;function l(t){if(!this.isActive())return;if(this.emit("mousewheel",t),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)return;let e=0,i=0;"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));const n=this.options.verticalScroll,o=Math.abs(i)>=Math.abs(e),r=this.options.horizontalScroll&&this.options.horizontalScrollKey&&t[this.options.horizontalScrollKey];if(n&&o&&!r){const e=this.props.scrollTop,n=e+i;return void(this._setScrollTop(n)!==e&&(this._redraw(),this.emit("scroll",t),t.preventDefault()))}if(this.options.horizontalScroll){this.range.stopRolling();let n=(o?i:e)/120*(this.range.end-this.range.start)/20;this.options.horizontalScrollInvert&&o&&(n=-n);const r=this.range.start+n,s=this.range.end+n,a={animation:!1,byUser:!0,event:t};this.range.setRange(r,s,a),t.preventDefault()}}Pn(s).call(s,t=>{const e=e=>{o.isActive()&&o.emit(t,e)};o.hammer.on(t,e),o.timelineListeners[t]=e}),hk(this.hammer,t=>{o.emit("touch",t)}),a=this.hammer,(h=t=>{o.emit("release",t)}).inputHandler=function(t){t.isFinal&&h(t)},a.on("hammer.input",h.inputHandler);const c="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function d(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(c,xi(l).call(l,this),!1),this.dom.top.addEventListener(c,xi(l).call(l,this),!1),this.dom.bottom.addEventListener(c,xi(l).call(l,this),!1),this.dom.left.parentNode.addEventListener("scroll",xi(d).call(d,this)),this.dom.right.parentNode.addEventListener("scroll",xi(d).call(d,this));let u=!1;function p(t){var e;if(t.preventDefault&&(o.emit("dragover",o.getEventProperties(t)),t.preventDefault()),Nc(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",xi(p).call(p,this),!1),this.dom.center.addEventListener("drop",xi(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","horizontalScrollKey","horizontalScrollInvert","verticalScroll","longSelectPressTime","snap"];if(fC.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 tk(this.body,this.options);t.setOptions=e=>{const i=e?fC.extend({},e):{};i.orientation="top",tk.prototype.setOptions.call(t,i)},this.components.push(t)}}else if(this.timeAxis2){var i;const t=Nc(i=this.components).call(i,this.timeAxis2);var n;if(-1!==t)Hc(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&&vD(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new lk(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(Pn(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=fC.deepExtend({},this.options);Pn(o=this.components).call(o,t=>{fC.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,Pn(t=this.components).call(t,t=>t.destroy()),this.body=null}setCustomTime(t,e){var i;const n=po(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(dy(e)));n.length>0&&n[0].setCustomTime(t)}getCustomTime(t){var e;const i=po(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(dy(t)));return i[0].getCustomTime()}setCustomTimeMarker(t,e,i){var n;const o=po(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(dy(e)));o.length>0&&o[0].setCustomMarker(t,i)}setCustomTimeTitle(t,e){var i;const n=po(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(dy(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?fC.convert(t,"Date"):new Date,o=BS(i=this.customTimes).call(i,t=>t.options.id===e);if(o)throw new Error("A custom time with id ".concat(dy(e)," already exists"));const r=new eS(this.body,fC.extend({},this.options,{time:n,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(r),this.components.push(r),this._redraw(),e}removeCustomTime(t){var e;const i=po(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(dy(t)));Pn(i).call(i,t=>{var e,i,n,o;Hc(e=this.customTimes).call(e,Nc(i=this.customTimes).call(i,t),1),Hc(n=this.components).call(n,Nc(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),r=new Date(i.max.valueOf()+.01*n),s=!t||void 0===t.animation||t.animation;this.range.setRange(o,r,{animation:s},e)}getDataRange(){throw new Error("Cannot invoke abstract method getDataRange")}setWindow(t,e,i,n){let o,r;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(r=arguments[0],o=void 0===r.animation||r.animation,this.range.setRange(r.start,r.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(r=arguments[0],n=arguments[1],o=void 0===r.animation||r.animation,this.range.setRange(r.start,r.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=fC.convert(t,"Date").valueOf(),r=o-n/2,s=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(r,s,{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(),r=n.end.valueOf(),s=r-o,a=(s-s/(1+t))/2,h=o+a,l=r-a;this.setWindow(h,l,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(),r=n.end.valueOf(),s=r-o,a=o-s*t/2,h=r+s*t/2;this.setWindow(a,h,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;bD(this.options.moment,this.body,this.options.hiddenDates),"top"==n.orientation?(fC.addClassName(e.root,"vis-top"),fC.removeClassName(e.root,"vis-bottom")):(fC.removeClassName(e.root,"vis-top"),fC.addClassName(e.root,"vis-bottom")),n.rtl?(fC.addClassName(e.root,"vis-rtl"),fC.removeClassName(e.root,"vis-ltr")):(fC.addClassName(e.root,"vis-ltr"),fC.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=fC.option.asSize(n.maxHeight,""),e.root.style.minHeight=fC.option.asSize(n.minHeight,""),e.root.style.width=fC.option.asSize(n.width,"");const r=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 s=Math.max(o.left.height,o.center.height,o.right.height),a=o.top.height+s+o.bottom.height+o.border.top+o.border.bottom;e.root.style.height=fC.option.asSize(n.height,"".concat(a,"px")),o.root.height=e.root.offsetHeight,o.background.height=o.root.height;const h=o.root.height-o.top.height-o.bottom.height;o.centerContainer.height=h,o.leftContainer.height=h,o.rightContainer.height=o.leftContainer.height,o.root.width=r,o.background.width=o.root.width,this.initialDrawDone||(o.scrollbarWidth=fC.getScrollBarWidth());const l=e.leftContainer.clientWidth,c=e.rightContainer.clientWidth;n.verticalScroll?n.rtl?(o.left.width=l||-o.border.left,o.right.width=c+o.scrollbarWidth||-o.border.right):(o.left.width=l+o.scrollbarWidth||-o.border.left,o.right.width=c||-o.border.right):(o.left.width=l||-o.border.left,o.right.width=c||-o.border.right),this._setDOM();let d=this._updateScrollTop();"top"!=n.orientation.item&&(d+=Math.max(o.centerContainer.height-o.center.height-o.border.top-o.border.bottom,0)),e.center.style.transform="translateY(".concat(d,"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(d,"px"),e.right.style.top="".concat(d,"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=l||-o.border.left,o.right.width=c||-o.border.right,this._setDOM());const m=o.center.height>o.centerContainer.height;this.hammer.get("pan").set({direction:m?tS.DIRECTION_ALL:tS.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),Pn(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 xD(this,t,this.props.center.width)}_toGlobalTime(t){return xD(this,t,this.props.root.width)}_toScreen(t){return _D(this,t,this.props.center.width)}_toGlobalScreen(t){return _D(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=fC.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=ak(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null)}_onTouch(){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(){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")}}Xy(ck.prototype);var dk={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 uk{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 dk[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===fC.isString(t)){if(!0===fC.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===fC.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===fC.isValidHex(t)){let i=fC.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: "+dy(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=fC.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Ry(()=>{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=fC.extend({},t)),this.color=t;let e=fC.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),r=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){let e=fC.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=fC.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=fC.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),Wy(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=xi(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=xi(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=xi(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=xi(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 tS(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),hk(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,r=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,r,s),this.centerCoordinates={x:.5*r,y:.5*s},this.r=.49*r;let a,h=2*Math.PI/360,l=1/360,c=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(h*n),i=this.centerCoordinates.y+o*Math.cos(h*n),a=fC.HSVToRGB(n*l,o*c,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,r,s)}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,r=.5*this.colorPickerDiv.clientWidth,s=i-r,a=n-o,h=Math.atan2(s,a),l=.98*Math.min(Math.sqrt(s*s+a*a),r),c=Math.cos(h)*l+o,d=Math.sin(h)*l+r;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+"px";let u=h/(2*Math.PI);u=u<0?u+1:u;let p=l/this.r,m=fC.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;let f=fC.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 pk{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},fC.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new uk(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(dv(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!==po(t)&&(this.options.filter=po(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===po(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=po(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===Nc(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 Pn(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=fC.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?fC.xss("<i><b>"+t+":</b></i>"):fC.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!==Nc(t).call(t,e)&&(o=Nc(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 r=this;n.onchange=function(){r._update(this.value,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeRange(t,e,i){let n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=r}catch(t){}a.step=s;let h="",l=0;if(void 0!==e){let t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<o&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>r&&1!==r&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=n;let c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=Number(a.value);var d=this;a.onchange=function(){c.value=this.value,d._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};let u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,c);""!==h&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(h,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=fC.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=Ry(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Ry(()=>{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 r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,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 r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,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 r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,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=po(this.options),r=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;n=!0;let a=t[s],h=fC.copyAndExtendArray(e,s);if("function"==typeof o&&(n=o(s,e),!1===n&&!dv(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==n){r=!0;let t=this._getValue(h);if(dv(a))this._handleArray(a,t,h);else if("string"==typeof a)this._makeTextInput(a,t,h);else if("boolean"==typeof a)this._makeCheckbox(a,t,h);else if(a instanceof Object){let t=!0;if(-1!==Nc(e).call(e,"physics")&&this.moduleOptions.physics.solver!==s&&(t=!1),!0===t)if(void 0!==a.enabled){let t=fC.copyAndExtendArray(h,"enabled"),e=this._getValue(t);if(!0===e){let t=this._makeLabel(s,h,!0);this._makeItem(h,t),r=this._handleObject(a,h)||r}else this._makeCheckbox(a,e,h)}else{let t=this._makeLabel(s,h,!0);this._makeItem(h,t),r=this._handleObject(a,h)||r}}else console.error("dont know how to handle",a,s,h)}}return r}_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 = "+dy(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}}let mk,fk=!1;const gk="background: #FFeeee; color: #dd0000";class vk{static validate(t,e,i){fk=!1,mk=e;let n=e;return void 0!==i&&(n=e[i]),vk.parse(t,n,[]),fk}static parse(t,e,i){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&vk.check(n,t,e,i)}static check(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)return void vk.getSuggestion(t,i,n);let o=t,r=!0;void 0===i[t]&&void 0!==i.__any__&&(o="__any__",r="object"===vk.getType(e[t]));let s=i[o];r&&void 0!==s.__type__&&(s=s.__type__),vk.checkFields(t,e,i,o,s,n)}static checkFields(t,e,i,n,o,r){let s=function(e){console.log("%c"+e+vk.printLocation(r,t),gk)},a=vk.getType(e[t]),h=o[a];void 0!==h?"array"===vk.getType(h)&&-1===Nc(h).call(h,e[t])?(s('Invalid option detected in "'+t+'". Allowed values are:'+vk.print(h)+' not "'+e[t]+'". '),fk=!0):"object"===a&&"__any__"!==n&&(r=fC.copyAndExtendArray(r,t),vk.parse(e[t],i[n],r)):void 0===o.any&&(s('Invalid type received for "'+t+'". Expected: '+vk.print(hl(o))+". Received ["+a+'] "'+e[t]+'"'),fk=!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":dv(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=vk.findInOptions(t,e,i,!1),r=vk.findInOptions(t,mk,[],!0);n=void 0!==o.indexMatch?" in "+vk.printLocation(o.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':r.distance<=4&&o.distance>r.distance?" in "+vk.printLocation(o.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+vk.printLocation(r.path,r.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+vk.printLocation(o.path,t):". Did you mean one of these: "+vk.print(hl(e))+vk.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+n,gk),fk=!0}static findInOptions(t,e,i){let n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[],h=t.toLowerCase();for(let c in e){if(!Object.prototype.hasOwnProperty.call(e,c))continue;let d;if(void 0!==e[c].__type__&&!0===o){let o=vk.findInOptions(t,e[c],fC.copyAndExtendArray(i,c));r>o.distance&&(s=o.closestMatch,a=o.path,r=o.distance,n=o.indexMatch)}else{var l;-1!==Nc(l=c.toLowerCase()).call(l,h)&&(n=c),d=vk.levenshteinDistance(t,c),r>d&&(s=c,a=fC.copyArray(i),r=d)}}return{closestMatch:s,path:a,distance:r,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 dy(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]}}const bk="string",yk="boolean",wk="number",_k="date",xk="object",Ck="moment",Sk={configure:{enabled:{boolean:yk},filter:{boolean:yk,function:"function"},container:{dom:"dom"},__type__:{object:xk,boolean:yk,function:"function"}},alignCurrentTime:{string:bk,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:bk},sort:{boolean:yk},sampling:{boolean:yk},stack:{boolean:yk},graphHeight:{string:bk,number:wk},shaded:{enabled:{boolean:yk},orientation:{string:["bottom","top","zero","group"]},groupId:{object:xk},__type__:{boolean:yk,object:xk}},style:{string:["line","bar","points"]},barChart:{width:{number:wk},minWidth:{number:wk},sideBySide:{boolean:yk},align:{string:["left","center","right"]},__type__:{object:xk}},interpolation:{enabled:{boolean:yk},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:wk},__type__:{object:xk,boolean:yk}},drawPoints:{enabled:{boolean:yk},onRender:{function:"function"},size:{number:wk},style:{string:["square","circle"]},__type__:{object:xk,boolean:yk,function:"function"}},dataAxis:{showMinorLabels:{boolean:yk},showMajorLabels:{boolean:yk},showWeekScale:{boolean:yk},icons:{boolean:yk},width:{string:bk,number:wk},visible:{boolean:yk},alignZeros:{boolean:yk},left:{range:{min:{number:wk,undefined:"undefined"},max:{number:wk,undefined:"undefined"},__type__:{object:xk}},format:{function:"function"},title:{text:{string:bk,number:wk,undefined:"undefined"},style:{string:bk,undefined:"undefined"},__type__:{object:xk}},__type__:{object:xk}},right:{range:{min:{number:wk,undefined:"undefined"},max:{number:wk,undefined:"undefined"},__type__:{object:xk}},format:{function:"function"},title:{text:{string:bk,number:wk,undefined:"undefined"},style:{string:bk,undefined:"undefined"},__type__:{object:xk}},__type__:{object:xk}},__type__:{object:xk}},legend:{enabled:{boolean:yk},icons:{boolean:yk},left:{visible:{boolean:yk},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:xk}},right:{visible:{boolean:yk},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:xk}},__type__:{object:xk,boolean:yk}},groups:{visibility:{any:"any"},__type__:{object:xk}},autoResize:{boolean:yk},throttleRedraw:{number:wk},clickToUse:{boolean:yk},end:{number:wk,date:_k,string:bk,moment:Ck},format:{minorLabels:{millisecond:{string:bk,undefined:"undefined"},second:{string:bk,undefined:"undefined"},minute:{string:bk,undefined:"undefined"},hour:{string:bk,undefined:"undefined"},weekday:{string:bk,undefined:"undefined"},day:{string:bk,undefined:"undefined"},week:{string:bk,undefined:"undefined"},month:{string:bk,undefined:"undefined"},quarter:{string:bk,undefined:"undefined"},year:{string:bk,undefined:"undefined"},__type__:{object:xk}},majorLabels:{millisecond:{string:bk,undefined:"undefined"},second:{string:bk,undefined:"undefined"},minute:{string:bk,undefined:"undefined"},hour:{string:bk,undefined:"undefined"},weekday:{string:bk,undefined:"undefined"},day:{string:bk,undefined:"undefined"},week:{string:bk,undefined:"undefined"},month:{string:bk,undefined:"undefined"},quarter:{string:bk,undefined:"undefined"},year:{string:bk,undefined:"undefined"},__type__:{object:xk}},__type__:{object:xk}},moment:{function:"function"},height:{string:bk,number:wk},hiddenDates:{start:{date:_k,number:wk,string:bk,moment:Ck},end:{date:_k,number:wk,string:bk,moment:Ck},repeat:{string:bk},__type__:{object:xk,array:"array"}},locale:{string:bk},locales:{__any__:{any:"any"},__type__:{object:xk}},max:{date:_k,number:wk,string:bk,moment:Ck},maxHeight:{number:wk,string:bk},maxMinorChars:{number:wk},min:{date:_k,number:wk,string:bk,moment:Ck},minHeight:{number:wk,string:bk},moveable:{boolean:yk},multiselect:{boolean:yk},orientation:{string:bk},showCurrentTime:{boolean:yk},showMajorLabels:{boolean:yk},showMinorLabels:{boolean:yk},showWeekScale:{boolean:yk},snap:{function:"function",null:"null"},start:{date:_k,number:wk,string:bk,moment:Ck},timeAxis:{scale:{string:bk,undefined:"undefined"},step:{number:wk,undefined:"undefined"},__type__:{object:xk}},width:{string:bk,number:wk},zoomable:{boolean:yk},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:wk},zoomMin:{number:wk},zIndex:{number:wk},__type__:{object:xk}},Dk={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}};class kk extends MC{constructor(t,e){var i,n,o,r,s,a,h;super();const l=NC().hours(0).minutes(0).seconds(0).milliseconds(0),c=l.clone().add(-3,"days").valueOf(),d=l.clone().add(3,"days").valueOf();this.millisecondsPerPixelCache=void 0,void 0===e?(this.start=c,this.end=d):(this.start=e.start||c,this.end=e.end||d),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:NC,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=fC.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",xi(i=this._onDragStart).call(i,this)),this.body.emitter.on("panmove",xi(n=this._onDrag).call(n,this)),this.body.emitter.on("panend",xi(o=this._onDragEnd).call(o,this)),this.body.emitter.on("mousewheel",xi(r=this._onMouseWheel).call(r,this)),this.body.emitter.on("touch",xi(s=this._onTouch).call(s,this)),this.body.emitter.on("pinch",xi(a=this._onPinch).call(a,this)),this.body.dom.rollingModeBtn.addEventListener("click",xi(h=this.startRolling).call(h,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","horizontalScrollKey","horizontalScrollInvert","verticalScroll"];fC.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=fC.convert(new Date,"Date").valueOf(),o=t.options.rollingMode&&t.options.rollingMode.offset||.5,r=n-i*o,s=n+i*(1-o);t.setRange(r,s,{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=Ry(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 r=this,s=null!=t?fC.convert(t,"Date").valueOf():null,a=null!=e?fC.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){const t=this.start,e=this.end,c="object"==typeof i.animation&&"duration"in i.animation?i.animation.duration:500,d="object"==typeof i.animation&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",u=fC.easingFunctions[d];var h;if(!u)throw new Error(qv(h="Unknown easing function ".concat(dy(d),". Choose from: ")).call(h,hl(fC.easingFunctions).join(", ")));const p=Un();let m=!1;const f=()=>{if(!r.props.touch.dragging){const h=Un()-p,d=u(h/c),g=h>c,v=g||null===s?s:t+(s-t)*d,b=g||null===a?a:e+(a-e)*d;l=r._applyRange(v,b),bD(r.options.moment,r.body,r.options.hiddenDates),m=m||l;const y={start:new Date(r.start),end:new Date(r.end),byUser:i.byUser,event:i.event};if(o&&o(d,l,g),l&&r.body.emitter.emit("rangechange",y),g){if(m&&(r.body.emitter.emit("rangechanged",y),n))return n()}else r.animationTimer=Ry(f,20)}};return f()}var l=this._applyRange(s,a);if(bD(this.options.moment,this.body,this.options.hiddenDates),l){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(r.timeoutID),r.timeoutID=Ry(()=>{r.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?fC.convert(t,"Date").valueOf():this.start,n=null!=e?fC.convert(e,"Date").valueOf():this.end;const o=null!=this.options.max?fC.convert(this.options.max,"Date").valueOf():null,r=null!=this.options.min?fC.convert(this.options.min,"Date").valueOf():null;let s;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!==r&&i<r&&(s=r-i,i+=s,n+=s,null!=o&&n>o&&(n=o)),null!==o&&n>o&&(s=n-o,i-=s,n-=s,null!=r&&i<r&&(i=r)),null!==this.options.zoomMin){let t=fS(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):(s=t-(n-i),i-=s/2,n+=s/2)}}if(null!==this.options.zoomMax){let t=fS(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):(s=n-i-t,i+=s/2,n-=s/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 kk.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;Tk(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let n=this.props.touch.end-this.props.touch.start;n-=CD(this.body.hiddenDates,this.start,this.end);const o="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;let r;r=this.options.rtl?i/o*n:-i/o*n;const s=this.props.touch.start+r,a=this.props.touch.end+r,h=OD(this.body.hiddenDates,s,this.previousDelta-i,!0),l=OD(this.body.hiddenDates,a,this.previousDelta-i,!0);if(h!=s||l!=a)return this.deltaDifference+=i,this.props.touch.start=h,this.props.touch.end=l,void this._onDrag(t);this.previousDelta=i,this._applyRange(s,a);const c=new Date(this.start),d=new Date(this.end);this.body.emitter.emit("rangechange",{start:c,end:d,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,fC.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;fC.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=CD(this.body.hiddenDates,this.start,this.end),o=kD(this.options.moment,this.body.hiddenDates,this,i),r=n-o;let s=i-o+(this.props.touch.start-(i-o))*e,a=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;const h=OD(this.body.hiddenDates,s,1-e,!0),l=OD(this.body.hiddenDates,a,e-1,!0);h==s&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,s=h,a=l);const c={animation:!1,byUser:!0,event:t};this.setRange(s,a,c),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(Tk(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=CD(this.body.hiddenDates,this.start,this.end),r=kD(this.options.moment,this.body.hiddenDates,this,e),s=o-r;let a=e-r+(this.start-(e-r))*t,h=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);const l=OD(this.body.hiddenDates,a,i,!0),c=OD(this.body.hiddenDates,h,-i,!0);l==a&&c==h||(a=l,h=c);const d={animation:!1,byUser:!0,event:n};this.setRange(a,h,d),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 Tk(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}function Ok(t,e,i,n){var o,r,s,a,h,l,c;if(!dv(i)&&!aC(i)&&i instanceof Object){var d=n;n=i,i=d}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:NC,width:null,height:null,maxHeight:null,minHeight:null},this.options=fC.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:xi(o=this.on).call(o,this),off:xi(r=this.off).call(r,this),emit:xi(s=this.emit).call(s,this)},hiddenDates:[],util:{getScale:()=>u.timeAxis.step.scale,getStep:()=>u.timeAxis.step.step,toScreen:xi(a=u._toScreen).call(a,u),toGlobalScreen:xi(h=u._toGlobalScreen).call(h,u),toTime:xi(l=u._toTime).call(l,u),toGlobalTime:xi(c=u._toGlobalTime).call(c,u)}},this.range=new kk(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new tk(this.body),this.components.push(this.timeAxis),this.currentTime=new JC(this.body),this.components.push(this.currentTime),this.linegraph=new QD(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&&Ry(()=>u.options.onInitialDrawComplete(),0))}}),n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}Ok.prototype=new ck,Ok.prototype.setOptions=function(t){!0===vk.validate(t,Sk)&&console.log("%cErrors have been found in the supplied options object.",gk),ck.prototype.setOptions.call(this,t)},Ok.prototype.setItems=function(t){var e,n=null==this.itemsData;if(e=t?aC(t)?dC(t):dC(new i.DataSet(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),n)if(null!=this.options.start||null!=this.options.end){var o=null!=this.options.start?this.options.start:null,r=null!=this.options.end?this.options.end:null;this.setWindow(o,r,{animation:!1})}else this.fit({animation:!1})},Ok.prototype.setGroups=function(t){var e;e=t?aC(t)?t:new i.DataSet(t):null,this.groupsData=e,this.linegraph.setGroups(e)},Ok.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+"'"},Ok.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]))},Ok.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],r=fC.convert(o.x,"Date").valueOf();t=null==t||t>r?r:t,e=null==e||e<r?r:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},Ok.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=e-fC.getAbsoluteLeft(this.dom.centerContainer),o=i-fC.getAbsoluteTop(this.dom.centerContainer),r=this._toTime(n),s=eS.customTimeFromTarget(t),a=fC.getTarget(t),h=null;fC.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&fC.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":fC.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||fC.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":fC.hasParent(a,this.linegraph.legendLeft.dom.frame)||fC.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=s?h="custom-time":fC.hasParent(a,this.currentTime.bar)?h="current-time":fC.hasParent(a,this.dom.center)&&(h="background");var l=[],c=this.linegraph.yAxisLeft,d=this.linegraph.yAxisRight;return!c.hidden&&this.itemsData.length>0&&l.push(c.screenToValue(o)),!d.hidden&&this.itemsData.length>0&&l.push(d.screenToValue(o)),{event:t,customTime:s?s.options.id:null,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:r,value:l}},Ok.prototype._createConfigurator=function(){return new pk(this,this.dom.container,Dk)};const Ek="string",Ik="boolean",Pk="number",Ak="array",Mk="date",Nk="object",Fk="moment",Rk={configure:{enabled:{boolean:Ik},filter:{boolean:Ik,function:"function"},container:{dom:"dom"},__type__:{object:Nk,boolean:Ik,function:"function"}},align:{string:Ek},alignCurrentTime:{string:Ek,undefined:"undefined"},rtl:{boolean:Ik,undefined:"undefined"},rollingMode:{follow:{boolean:Ik},offset:{number:Pk,undefined:"undefined"},__type__:{object:Nk}},onTimeout:{timeoutMs:{number:Pk},callback:{function:"function"},__type__:{object:Nk}},verticalScroll:{boolean:Ik,undefined:"undefined"},horizontalScroll:{boolean:Ik,undefined:"undefined"},horizontalScrollKey:{string:Ek,undefined:"undefined"},horizontalScrollInvert:{boolean:Ik,undefined:"undefined"},autoResize:{boolean:Ik},throttleRedraw:{number:Pk},clickToUse:{boolean:Ik},dataAttributes:{string:Ek,array:Ak},editable:{add:{boolean:Ik,undefined:"undefined"},remove:{boolean:Ik,undefined:"undefined"},updateGroup:{boolean:Ik,undefined:"undefined"},updateTime:{boolean:Ik,undefined:"undefined"},overrideItems:{boolean:Ik,undefined:"undefined"},__type__:{boolean:Ik,object:Nk}},end:{number:Pk,date:Mk,string:Ek,moment:Fk},format:{minorLabels:{millisecond:{string:Ek,undefined:"undefined"},second:{string:Ek,undefined:"undefined"},minute:{string:Ek,undefined:"undefined"},hour:{string:Ek,undefined:"undefined"},weekday:{string:Ek,undefined:"undefined"},day:{string:Ek,undefined:"undefined"},week:{string:Ek,undefined:"undefined"},month:{string:Ek,undefined:"undefined"},year:{string:Ek,undefined:"undefined"},__type__:{object:Nk,function:"function"}},majorLabels:{millisecond:{string:Ek,undefined:"undefined"},second:{string:Ek,undefined:"undefined"},minute:{string:Ek,undefined:"undefined"},hour:{string:Ek,undefined:"undefined"},weekday:{string:Ek,undefined:"undefined"},day:{string:Ek,undefined:"undefined"},week:{string:Ek,undefined:"undefined"},month:{string:Ek,undefined:"undefined"},year:{string:Ek,undefined:"undefined"},__type__:{object:Nk,function:"function"}},__type__:{object:Nk}},moment:{function:"function"},groupHeightMode:{string:Ek},groupOrder:{string:Ek,function:"function"},groupEditable:{add:{boolean:Ik,undefined:"undefined"},remove:{boolean:Ik,undefined:"undefined"},order:{boolean:Ik,undefined:"undefined"},__type__:{boolean:Ik,object:Nk}},groupOrderSwap:{function:"function"},height:{string:Ek,number:Pk},hiddenDates:{start:{date:Mk,number:Pk,string:Ek,moment:Fk},end:{date:Mk,number:Pk,string:Ek,moment:Fk},repeat:{string:Ek},__type__:{object:Nk,array:Ak}},itemsAlwaysDraggable:{item:{boolean:Ik,undefined:"undefined"},range:{boolean:Ik,undefined:"undefined"},__type__:{boolean:Ik,object:Nk}},limitSize:{boolean:Ik},locale:{string:Ek},locales:{__any__:{any:"any"},__type__:{object:Nk}},longSelectPressTime:{number:Pk},margin:{axis:{number:Pk},item:{horizontal:{number:Pk,undefined:"undefined"},vertical:{number:Pk,undefined:"undefined"},__type__:{object:Nk,number:Pk}},__type__:{object:Nk,number:Pk}},max:{date:Mk,number:Pk,string:Ek,moment:Fk},maxHeight:{number:Pk,string:Ek},maxMinorChars:{number:Pk},min:{date:Mk,number:Pk,string:Ek,moment:Fk},minHeight:{number:Pk,string:Ek},moveable:{boolean:Ik},multiselect:{boolean:Ik},multiselectPerGroup:{boolean:Ik},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:Ek,undefined:"undefined"},item:{string:Ek,undefined:"undefined"},__type__:{string:Ek,object:Nk}},selectable:{boolean:Ik},sequentialSelection:{boolean:Ik},showCurrentTime:{boolean:Ik},showMajorLabels:{boolean:Ik},showMinorLabels:{boolean:Ik},showWeekScale:{boolean:Ik},stack:{boolean:Ik},stackSubgroups:{boolean:Ik},cluster:{maxItems:{number:Pk,undefined:"undefined"},titleTemplate:{string:Ek,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:Ik,undefined:"undefined"},fitOnDoubleClick:{boolean:Ik,undefined:"undefined"},__type__:{boolean:Ik,object:Nk}},snap:{function:"function",null:"null"},start:{date:Mk,number:Pk,string:Ek,moment:Fk},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:Ek,function:"function"},showTooltips:{boolean:Ik},tooltip:{followMouse:{boolean:Ik},overflowMethod:{string:["cap","flip","none"]},delay:{number:Pk},template:{function:"function"},__type__:{object:Nk}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:Ik,object:Nk}},timeAxis:{scale:{string:Ek,undefined:"undefined"},step:{number:Pk,undefined:"undefined"},__type__:{object:Nk}},type:{string:Ek},width:{string:Ek,number:Pk},preferZoom:{boolean:Ik},zoomable:{boolean:Ik},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:Pk},zoomMax:{number:Pk},zoomMin:{number:Pk},xss:{disabled:{boolean:Ik},filterOptions:{__any__:{any:"any"},__type__:{object:Nk}},__type__:{object:Nk}},__type__:{object:Nk}},Lk={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}}};class jk extends ck{constructor(t,e,i,n){var o,r,s,a,h,l,c;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof jk))throw new SyntaxError("Constructor must be called with the new operator");if(!dv(i)&&!aC(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 d=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:NC},this.options=fC.deepExtend({},this.defaultOptions),n&&fC.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=xi(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=fC.xss(e))}function m(t,e){d.hasListeners(t)&&d.emit(t,d.getEventProperties(e))}this.dom.loadingScreen.appendChild(u),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:xi(o=this.on).call(o,this),off:xi(r=this.off).call(r,this),emit:xi(s=this.emit).call(s,this)},hiddenDates:[],util:{getScale:()=>d.timeAxis.step.scale,getStep:()=>d.timeAxis.step.step,toScreen:xi(a=d._toScreen).call(a,d),toGlobalScreen:xi(h=d._toGlobalScreen).call(h,d),toTime:xi(l=d._toTime).call(l,d),toGlobalTime:xi(c=d._toGlobalTime).call(c,d)}},this.range=new kk(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new tk(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new JC(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new $D(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!=d.itemsData){if(!d.initialFitDone&&!d.options.rollingMode)if(d.initialFitDone=!0,null!=d.options.start||null!=d.options.end){if(null==d.options.start||null==d.options.end)var t=d.getItemRange();const e=null!=d.options.start?d.options.start:t.min,i=null!=d.options.end?d.options.end:t.max;d.setWindow(e,i,{animation:!1})}else d.fit({animation:!1});d.initialDrawDone||!d.initialRangeChangeDone&&(d.options.start||d.options.end)&&!d.options.rollingMode||(d.initialDrawDone=!0,d.itemSet.initialDrawDone=!0,d.dom.root.style.visibility="visible",d.dom.loadingScreen.parentNode.removeChild(d.dom.loadingScreen),d.options.onInitialDrawComplete&&Ry(()=>d.options.onInitialDrawComplete(),0))}}),this.on("destroyTimeline",()=>{d.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 pk(this,this.dom.container,Lk)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===vk.validate(t,Rk)&&console.log("%cErrors have been found in the supplied options object.",gk),ck.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?aC(t)?dC(t):dC(new i.DataSet(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 n=t=>!1!==t.visible;t?(dv(t)&&(t=new i.DataSet(t)),e=new i.DataView(t,{filter:n})):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=dv(t)?t:[t],n=this.itemsData.get(i);let o=null,r=null;if(Pn(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===r||i>r)&&(r=i)}),null!==o&&null!==r){const t=this,n=this.itemSet.items[i[0]];let s=-1*this._getScrollTop(),a=null;const h=(e,i,o)=>{const r=Hk(t,n);if(!1===r)return;if(a||(a=r),a.itemTop==r.itemTop&&!a.shouldScroll)return;a.itemTop!=r.itemTop&&r.shouldScroll&&(a=r,s=-1*t._getScrollTop());const h=s,l=a.scrollOffset,c=o?l:h+(l-h)*e;t._setScrollTop(-c),i||t._redraw()},l=()=>{const e=Hk(t,n);e.shouldScroll&&e.itemTop!=a.itemTop&&(t._setScrollTop(-e.scrollOffset),t._redraw())},c=()=>{l(),Ry(l,100)},d=!e||void 0===e.zoom||e.zoom,u=(o+r)/2,p=d?1.1*(r-o):Math.max(this.range.end-this.range.start,1.1*(r-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},c,h)}}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 r=t/this.props.center.width,s={};let a=0;Pn(fC).call(fC,this.itemSet.items,(t,e)=>{if(t.groupShowing){const i=!0;s[e]=t.redraw(i),a=s[e].length}});if(a>0)for(let t=0;t<a;t++)Pn(fC).call(fC,s,e=>{e[t]()});if(Pn(fC).call(fC,this.itemSet.items,t=>{const s=zk(t),a=Bk(t);let h,l;this.options.rtl?(h=s-(t.getWidthRight()+10)*r,l=a+(t.getWidthLeft()+10)*r):(h=s-(t.getWidthLeft()+10)*r,l=a+(t.getWidthRight()+10)*r),h<e&&(e=h,n=t),l>i&&(i=l,o=t)}),n&&o){const r=n.getWidthLeft()+10,s=o.getWidthRight()+10,a=this.props.center.width-r-s;a>0&&(this.options.rtl?(e=zk(n)-s*t/a,i=Bk(o)+r*t/a):(e=zk(n)-r*t/a,i=Bk(o)+s*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&&Pn(i=this.itemsData).call(i,i=>{const n=fC.convert(i.start,"Date").valueOf(),o=fC.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,r=i-n.top,s=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),h=eS.customTimeFromTarget(t),l=this.itemSet.options.snap||null,c=this.body.util.getScale(),d=this.body.util.getStep(),u=this._toTime(o),p=l?l(u,c,d):u,m=fC.getTarget(t);let f=null;return null!=s?f="item":null!=h?f="custom-time":fC.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&fC.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":fC.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":fC.hasParent(m,this.currentTime.bar)?f="current-time":fC.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:s?s.id:null,isCluster:!!s&&!!s.isCluster,items:s?s.items||[]:null,group:a?a.groupId:null,customTime:h?h.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:r,time:u,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}_redraw(){ck.prototype._redraw.call(this)}_onFit(t){const e=t.start,i=t.end,n=t.animation;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}function zk(t){return fC.convert(t.data.start,"Date").valueOf()}function Bk(t){const e=null!=t.data.end?t.data.end:t.data.start;return fC.convert(e,"Date").valueOf()}function Hk(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 r=o.top,s=!0;const a=t.timeAxis.options.orientation.axis,h=()=>"bottom"==a?o.height-e.top-e.height:e.top,l=-1*t._getScrollTop(),c=r+h(),d=e.height;return c<l?r+i<=r+h()+d&&(r+=h()-t.itemSet.options.margin.item.vertical):c+d>l+i?r+=h()+d-i+t.itemSet.options.margin.item.vertical:s=!1,r=Math.min(r,n-i),{shouldScroll:s,scrollOffset:r,itemTop:c}}const Gk=function(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}();e.locale(Gk);const Wk={Core:ck,DateUtil:ID,Range:kk,stack:EC,TimeStep:PD,components:{items:{Item:CS,BackgroundItem:DS,BoxItem:kS,ClusterItem:HS,PointItem:GS,RangeItem:SS},BackgroundGroup:AC,Component:MC,CurrentTime:JC,CustomTime:eS,DataAxis:vS,DataScale:gS,GraphGroup:xS,Group:PC,ItemSet:$D,Legend:JD,LineGraph:QD,TimeAxis:tk}};t.Graph2d=Ok,t.Timeline=jk,t.timeline=Wk});
//# sourceMappingURL=vis-timeline-graph2d.min.js.map