/**
 * vis-timeline and vis-graph2d
 * https://visjs.github.io/vis-timeline/
 *
 * Create a fully customizable, interactive timeline with items and ranges.
 *
 * @version 8.5.0
 * @date    2025-12-12T13:44:42.806Z
 *
 * @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.
 */
import t from"moment";import{isDataViewLike as e,DataSet as i,createNewDataPipeFrom as o,DataView as n}from"vis-data/peer/esm/vis-data.js";var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var a,h,l,c,d,u,p,m,f,g,v,b,y,w,_,x;function C(){if(h)return a;h=1;var t=function(t){return t&&t.Math===Math&&t};return a=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof s&&s)||t("object"==typeof a&&a)||function(){return this}()||Function("return this")()}function S(){return c?l:(c=1,l=function(t){try{return!!t()}catch(t){return!0}})}function D(){return u?d:(u=1,d=!S()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function k(){if(m)return p;m=1;var t=D(),e=Function.prototype,i=e.apply,o=e.call;return p="object"==typeof Reflect&&Reflect.apply||(t?o.bind(i):function(){return o.apply(i,arguments)}),p}function T(){if(g)return f;g=1;var t=D(),e=Function.prototype,i=e.call,o=t&&e.bind.bind(i,i);return f=t?o:function(t){return function(){return i.apply(t,arguments)}},f}function O(){if(b)return v;b=1;var t=T(),e=t({}.toString),i=t("".slice);return v=function(t){return i(e(t),8,-1)},v}function E(){if(w)return y;w=1;var t=O(),e=T();return y=function(i){if("Function"===t(i))return e(i)}}function I(){if(x)return _;x=1;var t="object"==typeof document&&document.all;return _=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var P,A,M,N,F={};function R(){return A?P:(A=1,P=!S()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function L(){if(N)return M;N=1;var t=D(),e=Function.prototype.call;return M=t?e.bind(e):function(){return e.apply(e,arguments)},M}var j,z,B,H,G,W,Y,V,U,X,q,K,$,Z,Q,J,tt,et,it,ot,nt,st,rt,at,ht,lt,ct,dt,ut,pt,mt,ft,gt,vt,bt,yt,wt,_t={};function xt(){if(j)return _t;j=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,i=e&&!t.call({1:2},1);return _t.f=i?function(t){var i=e(this,t);return!!i&&i.enumerable}:t,_t}function Ct(){return B?z:(B=1,z=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function St(){if(G)return H;G=1;var t=T(),e=S(),i=O(),o=Object,n=t("".split);return H=e(function(){return!o("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?n(t,""):o(t)}:o,H}function Dt(){return Y||(Y=1,W=function(t){return null==t}),W}function kt(){if(U)return V;U=1;var t=Dt(),e=TypeError;return V=function(i){if(t(i))throw new e("Can't call method on "+i);return i},V}function Tt(){if(q)return X;q=1;var t=St(),e=kt();return X=function(i){return t(e(i))},X}function Ot(){if($)return K;$=1;var t=I();return K=function(e){return"object"==typeof e?null!==e:t(e)},K}function Et(){return Q?Z:(Q=1,Z={})}function It(){if(tt)return J;tt=1;var t=Et(),e=C(),i=I(),o=function(t){return i(t)?t:void 0};return J=function(i,n){return arguments.length<2?o(t[i])||o(e[i]):t[i]&&t[i][n]||e[i]&&e[i][n]},J}function Pt(){return it?et:(it=1,et=T()({}.isPrototypeOf))}function At(){if(nt)return ot;nt=1;var t=C().navigator,e=t&&t.userAgent;return ot=e?String(e):""}function Mt(){if(rt)return st;rt=1;var t,e,i=C(),o=At(),n=i.process,s=i.Deno,r=n&&n.versions||s&&s.version,a=r&&r.v8;return a&&(e=(t=a.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&o&&(!(t=o.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=o.match(/Chrome\/(\d+)/))&&(e=+t[1]),st=e}function Nt(){if(ht)return at;ht=1;var t=Mt(),e=S(),i=C().String;return at=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}),at}function Ft(){return ct?lt:(ct=1,lt=Nt()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Rt(){if(ut)return dt;ut=1;var t=It(),e=I(),i=Pt(),o=Object;return dt=Ft()?function(t){return"symbol"==typeof t}:function(n){var s=t("Symbol");return e(s)&&i(s.prototype,o(n))},dt}function Lt(){if(mt)return pt;mt=1;var t=String;return pt=function(e){try{return t(e)}catch(t){return"Object"}}}function jt(){if(gt)return ft;gt=1;var t=I(),e=Lt(),i=TypeError;return ft=function(o){if(t(o))return o;throw new i(e(o)+" is not a function")}}function zt(){if(bt)return vt;bt=1;var t=jt(),e=Dt();return vt=function(i,o){var n=i[o];return e(n)?void 0:t(n)}}function Bt(){if(wt)return yt;wt=1;var t=L(),e=I(),i=Ot(),o=TypeError;return yt=function(n,s){var r,a;if("string"===s&&e(r=n.toString)&&!i(a=t(r,n)))return a;if(e(r=n.valueOf)&&!i(a=t(r,n)))return a;if("string"!==s&&e(r=n.toString)&&!i(a=t(r,n)))return a;throw new o("Can't convert object to primitive value")}}var Ht,Gt,Wt,Yt,Vt,Ut,Xt,qt,Kt,$t,Zt,Qt,Jt,te,ee,ie,oe,ne,se,re,ae,he,le,ce,de,ue,pe,me,fe={exports:{}};function ge(){return Gt?Ht:(Gt=1,Ht=!0)}function ve(){if(Yt)return Wt;Yt=1;var t=C(),e=Object.defineProperty;return Wt=function(i,o){try{e(t,i,{value:o,configurable:!0,writable:!0})}catch(e){t[i]=o}return o}}function be(){if(Vt)return fe.exports;Vt=1;var t=ge(),e=C(),i=ve(),o="__core-js_shared__",n=fe.exports=e[o]||i(o,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),fe.exports}function ye(){if(Xt)return Ut;Xt=1;var t=be();return Ut=function(e,i){return t[e]||(t[e]=i||{})}}function we(){if(Kt)return qt;Kt=1;var t=kt(),e=Object;return qt=function(i){return e(t(i))}}function _e(){if(Zt)return $t;Zt=1;var t=T(),e=we(),i=t({}.hasOwnProperty);return $t=Object.hasOwn||function(t,o){return i(e(t),o)},$t}function xe(){if(Jt)return Qt;Jt=1;var t=T(),e=0,i=Math.random(),o=t(1.1.toString);return Qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++e+i,36)}}function Ce(){if(ee)return te;ee=1;var t=C(),e=ye(),i=_e(),o=xe(),n=Nt(),s=Ft(),r=t.Symbol,a=e("wks"),h=s?r.for||r:r&&r.withoutSetter||o;return te=function(t){return i(a,t)||(a[t]=n&&i(r,t)?r[t]:h("Symbol."+t)),a[t]}}function Se(){if(oe)return ie;oe=1;var t=L(),e=Ot(),i=Rt(),o=zt(),n=Bt(),s=TypeError,r=Ce()("toPrimitive");return ie=function(a,h){if(!e(a)||i(a))return a;var l,c=o(a,r);if(c){if(void 0===h&&(h="default"),l=t(c,a,h),!e(l)||i(l))return l;throw new s("Can't convert object to primitive value")}return void 0===h&&(h="number"),n(a,h)}}function De(){if(se)return ne;se=1;var t=Se(),e=Rt();return ne=function(i){var o=t(i,"string");return e(o)?o:o+""}}function ke(){if(ae)return re;ae=1;var t=C(),e=Ot(),i=t.document,o=e(i)&&e(i.createElement);return re=function(t){return o?i.createElement(t):{}},re}function Te(){if(le)return he;le=1;var t=R(),e=S(),i=ke();return he=!t&&!e(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})}function Oe(){if(ce)return F;ce=1;var t=R(),e=L(),i=xt(),o=Ct(),n=Tt(),s=De(),r=_e(),a=Te(),h=Object.getOwnPropertyDescriptor;return F.f=t?h:function(t,l){if(t=n(t),l=s(l),a)try{return h(t,l)}catch(t){}if(r(t,l))return o(!e(i.f,t,l),t[l])},F}function Ee(){if(ue)return de;ue=1;var t=S(),e=I(),i=/#|\.prototype\./,o=function(i,o){var h=s[n(i)];return h===a||h!==r&&(e(o)?t(o):!!o)},n=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},r=o.NATIVE="N",a=o.POLYFILL="P";return de=o}function Ie(){if(me)return pe;me=1;var t=E(),e=jt(),i=D(),o=t(t.bind);return pe=function(t,n){return e(t),void 0===n?t:i?o(t,n):function(){return t.apply(n,arguments)}},pe}var Pe,Ae,Me,Ne,Fe,Re,Le,je,ze,Be,He,Ge,We,Ye,Ve,Ue,Xe,qe,Ke={};function $e(){return Ae?Pe:(Ae=1,Pe=R()&&S()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Ze(){if(Ne)return Me;Ne=1;var t=Ot(),e=String,i=TypeError;return Me=function(o){if(t(o))return o;throw new i(e(o)+" is not an object")}}function Qe(){if(Fe)return Ke;Fe=1;var t=R(),e=Te(),i=$e(),o=Ze(),n=De(),s=TypeError,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,h="enumerable",l="configurable",c="writable";return Ke.f=t?i?function(t,e,i){if(o(t),e=n(e),o(i),"function"==typeof t&&"prototype"===e&&"value"in i&&c in i&&!i[c]){var s=a(t,e);s&&s[c]&&(t[e]=i.value,i={configurable:l in i?i[l]:s[l],enumerable:h in i?i[h]:s[h],writable:!1})}return r(t,e,i)}:r:function(t,i,a){if(o(t),i=n(i),o(a),e)try{return r(t,i,a)}catch(t){}if("get"in a||"set"in a)throw new s("Accessors not supported");return"value"in a&&(t[i]=a.value),t},Ke}function Je(){if(Le)return Re;Le=1;var t=R(),e=Qe(),i=Ct();return Re=t?function(t,o,n){return e.f(t,o,i(1,n))}:function(t,e,i){return t[e]=i,t},Re}function ti(){if(ze)return je;ze=1;var t=C(),e=k(),i=E(),o=I(),n=Oe().f,s=Ee(),r=Et(),a=Ie(),h=Je(),l=_e(),c=function(t){var i=function(o,n,s){if(this instanceof i){switch(arguments.length){case 0:return new t;case 1:return new t(o);case 2:return new t(o,n)}return new t(o,n,s)}return e(t,this,arguments)};return i.prototype=t.prototype,i};return je=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?r:r[_]||h(r,_,{})[_],T=k.prototype;for(f in d)p=!(u=s(x?f:_+(C?".":"#")+f,e.forced))&&D&&l(D,f),v=k[f],p&&(b=e.dontCallGetSet?(w=n(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&&o(g)?i(g):g,(e.sham||g&&g.sham||v&&v.sham)&&h(y,"sham",!0),h(k,f,y),S&&(l(r,m=_+"Prototype")||h(r,m,{}),h(r[m],f,g),e.real&&T&&(u||!T[f])&&h(T,f,g)))}}function ei(){if(He)return Be;He=1;var t=O();return Be=Array.isArray||function(e){return"Array"===t(e)}}function ii(){return Ye?We:(Ye=1,Ge||(Ge=1,ti()({target:"Array",stat:!0},{isArray:ei()})),We=Et().Array.isArray)}function oi(){return Ue?Ve:(Ue=1,Ve=ii())}var ni,si,ri,ai,hi,li,ci,di,ui,pi,mi,fi,gi,vi,bi,yi=r(qe?Xe:(qe=1,Xe=oi())),wi={};function _i(){return si?ni:(si=1,ni=T()([].slice))}function xi(){if(ai)return ri;ai=1;var t=T(),e=jt(),i=Ot(),o=_e(),n=_i(),s=D(),r=Function,a=t([].concat),h=t([].join),l={};return ri=s?r.bind:function(t){var s=e(this),c=s.prototype,d=n(arguments,1),u=function(){var e=a(d,n(arguments));return this instanceof u?function(t,e,i){if(!o(l,e)){for(var n=[],s=0;s<e;s++)n[s]="a["+s+"]";l[e]=r("C,a","return new C("+h(n,",")+")")}return l[e](t,i)}(s,e.length,e):s.apply(t,e)};return i(c)&&(u.prototype=c),u},ri}function Ci(){if(ci)return li;ci=1;var t=C(),e=Et();return li=function(i,o){var n=e[i+"Prototype"],s=n&&n[o];if(s)return s;var r=t[i],a=r&&r.prototype;return a&&a[o]}}function Si(){return ui?di:(ui=1,function(){if(hi)return wi;hi=1;var t=ti(),e=xi();t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e})}(),di=Ci()("Function","bind"))}function Di(){if(mi)return pi;mi=1;var t=Pt(),e=Si(),i=Function.prototype;return pi=function(o){var n=o.bind;return o===i||t(i,o)&&n===i.bind?e:n},pi}function ki(){return gi?fi:(gi=1,fi=Di())}var Ti,Oi,Ei,Ii,Pi,Ai,Mi,Ni=r(bi?vi:(bi=1,vi=ki())),Fi={},Ri={};function Li(){if(Oi)return Ti;Oi=1;var t=C(),e=At(),i=O(),o=function(t){return e.slice(0,t.length)===t};return Ti=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("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 ji(){if(Ii)return Ei;Ii=1;var t=TypeError;return Ei=function(e,i){if(e<i)throw new t("Not enough arguments");return e}}function zi(){if(Ai)return Pi;Ai=1;var t,e=C(),i=k(),o=I(),n=Li(),s=At(),r=_i(),a=ji(),h=e.Function,l=/MSIE .\./.test(s)||"BUN"===n&&((t=e.Bun.version.split(".")).length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2]));return Pi=function(t,e){var n=e?2:1;return l?function(s,l){var c=a(arguments.length,1)>n,d=o(s)?s:h(s),u=c?r(arguments,n):[],p=c?function(){i(d,this,u)}:d;return e?t(p,l):t(p)}:t},Pi}var Bi,Hi,Gi,Wi,Yi,Vi,Ui={};function Xi(){return Hi||(Hi=1,function(){if(Mi)return Ri;Mi=1;var t=ti(),e=C(),i=zi()(e.setInterval,!0);t({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i})}(),function(){if(Bi)return Ui;Bi=1;var t=ti(),e=C(),i=zi()(e.setTimeout,!0);t({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i})}()),Fi}function qi(){return Wi?Gi:(Wi=1,Xi(),Gi=Et().setTimeout)}var Ki,$i,Zi,Qi,Ji=r(Vi?Yi:(Vi=1,Yi=qi()));function to(){if($i)return Ki;$i=1;var t={};return t[Ce()("toStringTag")]="z",Ki="[object z]"===String(t)}function eo(){if(Qi)return Zi;Qi=1;var t=to(),e=I(),i=O(),o=Ce()("toStringTag"),n=Object,s="Arguments"===i(function(){return arguments}());return Zi=t?i:function(t){var r,a,h;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(r=n(t),o))?a:s?i(r):"Object"===(h=i(r))&&e(r.callee)?"Arguments":h},Zi}var io,oo,no,so,ro,ao,ho,lo,co,uo,po,mo,fo,go,vo,bo,yo,wo,_o,xo,Co,So,Do,ko,To,Oo,Eo,Io,Po,Ao,Mo,No={};function Fo(){if(oo)return io;oo=1;var t=Math.ceil,e=Math.floor;return io=Math.trunc||function(i){var o=+i;return(o>0?e:t)(o)}}function Ro(){if(so)return no;so=1;var t=Fo();return no=function(e){var i=+e;return i!=i||0===i?0:t(i)},no}function Lo(){if(ao)return ro;ao=1;var t=Ro(),e=Math.min;return ro=function(i){var o=t(i);return o>0?e(o,9007199254740991):0}}function jo(){if(lo)return ho;lo=1;var t=Lo();return ho=function(e){return t(e.length)}}function zo(){if(uo)return co;uo=1;var t=T(),e=I(),i=be(),o=t(Function.toString);return e(i.inspectSource)||(i.inspectSource=function(t){return o(t)}),co=i.inspectSource}function Bo(){if(mo)return po;mo=1;var t=T(),e=S(),i=I(),o=eo(),n=It(),s=zo(),r=function(){},a=n("Reflect","construct"),h=/^\s*(?:class|function)\b/,l=t(h.exec),c=!h.test(r),d=function(t){if(!i(t))return!1;try{return a(r,[],t),!0}catch(t){return!1}},u=function(t){if(!i(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(h,s(t))}catch(t){return!0}};return u.sham=!0,po=!a||e(function(){var t;return d(d.call)||!d(Object)||!d(function(){t=!0})||t})?u:d}function Ho(){if(go)return fo;go=1;var t=ei(),e=Bo(),i=Ot(),o=Ce()("species"),n=Array;return fo=function(s){var r;return t(s)&&(r=s.constructor,(e(r)&&(r===n||t(r.prototype))||i(r)&&null===(r=r[o]))&&(r=void 0)),void 0===r?n:r}}function Go(){if(bo)return vo;bo=1;var t=Ho();return vo=function(e,i){return new(t(e))(0===i?0:i)}}function Wo(){if(wo)return yo;wo=1;var t=Ie(),e=T(),i=St(),o=we(),n=jo(),s=Go(),r=e([].push),a=function(e){var a=1===e,h=2===e,l=3===e,c=4===e,d=6===e,u=7===e,p=5===e||d;return function(m,f,g,v){for(var b,y,w=o(m),_=i(w),x=n(_),C=t(f,g),S=0,D=v||s,k=a?D(m,x):h||u?D(m,0):void 0;x>S;S++)if((p||S in _)&&(y=C(b=_[S],S,w),e))if(a)k[S]=y;else if(y)switch(e){case 3:return!0;case 5:return b;case 6:return S;case 2:r(k,b)}else switch(e){case 4:return!1;case 7:r(k,b)}return d?-1:l||c?c:k}};return yo={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}function Yo(){if(xo)return _o;xo=1;var t=S();return _o=function(e,i){var o=[][e];return!!o&&t(function(){o.call(null,i||function(){return 1},1)})}}function Vo(){if(So)return Co;So=1;var t=Wo().forEach,e=Yo()("forEach");return Co=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},Co}function Uo(){return To?ko:(To=1,function(){if(Do)return No;Do=1;var t=ti(),e=Vo();t({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e})}(),ko=Ci()("Array","forEach"))}function Xo(){return Eo?Oo:(Eo=1,Oo=Uo())}function qo(){if(Po)return Io;Po=1;var t=eo(),e=_e(),i=Pt(),o=Xo(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Io=function(r){var a=r.forEach;return r===n||i(n,r)&&a===n.forEach||e(s,t(r))?o:a},Io}var Ko=r(Mo?Ao:(Mo=1,Ao=qo()));const $o="undefined"!=typeof window&&window.moment||t;var Zo,Qo,Jo={},tn={};function en(){if(Qo)return Zo;Qo=1;var t=eo(),e=String;return Zo=function(i){if("Symbol"===t(i))throw new TypeError("Cannot convert a Symbol value to a string");return e(i)}}var on,nn,sn,rn,an,hn,ln,cn,dn,un,pn,mn,fn,gn,vn,bn,yn,wn,_n,xn={};function Cn(){if(nn)return on;nn=1;var t=Ro(),e=Math.max,i=Math.min;return on=function(o,n){var s=t(o);return s<0?e(s+n,0):i(s,n)}}function Sn(){if(rn)return sn;rn=1;var t=Tt(),e=Cn(),i=jo(),o=function(o){return function(n,s,r){var a=t(n),h=i(a);if(0===h)return!o&&-1;var l,c=e(r,h);if(o&&s!=s){for(;h>c;)if((l=a[c++])!=l)return!0}else for(;h>c;c++)if((o||c in a)&&a[c]===s)return o||c||0;return!o&&-1}};return sn={includes:o(!0),indexOf:o(!1)}}function Dn(){return hn?an:(hn=1,an={})}function kn(){if(cn)return ln;cn=1;var t=T(),e=_e(),i=Tt(),o=Sn().indexOf,n=Dn(),s=t([].push);return ln=function(t,r){var a,h=i(t),l=0,c=[];for(a in h)!e(n,a)&&e(h,a)&&s(c,a);for(;r.length>l;)e(h,a=r[l++])&&(~o(c,a)||s(c,a));return c},ln}function Tn(){return un?dn:(un=1,dn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function On(){if(mn)return pn;mn=1;var t=kn(),e=Tn();return pn=Object.keys||function(i){return t(i,e)}}function En(){if(fn)return xn;fn=1;var t=R(),e=$e(),i=Qe(),o=Ze(),n=Tt(),s=On();return xn.f=t&&!e?Object.defineProperties:function(t,e){o(t);for(var r,a=n(e),h=s(e),l=h.length,c=0;l>c;)i.f(t,r=h[c++],a[r]);return t},xn}function In(){return vn?gn:(vn=1,gn=It()("document","documentElement"))}function Pn(){if(yn)return bn;yn=1;var t=ye(),e=xe(),i=t("keys");return bn=function(t){return i[t]||(i[t]=e(t))}}function An(){if(_n)return wn;_n=1;var t,e=Ze(),i=En(),o=Tn(),n=Dn(),s=In(),r=ke(),a="prototype",h="script",l=Pn()("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,n;p="undefined"!=typeof document?document.domain&&t?u(t):(i=r("iframe"),n="java"+h+":",i.style.display="none",s.appendChild(i),i.src=String(n),(e=i.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):u(t);for(var l=o.length;l--;)delete p[a][o[l]];return p()};return n[l]=!0,wn=Object.create||function(t,o){var n;return null!==t?(c[a]=e(t),n=new c,c[a]=null,n[l]=t):n=p(),void 0===o?n:i.f(n,o)}}var Mn,Nn={};function Fn(){if(Mn)return Nn;Mn=1;var t=kn(),e=Tn().concat("length","prototype");return Nn.f=Object.getOwnPropertyNames||function(i){return t(i,e)},Nn}var Rn,Ln={};function jn(){if(Rn)return Ln;Rn=1;var t=O(),e=Tt(),i=Fn().f,o=_i(),n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Ln.f=function(s){return n&&"Window"===t(s)?function(t){try{return i(t)}catch(t){return o(n)}}(s):i(e(s))},Ln}var zn,Bn,Hn,Gn,Wn,Yn={};function Vn(){return zn||(zn=1,Yn.f=Object.getOwnPropertySymbols),Yn}function Un(){if(Hn)return Bn;Hn=1;var t=Je();return Bn=function(e,i,o,n){return n&&n.enumerable?e[i]=o:t(e,i,o),e}}function Xn(){if(Wn)return Gn;Wn=1;var t=Qe();return Gn=function(e,i,o){return t.f(e,i,o)}}var qn,Kn,$n,Zn,Qn,Jn,ts,es,is,os,ns,ss,rs,as,hs={};function ls(){if(qn)return hs;qn=1;var t=Ce();return hs.f=t,hs}function cs(){if($n)return Kn;$n=1;var t=Et(),e=_e(),i=ls(),o=Qe().f;return Kn=function(n){var s=t.Symbol||(t.Symbol={});e(s,n)||o(s,n,{value:i.f(n)})}}function ds(){if(Qn)return Zn;Qn=1;var t=L(),e=It(),i=Ce(),o=Un();return Zn=function(){var n=e("Symbol"),s=n&&n.prototype,r=s&&s.valueOf,a=i("toPrimitive");s&&!s[a]&&o(s,a,function(e){return t(r,this)},{arity:1})}}function us(){if(ts)return Jn;ts=1;var t=to(),e=eo();return Jn=t?{}.toString:function(){return"[object "+e(this)+"]"}}function ps(){if(is)return es;is=1;var t=to(),e=Qe().f,i=Je(),o=_e(),n=us(),s=Ce()("toStringTag");return es=function(r,a,h,l){var c=h?r:r&&r.prototype;c&&(o(c,s)||e(c,s,{configurable:!0,value:a}),l&&!t&&i(c,"toString",n))},es}function ms(){if(ns)return os;ns=1;var t=C(),e=I(),i=t.WeakMap;return os=e(i)&&/native code/.test(String(i))}function fs(){if(rs)return ss;rs=1;var t,e,i,o=ms(),n=C(),s=Ot(),r=Je(),a=_e(),h=be(),l=Pn(),c=Dn(),d="Object already initialized",u=n.TypeError,p=n.WeakMap;if(o||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,r(t,f,e),e},e=function(t){return a(t,f)?t[f]:{}},i=function(t){return a(t,f)}}return ss={set:t,get:e,has:i,enforce:function(o){return i(o)?e(o):t(o,{})},getterFor:function(t){return function(i){var o;if(!s(i)||(o=e(i)).type!==t)throw new u("Incompatible receiver, "+t+" required");return o}}},ss}var gs,vs,bs,ys={};function ws(){return vs?gs:(vs=1,gs=Nt()&&!!Symbol.for&&!!Symbol.keyFor)}var _s,xs={};var Cs,Ss,Ds,ks={};function Ts(){if(Ss)return Cs;Ss=1;var t=T(),e=ei(),i=I(),o=O(),n=en(),s=t([].push);return Cs=function(t){if(i(t))return t;if(e(t)){for(var r=t.length,a=[],h=0;h<r;h++){var l=t[h];"string"==typeof l?s(a,l):"number"!=typeof l&&"Number"!==o(l)&&"String"!==o(l)||s(a,n(l))}var c=a.length,d=!0;return function(t,i){if(d)return d=!1,i;if(e(this))return i;for(var o=0;o<c;o++)if(a[o]===t)return i}}},Cs}function Os(){if(Ds)return ks;Ds=1;var t=ti(),e=It(),i=k(),o=L(),n=T(),s=S(),r=I(),a=Rt(),h=_i(),l=Ts(),c=Nt(),d=String,u=e("JSON","stringify"),p=n(/./.exec),m=n("".charAt),f=n("".charCodeAt),g=n("".replace),v=n(1.1.toString),b=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,_=!c||s(function(){var t=e("Symbol")("stringify detection");return"[null]"!==u([t])||"{}"!==u({a:t})||"{}"!==u(Object(t))}),x=s(function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}),C=function(t,e){var n=h(arguments),s=l(e);if(r(s)||void 0!==t&&!a(t))return n[1]=function(t,e){if(r(s)&&(e=o(s,this,d(t),e)),!a(e))return e},i(u,null,n)},D=function(t,e,i){var o=m(i,e-1),n=m(i,e+1);return p(y,t)&&!p(w,n)||p(w,t)&&!p(y,o)?"\\u"+v(f(t,0),16):t};return u&&t({target:"JSON",stat:!0,arity:3,forced:_||x},{stringify:function(t,e,o){var n=h(arguments),s=i(_?C:u,null,n);return x&&"string"==typeof s?g(s,b,D):s}}),ks}var Es,Is,Ps,As,Ms,Ns,Fs,Rs,Ls={};function js(){return Is||(Is=1,function(){if(as)return tn;as=1;var t=ti(),e=C(),i=L(),o=T(),n=ge(),s=R(),r=Nt(),a=S(),h=_e(),l=Pt(),c=Ze(),d=Tt(),u=De(),p=en(),m=Ct(),f=An(),g=On(),v=Fn(),b=jn(),y=Vn(),w=Oe(),_=Qe(),x=En(),D=xt(),k=Un(),O=Xn(),E=ye(),I=Pn(),P=Dn(),A=xe(),M=Ce(),N=ls(),F=cs(),j=ds(),z=ps(),B=fs(),H=Wo().forEach,G=I("hidden"),W="Symbol",Y="prototype",V=B.set,U=B.getterFor(W),X=Object[Y],q=e.Symbol,K=q&&q[Y],$=e.RangeError,Z=e.TypeError,Q=e.QObject,J=w.f,tt=_.f,et=b.f,it=D.f,ot=o([].push),nt=E("symbols"),st=E("op-symbols"),rt=E("wks"),at=!Q||!Q[Y]||!Q[Y].findChild,ht=function(t,e,i){var o=J(X,e);o&&delete X[e],tt(t,e,i),o&&t!==X&&tt(X,e,o)},lt=s&&a(function(){return 7!==f(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a})?ht:tt,ct=function(t,e){var i=nt[t]=f(K);return V(i,{type:W,tag:t,description:e}),s||(i.description=e),i},dt=function(t,e,i){t===X&&dt(st,e,i),c(t);var o=u(e);return c(i),h(nt,o)?(i.enumerable?(h(t,G)&&t[G][o]&&(t[G][o]=!1),i=f(i,{enumerable:m(0,!1)})):(h(t,G)||tt(t,G,m(1,f(null))),t[G][o]=!0),lt(t,o,i)):tt(t,o,i)},ut=function(t,e){c(t);var o=d(e),n=g(o).concat(gt(o));return H(n,function(e){s&&!i(pt,o,e)||dt(t,e,o[e])}),t},pt=function(t){var e=u(t),o=i(it,this,e);return!(this===X&&h(nt,e)&&!h(st,e))&&(!(o||!h(this,e)||!h(nt,e)||h(this,G)&&this[G][e])||o)},mt=function(t,e){var i=d(t),o=u(e);if(i!==X||!h(nt,o)||h(st,o)){var n=J(i,o);return!n||!h(nt,o)||h(i,G)&&i[G][o]||(n.enumerable=!0),n}},ft=function(t){var e=et(d(t)),i=[];return H(e,function(t){h(nt,t)||h(P,t)||ot(i,t)}),i},gt=function(t){var e=t===X,i=et(e?st:d(t)),o=[];return H(i,function(t){!h(nt,t)||e&&!h(X,t)||ot(o,nt[t])}),o};r||(q=function(){if(l(K,this))throw new Z("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,o=A(t),n=function(t){var s=void 0===this?e:this;s===X&&i(n,st,t),h(s,G)&&h(s[G],o)&&(s[G][o]=!1);var r=m(1,t);try{lt(s,o,r)}catch(t){if(!(t instanceof $))throw t;ht(s,o,r)}};return s&&at&&lt(X,o,{configurable:!0,set:n}),ct(o,t)},k(K=q[Y],"toString",function(){return U(this).tag}),k(q,"withoutSetter",function(t){return ct(A(t),t)}),D.f=pt,_.f=dt,x.f=ut,w.f=mt,v.f=b.f=ft,y.f=gt,N.f=function(t){return ct(M(t),t)},s&&(O(K,"description",{configurable:!0,get:function(){return U(this).description}}),n||k(X,"propertyIsEnumerable",pt,{unsafe:!0}))),t({global:!0,constructor:!0,wrap:!0,forced:!r,sham:!r},{Symbol:q}),H(g(rt),function(t){F(t)}),t({target:W,stat:!0,forced:!r},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),t({target:"Object",stat:!0,forced:!r,sham:!s},{create:function(t,e){return void 0===e?f(t):ut(f(t),e)},defineProperty:dt,defineProperties:ut,getOwnPropertyDescriptor:mt}),t({target:"Object",stat:!0,forced:!r},{getOwnPropertyNames:ft}),j(),z(q,W),P[G]=!0}(),function(){if(bs)return ys;bs=1;var t=ti(),e=It(),i=_e(),o=en(),n=ye(),s=ws(),r=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{for:function(t){var n=o(t);if(i(r,n))return r[n];var s=e("Symbol")(n);return r[n]=s,a[s]=n,s}})}(),function(){if(_s)return xs;_s=1;var t=ti(),e=_e(),i=Rt(),o=Lt(),n=ye(),s=ws(),r=n("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{keyFor:function(t){if(!i(t))throw new TypeError(o(t)+" is not a symbol");if(e(r,t))return r[t]}})}(),Os(),function(){if(Es)return Ls;Es=1;var t=ti(),e=Nt(),i=S(),o=Vn(),n=we();t({target:"Object",stat:!0,forced:!e||i(function(){o.f(1)})},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(n(t)):[]}})}()),Jo}function zs(){return As?Ps:(As=1,js(),Ps=Et().Object.getOwnPropertySymbols)}function Bs(){return Ns?Ms:(Ns=1,Ms=zs())}var Hs,Gs,Ws,Ys,Vs,Us,Xs,qs,Ks,$s,Zs,Qs=r(Rs?Fs:(Rs=1,Fs=Bs())),Js={};function tr(){if(Gs)return Hs;Gs=1;var t=S(),e=Ce(),i=Mt(),o=e("species");return Hs=function(e){return i>=51||!t(function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Hs}function er(){return Vs?Ys:(Vs=1,function(){if(Ws)return Js;Ws=1;var t=ti(),e=Wo().filter;t({target:"Array",proto:!0,forced:!tr()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),Ys=Ci()("Array","filter"))}function ir(){if(Xs)return Us;Xs=1;var t=Pt(),e=er(),i=Array.prototype;return Us=function(o){var n=o.filter;return o===i||t(i,o)&&n===i.filter?e:n},Us}function or(){return Ks?qs:(Ks=1,qs=ir())}var nr,sr,rr,ar,hr,lr,cr=r(Zs?$s:(Zs=1,$s=or())),dr={exports:{}},ur={};function pr(){if(sr)return dr.exports;sr=1,function(){if(nr)return ur;nr=1;var t=ti(),e=S(),i=Tt(),o=Oe().f,n=R();t({target:"Object",stat:!0,forced:!n||e(function(){o(1)}),sham:!n},{getOwnPropertyDescriptor:function(t,e){return o(i(t),e)}})}();var t=Et().Object,e=dr.exports=function(e,i){return t.getOwnPropertyDescriptor(e,i)};return t.getOwnPropertyDescriptor.sham&&(e.sham=!0),dr.exports}function mr(){return ar?rr:(ar=1,rr=pr())}var fr,gr,vr,br,yr,wr,_r,xr,Cr,Sr,Dr,kr=r(lr?hr:(lr=1,hr=mr())),Tr={};function Or(){if(gr)return fr;gr=1;var t=It(),e=T(),i=Fn(),o=Vn(),n=Ze(),s=e([].concat);return fr=t("Reflect","ownKeys")||function(t){var e=i.f(n(t)),r=o.f;return r?s(e,r(t)):e},fr}function Er(){if(br)return vr;br=1;var t=R(),e=Qe(),i=Ct();return vr=function(o,n,s){t?e.f(o,n,i(0,s)):o[n]=s},vr}function Ir(){return _r?wr:(_r=1,function(){if(yr)return Tr;yr=1;var t=ti(),e=R(),i=Or(),o=Tt(),n=Oe(),s=Er();t({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(t){for(var e,r,a=o(t),h=n.f,l=i(a),c={},d=0;l.length>d;)void 0!==(r=h(a,e=l[d++]))&&s(c,e,r);return c}})}(),wr=Et().Object.getOwnPropertyDescriptors)}function Pr(){return Cr?xr:(Cr=1,xr=Ir())}var Ar,Mr,Nr,Fr,Rr,Lr,jr=r(Dr?Sr:(Dr=1,Sr=Pr())),zr={exports:{}},Br={};function Hr(){if(Ar)return Br;Ar=1;var t=ti(),e=R(),i=En().f;return t({target:"Object",stat:!0,forced:Object.defineProperties!==i,sham:!e},{defineProperties:i}),Br}function Gr(){if(Mr)return zr.exports;Mr=1,Hr();var t=Et().Object,e=zr.exports=function(e,i){return t.defineProperties(e,i)};return t.defineProperties.sham&&(e.sham=!0),zr.exports}function Wr(){return Fr?Nr:(Fr=1,Nr=Gr())}var Yr,Vr,Ur,Xr,qr,Kr,$r,Zr,Qr,Jr,ta=r(Lr?Rr:(Lr=1,Rr=Wr())),ea={exports:{}},ia={};function oa(){if(Yr)return ia;Yr=1;var t=ti(),e=R(),i=Qe().f;return t({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!e},{defineProperty:i}),ia}function na(){if(Vr)return ea.exports;Vr=1,oa();var t=Et().Object,e=ea.exports=function(e,i,o){return t.defineProperty(e,i,o)};return t.defineProperty.sham&&(e.sham=!0),ea.exports}function sa(){return Xr?Ur:(Xr=1,Ur=na())}function ra(){return Kr?qr:(Kr=1,qr=sa())}function aa(){return Zr?$r:(Zr=1,$r=ra())}function ha(){return Jr?Qr:(Jr=1,Qr=aa())}var la,ca,da,ua=r(ha()),pa={};function ma(){if(ca)return la;ca=1;var t=TypeError;return la=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e},la}function fa(){if(da)return pa;da=1;var t=ti(),e=S(),i=ei(),o=Ot(),n=we(),s=jo(),r=ma(),a=Er(),h=Go(),l=tr(),c=Ce(),d=Mt(),u=c("isConcatSpreadable"),p=d>=51||!e(function(){var t=[];return t[u]=!1,t.concat()[0]!==t}),m=function(t){if(!o(t))return!1;var e=t[u];return void 0!==e?!!e:i(t)};return t({target:"Array",proto:!0,arity:1,forced:!p||!l("concat")},{concat:function(t){var e,i,o,l,c,d=n(this),u=h(d,0),p=0;for(e=-1,o=arguments.length;e<o;e++)if(m(c=-1===e?d:arguments[e]))for(l=s(c),r(p+l),i=0;i<l;i++,p++)i in c&&a(u,p,c[i]);else r(p+1),a(u,p++,c);return u.length=p,u}}),pa}var ga,va={};function ba(){return ga||(ga=1,cs()("asyncDispose")),va}var ya;var wa,_a={};function xa(){return wa||(wa=1,cs()("dispose")),_a}var Ca;var Sa;var Da,ka={};function Ta(){return Da||(Da=1,cs()("iterator")),ka}var Oa;var Ea;var Ia;var Pa;var Aa;var Ma;var Na,Fa={};function Ra(){if(Na)return Fa;Na=1;var t=cs(),e=ds();return t("toPrimitive"),e(),Fa}var La,ja={};var za;var Ba,Ha,Ga,Wa={};function Ya(){return Ga?Ha:(Ga=1,fa(),js(),ba(),ya||(ya=1,cs()("asyncIterator")),xa(),Ca||(Ca=1,cs()("hasInstance")),Sa||(Sa=1,cs()("isConcatSpreadable")),Ta(),Oa||(Oa=1,cs()("match")),Ea||(Ea=1,cs()("matchAll")),Ia||(Ia=1,cs()("replace")),Pa||(Pa=1,cs()("search")),Aa||(Aa=1,cs()("species")),Ma||(Ma=1,cs()("split")),Ra(),function(){if(La)return ja;La=1;var t=It(),e=cs(),i=ps();e("toStringTag"),i(t("Symbol"),"Symbol")}(),za||(za=1,cs()("unscopables")),function(){if(Ba)return Wa;Ba=1;var t=C();ps()(t.JSON,"JSON",!0)}(),Ha=Et().Symbol)}var Va,Ua,Xa,qa,Ka,$a,Za,Qa,Ja,th,eh,ih,oh,nh,sh,rh,ah,hh,lh,ch,dh,uh,ph,mh,fh,gh,vh,bh,yh,wh,_h,xh,Ch,Sh={};function Dh(){return Ua?Va:(Ua=1,Va=function(){})}function kh(){return qa?Xa:(qa=1,Xa={})}function Th(){if($a)return Ka;$a=1;var t=R(),e=_e(),i=Function.prototype,o=t&&Object.getOwnPropertyDescriptor,n=e(i,"name"),s=n&&"something"===function(){}.name,r=n&&(!t||t&&o(i,"name").configurable);return Ka={EXISTS:n,PROPER:s,CONFIGURABLE:r}}function Oh(){return Qa?Za:(Qa=1,Za=!S()(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}function Eh(){if(th)return Ja;th=1;var t=_e(),e=I(),i=we(),o=Pn(),n=Oh(),s=o("IE_PROTO"),r=Object,a=r.prototype;return Ja=n?r.getPrototypeOf:function(o){var n=i(o);if(t(n,s))return n[s];var h=n.constructor;return e(h)&&n instanceof h?h.prototype:n instanceof r?a:null},Ja}function Ih(){if(ih)return eh;ih=1;var t,e,i,o=S(),n=I(),s=Ot(),r=An(),a=Eh(),h=Un(),l=Ce(),c=ge(),d=l("iterator"),u=!1;return[].keys&&("next"in(i=[].keys())?(e=a(a(i)))!==Object.prototype&&(t=e):u=!0),!s(t)||o(function(){var e={};return t[d].call(e)!==e})?t={}:c&&(t=r(t)),n(t[d])||h(t,d,function(){return this}),eh={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:u}}function Ph(){if(nh)return oh;nh=1;var t=Ih().IteratorPrototype,e=An(),i=Ct(),o=ps(),n=kh(),s=function(){return this};return oh=function(r,a,h,l){var c=a+" Iterator";return r.prototype=e(t,{next:i(+!l,h)}),o(r,c,!1,!0),n[c]=s,r}}function Ah(){if(rh)return sh;rh=1;var t=T(),e=jt();return sh=function(i,o,n){try{return t(e(Object.getOwnPropertyDescriptor(i,o)[n]))}catch(t){}},sh}function Mh(){if(hh)return ah;hh=1;var t=Ot();return ah=function(e){return t(e)||null===e}}function Nh(){if(ch)return lh;ch=1;var t=Mh(),e=String,i=TypeError;return lh=function(o){if(t(o))return o;throw new i("Can't set "+e(o)+" as a prototype")}}function Fh(){if(uh)return dh;uh=1;var t=Ah(),e=Ot(),i=kt(),o=Nh();return dh=Object.setPrototypeOf||("__proto__"in{}?function(){var n,s=!1,r={};try{(n=t(Object.prototype,"__proto__","set"))(r,[]),s=r instanceof Array}catch(t){}return function(t,r){return i(t),o(r),e(t)?(s?n(t,r):t.__proto__=r,t):t}}():void 0)}function Rh(){if(mh)return ph;mh=1;var t=ti(),e=L(),i=ge(),o=Th(),n=I(),s=Ph(),r=Eh(),a=Fh(),h=ps(),l=Je(),c=Un(),d=Ce(),u=kh(),p=Ih(),m=o.PROPER,f=o.CONFIGURABLE,g=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,b=d("iterator"),y="keys",w="values",_="entries",x=function(){return this};return ph=function(o,d,p,C,S,D,k){s(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=o.prototype,N=M[b]||M["@@iterator"]||S&&M[S],F=!v&&N||I(S),R="Array"===d&&M.entries||N;if(R&&(T=r(R.call(new o)))!==Object.prototype&&T.next&&(i||r(T)===g||(a?a(T,g):n(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 Lh(){return gh?fh:(gh=1,fh=function(t,e){return{value:t,done:e}})}function jh(){if(bh)return vh;bh=1;var t=Tt(),e=Dh(),i=kh(),o=fs(),n=Qe().f,s=Rh(),r=Lh(),a=ge(),h=R(),l="Array Iterator",c=o.set,d=o.getterFor(l);vh=s(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,r(void 0,!0);switch(t.kind){case"keys":return r(i,!1);case"values":return r(e[i],!1)}return r([i,e[i]],!1)},"values");var u=i.Arguments=i.Array;if(e("keys"),e("values"),e("entries"),!a&&h&&"values"!==u.name)try{n(u,"name",{value:"values"})}catch(t){}return vh}function zh(){return wh?yh:(wh=1,yh={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 Bh(){if(_h)return Sh;_h=1,jh();var t=zh(),e=C(),i=ps(),o=kh();for(var n in t)i(e[n],n),o[n]=o.Array;return Sh}function Hh(){if(Ch)return xh;Ch=1;var t=Ya();return Bh(),xh=t}var Gh,Wh={};var Yh;var Vh;var Uh,Xh,qh;function Kh(){if(qh)return Xh;qh=1;var t=Hh();return function(){if(Gh)return Wh;Gh=1;var t=Ce(),e=Qe().f,i=t("metadata"),o=Function.prototype;void 0===o[i]&&e(o,i,{value:null})}(),Yh||(Yh=1,ba()),Vh||(Vh=1,xa()),Uh||(Uh=1,cs()("metadata")),Xh=t}var $h,Zh,Qh;function Jh(){if(Zh)return $h;Zh=1;var t=It(),e=T(),i=t("Symbol"),o=i.keyFor,n=e(i.prototype.valueOf);return $h=i.isRegisteredSymbol||function(t){try{return void 0!==o(n(t))}catch(t){return!1}}}var tl,el,il;function ol(){if(el)return tl;el=1;for(var t=ye(),e=It(),i=T(),o=Rt(),n=Ce(),s=e("Symbol"),r=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),h=i(s.prototype.valueOf),l=t("wks"),c=0,d=a(s),u=d.length;c<u;c++)try{var p=d[c];o(s[p])&&n(p)}catch(t){}return tl=function(t){if(r&&r(t))return!0;try{for(var e=h(t),i=0,o=a(l),n=o.length;i<n;i++)if(l[o[i]]==e)return!0}catch(t){}return!1},tl}var nl;var sl;var rl;var al;var hl;var ll;var cl;var dl,ul,pl,ml,fl;function gl(){if(pl)return ul;pl=1;var t=Kh();return Qh||(Qh=1,ti()({target:"Symbol",stat:!0},{isRegisteredSymbol:Jh()})),il||(il=1,ti()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:ol()})),nl||(nl=1,cs()("customMatcher")),sl||(sl=1,cs()("observable")),rl||(rl=1,ti()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Jh()})),al||(al=1,ti()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:ol()})),hl||(hl=1,cs()("matcher")),ll||(ll=1,cs()("metadataKey")),cl||(cl=1,cs()("patternMatch")),dl||(dl=1,cs()("replaceAll")),ul=t}function vl(){return fl?ml:(fl=1,ml=gl())}var bl,yl,wl,_l,xl,Cl,Sl,Dl,kl,Tl,Ol,El,Il,Pl=r(vl()),Al={};function Ml(){if(yl)return bl;yl=1;var t=T(),e=Ro(),i=en(),o=kt(),n=t("".charAt),s=t("".charCodeAt),r=t("".slice),a=function(t){return function(a,h){var l,c,d=i(o(a)),u=e(h),p=d.length;return u<0||u>=p?t?"":void 0:(l=s(d,u))<55296||l>56319||u+1===p||(c=s(d,u+1))<56320||c>57343?t?n(d,u):l:t?r(d,u,u+2):c-56320+(l-55296<<10)+65536}};return bl={codeAt:a(!1),charAt:a(!0)}}function Nl(){if(wl)return Al;wl=1;var t=Ml().charAt,e=en(),i=fs(),o=Rh(),n=Lh(),s="String Iterator",r=i.set,a=i.getterFor(s);return o(String,"String",function(t){r(this,{type:s,string:e(t),index:0})},function(){var e,i=a(this),o=i.string,s=i.index;return s>=o.length?n(void 0,!0):(e=t(o,s),i.index+=e.length,n(e,!1))}),Al}function Fl(){return xl?_l:(xl=1,jh(),Nl(),Ta(),_l=ls().f("iterator"))}function Rl(){if(Sl)return Cl;Sl=1;var t=Fl();return Bh(),Cl=t}function Ll(){return kl?Dl:(kl=1,Dl=Rl())}function jl(){return Ol?Tl:(Ol=1,Tl=Ll())}function zl(){return Il?El:(Il=1,El=jl())}var Bl,Hl,Gl,Wl,Yl,Vl,Ul,Xl,ql,Kl,$l=r(zl());function Zl(t){return Zl="function"==typeof Pl&&"symbol"==typeof $l?function(t){return typeof t}:function(t){return t&&"function"==typeof Pl&&t.constructor===Pl&&t!==Pl.prototype?"symbol":typeof t},Zl(t)}function Ql(){return Hl?Bl:(Hl=1,Ra(),Bl=ls().f("toPrimitive"))}function Jl(){return Wl?Gl:(Wl=1,Gl=Ql())}function tc(){return Vl?Yl:(Vl=1,Yl=Jl())}function ec(){return Xl?Ul:(Xl=1,Ul=tc())}function ic(){return Kl?ql:(Kl=1,ql=ec())}var oc=r(ic());function nc(t){var e=function(t,e){if("object"!=Zl(t)||!t)return t;var i=t[oc];if(void 0!==i){var o=i.call(t,e);if("object"!=Zl(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Zl(e)?e:e+""}function sc(t,e,i){return(e=nc(e))in t?ua(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var rc,ac,hc,lc,cc,dc,uc,pc,mc,fc={};function gc(){return hc?ac:(hc=1,function(){if(rc)return fc;rc=1;var t=ti(),e=Wo().map;t({target:"Array",proto:!0,forced:!tr()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),ac=Ci()("Array","map"))}function vc(){if(cc)return lc;cc=1;var t=Pt(),e=gc(),i=Array.prototype;return lc=function(o){var n=o.map;return o===i||t(i,o)&&n===i.map?e:n},lc}function bc(){return uc?dc:(uc=1,dc=vc())}var yc,wc,_c,xc,Cc,Sc,Dc,kc,Tc,Oc,Ec,Ic,Pc,Ac=r(mc?pc:(mc=1,pc=bc())),Mc={};function Nc(){if(wc)return yc;wc=1;var t=jt(),e=we(),i=St(),o=jo(),n=TypeError,s="Reduce of empty array with no initial value",r=function(r){return function(a,h,l,c){var d=e(a),u=i(d),p=o(d);if(t(h),0===p&&l<2)throw new n(s);var m=r?p-1:0,f=r?-1:1;if(l<2)for(;;){if(m in u){c=u[m],m+=f;break}if(m+=f,r?m<0:p<=m)throw new n(s)}for(;r?m>=0:p>m;m+=f)m in u&&(c=h(c,u[m],m,d));return c}};return yc={left:r(!1),right:r(!0)}}function Fc(){return xc?_c:(xc=1,_c="NODE"===Li())}function Rc(){return Dc?Sc:(Dc=1,function(){if(Cc)return Mc;Cc=1;var t=ti(),e=Nc().left,i=Yo(),o=Mt();t({target:"Array",proto:!0,forced:!Fc()&&o>79&&o<83||!i("reduce")},{reduce:function(t){var i=arguments.length;return e(this,t,i,i>1?arguments[1]:void 0)}})}(),Sc=Ci()("Array","reduce"))}function Lc(){if(Tc)return kc;Tc=1;var t=Pt(),e=Rc(),i=Array.prototype;return kc=function(o){var n=o.reduce;return o===i||t(i,o)&&n===i.reduce?e:n},kc}function jc(){return Ec?Oc:(Ec=1,Oc=Lc())}var zc,Bc,Hc,Gc,Wc,Yc,Vc,Uc=r(Pc?Ic:(Pc=1,Ic=jc())),Xc={};function qc(){return Hc?Bc:(Hc=1,function(){if(zc)return Xc;zc=1;var t=ti(),e=we(),i=On();t({target:"Object",stat:!0,forced:S()(function(){i(1)})},{keys:function(t){return i(e(t))}})}(),Bc=Et().Object.keys)}function Kc(){return Wc?Gc:(Wc=1,Gc=qc())}var $c,Zc,Qc=r(Vc?Yc:(Vc=1,Yc=Kc()));var Jc,td,ed=r(Zc?$c:(Zc=1,$c=sa()));var id,od,nd,sd,rd,ad,hd,ld,cd,dd=r(td?Jc:(td=1,Jc=Hh())),ud={};function pd(){return nd?od:(nd=1,function(){if(id)return ud;id=1;var t=ti(),e=ei(),i=Bo(),o=Ot(),n=Cn(),s=jo(),r=Tt(),a=Er(),h=Ce(),l=tr(),c=_i(),d=l("slice"),u=h("species"),p=Array,m=Math.max;t({target:"Array",proto:!0,forced:!d},{slice:function(t,h){var l,d,f,g=r(this),v=s(g),b=n(t,v),y=n(void 0===h?v:h,v);if(e(g)&&(l=g.constructor,(i(l)&&(l===p||e(l.prototype))||o(l)&&null===(l=l[u]))&&(l=void 0),l===p||void 0===l))return c(g,b,y);for(d=new(void 0===l?p:l)(m(y-b,0)),f=0;b<y;b++,f++)b in g&&a(d,f,g[b]);return d.length=f,d}})}(),od=Ci()("Array","slice"))}function md(){if(rd)return sd;rd=1;var t=Pt(),e=pd(),i=Array.prototype;return sd=function(o){var n=o.slice;return o===i||t(i,o)&&n===i.slice?e:n},sd}function fd(){return hd?ad:(hd=1,ad=md())}var gd,vd,bd,yd,wd,_d,xd,Cd=r(cd?ld:(cd=1,ld=fd()));function Sd(){return bd?vd:(bd=1,gd||(gd=1,ti()({target:"Reflect",stat:!0},{ownKeys:Or()})),vd=Et().Reflect.ownKeys)}function Dd(){return wd?yd:(wd=1,yd=Sd())}var kd,Td,Od,Ed,Id,Pd,Ad,Md=r(xd?_d:(xd=1,_d=Dd())),Nd={};function Fd(){return Od?Td:(Od=1,function(){if(kd)return Nd;kd=1;var t=ti(),e=Date,i=T()(e.prototype.getTime);t({target:"Date",stat:!0},{now:function(){return i(new e)}})}(),Td=Et().Date.now)}function Rd(){return Id?Ed:(Id=1,Ed=Fd())}var Ld,jd,zd,Bd,Hd,Gd,Wd,Yd,Vd,Ud=r(Ad?Pd:(Ad=1,Pd=Rd())),Xd={};function qd(){return zd?jd:(zd=1,function(){if(Ld)return Xd;Ld=1;var t=ti(),e=T(),i=ei(),o=e([].reverse),n=[1,2];t({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o(this)}})}(),jd=Ci()("Array","reverse"))}function Kd(){if(Hd)return Bd;Hd=1;var t=Pt(),e=qd(),i=Array.prototype;return Bd=function(o){var n=o.reverse;return o===i||t(i,o)&&n===i.reverse?e:n},Bd}function $d(){return Wd?Gd:(Wd=1,Gd=Kd())}var Zd,Qd,Jd,tu,eu,iu,ou,nu,su,ru,au,hu,lu,cu=r(Vd?Yd:(Vd=1,Yd=$d())),du={};function uu(){if(Qd)return Zd;Qd=1;var t=R(),e=ei(),i=TypeError,o=Object.getOwnPropertyDescriptor,n=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return Zd=n?function(t,n){if(e(t)&&!o(t,"length").writable)throw new i("Cannot set read only .length");return t.length=n}:function(t,e){return t.length=e}}function pu(){if(tu)return Jd;tu=1;var t=Lt(),e=TypeError;return Jd=function(i,o){if(!delete i[o])throw new e("Cannot delete property "+t(o)+" of "+t(i))}}function mu(){return ou?iu:(ou=1,function(){if(eu)return du;eu=1;var t=ti(),e=we(),i=Cn(),o=Ro(),n=jo(),s=uu(),r=ma(),a=Go(),h=Er(),l=pu(),c=tr()("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=n(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(o(c),0),w-_)),r(w+p-m),f=a(y,m),g=0;g<m;g++)(v=_+g)in y&&h(f,g,y[v]);if(f.length=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 s(y,w-m+p),f}})}(),iu=Ci()("Array","splice"))}function fu(){if(su)return nu;su=1;var t=Pt(),e=mu(),i=Array.prototype;return nu=function(o){var n=o.splice;return o===i||t(i,o)&&n===i.splice?e:n},nu}function gu(){return au?ru:(au=1,ru=fu())}var vu,bu,yu,wu,_u,xu,Cu,Su,Du,ku=r(lu?hu:(lu=1,hu=gu())),Tu={};function Ou(){if(bu)return vu;bu=1;var t=R(),e=T(),i=L(),o=S(),n=On(),s=Vn(),r=xt(),a=we(),h=St(),l=Object.assign,c=Object.defineProperty,d=e([].concat);return vu=!l||o(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={},o=Symbol("assign detection"),s="abcdefghijklmnopqrst";return e[o]=7,s.split("").forEach(function(t){i[t]=t}),7!==l({},e)[o]||n(l({},i)).join("")!==s})?function(e,o){for(var l=a(e),c=arguments.length,u=1,p=s.f,m=r.f;c>u;)for(var f,g=h(arguments[u++]),v=p?d(n(g),p(g)):n(g),b=v.length,y=0;b>y;)f=v[y++],t&&!i(m,g,f)||(l[f]=g[f]);return l}:l,vu}function Eu(){return _u?wu:(_u=1,function(){if(yu)return Tu;yu=1;var t=ti(),e=Ou();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}(),wu=Et().Object.assign)}function Iu(){return Cu?xu:(Cu=1,xu=Eu())}var Pu,Au,Mu,Nu=r(Du?Su:(Du=1,Su=Iu())),Fu={};function Ru(){return Mu?Au:(Mu=1,function(){if(Pu)return Fu;Pu=1;var t=ti(),e=Sn().includes,i=S(),o=Dh();t({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")}(),Au=Ci()("Array","includes"))}var Lu,ju,zu,Bu,Hu,Gu,Wu,Yu,Vu,Uu,Xu,qu,Ku,$u,Zu,Qu={};function Ju(){if(ju)return Lu;ju=1;var t=Ot(),e=O(),i=Ce()("match");return Lu=function(o){var n;return t(o)&&(void 0!==(n=o[i])?!!n:"RegExp"===e(o))},Lu}function tp(){if(Bu)return zu;Bu=1;var t=Ju(),e=TypeError;return zu=function(i){if(t(i))throw new e("The method doesn't accept regular expressions");return i},zu}function ep(){if(Gu)return Hu;Gu=1;var t=Ce()("match");return Hu=function(e){var i=/./;try{"/./"[e](i)}catch(o){try{return i[t]=!1,"/./"[e](i)}catch(t){}}return!1}}function ip(){return Vu?Yu:(Vu=1,function(){if(Wu)return Qu;Wu=1;var t=ti(),e=T(),i=tp(),o=kt(),n=en(),s=ep(),r=e("".indexOf);t({target:"String",proto:!0,forced:!s("includes")},{includes:function(t){return!!~r(n(o(this)),n(i(t)),arguments.length>1?arguments[1]:void 0)}})}(),Yu=Ci()("String","includes"))}function op(){if(Xu)return Uu;Xu=1;var t=Pt(),e=Ru(),i=ip(),o=Array.prototype,n=String.prototype;return Uu=function(s){var r=s.includes;return s===o||t(o,s)&&r===o.includes?e:"string"==typeof s||s===n||t(n,s)&&r===n.includes?i:r},Uu}function np(){return Ku?qu:(Ku=1,qu=op())}var sp,rp,ap,hp,lp,cp,dp,up=r(Zu?$u:(Zu=1,$u=np())),pp={};function mp(){return ap?rp:(ap=1,function(){if(sp)return pp;sp=1;var t=ti(),e=S(),i=we(),o=Eh(),n=Oh();t({target:"Object",stat:!0,forced:e(function(){o(1)}),sham:!n},{getPrototypeOf:function(t){return o(i(t))}})}(),rp=Et().Object.getPrototypeOf)}function fp(){return lp?hp:(lp=1,hp=mp())}var gp,vp,bp,yp,wp,_p,xp,Cp,Sp=r(dp?cp:(dp=1,cp=fp()));function Dp(){return vp?gp:(vp=1,fa(),gp=Ci()("Array","concat"))}function kp(){if(yp)return bp;yp=1;var t=Pt(),e=Dp(),i=Array.prototype;return bp=function(o){var n=o.concat;return o===i||t(i,o)&&n===i.concat?e:n},bp}function Tp(){return _p?wp:(_p=1,wp=kp())}var Op,Ep,Ip,Pp,Ap,Mp,Np,Fp,Rp,Lp=r(Cp?xp:(Cp=1,xp=Tp())),jp={};function zp(){if(Ep)return Op;Ep=1;var t=R(),e=S(),i=T(),o=Eh(),n=On(),s=Tt(),r=i(xt().f),a=i([].push),h=t&&e(function(){var t=Object.create(null);return t[2]=2,!r(t,2)}),l=function(e){return function(i){for(var l,c=s(i),d=n(c),u=h&&null===o(c),p=d.length,m=0,f=[];p>m;)l=d[m++],t&&!(u?l in c:r(c,l))||a(f,e?[l,c[l]]:c[l]);return f}};return Op={entries:l(!0),values:l(!1)}}function Bp(){return Ap?Pp:(Ap=1,function(){if(Ip)return jp;Ip=1;var t=ti(),e=zp().values;t({target:"Object",stat:!0},{values:function(t){return e(t)}})}(),Pp=Et().Object.values)}function Hp(){return Np?Mp:(Np=1,Mp=Bp())}var Gp,Wp,Yp,Vp,Up,Xp,qp,Kp,$p,Zp,Qp,Jp,tm,em=r(Rp?Fp:(Rp=1,Fp=Hp())),im={};function om(){return Wp?Gp:(Wp=1,Gp="\t\n\v\f\r                　\u2028\u2029\ufeff")}function nm(){if(Vp)return Yp;Vp=1;var t=T(),e=kt(),i=en(),o=om(),n=t("".replace),s=RegExp("^["+o+"]+"),r=RegExp("(^|[^"+o+"])["+o+"]+$"),a=function(t){return function(o){var a=i(e(o));return 1&t&&(a=n(a,s,"")),2&t&&(a=n(a,r,"$1")),a}};return Yp={start:a(1),end:a(2),trim:a(3)}}function sm(){if(Xp)return Up;Xp=1;var t=C(),e=S(),i=T(),o=en(),n=nm().trim,s=om(),r=t.parseInt,a=t.Symbol,h=a&&a.iterator,l=/^[+-]?0x/i,c=i(l.exec),d=8!==r(s+"08")||22!==r(s+"0x16")||h&&!e(function(){r(Object(h))});return Up=d?function(t,e){var i=n(o(t));return r(i,e>>>0||(c(l,i)?16:10))}:r,Up}function rm(){return $p?Kp:($p=1,function(){if(qp)return im;qp=1;var t=ti(),e=sm();t({global:!0,forced:parseInt!==e},{parseInt:e})}(),Kp=Et().parseInt)}function am(){return Qp?Zp:(Qp=1,Zp=rm())}var hm,lm,cm,dm,um,pm,mm,fm,gm,vm=r(tm?Jp:(tm=1,Jp=am())),bm={};function ym(){return cm?lm:(cm=1,function(){if(hm)return bm;hm=1;var t=ti(),e=E(),i=Sn().indexOf,o=Yo(),n=e([].indexOf),s=!!n&&1/n([1],1,-0)<0;t({target:"Array",proto:!0,forced:s||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return s?n(this,t,e)||0:i(this,t,e)}})}(),lm=Ci()("Array","indexOf"))}function wm(){if(um)return dm;um=1;var t=Pt(),e=ym(),i=Array.prototype;return dm=function(o){var n=o.indexOf;return o===i||t(i,o)&&n===i.indexOf?e:n},dm}function _m(){return mm?pm:(mm=1,pm=wm())}var xm,Cm,Sm,Dm,km,Tm,Om,Em=r(gm?fm:(gm=1,fm=_m())),Im={};function Pm(){return Sm?Cm:(Sm=1,function(){if(xm)return Im;xm=1;var t=ti(),e=zp().entries;t({target:"Object",stat:!0},{entries:function(t){return e(t)}})}(),Cm=Et().Object.entries)}function Am(){return km?Dm:(km=1,Dm=Pm())}var Mm,Nm,Fm,Rm,Lm,jm,zm,Bm=r(Om?Tm:(Om=1,Tm=Am()));function Hm(){if(Fm)return Nm;Fm=1,Mm||(Mm=1,ti()({target:"Object",stat:!0,sham:!R()},{create:An()}));var t=Et().Object;return Nm=function(e,i){return t.create(e,i)}}function Gm(){return Lm?Rm:(Lm=1,Rm=Hm())}var Wm,Ym,Vm,Um,Xm,qm,Km,$m,Zm,Qm,Jm,tf,ef,of=r(zm?jm:(zm=1,jm=Gm())),nf={};function sf(){if(Ym)return Wm;Ym=1;var t=Ro(),e=en(),i=kt(),o=RangeError;return Wm=function(n){var s=e(i(this)),r="",a=t(n);if(a<0||a===1/0)throw new o("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(s+=s))1&a&&(r+=s);return r}}function rf(){if(Um)return Vm;Um=1;var t=T(),e=Lo(),i=en(),o=sf(),n=kt(),s=t(o),r=t("".slice),a=Math.ceil,h=function(t){return function(o,h,l){var c,d,u=i(n(o)),p=e(h),m=u.length,f=void 0===l?" ":i(l);return p<=m||""===f?u:((d=s(f,a((c=p-m)/f.length))).length>c&&(d=r(d,0,c)),t?u+d:d+u)}};return Vm={start:h(!1),end:h(!0)}}function af(){if(qm)return Xm;qm=1;var t=T(),e=S(),i=rf().start,o=RangeError,n=isFinite,s=Math.abs,r=Date.prototype,a=r.toISOString,h=t(r.getTime),l=t(r.getUTCDate),c=t(r.getUTCFullYear),d=t(r.getUTCHours),u=t(r.getUTCMilliseconds),p=t(r.getUTCMinutes),m=t(r.getUTCMonth),f=t(r.getUTCSeconds);return Xm=e(function(){return"0385-07-25T07:06:39.999Z"!==a.call(new Date(-50000000000001))})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(h(this)))throw new o("Invalid time value");var t=this,e=c(t),r=u(t),a=e<0?"-":e>9999?"+":"";return a+i(s(e),a?6:4,0)+"-"+i(m(t)+1,2,0)+"-"+i(l(t),2,0)+"T"+i(d(t),2,0)+":"+i(p(t),2,0)+":"+i(f(t),2,0)+"."+i(r,3,0)+"Z"}:a,Xm}function hf(){if(Zm)return $m;Zm=1,function(){if(Km)return nf;Km=1;var t=ti(),e=L(),i=we(),o=Se(),n=af(),s=O();t({target:"Date",proto:!0,forced:S()(function(){return null!==new Date(NaN).toJSON()||1!==e(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(t){var r=i(this),a=o(r,"number");return"number"!=typeof a||isFinite(a)?"toISOString"in r||"Date"!==s(r)?r.toISOString():e(n,r):null}})}(),Os();var t=Et(),e=k();return t.JSON||(t.JSON={stringify:JSON.stringify}),$m=function(i,o,n){return e(t.JSON.stringify,null,arguments)},$m}function lf(){return Jm?Qm:(Jm=1,Qm=hf())}var cf,df,uf,pf,mf,ff,gf,vf,bf,yf,wf,_f=r(ef?tf:(ef=1,tf=lf())),xf={};function Cf(){if(df)return cf;df=1;var t=we(),e=Cn(),i=jo();return cf=function(o){for(var n=t(this),s=i(n),r=arguments.length,a=e(r>1?arguments[1]:void 0,s),h=r>2?arguments[2]:void 0,l=void 0===h?s:e(h,s);l>a;)n[a++]=o;return n},cf}function Sf(){return mf?pf:(mf=1,function(){if(uf)return xf;uf=1;var t=ti(),e=Cf(),i=Dh();t({target:"Array",proto:!0},{fill:e}),i("fill")}(),pf=Ci()("Array","fill"))}function Df(){if(gf)return ff;gf=1;var t=Pt(),e=Sf(),i=Array.prototype;return ff=function(o){var n=o.fill;return o===i||t(i,o)&&n===i.fill?e:n},ff}function kf(){return bf?vf:(bf=1,vf=Df())}var Tf,Of=r(wf?yf:(wf=1,yf=kf())),Ef={exports:{}};var If=(Tf||(Tf=1,function(){function t(e){if(e)return function(e){for(var i in t.prototype)e[i]=t.prototype[i];return e}(e)}Ef.exports=t,t.prototype.on=t.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},t.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<o.length;n++)if((i=o[n])===e||i.fn===e){o.splice(n,1);break}return 0===o.length&&delete this._callbacks["$"+t],this},t.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(i){o=0;for(var n=(i=i.slice(0)).length;o<n;++o)i[o].apply(this,e)}return this},t.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},t.prototype.hasListeners=function(t){return!!this.listeners(t).length}}()),Ef.exports),Pf=r(If);
/*! 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 Af(){return Af=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},Af.apply(this,arguments)}function Mf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Nf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Ff,Rf="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 o=arguments[i];if(null!=o)for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])}return e}:Object.assign,Lf=["","webkit","Moz","MS","ms","o"],jf="undefined"==typeof document?{style:{}}:document.createElement("div"),zf=Math.round,Bf=Math.abs,Hf=Date.now;function Gf(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s<Lf.length;){if((o=(i=Lf[s])?i+n:e)in t)return o;s++}}Ff="undefined"==typeof window?{}:window;var Wf=Gf(jf.style,"touchAction"),Yf=void 0!==Wf;var Vf="compute",Uf="auto",Xf="manipulation",qf="none",Kf="pan-x",$f="pan-y",Zf=function(){if(!Yf)return!1;var t={},e=Ff.CSS&&Ff.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){return t[i]=!e||Ff.CSS.supports("touch-action",i)}),t}(),Qf="ontouchstart"in Ff,Jf=void 0!==Gf(Ff,"PointerEvent"),tg=Qf&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),eg="touch",ig="mouse",og=16,ng=24,sg=["x","y"],rg=["clientX","clientY"];function ag(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(o=0;o<t.length;)e.call(i,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function hg(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function lg(t,e){return t.indexOf(e)>-1}var cg=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Vf&&(t=this.compute()),Yf&&this.manager.element.style&&Zf[t]&&(this.manager.element.style[Wf]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return ag(this.manager.recognizers,function(e){hg(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(lg(t,qf))return qf;var e=lg(t,Kf),i=lg(t,$f);return e&&i?qf:e||i?e?Kf:$f:lg(t,Xf)?Xf:Uf}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,n=lg(o,qf)&&!Zf[qf],s=lg(o,$f)&&!Zf[$f],r=lg(o,Kf)&&!Zf[Kf];if(n){var a=1===t.pointers.length,h=t.distance<2,l=t.deltaTime<250;if(a&&h&&l)return}if(!r||!s)return n||s&&6&i||r&&i&ng?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function dg(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function ug(t){var e=t.length;if(1===e)return{x:zf(t[0].clientX),y:zf(t[0].clientY)};for(var i=0,o=0,n=0;n<e;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:zf(i/e),y:zf(o/e)}}function pg(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:zf(t.pointers[i].clientX),clientY:zf(t.pointers[i].clientY)},i++;return{timeStamp:Hf(),pointers:e,center:ug(e),deltaX:t.deltaX,deltaY:t.deltaY}}function mg(t,e,i){i||(i=sg);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function fg(t,e,i){i||(i=sg);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function gg(t,e){return t===e?1:Bf(t)>=Bf(e)?t<0?2:4:e<0?8:og}function vg(t,e,i){return{x:e/t||0,y:i/t||0}}function bg(t,e){var i=t.session,o=e.pointers,n=o.length;i.firstInput||(i.firstInput=pg(e)),n>1&&!i.firstMultiple?i.firstMultiple=pg(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=ug(o);e.timeStamp=Hf(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=fg(a,h),e.distance=mg(a,h),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=gg(e.deltaX,e.deltaY);var l,c,d=vg(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=Bf(d.x)>Bf(d.y)?d.x:d.y,e.scale=r?(l=r.pointers,mg((c=o)[0],c[1],rg)/mg(l[0],l[1],rg)):1,e.rotation=r?function(t,e){return fg(e[1],e[0],rg)+fg(t[1],t[0],rg)}(r.pointers,o):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,o,n,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(8!==e.eventType&&(a>25||void 0===r.velocity)){var h=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,c=vg(a,h,l);o=c.x,n=c.y,i=Bf(c.x)>Bf(c.y)?c.x:c.y,s=gg(h,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}(i,e);var u,p=t.element,m=e.srcEvent;dg(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function yg(t,e,i){var o=i.pointers.length,n=i.changedPointers.length,s=1&e&&o-n===0,r=12&e&&o-n===0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,bg(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function wg(t){return t.trim().split(/\s+/g)}function _g(t,e,i){ag(wg(e),function(e){t.addEventListener(e,i,!1)})}function xg(t,e,i){ag(wg(e),function(e){t.removeEventListener(e,i,!1)})}function Cg(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Sg=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){hg(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&_g(this.element,this.evEl,this.domHandler),this.evTarget&&_g(this.target,this.evTarget,this.domHandler),this.evWin&&_g(Cg(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&xg(this.element,this.evEl,this.domHandler),this.evTarget&&xg(this.target,this.evTarget,this.domHandler),this.evWin&&xg(Cg(this.element),this.evWin,this.domHandler)},t}();function Dg(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}var kg={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Tg={2:eg,3:"pen",4:ig,5:"kinect"},Og="pointerdown",Eg="pointermove pointerup pointercancel";Ff.MSPointerEvent&&!Ff.PointerEvent&&(Og="MSPointerDown",Eg="MSPointerMove MSPointerUp MSPointerCancel");var Ig=function(t){function e(){var i,o=e.prototype;return o.evEl=Og,o.evWin=Eg,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Mf(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),n=kg[o],s=Tg[t.pointerType]||t.pointerType,r=s===eg,a=Dg(e,t.pointerId,"pointerId");1&n&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):12&n&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))},e}(Sg);function Pg(t){return Array.prototype.slice.call(t,0)}function Ag(t,e,i){for(var o=[],n=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];Dg(n,r)<0&&o.push(t[s]),n[s]=r,s++}return i&&(o=e?o.sort(function(t,i){return t[e]>i[e]}):o.sort()),o}var Mg={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Ng=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return Mf(e,t),e.prototype.handler=function(t){var e=Mg[t.type],i=Fg.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:eg,srcEvent:t})},e}(Sg);function Fg(t,e){var i,o,n=Pg(t.touches),s=this.targetIds;if(3&e&&1===n.length)return s[n[0].identifier]=!0,[n,n];var r=Pg(t.changedTouches),a=[],h=this.target;if(o=n.filter(function(t){return dg(t.target,h)}),1===e)for(i=0;i<o.length;)s[o[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),12&e&&delete s[r[i].identifier],i++;return a.length?[Ag(o.concat(a),"identifier",!0),a]:void 0}var Rg={mousedown:1,mousemove:2,mouseup:4},Lg=function(t){function e(){var i,o=e.prototype;return o.evEl="mousedown",o.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return Mf(e,t),e.prototype.handler=function(t){var e=Rg[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:ig,srcEvent:t}))},e}(Sg);function jg(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},o=this.lastTouches;this.lastTouches.push(i);setTimeout(function(){var t=o.indexOf(i);t>-1&&o.splice(t,1)},2500)}}function zg(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,jg.call(this,e)):12&t&&jg.call(this,e)}function Bg(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var n=this.lastTouches[o],s=Math.abs(e-n.x),r=Math.abs(i-n.y);if(s<=25&&r<=25)return!0}return!1}var Hg=function(){return function(t){function e(e,i){var o;return(o=t.call(this,e,i)||this).handler=function(t,e,i){var n=i.pointerType===eg,s=i.pointerType===ig;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)zg.call(Nf(Nf(o)),e,i);else if(s&&Bg.call(Nf(Nf(o)),i))return;o.callback(t,e,i)}},o.touch=new Ng(o.manager,o.handler),o.mouse=new Lg(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return Mf(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(Sg)}();function Gg(t,e,i){return!!Array.isArray(t)&&(ag(t,i[e],i),!0)}var Wg=32,Yg=1;function Vg(t,e){var i=e.manager;return i?i.get(t):t}function Ug(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var Xg=function(){function t(t){void 0===t&&(t={}),this.options=Af({enable:!0},t),this.id=Yg++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return Rf(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Gg(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Vg(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Gg(t,"dropRecognizeWith",this)||(t=Vg(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Gg(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Dg(e,t=Vg(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Gg(t,"dropRequireFailure",this))return this;t=Vg(t,this);var e=Dg(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 o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Ug(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Ug(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Wg},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=Rf({},t);if(!hg(this.options.enable,[this,e]))return this.reset(),void(this.state=Wg);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}(),qg=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Af({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}Mf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Xf]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,s=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(n&&s&&o){if(4!==t.eventType)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||mg(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&r?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout(function(){e.state=8,e.tryEmit()},i.interval),2):8}return Wg},i.failTimeout=function(){var t=this;return this._timer=setTimeout(function(){t.state=Wg},this.options.interval),Wg},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}(Xg),Kg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Af({pointers:1},e))||this}Mf(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,o=6&e,n=this.attrTest(t);return o&&(8&i||!n)?16|e:o||n?4&i?8|e:2&e?4|e:2:Wg},e}(Xg);function $g(t){return t===og?"down":8===t?"up":2===t?"left":4===t?"right":""}var Zg=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Af({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}Mf(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push($f),t&ng&&e.push(Kf),e},i.directionTest=function(t){var e=this.options,i=!0,o=t.distance,n=t.direction,s=t.deltaX,r=t.deltaY;return n&e.direction||(6&e.direction?(n=0===s?1:s<0?2:4,i=s!==this.pX,o=Math.abs(t.deltaX)):(n=0===r?1:r<0?8:og,i=r!==this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},i.attrTest=function(t){return Kg.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=$g(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(Kg),Qg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Af({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}Mf(e,t);var i=e.prototype;return i.getTouchAction=function(){return Zg.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,o=this.options.direction;return 30&o?i=e.overallVelocity:6&o?i=e.overallVelocityX:o&ng&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&o&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Bf(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=$g(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Kg),Jg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Af({event:"pinch",threshold:0,pointers:2},e))||this}Mf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[qf]},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}(Kg),tv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Af({event:"rotate",threshold:0,pointers:2},e))||this}Mf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[qf]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Kg),ev=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Af({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Mf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Uf]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,s=t.deltaTime>i.time;if(this._input=t,!n||!o||12&t.eventType&&!s)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout(function(){e.state=8,e.tryEmit()},i.time);else if(4&t.eventType)return 8;return Wg},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=Hf(),this.manager.emit(this.options.event,this._input)))},e}(Xg),iv={domEvents:!1,touchAction:Vf,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ov=[[tv,{enable:!1}],[Jg,{enable:!1},["rotate"]],[Qg,{direction:6}],[Zg,{direction:6},["swipe"]],[qg],[qg,{event:"doubletap",taps:2},["tap"]],[ev]];function nv(t,e){var i,o=t.element;o.style&&(ag(t.options.cssProps,function(n,s){i=Gf(o.style,s),e?(t.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}var sv=function(){function t(t,e){var i,o=this;this.options=Rf({},iv,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||(Jf?Ig:tg?Ng:Qf?Hg:Lg))(i,yg),this.touchAction=new cg(this,this.options.touchAction),nv(this,!0),ag(this.options.recognizers,function(t){var e=o.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 Rf(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 o=this.recognizers,n=e.curRecognizer;(!n||n&&8&n.state)&&(e.curRecognizer=null,n=null);for(var s=0;s<o.length;)i=o[s],2===e.stopped||n&&i!==n&&!i.canRecognizeWith(n)?i.reset():i.recognize(t),!n&&14&i.state&&(e.curRecognizer=i,n=i),s++}},e.get=function(t){if(t instanceof Xg)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(Gg(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(Gg(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,o=Dg(i,e);-1!==o&&(i.splice(o,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 ag(wg(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 ag(wg(t),function(t){e?i[t]&&i[t].splice(Dg(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 o=0;o<i.length;)i[o](e),o++}},e.destroy=function(){this.element&&nv(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),rv={touchstart:1,touchmove:2,touchend:4,touchcancel:8},av=function(t){function e(){var i,o=e.prototype;return o.evTarget="touchstart",o.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return Mf(e,t),e.prototype.handler=function(t){var e=rv[t.type];if(1===e&&(this.started=!0),this.started){var i=hv.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:eg,srcEvent:t})}},e}(Sg);function hv(t,e){var i=Pg(t.touches),o=Pg(t.changedTouches);return 12&e&&(i=Ag(i.concat(o),"identifier",!0)),[i,o]}function lv(t,e,i){var o="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",n=window.console&&(window.console.warn||window.console.log);return n&&n.call(window.console,o,i),t.apply(this,arguments)}}var cv=lv(function(t,e,i){for(var o=Object.keys(e),n=0;n<o.length;)(!i||i&&void 0===t[o[n]])&&(t[o[n]]=e[o[n]]),n++;return t},"extend","Use `assign`."),dv=lv(function(t,e){return cv(t,e,!0)},"merge","Use `assign`.");function uv(t,e,i){var o,n=e.prototype;(o=t.prototype=Object.create(n)).constructor=t,o._super=n,i&&Rf(o,i)}function pv(t,e){return function(){return t.apply(e,arguments)}}var mv=function(){var t=function(t,e){return void 0===e&&(e={}),new sv(t,Af({recognizers:ov.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=og,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=ng,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=og,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=Wg,t.Manager=sv,t.Input=Sg,t.TouchAction=cg,t.TouchInput=Ng,t.MouseInput=Lg,t.PointerEventInput=Ig,t.TouchMouseInput=Hg,t.SingleTouchInput=av,t.Recognizer=Xg,t.AttrRecognizer=Kg,t.Tap=qg,t.Pan=Zg,t.Swipe=Qg,t.Pinch=Jg,t.Rotate=tv,t.Press=ev,t.on=_g,t.off=xg,t.each=ag,t.merge=dv,t.extend=cv,t.bindFn=pv,t.assign=Rf,t.inherit=uv,t.bindFn=pv,t.prefixed=Gf,t.toArray=Pg,t.inArray=Dg,t.uniqueArray=Ag,t.splitStr=wg,t.boolOrFn=hg,t.hasParent=dg,t.addEventListeners=_g,t.removeEventListeners=xg,t.defaults=Rf({},iv,{preset:ov}),t}();mv.defaults;const fv=dd("DELETE");function gv(){const t=vv(...arguments);return yv(t),t}function vv(){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 vv(gv(e[0],e[1]),...Cd(e).call(e,2));const o=e[0],n=e[1];if(o instanceof Date&&n instanceof Date)return o.setTime(n.getTime()),o;for(const t of Md(n))Object.prototype.propertyIsEnumerable.call(n,t)&&(n[t]===fv?delete o[t]:null===o[t]||null===n[t]||"object"!=typeof o[t]||"object"!=typeof n[t]||yi(o[t])||yi(n[t])?o[t]=bv(n[t]):o[t]=vv(o[t],n[t]));return o}function bv(t){return yi(t)?Ac(t).call(t,t=>bv(t)):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):vv({},t):t}function yv(t){for(const e of Qc(t))t[e]===fv?delete t[e]:"object"==typeof t[e]&&null!==t[e]&&yv(t[e])}const wv="undefined"!=typeof window?window.Hammer||mv:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function _v(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=wv(this._dom.overlay);i.on("tap",Ni(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{i.destroy()});const o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Ko(o).call(o,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()}}Pf(_v.prototype),_v.current=null,_v.prototype.destroy=function(){this.deactivate();for(const i of cu(t=ku(e=this._cleanupQueue).call(e,0)).call(t)){var t,e;i()}},_v.prototype.activate=function(){_v.current&&_v.current.deactivate(),_v.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)},_v.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")},_v.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const xv=/^\/?Date\((-?\d+)/i,Cv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Sv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Dv=/^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,kv=/^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 Tv(t){return t instanceof Number||"number"==typeof t}function Ov(t){return t instanceof String||"string"==typeof t}function Ev(t){return"object"==typeof t&&null!==t}function Iv(t,e,i,o){let n=!1;!0===o&&(n=null===e[i]&&void 0!==t[i]),n?delete t[i]:t[i]=e[i]}const Pv=Nu;function Av(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||!0===i)if("object"==typeof e[s]&&null!==e[s]&&Sp(e[s])===Object.prototype)void 0===t[s]?t[s]=Av({},e[s],i):"object"==typeof t[s]&&null!==t[s]&&Sp(t[s])===Object.prototype?Av(t[s],e[s],i):Iv(t,e,s,o);else if(yi(e[s])){var n;t[s]=Cd(n=e[s]).call(n)}else Iv(t,e,s,o);return t}function Mv(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":yi(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function Nv(t,e){return[...t,e]}function Fv(t){return Cd(t).call(t)}const Rv=em;const Lv={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()),Ov(t)?t:Tv(t)?t+"px":e||null),asElement:(t,e)=>("function"==typeof t&&(t=t()),t||e||null)};function jv(t){let e;switch(t.length){case 3:case 4:return e=Sv.exec(t),e?{r:vm(e[1]+e[1],16),g:vm(e[2]+e[2],16),b:vm(e[3]+e[3],16)}:null;case 6:case 7:return e=Cv.exec(t),e?{r:vm(e[1],16),g:vm(e[2],16),b:vm(e[3],16)}:null;default:return null}}function zv(t,e,i){var o;return"#"+Cd(o=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(o,1)}function Bv(t,e,i){t/=255,e/=255,i/=255;const o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o===n)return{h:0,s:0,v:o};return{h:60*((t===o?3:i===o?1:5)-(t===o?e-i:i===o?t-e:i-t)/(n-o))/360,s:(n-o)/n,v:n}}function Hv(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 Gv(t,e,i){let o,n,s;const r=Math.floor(6*t),a=6*t-r,h=i*(1-e),l=i*(1-a*e),c=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=c,s=h;break;case 1:o=l,n=i,s=h;break;case 2:o=h,n=i,s=c;break;case 3:o=h,n=l,s=i;break;case 4:o=c,n=h,s=i;break;case 5:o=i,n=h,s=l}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}}function Wv(t,e,i){const o=Gv(t,e,i);return zv(o.r,o.g,o.b)}function Yv(t){const e=jv(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return Bv(e.r,e.g,e.b)}function Vv(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function Uv(t){return Dv.test(t)}function Xv(t){return kv.test(t)}function qv(t){if(null===t||"object"!=typeof t)return null;if(t instanceof Element)return t;const e=of(t);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==typeof t[i]&&(e[i]=qv(t[i]));return e}const Kv={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 $v={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 Zv=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 $v[t]}setColor(t){let e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"===t)return;const o=this._isColorString(t);if(void 0!==o&&(t=o),!0===Ov(t)){if(!0===Uv(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===Xv(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===Vv(t)){const i=jv(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: "+_f(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=Nu({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Ji(()=>{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=Nu({},t)),this.color=t;const e=Bv(t.r,t.g,t.b),i=2*Math.PI,o=this.r*e.s,n=this.centerCoordinates.x+o*Math.sin(i*e.h),s=this.centerCoordinates.y+o*Math.cos(i*e.h);this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){const e=Bv(this.color.r,this.color.g,this.color.b);e.v=t/100;const i=Gv(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=Bv(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 o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),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),Of(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,o;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 n=this;this.opacityRange.onchange=function(){n._setOpacity(this.value)},this.opacityRange.oninput=function(){n._setOpacity(this.value)},this.brightnessRange.onchange=function(){n._setBrightness(this.value)},this.brightnessRange.oninput=function(){n._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=Ni(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=Ni(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=Ni(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=Ni(o=this._loadLast).call(o,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 wv(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 o,n,s,r;t.clearRect(0,0,e,i),this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;const a=2*Math.PI/360,h=1/360,l=1/this.r;let c;for(s=0;s<360;s++)for(r=0;r<this.r;r++)o=this.centerCoordinates.x+r*Math.sin(a*s),n=this.centerCoordinates.y+r*Math.cos(a*s),c=Gv(s*h,r*l,1),t.fillStyle="rgb("+c.r+","+c.g+","+c.b+")",t.fillRect(o-.5,n-.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,o=t.center.y-e.top,n=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=o-n,h=Math.atan2(r,a),l=.98*Math.min(Math.sqrt(r*r+a*a),s),c=Math.cos(h)*l+n,d=Math.sin(h)*l+s;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=Bv(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;const f=Gv(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 Qv(){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(Qv(...Cd(e).call(e,1))),t}}let Jv,tb=!1;const eb="background: #FFeeee; color: #dd0000";const ib=_v,ob=Zv,nb=class{constructor(t,e,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>!1;this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=n,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Nu(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Zv(o),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(yi(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!==cr(t)&&(this.options.filter=cr(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===cr(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=cr(this.options);let e=0,i=!1;for(const o in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,o)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(o,[]),i=i||this._handleObject(this.configureOptions[o],[o],!0)):!0!==t&&-1===Em(t).call(t,o)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(o),this._handleObject(this.configureOptions[o],[o])),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 n=document.createElement("div");n.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return Ko(i).call(i,t=>{n.appendChild(t)}),this.domElements.push(n),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 o=document.createElement("div");if(o.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(Qv("i","b",t))}else o.innerText=t+":";return o}_makeDropdown(t,e,i){const o=document.createElement("select");o.className="vis-configuration vis-config-select";let n=0;void 0!==e&&-1!==Em(t).call(t,e)&&(n=Em(t).call(t,e));for(let e=0;e<t.length;e++){const i=document.createElement("option");i.value=t[e],e===n&&(i.selected="selected"),i.innerText=t[e],o.appendChild(i)}const s=this;o.onchange=function(){s._update(this.value,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,o)}_makeRange(t,e,i){const o=t[0],n=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=n,a.max=s}catch(t){}a.step=r;let h="",l=0;if(void 0!==e){const t=1.2;e<0&&e*t<n?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<n&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=o;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=Ji(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Ji(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){const o=document.createElement("input");o.type="checkbox",o.className="vis-configuration vis-config-checkbox",o.checked=t,void 0!==e&&(o.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 n=this;o.onchange=function(){n._update(this.checked,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeTextInput(t,e,i){const o=document.createElement("input");o.type="text",o.className="vis-configuration vis-config-text",o.value=e,e!==t&&this.changedOptions.push({path:i,value:e});const n=this;o.onchange=function(){n._update(this.value,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeColorField(t,e,i){const o=t[1],n=document.createElement("div");"none"!==(e=void 0===e?o:e)?(n.className="vis-configuration vis-config-colorBlock",n.style.backgroundColor=e):n.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,n.onclick=()=>{this._showColorPicker(e,n,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{const o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,this._update(o,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],o=!1;const n=cr(this.options);let s=!1;for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){o=!0;const a=t[r],h=Nv(e,r);if("function"==typeof n&&(o=n(r,e),!1===o&&!yi(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==o){s=!0;const t=this._getValue(h);if(yi(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,r,this.moduleOptions))if(void 0!==a.enabled){const t=Nv(h,"enabled"),e=this._getValue(t);if(!0===e){const t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,e,h)}else{const t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}_handleArray(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}_update(t,e){const i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===o[e[i]]&&(o[e[i]]={}),i!==e.length-1?o=o[e[i]]:o[e[i]]=t);return i}_printOptions(){const t=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Qv("pre","const options = "+_f(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}},sb=wv,rb=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=vm(t),this.y=vm(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,o=this.frame.parentNode.clientWidth;let n=0,s=0;if("flip"==this.overflowMethod){let i=!1,r=!0;this.y-t<this.padding&&(r=!1),this.x+e>o-this.padding&&(i=!0),n=i?this.x-e:this.x,s=r?this.y-t:this.y}else s=this.y-t,s+t+this.padding>i&&(s=i-t-this.padding),s<this.padding&&(s=this.padding),n=this.x,n+e+this.padding>o&&(n=o-e-this.padding),n<this.padding&&(n=this.padding);this.frame.style.left=n+"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)}},ab=eb,hb=class t{static validate(e,i,o){tb=!1,Jv=i;let n=i;return void 0!==o&&(n=i[o]),t.parse(e,n,[]),tb}static parse(e,i,o){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.check(n,e,i,o)}static check(e,i,o,n){if(void 0===o[e]&&void 0===o.__any__)return void t.getSuggestion(e,o,n);let s=e,r=!0;void 0===o[e]&&void 0!==o.__any__&&(s="__any__",r="object"===t.getType(i[e]));let a=o[s];r&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,o,s,a,n)}static checkFields(e,i,o,n,s,r){const a=function(i){console.error("%c"+i+t.printLocation(r,e),eb)},h=t.getType(i[e]),l=s[h];void 0!==l?"array"===t.getType(l)&&-1===Em(l).call(l,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(l)+' not "'+i[e]+'". '),tb=!0):"object"===h&&"__any__"!==n&&(r=Nv(r,e),t.parse(i[e],o[n],r)):void 0===s.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(Qc(s))+". Received ["+h+'] "'+i[e]+'"'),tb=!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":yi(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,o){const n=t.findInOptions(e,i,o,!1),s=t.findInOptions(e,Jv,[],!0);let r;r=void 0!==n.indexMatch?" in "+t.printLocation(n.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':s.distance<=4&&n.distance>s.distance?" in "+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e):". Did you mean one of these: "+t.print(Qc(i))+t.printLocation(o,e),console.error('%cUnknown option detected: "'+e+'"'+r,eb),tb=!0}static findInOptions(e,i,o){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[];const h=e.toLowerCase();let l;for(const d in i){let u;if(void 0!==i[d].__type__&&!0===n){const n=t.findInOptions(e,i[d],Nv(o,d));s>n.distance&&(r=n.closestMatch,a=n.path,s=n.distance,l=n.indexMatch)}else{var c;-1!==Em(c=d.toLowerCase()).call(c,h)&&(l=d),u=t.levenshteinDistance(e,d),s>u&&(r=d,a=Fv(o),s=u)}}return{closestMatch:r,path:a,distance:s,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 o=0;o<t.length-e;o++)i+="  ";i+="}\n"}return i+"\n\n"}static print(t){return _f(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 o,n;for(o=0;o<=e.length;o++)i[o]=[o];for(n=0;n<=t.length;n++)i[0][n]=n;for(o=1;o<=e.length;o++)for(n=1;n<=t.length;n++)e.charAt(o-1)==t.charAt(n-1)?i[o][n]=i[o-1][n-1]:i[o][n]=Math.min(i[o-1][n-1]+1,Math.min(i[o][n-1]+1,i[o-1][n]+1));return i[e.length][t.length]}};var lb,cb,db,ub,pb,mb,fb,gb,vb,bb,yb,wb=Object.freeze({__proto__:null,Activator:ib,Alea:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){let[e,i,o]=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 o=.02519603282416938*t;t=o>>>0,o-=t,o*=t,t=o>>>0,o-=t,t+=4294967296*o}return 2.3283064365386963e-10*(t>>>0)}}();let e=t(" "),i=t(" "),o=t(" ");for(let n=0;n<arguments.length;n++)e-=t(n<0||arguments.length<=n?void 0:arguments[n]),e<0&&(e+=1),i-=t(n<0||arguments.length<=n?void 0:arguments[n]),i<0&&(i+=1),o-=t(n<0||arguments.length<=n?void 0:arguments[n]),o<0&&(o+=1);return[e,i,o]}(t),n=1;const s=()=>{const t=2091639*e+2.3283064365386963e-10*n;return e=i,i=o,o=t-(n=0|t)};return s.uint32=()=>4294967296*s(),s.fract53=()=>s()+11102230246251565e-32*(2097152*s()|0),s.algorithm="Alea",s.seed=t,s.version="0.9",s}(e.length?e:[Ud()])},ColorPicker:ob,Configurator:nb,DELETE:fv,HSVToHex:Wv,HSVToRGB:Gv,Hammer:sb,Popup:rb,RGBToHSV:Bv,RGBToHex:zv,VALIDATOR_PRINT_STYLE:ab,Validator:hb,addClassName:function(t,e){let i=t.className.split(" ");const o=e.split(" ");i=Lp(i).call(i,cr(o).call(o,function(t){return!up(i).call(i,t)})),t.className=i.join(" ")},addCssText:function(t,e){const i=Hv(e);for(const[e,o]of Bm(i))t.style.setProperty(e,o)},binarySearchCustom:function(t,e,i,o){let n=0,s=0,r=t.length-1;for(;s<=r&&n<1e4;){const a=Math.floor((s+r)/2),h=t[a],l=e(void 0===o?h[i]:h[i][o]);if(0==l)return a;-1==l?s=a+1:r=a-1,n++}return-1},binarySearchValue:function(t,e,i,o,n){let s,r,a,h,l=0,c=0,d=t.length-1;for(n=null!=n?n:function(t,e){return t==e?0:t<e?-1:1};c<=d&&l<1e4;){if(h=Math.floor(.5*(d+c)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==n(r,e))return h;if(n(s,e)<0&&n(r,e)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?c=h+1:d=h-1,l++}return-1},bridgeObject:qv,copyAndExtendArray:Nv,copyArray:Fv,deepExtend:Av,deepObjectAssign:gv,easingFunctions:Kv,equalArray:function(t,e){if(t.length!==e.length)return!1;for(let i=0,o=t.length;i<o;i++)if(t[i]!=e[i])return!1;return!0},extend:Pv,fillIfDefined:function t(e,i){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(const n in e)if(void 0!==i[n])if(null===i[n]||"object"!=typeof i[n])Iv(e,i,n,o);else{const s=e[n],r=i[n];Ev(s)&&Ev(r)&&t(s,r,o)}},forEach:function(t,e){if(yi(t)){const i=t.length;for(let o=0;o<i;o++)e(t[o],o,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 o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),i-o},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:Mv,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:Yv,hexToRGB:jv,insertSort:function(t,e){for(let i=0;i<t.length;i++){const o=t[i];let n;for(n=i;n>0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},isDate:function(t){if(t instanceof Date)return!0;if(Ov(t)){if(xv.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:Tv,isObject:Ev,isString:Ov,isValidHex:Vv,isValidRGB:Uv,isValidRGBA:Xv,mergeOptions:function(t,e,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=function(t){return null!=t},s=function(t){return null!==t&&"object"==typeof t};if(!s(t))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(i))throw new Error("Parameter option must have a value");if(!s(o))throw new Error("Parameter globalOptions must be an object");const r=e[i],a=s(o)&&!function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(o)?o[i]:void 0,h=a?a.enabled:void 0;if(void 0===r)return;if("boolean"==typeof r)return s(t[i])||(t[i]={}),void(t[i].enabled=r);if(null===r&&!s(t[i])){if(!n(a))return;t[i]=of(a)}if(!s(r))return;let l=!0;void 0!==r.enabled?l=r.enabled:void 0!==h&&(l=a.enabled),function(t,e,i){s(t[i])||(t[i]={});const o=e[i],n=t[i];for(const t in o)Object.prototype.hasOwnProperty.call(o,t)&&(n[t]=o[t])}(t,e,i),t[i].enabled=l},option:Lv,overrideOpacity:function(t,e){if(up(t).call(t,"rgba"))return t;if(up(t).call(t,"rgb")){const i=t.substr(Em(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}{const i=jv(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"}},parseColor:function(t,e){if(Ov(t)){let e=t;if(Uv(e)){var i;const t=Ac(i=e.substr(4).substr(0,e.length-5).split(",")).call(i,function(t){return vm(t)});e=zv(t[0],t[1],t[2])}if(!0===Vv(e)){const t=Yv(e),i={h:t.h,s:.8*t.s,v:Math.min(1,1.02*t.v)},o={h:t.h,s:Math.min(1,1.25*t.s),v:.8*t.v},n=Wv(o.h,o.s,o.v),s=Wv(i.h,i.s,i.v);return{background:e,border:n,highlight:{background:s,border:n},hover:{background:s,border:n}}}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:Ov(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:Ov(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:Ov(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:Ov(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),o=1;o<e;o++)i[o-1]=arguments[o];return gv({},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 o=e.split(" ");i=cr(i).call(i,function(t){return!up(o).call(o,t)}),t.className=i.join(" ")},removeCssText:function(t,e){const i=Hv(e);for(const e of Qc(i))t.style.removeProperty(e)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"==typeof e){const i=of(e);for(let o=0;o<t.length;o++)Object.prototype.hasOwnProperty.call(e,t[o])&&"object"==typeof e[t[o]]&&(i[t[o]]=qv(e[t[o]]));return i}return null},selectiveDeepExtend:function(t,e,i){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(yi(i))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n<t.length;n++){const s=t[n];if(Object.prototype.hasOwnProperty.call(i,s))if(i[s]&&i[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?Av(e[s],i[s],!1,o):Iv(e,i,s,o);else{if(yi(i[s]))throw new TypeError("Arrays are not supported by deepExtend");Iv(e,i,s,o)}}return e},selectiveExtend:function(t,e){if(!yi(t))throw new Error("Array with property names expected as first argument");for(var i=arguments.length,o=new Array(i>2?i-2:0),n=2;n<i;n++)o[n-2]=arguments[n];for(const i of o)for(let o=0;o<t.length;o++){const n=t[o];i&&Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},selectiveNotDeepExtend:function(t,e,i){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(yi(i))throw new TypeError("Arrays are not supported by deepExtend");for(const n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&!up(t).call(t,n))if(i[n]&&i[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n].constructor===Object?Av(e[n],i[n]):Iv(e,i,n,o);else if(yi(i[n])){e[n]=[];for(let t=0;t<i[n].length;t++)e[n].push(i[n][t])}else Iv(e,i,n,o);return e},throttle:function(t){let e=!1;return()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,t()}))}},toArray:Rv,topMost:function(t,e){let i;yi(e)||(e=[e]);for(const o of t)if(o){i=o[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)}}),_b={exports:{}},xb={},Cb={exports:{}},Sb={};function Db(){if(lb)return Sb;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}lb=1;var e=/javascript\s*\:/gim;return Sb.whiteList=t(),Sb.getDefaultWhiteList=t,Sb.onAttr=function(t,e,i){},Sb.onIgnoreAttr=function(t,e,i){},Sb.safeAttrValue=function(t,i){return e.test(i)?"":i},Sb}function kb(){return db?cb:(db=1,cb={indexOf:function(t,e){var i,o;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,o=t.length;i<o;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var o,n;if(Array.prototype.forEach)return t.forEach(e,i);for(o=0,n=t.length;o<n;o++)e.call(i,t[o],o,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 Tb(){if(fb)return mb;fb=1;var t=Db(),e=function(){if(pb)return ub;pb=1;var t=kb();return ub=function(e,i){";"!==(e=t.trimRight(e))[e.length-1]&&(e+=";");var o=e.length,n=!1,s=0,r=0,a="";function h(){if(!n){var o=t.trim(e.slice(s,r)),h=o.indexOf(":");if(-1!==h){var l=t.trim(o.slice(0,h)),c=t.trim(o.slice(h+1));if(l){var d=i(s,a.length,l,c,o);d&&(a+=d+"; ")}}}s=r+1}for(;r<o;r++){var l=e[r];if("/"===l&&"*"===e[r+1]){var c=e.indexOf("*/",r+2);if(-1===c)break;s=(r=c+1)+1,n=!1}else"("===l?n=!0:")"===l?n=!1:";"===l?n||h():"\n"===l&&h()}return t.trim(a)},ub}();function i(t){return null==t}function o(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 kb(),o.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var o=this.options,n=o.whiteList,s=o.onAttr,r=o.onIgnoreAttr,a=o.safeAttrValue;return e(t,function(t,e,o,h,l){var c=n[o],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(o,h)){var u,p={position:e,sourcePosition:t,source:l,isWhite:d};return d?i(u=s(o,h,p))?o+":"+h:u:i(u=r(o,h,p))?void 0:u}})},mb=o}function Ob(){return gb||(gb=1,function(t,e){var i=Db(),o=Tb();for(var n in e=t.exports=function(t,e){return new o(e).process(t)},e.FilterCSS=o,i)e[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=t.exports)}(Cb,Cb.exports)),Cb.exports}function Eb(){return bb?vb:(bb=1,vb={indexOf:function(t,e){var i,o;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,o=t.length;i<o;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var o,n;if(Array.prototype.forEach)return t.forEach(e,i);for(o=0,n=t.length;o<n;o++)e.call(i,t[o],o,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 Ib(){if(yb)return xb;yb=1;var t=Ob().FilterCSS,e=Ob().getDefaultWhiteList,i=Eb();function o(){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 n=new t;function s(t){return t.replace(r,"&lt;").replace(a,"&gt;")}var r=/</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="",o=0,n=t.length;o<n;o++)e+=t.charCodeAt(o)<32?" ":t.charAt(o);return i.trim(e)}function _(t){return t=w(t=y(t=b(t=v(t))))}function x(t){return t=s(t=g(t))}return xb.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"]},xb.getDefaultWhiteList=o,xb.onTag=function(t,e,i){},xb.onIgnoreTag=function(t,e,i){},xb.onTagAttr=function(t,e,i){},xb.onIgnoreTagAttr=function(t,e,i){},xb.safeAttrValue=function(t,e,o,s){if(o=_(o),"href"===e||"src"===e){if("#"===(o=i.trim(o)))return"#";if("http://"!==o.substr(0,7)&&"https://"!==o.substr(0,8)&&"mailto:"!==o.substr(0,7)&&"tel:"!==o.substr(0,4)&&"data:image/"!==o.substr(0,11)&&"ftp://"!==o.substr(0,6)&&"./"!==o.substr(0,2)&&"../"!==o.substr(0,3)&&"#"!==o[0]&&"/"!==o[0])return""}else if("background"===e){if(p.lastIndex=0,p.test(o))return""}else if("style"===e){if(m.lastIndex=0,m.test(o))return"";if(f.lastIndex=0,f.test(o)&&(p.lastIndex=0,p.test(o)))return"";!1!==s&&(o=(s=s||n).process(o))}return o=x(o)},xb.escapeHtml=s,xb.escapeQuote=g,xb.unescapeQuote=v,xb.escapeHtmlEntities=b,xb.escapeDangerHtml5Entities=y,xb.clearNonPrintableCharacter=w,xb.friendlyAttrValue=_,xb.escapeAttrValue=x,xb.onIgnoreTagStripAll=function(){return""},xb.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var o=!Array.isArray(t),n=[],s=!1;return{onIgnoreTag:function(r,a,h){if(function(e){return!!o||-1!==i.indexOf(t,e)}(r)){if(h.isClosing){var l="[/removed]",c=h.position+10;return n.push([!1!==s?s:h.position,c]),s=!1,l}return s||(s=h.position),"[removed]"}return e(r,a,h)},remove:function(t){var e="",o=0;return i.forEach(n,function(i){e+=t.slice(o,i[0]),o=i[1]}),e+=t.slice(o)}}},xb.stripCommentTag=function(t){for(var e="",i=0;i<t.length;){var o=t.indexOf("\x3c!--",i);if(-1===o){e+=t.slice(i);break}e+=t.slice(i,o);var n=t.indexOf("--\x3e",o);if(-1===n)break;i=n+3}return e},xb.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("")},xb.attributeWrapSign='"',xb.cssFilter=n,xb.getDefaultCSSWhiteList=e,xb}var Pb,Ab,Mb,Nb,Fb={};function Rb(){if(Pb)return Fb;Pb=1;var t=Eb();function e(e){var i,o=t.spaceIndex(e);return i=-1===o?e.slice(1,-1):e.slice(1,o+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 o=/[^a-zA-Z0-9\\_:.-]/gim;function n(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}}function s(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}}function r(t,e){for(;e>0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function a(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}return Fb.parseTag=function(t,o,n){var s="",r=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){s+=n(t.slice(r,l)),a=l,r=l;continue}if(">"===p||l===c-1){s+=n(t.slice(r,a)),d=e(u=t.slice(a,l+1)),s+=o(a,s.length,d,u,i(u)),r=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 r<c&&(s+=n(t.substr(r))),s},Fb.parseAttr=function(e,i){var h=0,l=0,c=[],d=!1,u=e.length;function p(e,n){if(!((e=(e=t.trim(e)).replace(o,"").toLowerCase()).length<1)){var s=i(e,n||"");s&&c.push(s)}}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=n(e,m))){p(t.trim(e.slice(h,m))),d=!1,h=m+1;continue}m=f-1;continue}if(-1===(f=r(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:s(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(" "))},Fb}function Lb(){if(Mb)return Ab;Mb=1;var t=Ob().FilterCSS,e=Ib(),i=Rb(),o=i.parseTag,n=i.parseAttr,s=Eb();function r(t){return null==t}function a(i){(i=function(t){var e={};for(var i in t)e[i]=t[i];return e}(i||{})).stripIgnoreTag&&(i.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),i.onIgnoreTag=e.onIgnoreTagStripAll),i.whiteList||i.allowList?i.whiteList=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i.toLowerCase()]=t[i].map(function(t){return t.toLowerCase()}):e[i.toLowerCase()]=t[i];return e}(i.whiteList||i.allowList):i.whiteList=e.whiteList,this.attributeWrapSign=!0===i.singleQuotedAttributeValue?"'":e.attributeWrapSign,i.onTag=i.onTag||e.onTag,i.onTagAttr=i.onTagAttr||e.onTagAttr,i.onIgnoreTag=i.onIgnoreTag||e.onIgnoreTag,i.onIgnoreTagAttr=i.onIgnoreTagAttr||e.onIgnoreTagAttr,i.safeAttrValue=i.safeAttrValue||e.safeAttrValue,i.escapeHtml=i.escapeHtml||e.escapeHtml,this.options=i,!1===i.css?this.cssFilter=!1:(i.css=i.css||{},this.cssFilter=new t(i.css))}return a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var i=this,a=i.options,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=o(t,function(t,e,i,o,a){var v={sourcePosition:t,position:e,isClosing:a,isWhite:Object.prototype.hasOwnProperty.call(h,i)},b=l(i,o,v);if(!r(b))return b;if(v.isWhite){if(v.isClosing)return"</"+i+">";var y=function(t){var e=s.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=s.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=s.trim(t.slice(0,-1))),{html:t,closing:i}}(o),w=h[i],_=n(y.html,function(t,e){var o=-1!==s.indexOf(w,t),n=d(i,t,e,o);return r(n)?o?(e=p(i,t,e,g))?t+"="+f+e+f:t:r(n=u(i,t,e,o))?void 0:n:n});return o="<"+i,_&&(o+=" "+_),y.closing&&(o+=" /"),o+=">"}return r(b=c(i,o,v))?m(o):b},m);return v&&(b=v.remove(b)),b},Ab=a}var jb=(Nb||(Nb=1,function(t,e){var i=Ib(),o=Rb(),n=Lb();function s(t,e){return new n(e).process(t)}(e=t.exports=s).filterXSS=s,e.FilterXSS=n,function(){for(var t in i)e[t]=i[t];for(var n in o)e[n]=o[n]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(_b,_b.exports)),_b.exports),zb=r(jb);const Bb=[];for(let t=0;t<256;++t)Bb.push((t+256).toString(16).slice(1));let Hb;const Gb=new Uint8Array(16);var Wb={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Yb(t,e,i){const o=(t=t||{}).random??t.rng?.()??function(){if(!Hb){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Hb=crypto.getRandomValues.bind(crypto)}return Hb(Gb)}();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=15&o[6]|64,o[8]=63&o[8]|128,function(t,e=0){return(Bb[t[e+0]]+Bb[t[e+1]]+Bb[t[e+2]]+Bb[t[e+3]]+"-"+Bb[t[e+4]]+Bb[t[e+5]]+"-"+Bb[t[e+6]]+Bb[t[e+7]]+"-"+Bb[t[e+8]]+Bb[t[e+9]]+"-"+Bb[t[e+10]]+Bb[t[e+11]]+Bb[t[e+12]]+Bb[t[e+13]]+Bb[t[e+14]]+Bb[t[e+15]]).toLowerCase()}(o)}function Vb(t,e,i){return Wb.randomUUID&&!t?Wb.randomUUID():Yb(t)}function Ub(t,e){var i=Qc(t);if(Qs){var o=Qs(t);e&&(o=cr(o).call(o,function(e){return kr(t,e).enumerable})),i.push.apply(i,o)}return i}function Xb(t){for(var e=1;e<arguments.length;e++){var i,o,n=null!=arguments[e]?arguments[e]:{};e%2?Ko(i=Ub(Object(n),!0)).call(i,function(e){sc(t,e,n[e])}):jr?ta(t,jr(n)):Ko(o=Ub(Object(n))).call(o,function(e){ed(t,e,kr(n,e))})}return t}function qb(t){var i;if(!t)return!1;let o=null!==(i=t.idProp)&&void 0!==i?i:t._idProp;return!!o&&e(o,t)}const Kb=/^\/?Date\((-?\d+)/i,$b=/^\d+$/;function Zb(e,i){let o;if(void 0!==e){if(null===e)return null;if(!i)return e;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(e);case"number":case"Number":return Ov(e)&&!isNaN(Date.parse(e))?t(e).valueOf():Number(e.valueOf());case"string":case"String":return String(e);case"Date":try{return Zb(e,"Moment").toDate()}catch(t){throw t instanceof TypeError?new TypeError("Cannot convert object of type "+Mv(e)+" to type "+i):t}case"Moment":if(Tv(e))return t(e);if(e instanceof Date)return t(e.valueOf());if(t.isMoment(e))return t(e);if(Ov(e))return o=Kb.exec(e),o?t(Number(o[1])):(o=$b.exec(e),t(o?Number(e):e));throw new TypeError("Cannot convert object of type "+Mv(e)+" to type "+i);case"ISODate":if(Tv(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(t.isMoment(e))return e.toDate().toISOString();if(Ov(e))return o=Kb.exec(e),o?new Date(Number(o[1])).toISOString():t(e).format();throw new Error("Cannot convert object of type "+Mv(e)+" to type ISODate");case"ASPDate":if(Tv(e))return"/Date("+e+")/";if(e instanceof Date||t.isMoment(e))return"/Date("+e.valueOf()+")/";if(Ov(e)){let t;return o=Kb.exec(e),t=o?new Date(Number(o[1])).valueOf():new Date(e).valueOf(),"/Date("+t+")/"}throw new Error("Cannot convert object of type "+Mv(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(i))}}}function Qb(t){var e,n,s,r,a,h;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"};const c=t._idProp,d=new i({fieldId:c}),u=Ac(e=o(t)).call(e,t=>{var e;return Uc(e=Qc(t)).call(e,(e,i)=>(e[i]=Zb(t[i],l[i]),e),{})}).to(d);return u.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:Ni(n=Ko(d)).call(n,d),get:Ni(s=d.get).call(s,d),getIds:Ni(r=d.getIds).call(r,d),off:Ni(a=d.off).call(a,d),on:Ni(h=d.on).call(h,d),get length(){return d.length},idProp:c,type:l,rawDS:t,coercedDS:d,dispose:()=>u.stop()}}const Jb=t=>{const e=new zb.FilterXSS(t);return t=>"string"==typeof t?e.process(t):t},ty=t=>t;let ey=Jb();const iy=Xb(Xb({},wb),{},{convert:Zb,setupXSSProtection:t=>{t&&(!0===t.disabled?(ey=ty,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(ey=Jb(t.filterOptions)))}});ed(iy,"xss",{get:function(){return ey}});var oy,ny,sy,ry,ay,hy,ly,cy,dy,uy={};function py(){if(ny)return oy;ny=1;var t=C(),e=S(),i=T(),o=en(),n=nm().trim,s=om(),r=i("".charAt),a=t.parseFloat,h=t.Symbol,l=h&&h.iterator,c=1/a(s+"-0")!=-1/0||l&&!e(function(){a(Object(l))});return oy=c?function(t){var e=n(o(t)),i=a(e);return 0===i&&"-"===r(e,0)?-0:i}:a,oy}function my(){return ay?ry:(ay=1,function(){if(sy)return uy;sy=1;var t=ti(),e=py();t({global:!0,forced:parseFloat!==e},{parseFloat:e})}(),ry=Et().parseFloat)}function fy(){return ly?hy:(ly=1,hy=my())}var gy=r(dy?cy:(dy=1,cy=fy()));class vy{constructor(){this.options=null,this.props=null}setOptions(t){t&&iy.extend(this.options,t)}redraw(){return!1}destroy(){}_isResized(){const t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t}}var by,yy,wy,_y,xy,Cy,Sy,Dy,ky;function Ty(){return wy?yy:(wy=1,by||(by=1,ti()({target:"String",proto:!0},{repeat:sf()})),yy=Ci()("String","repeat"))}function Oy(){if(xy)return _y;xy=1;var t=Pt(),e=Ty(),i=String.prototype;return _y=function(o){var n=o.repeat;return"string"==typeof o||o===i||t(i,o)&&n===i.repeat?e:n},_y}function Ey(){return Sy?Cy:(Sy=1,Cy=Oy())}var Iy,Py,Ay,My,Ny,Fy,Ry,Ly,jy,zy,By,Hy,Gy,Wy,Yy,Vy,Uy,Xy=r(ky?Dy:(ky=1,Dy=Ey())),qy={};function Ky(){if(Py)return Iy;Py=1;var t=_i(),e=Math.floor,i=function(o,n){var s=o.length;if(s<8)for(var r,a,h=1;h<s;){for(a=h,r=o[h];a&&n(o[a-1],r)>0;)o[a]=o[--a];a!==h++&&(o[a]=r)}else for(var l=e(s/2),c=i(t(o,0,l),n),d=i(t(o,l),n),u=c.length,p=d.length,m=0,f=0;m<u||f<p;)o[m+f]=m<u&&f<p?n(c[m],d[f])<=0?c[m++]:d[f++]:m<u?c[m++]:d[f++];return o};return Iy=i}function $y(){if(My)return Ay;My=1;var t=At().match(/firefox\/(\d+)/i);return Ay=!!t&&+t[1]}function Zy(){return Fy?Ny:(Fy=1,Ny=/MSIE|Trident/.test(At()))}function Qy(){if(Ly)return Ry;Ly=1;var t=At().match(/AppleWebKit\/(\d+)\./);return Ry=!!t&&+t[1]}function Jy(){if(jy)return qy;jy=1;var t=ti(),e=T(),i=jt(),o=we(),n=jo(),s=pu(),r=en(),a=S(),h=Ky(),l=Yo(),c=$y(),d=Zy(),u=Mt(),p=Qy(),m=[],f=e(m.sort),g=e(m.push),v=a(function(){m.sort(void 0)}),b=a(function(){m.sort(null)}),y=l("sort"),w=!a(function(){if(u)return u<70;if(!(c&&c>3)){if(d)return!0;if(p)return p<603;var t,e,i,o,n="";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(o=0;o<47;o++)m.push({k:e+o,v:i})}for(m.sort(function(t,e){return e.v-t.v}),o=0;o<m.length;o++)e=m[o].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});return t({target:"Array",proto:!0,forced:v||!b||!y||!w},{sort:function(t){void 0!==t&&i(t);var e=o(this);if(w)return void 0===t?f(e):f(e,t);var a,l,c=[],d=n(e);for(l=0;l<d;l++)l in e&&g(c,e[l]);for(h(c,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:r(e)>r(i)?1:-1}}(t)),a=n(c),l=0;l<a;)e[l]=c[l++];for(;l<d;)s(e,l++);return e}}),qy}function tw(){return By?zy:(By=1,Jy(),zy=Ci()("Array","sort"))}function ew(){if(Gy)return Hy;Gy=1;var t=Pt(),e=tw(),i=Array.prototype;return Hy=function(o){var n=o.sort;return o===i||t(i,o)&&n===i.sort?e:n},Hy}function iw(){return Yy?Wy:(Yy=1,Wy=ew())}var ow=r(Uy?Vy:(Uy=1,Vy=iw()));function nw(t,e,i){if(i&&!yi(i))return nw(t,e,[i]);if(e.hiddenDates=[],i&&1==yi(i)){var o;for(let o=0;o<i.length;o++)if(void 0===Xy(i[o])){const n={};n.start=t(i[o].start).toDate().valueOf(),n.end=t(i[o].end).toDate().valueOf(),e.hiddenDates.push(n)}ow(o=e.hiddenDates).call(o,(t,e)=>t.start-e.start)}}function sw(t,e,i){if(i&&!yi(i))return sw(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){nw(t,e,i);const o=t(e.range.start),n=t(e.range.end),s=(e.range.end-e.range.start)/e.domProps.centerContainer.width;for(let r=0;r<i.length;r++)if(void 0!==Xy(i[r])){let a=t(i[r].start),h=t(i[r].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: ".concat(i[r].start));if("Invalid Date"==h._d)throw new Error("Supplied end date is not valid: ".concat(i[r].end));if(h-a>=4*s){let t=0,s=n.clone();switch(Xy(i[r])){case"daily":a.day()!=h.day()&&(t=1),a=a.dayOfYear(o.dayOfYear()).year(o.year()).subtract(7,"days"),h=h.dayOfYear(o.dayOfYear()).year(o.year()).subtract(7-t,"days"),s.add(1,"weeks");break;case"weekly":{const t=h.diff(a,"days"),e=a.day();a=a.date(o.date()).month(o.month()).year(o.year()),h=a.clone(),a=a.day(e).subtract(1,"weeks"),h=h.day(e).add(t,"days").subtract(1,"weeks"),s.add(1,"weeks");break}case"monthly":a.month()!=h.month()&&(t=1),a=a.month(o.month()).year(o.year()).subtract(1,"months"),h=h.month(o.month()).year(o.year()).subtract(1,"months").add(t,"months"),s.add(1,"months");break;case"yearly":a.year()!=h.year()&&(t=1),a=a.year(o.year()).subtract(1,"years"),h=h.year(o.year()).subtract(1,"years").add(t,"years"),s.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",Xy(i[r]))}for(;a<s;)switch(e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()}),Xy(i[r])){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:",Xy(i[r]))}e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()})}}rw(e);const r=gw(e.range.start,e.hiddenDates),a=gw(e.range.end,e.hiddenDates);let h=e.range.start,l=e.range.end;1==r.hidden&&(h=1==e.range.startToFront?r.startDate-1:r.endDate+1),1==a.hidden&&(l=1==e.range.endToFront?a.startDate-1:a.endDate+1),1!=r.hidden&&1!=a.hidden||e.range._applyRange(h,l)}}function rw(t){var e;const i=t.hiddenDates,o=[];for(var n=0;n<i.length;n++)for(let t=0;t<i.length;t++)n!=t&&1!=i[t].remove&&1!=i[n].remove&&(i[t].start>=i[n].start&&i[t].end<=i[n].end?i[t].remove=!0:i[t].start>=i[n].start&&i[t].start<=i[n].end?(i[n].end=i[t].end,i[t].remove=!0):i[t].end>=i[n].start&&i[t].end<=i[n].end&&(i[n].start=i[t].start,i[t].remove=!0));for(n=0;n<i.length;n++)!0!==i[n].remove&&o.push(i[n]);t.hiddenDates=o,ow(e=t.hiddenDates).call(e,(t,e)=>t.start-e.start)}function aw(t,e,i){let o=!1;const n=e.current.valueOf();for(let t=0;t<e.hiddenDates.length;t++){const i=e.hiddenDates[t].start;var s=e.hiddenDates[t].end;if(n>=i&&n<s){o=!0;break}}if(1==o&&n<e._end.valueOf()&&n!=i){const o=t(i),n=t(s);o.year()!=n.year()?e.switchedYear=!0:o.month()!=n.month()?e.switchedMonth=!0:o.dayOfYear()!=n.dayOfYear()&&(e.switchedDay=!0),e.current=n}}function hw(t,e,i){let o;if(0==t.body.hiddenDates.length)return o=t.range.conversion(i),(e.valueOf()-o.offset)*o.scale;{const n=gw(e,t.body.hiddenDates);1==n.hidden&&(e=n.startDate);const s=cw(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){o=t.range.conversion(i,s);const n=dw(t.body.hiddenDates,e,o.offset);return e=t.options.moment(e).toDate().valueOf(),e+=n,-(o.offset-e.valueOf())*o.scale}if(e>t.range.end){const n={start:t.range.start,end:e};return e=uw(t.options.moment,t.body.hiddenDates,n,e),o=t.range.conversion(i,s),(e.valueOf()-o.offset)*o.scale}return e=uw(t.options.moment,t.body.hiddenDates,t.range,e),o=t.range.conversion(i,s),(e.valueOf()-o.offset)*o.scale}}function lw(t,e,i){if(0==t.body.hiddenDates.length){const o=t.range.conversion(i);return new Date(e/o.scale+o.offset)}{const o=cw(t.body.hiddenDates,t.range.start,t.range.end),n=(t.range.end-t.range.start-o)*e/i,s=mw(t.body.hiddenDates,t.range,n);return new Date(s+n+t.range.start)}}function cw(t,e,i){let o=0;for(let n=0;n<t.length;n++){const s=t[n].start,r=t[n].end;s>=e&&r<i&&(o+=r-s)}return o}function dw(t,e,i){let o=0;for(let n=0;n<t.length;n++){const s=t[n].start,r=t[n].end;s>=e&&r<=i&&(o+=r-s)}return o}function uw(t,e,i,o){return o=t(o).toDate().valueOf(),o-=pw(t,e,i,o)}function pw(t,e,i,o){let n=0;o=t(o).toDate().valueOf();for(let t=0;t<e.length;t++){const s=e[t].start,r=e[t].end;s>=i.start&&r<i.end&&o>=r&&(n+=r-s)}return n}function mw(t,e,i){let o=0,n=0,s=e.start;for(let r=0;r<t.length;r++){const a=t[r].start,h=t[r].end;if(a>=e.start&&h<e.end){if(n+=a-s,s=h,n>=i)break;o+=h-a}}return o}function fw(t,e,i,o){const n=gw(e,t);return 1==n.hidden?i<0?1==o?n.startDate-(n.endDate-e)-1:n.startDate-1:1==o?n.endDate+(e-n.startDate)+1:n.endDate+1:e}function gw(t,e){for(let n=0;n<e.length;n++){var i=e[n].start,o=e[n].end;if(t>=i&&t<o)return{hidden:!0,startDate:i,endDate:o}}return{hidden:!1,startDate:i,endDate:o}}var vw=Object.freeze({__proto__:null,convertHiddenOptions:nw,correctTimeForHidden:uw,getAccumulatedHiddenDuration:mw,getHiddenDurationBefore:pw,getHiddenDurationBeforeStart:dw,getHiddenDurationBetween:cw,getIsHidden:gw,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:rw,snapAwayFromHidden:fw,stepOverHiddenDates:aw,toScreen:hw,toTime:lw,updateHiddenDates:sw});class bw extends vy{constructor(t,e){var i,o,n,s,r,a,h;super();const l=$o().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:$o,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=iy.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",Ni(i=this._onDragStart).call(i,this)),this.body.emitter.on("panmove",Ni(o=this._onDrag).call(o,this)),this.body.emitter.on("panend",Ni(n=this._onDragEnd).call(n,this)),this.body.emitter.on("mousewheel",Ni(s=this._onMouseWheel).call(s,this)),this.body.emitter.on("touch",Ni(r=this._onTouch).call(r,this)),this.body.emitter.on("pinch",Ni(a=this._onPinch).call(a,this)),this.body.dom.rollingModeBtn.addEventListener("click",Ni(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"];iy.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 o=iy.convert(new Date,"Date").valueOf(),n=t.options.rollingMode&&t.options.rollingMode.offset||.5,s=o-i*n,r=o+i*(1-n);t.setRange(s,r,{animation:!1}),i=1/t.conversion(t.body.domProps.center.width).scale/10,i<30&&(i=30),i>1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=Ji(e,i)}()}stopRolling(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}setRange(t,e,i,o,n){i||(i={}),!0!==i.byUser&&(i.byUser=!1);const s=this,r=null!=t?iy.convert(t,"Date").valueOf():null,a=null!=e?iy.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=iy.easingFunctions[d];var h;if(!u)throw new Error(Lp(h="Unknown easing function ".concat(_f(d),". Choose from: ")).call(h,Qc(iy.easingFunctions).join(", ")));const p=Ud();let m=!1;const f=()=>{if(!s.props.touch.dragging){const h=Ud()-p,d=u(h/c),g=h>c,v=g||null===r?r:t+(r-t)*d,b=g||null===a?a:e+(a-e)*d;l=s._applyRange(v,b),sw(s.options.moment,s.body,s.options.hiddenDates),m=m||l;const y={start:new Date(s.start),end:new Date(s.end),byUser:i.byUser,event:i.event};if(n&&n(d,l,g),l&&s.body.emitter.emit("rangechange",y),g){if(m&&(s.body.emitter.emit("rangechanged",y),o))return o()}else s.animationTimer=Ji(f,20)}};return f()}var l=this._applyRange(r,a);if(sw(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(s.timeoutID),s.timeoutID=Ji(()=>{s.body.emitter.emit("rangechanged",t)},200),o)return o()}}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?iy.convert(t,"Date").valueOf():this.start,o=null!=e?iy.convert(e,"Date").valueOf():this.end;const n=null!=this.options.max?iy.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?iy.convert(this.options.min,"Date").valueOf():null;let r;if(isNaN(i)||null===i)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(o)||null===o)throw new Error('Invalid end "'.concat(e,'"'));if(o<i&&(o=i),null!==s&&i<s&&(r=s-i,i+=r,o+=r,null!=n&&o>n&&(o=n)),null!==n&&o>n&&(r=o-n,i-=r,o-=r,null!=s&&i<s&&(i=s)),null!==this.options.zoomMin){let t=gy(this.options.zoomMin);if(t<0&&(t=0),o-i<t){const e=.5;this.end-this.start===t&&i>=this.start-e&&o<=this.end?(i=this.start,o=this.end):(r=t-(o-i),i-=r/2,o+=r/2)}}if(null!==this.options.zoomMax){let t=gy(this.options.zoomMax);t<0&&(t=0),o-i>t&&(this.end-this.start===t&&i<this.start&&o>this.end?(i=this.start,o=this.end):(r=o-i-t,i+=r/2,o-=r/2))}const a=this.start!=i||this.end!=o;return i>=this.start&&i<=this.end||o>=this.start&&o<=this.end||this.start>=i&&this.start<=o||this.end>=i&&this.end<=o||this.body.emitter.emit("checkRangedItems"),this.start=i,this.end=o,a}getRange(){return{start:this.start,end:this.end}}conversion(t,e){return bw.conversion(this.start,this.end,t,e)}static conversion(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{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;yw(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let o=this.props.touch.end-this.props.touch.start;o-=cw(this.body.hiddenDates,this.start,this.end);const n="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;let s;s=this.options.rtl?i/n*o:-i/n*o;const r=this.props.touch.start+s,a=this.props.touch.end+s,h=fw(this.body.hiddenDates,r,this.previousDelta-i,!0),l=fw(this.body.hiddenDates,a,this.previousDelta-i,!0);if(h!=r||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(r,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 o,n;if(o=e<0?1-e/i:1/(1+e/i),this.rolling){const t=this.options.rollingMode&&this.options.rollingMode.offset||.5;n=this.start+(this.end-this.start)*t}else{const e=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);n=this._pointerToDate(e)}this.zoom(o,n,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,iy.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;iy.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,o=cw(this.body.hiddenDates,this.start,this.end),n=pw(this.options.moment,this.body.hiddenDates,this,i),s=o-n;let r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;const h=fw(this.body.hiddenDates,r,1-e,!0),l=fw(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l);const c={animation:!1,byUser:!0,event:t};this.setRange(r,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(),o=this.options.rtl?e-i.left:i.right-e,n=this.body.util.toTime(o);return n>=this.start&&n<=this.end}_pointerToDate(t){let e;const i=this.options.direction;if(yw(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,o){null==e&&(e=(this.start+this.end)/2);const n=cw(this.body.hiddenDates,this.start,this.end),s=pw(this.options.moment,this.body.hiddenDates,this,e),r=n-s;let a=e-s+(this.start-(e-s))*t,h=e+r+(this.end-(e+r))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);const l=fw(this.body.hiddenDates,a,i,!0),c=fw(this.body.hiddenDates,h,-i,!0);l==a&&c==h||(a=l,h=c);const d={animation:!1,byUser:!0,event:o};this.setRange(a,h,d),this.startToFront=!1,this.endToFront=!0}move(t){const e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o}moveTo(t){const e=(this.start+this.end)/2-t,i=this.start-e,o=this.end-e;this.setRange(i,o,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}}function yw(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}var ww,_w,xw,Cw,Sw,Dw,kw,Tw,Ow,Ew={};function Iw(){return xw?_w:(xw=1,function(){if(ww)return Ew;ww=1;var t=ti(),e=Wo().some;t({target:"Array",proto:!0,forced:!Yo()("some")},{some:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),_w=Ci()("Array","some"))}function Pw(){if(Sw)return Cw;Sw=1;var t=Pt(),e=Iw(),i=Array.prototype;return Cw=function(o){var n=o.some;return o===i||t(i,o)&&n===i.some?e:n},Cw}function Aw(){return kw?Dw:(kw=1,Dw=Pw())}var Mw,Nw,Fw,Rw,Lw=r(Ow?Tw:(Ow=1,Tw=Aw()));function jw(){return Nw?Mw:(Nw=1,Xi(),Mw=Et().setInterval)}var zw=r(Rw?Fw:(Rw=1,Fw=jw())),Bw=null;let Hw;if("undefined"!=typeof window){Hw=function t(e,i){var o=i||{preventDefault:!1};if(e.Manager){var n=e,s=function(e,i){var s=Object.create(o);return i&&n.assign(s,i),t(new n(e,s),s)};return n.assign(s,n),s.Manager=function(e,i){var s=Object.create(o);return i&&n.assign(s,i),t(new n.Manager(e,s),s)},s}var r=Object.create(e),a=e.element;function h(t){return t.match(/[^ ]+/g)}function l(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=Bw;for(var o=Bw.isConnected?Bw:t.target;o&&!e;){var n=o.hammer;if(n)for(var s,r=0;r<n.length;r++)if(s=n[r]._handlers[t.type])for(var a=0;a<s.length&&!e;a++)s[a](t);o=o.parentNode}}return a.hammer||(a.hammer=[]),a.hammer.push(r),e.on("hammer.input",function(t){!0!==o.preventDefault&&o.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(Bw=t.target)}),r._handlers={},r.on=function(t,i){return h(t).forEach(function(t){var o=r._handlers[t];o||(r._handlers[t]=o=[],e.on(t,l)),o.push(i)}),r},r.off=function(t,i){return h(t).forEach(function(t){var o=r._handlers[t];o&&((o=i?o.filter(function(t){return t!==i}):[]).length>0?r._handlers[t]=o:(e.off(t,l),delete r._handlers[t]))}),r},r.emit=function(t,i){Bw=i.target,e.emit(t,i)},r.destroy=function(){var t=e.element.hammer,i=t.indexOf(r);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,r._handlers={},e.destroy()},r}(window.Hammer||mv,{preventDefault:"mouse"})}else Hw=function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};var Gw=Hw;function Ww(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}class Yw{constructor(t,e,i,o,n){this.moment=n&&n.moment||$o,this.options=n||{},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,yi(o)?this.hiddenDates=o:this.hiddenDates=null!=o?[o]:[],this.format=Yw.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=iy.deepExtend({},Yw.FORMAT);this.format=iy.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()):Ud(),this._end=null!=e?this.moment(e.valueOf()):Ud(),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(fw(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,aw(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,o=864e5,n=36e5,s=6e4,r=1e3;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),6048e5>t&&this.options.showWeekScale&&(this.scale="week",this.step=1),1728e5>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}static snap(t,e,i){let o=$o(t);if("year"==e){const t=o.year()+Math.round(o.month()/12);o=o.year(Math.round(t/i)*i).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if("month"==e)o=o.date()>15?o.date(1).add(1,"month"):o.date(1),o=o.hours(0).minutes(0).seconds(0).milliseconds(0);else if("week"==e)o=o.weekday()>2?o.weekday(0).add(1,"week"):o.weekday(0),o=o.hours(0).minutes(0).seconds(0).milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o=o.hours(24*Math.round(o.hours()/24));break;default:o=o.hours(12*Math.round(o.hours()/12))}o=o.minutes(0).seconds(0).milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o=o.hours(12*Math.round(o.hours()/12));break;default:o=o.hours(6*Math.round(o.hours()/6))}o=o.minutes(0).seconds(0).milliseconds(0)}else if("hour"==e){if(4===i)o=o.minutes(60*Math.round(o.minutes()/60));else o=o.minutes(30*Math.round(o.minutes()/30));o=o.seconds(0).milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o=o.minutes(5*Math.round(o.minutes()/5)).seconds(0);break;case 5:o=o.seconds(60*Math.round(o.seconds()/60));break;default:o=o.seconds(30*Math.round(o.seconds()/30))}o=o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o=o.seconds(5*Math.round(o.seconds()/5)).milliseconds(0);break;case 5:o=o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o=o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){const t=i>5?i/2:1;o=o.milliseconds(Math.round(o.milliseconds()/t)*t)}return o}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),o=i.locale?i.locale("en"):i.lang("en"),n=this.step,s=[];function r(t){return t/n%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(Ud(),"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(Ud(),"week")?" vis-current-week":""}function l(t){return t.isSame(Ud(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":s.push(a(o)),s.push(r(o.milliseconds()));break;case"second":s.push(a(o)),s.push(r(o.seconds()));break;case"minute":s.push(a(o)),s.push(r(o.minutes()));break;case"hour":s.push(Lp(t="vis-h".concat(o.hours())).call(t,4==this.step?"-h"+(o.hours()+4):"")),s.push(a(o)),s.push(r(o.hours()));break;case"weekday":s.push("vis-".concat(o.format("dddd").toLowerCase())),s.push(a(o)),s.push(h(o)),s.push(r(o.date()));break;case"day":s.push("vis-day".concat(o.date())),s.push("vis-".concat(o.format("MMMM").toLowerCase())),s.push(a(o)),s.push(l(o)),s.push(this.step<=2?a(o):""),s.push(this.step<=2?"vis-".concat(o.format("dddd").toLowerCase()):""),s.push(r(o.date()-1));break;case"week":s.push("vis-week".concat(o.format("w"))),s.push(h(o)),s.push(r(o.week()));break;case"month":s.push("vis-".concat(o.format("MMMM").toLowerCase())),s.push(l(o)),s.push(r(o.month()));break;case"year":s.push("vis-year".concat(o.year())),s.push(function(t){return t.isSame(Ud(),"year")?" vis-current-year":""}(o)),s.push(r(o.year()))}return cr(s).call(s,String).join(" ")}}Yw.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};class Vw extends vy{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:iy.extend({},Yw.FORMAT),moment:$o,timeAxis:null},this.options=iy.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(iy.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),iy.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 $o.locale?$o.locale(t.locale):$o.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,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();const s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;const a=e.nextSibling,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?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n}_repaintLabels(){const t=this.options.orientation.axis,e=iy.convert(this.body.range.start,"Number"),i=iy.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let n=o-pw(this.options.moment,this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();const s=new Yw(new Date(e),new Date(i),n,this.body.hiddenDates,this.options);s.setMoment(this.options.moment),this.options.format&&s.setFormat(this.options.format),this.options.timeAxis&&s.setScale(this.options.timeAxis),this.step=s;const r=this.dom;let a,h,l,c,d,u;r.redundant.lines=r.lines,r.redundant.majorTexts=r.majorTexts,r.redundant.minorTexts=r.minorTexts,r.lines=[],r.majorTexts=[],r.minorTexts=[];let p,m,f,g=0,v=0;const b=1e3;let y;for(s.start(),h=s.getCurrent(),c=this.body.util.toScreen(h);s.hasNext()&&v<b;){if(v++,d=s.isMajor(),y=s.getClassName(),a=h,l=c,s.next(),h=s.getCurrent(),c=this.body.util.toScreen(h),p=g,g=c-l,"week"===s.scale)u=!0;else u=g>=.4*p;if(this.options.showMinorLabels&&u){var w=this._repaintMinorText(l,s.getLabelMinor(a),t,y);w.style.width="".concat(g,"px")}d&&this.options.showMajorLabels?(l>0&&(null==f&&(f=l),w=this._repaintMajorText(l,s.getLabelMajor(a),t,y)),m=this._repaintMajorLine(l,g,t,y)):u?m=this._repaintMinorLine(l,g,t,y):m&&(m.style.width="".concat(vm(m.style.width)+g,"px"))}if(v!==b||Uw||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(b," lines.")),Uw=!0),this.options.showMajorLabels){const e=this.body.util.toTime(0),i=s.getLabelMajor(e),o=i.length*(this.props.majorCharWidth||10)+10;(null==f||o<f)&&this._repaintMajorText(0,i,t,y)}Ko(iy).call(iy,this.dom.redundant,t=>{for(;t.length;){const e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})}_repaintMinorText(t,e,i,o){let n=this.dom.redundant.minorTexts.shift();if(!n){const t=document.createTextNode("");n=document.createElement("div"),n.appendChild(t),this.dom.foreground.appendChild(n)}this.dom.minorTexts.push(n),n.innerHTML=iy.xss(e);let s="top"==i?this.props.majorLabelHeight:0;return this._setXY(n,t,s),n.className="vis-text vis-minor ".concat(o),n}_repaintMajorText(t,e,i,o){let n=this.dom.redundant.majorTexts.shift();if(!n){const t=document.createElement("div");n=document.createElement("div"),n.appendChild(t),this.dom.foreground.appendChild(n)}n.childNodes[0].innerHTML=iy.xss(e),n.className="vis-text vis-major ".concat(o);let s="top"==i?0:this.props.minorLabelHeight;return this._setXY(n,t,s),this.dom.majorTexts.push(n),n}_setXY(t,e,i){var o;const n=this.options.rtl?-1*e:e;t.style.transform=Lp(o="translate(".concat(n,"px, ")).call(o,i,"px)")}_repaintMinorLine(t,e,i,o){var n;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.minorLineHeight,"px");let a="top"==i?r.majorLabelHeight:this.body.domProps.top.height,h=t-r.minorLineWidth/2;return this._setXY(s,h,a),s.className=Lp(n="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(n,o),s}_repaintMajorLine(t,e,i,o){var n;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.majorLineHeight,"px");let a="top"==i?0:this.body.domProps.top.height,h=t-r.majorLineWidth/2;return this._setXY(s,h,a),s.className=Lp(n="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(n,o),s}_calculateCharSize(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}}var Uw=!1;function Xw(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=Gw(this.dom.overlay),this.hammer.on("tap",Ni(e=this._onTapOverlay).call(e,this));var o=this,n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Ko(n).call(n,function(t){o.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)||o.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=function(){var t,e=window,i={},o={keydown:{},keyup:{}},n={};for(t=97;t<=122;t++)n[String.fromCharCode(t)]={code:t-97+65,shift:!1};for(t=65;t<=90;t++)n[String.fromCharCode(t)]={code:t,shift:!0};for(t=0;t<=9;t++)n[""+t]={code:48+t,shift:!1};for(t=1;t<=12;t++)n["F"+t]={code:111+t,shift:!1};for(t=0;t<=9;t++)n["num"+t]={code:96+t,shift:!1};n["num*"]={code:106,shift:!1},n["num+"]={code:107,shift:!1},n["num-"]={code:109,shift:!1},n["num/"]={code:111,shift:!1},n["num."]={code:110,shift:!1},n.left={code:37,shift:!1},n.up={code:38,shift:!1},n.right={code:39,shift:!1},n.down={code:40,shift:!1},n.space={code:32,shift:!1},n.enter={code:13,shift:!1},n.shift={code:16,shift:void 0},n.esc={code:27,shift:!1},n.backspace={code:8,shift:!1},n.tab={code:9,shift:!1},n.ctrl={code:17,shift:!1},n.alt={code:18,shift:!1},n.delete={code:46,shift:!1},n.pageup={code:33,shift:!1},n.pagedown={code:34,shift:!1},n["="]={code:187,shift:!1},n["-"]={code:189,shift:!1},n["]"]={code:221,shift:!1},n["["]={code:219,shift:!1};var s=function(t){a(t,"keydown")},r=function(t){a(t,"keyup")},a=function(t,e){if(void 0!==o[e][t.keyCode])for(var i=o[e][t.keyCode],n=0;n<i.length;n++)(void 0===i[n].shift||1==i[n].shift&&1==t.shiftKey||0==i[n].shift&&0==t.shiftKey)&&i[n].fn(t)};return i.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===n[t])throw new Error("unsupported key: "+t);void 0===o[i][n[t].code]&&(o[i][n[t].code]=[]),o[i][n[t].code].push({fn:e,shift:n[t].shift})},i.bindAll=function(t,e){for(var o in void 0===e&&(e="keydown"),n)n.hasOwnProperty(o)&&i.bind(o,t,e)},i.getKey=function(t){for(var e in n)if(n.hasOwnProperty(e)){if(1==t.shiftKey&&1==n[e].shift&&t.keyCode==n[e].code)return e;if(0==t.shiftKey&&0==n[e].shift&&t.keyCode==n[e].code)return e;if(t.keyCode==n[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===n[t])throw new Error("unsupported key: "+t);if(void 0!==e){var s=[],r=o[i][n[t].code];if(void 0!==r)for(var a=0;a<r.length;a++)r[a].fn==e&&r[a].shift==n[t].shift||s.push(o[i][n[t].code][a]);o[i][n[t].code]=s}else o[i][n[t].code]=[]},i.reset=function(){o={keydown:{},keyup:{}}},i.destroy=function(){o={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",r,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",r,!0),i}(),this.escListener=Ni(i=this.deactivate).call(i,this)}Pf(Xw.prototype),Xw.current=null,Xw.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},Xw.prototype.activate=function(){var t;Xw.current&&Xw.current.deactivate(),Xw.current=this,this.active=!0,this.dom.overlay.style.display="none",iy.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),Ni(t=this.keycharm).call(t,"esc",this.escListener)},Xw.prototype.deactivate=function(){Xw.current===this&&(Xw.current=null),this.active=!1,this.dom.overlay.style.display="",iy.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},Xw.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};const qw={current:"current",time:"time",deleteSelected:"Delete selected"},Kw={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},$w={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},Zw={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},Qw={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},Jw={current:"actual",time:"hora",deleteSelected:"Eliminar selección"},t_={current:"поточний",time:"час",deleteSelected:"Видалити обране"},e_={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},i_={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},o_={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},n_={current:"güncel",time:"zaman",deleteSelected:"Seçileni sil"},s_={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},r_={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},a_={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},h_={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},l_={en:qw,en_EN:qw,en_US:qw,it:Kw,it_IT:Kw,it_CH:Kw,nl:$w,nl_NL:$w,nl_BE:$w,de:Zw,de_DE:Zw,de_CH:Zw,fr:Qw,fr_FR:Qw,fr_CA:Qw,fr_BE:Qw,fr_CH:Qw,es:Jw,es_ES:Jw,uk:t_,uk_UA:t_,ru:e_,ru_RU:e_,pl:i_,pl_PL:i_,pt:o_,pt_BR:o_,pt_PT:o_,tr:n_,tr_TR:n_,ja:s_,ja_JP:s_,lt:h_,lt_LT:h_,sv:r_,sv_SE:r_,nb:a_,nn:a_,nb_NO:a_,nn_NO:a_};class c_ extends vy{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={moment:$o,locales:l_,locale:"en",id:void 0,title:void 0},this.options=iy.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=iy.extend({},l_,this.options.locales);const o=this.defaultOptions.locales[this.defaultOptions.locale];Ko(i=Qc(this.options.locales)).call(i,t=>{this.options.locales[t]=iy.extend({},o,this.options.locales[t])}),e&&null!=e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(t){t&&iy.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}_create(){var t,e,i;const o=document.createElement("div");o["custom-time"]=this,o.className="vis-custom-time ".concat(this.options.id||""),o.style.position="absolute",o.style.top="0px",o.style.height="100%",this.bar=o;const n=document.createElement("div");function s(t){this.body.range._onMouseWheel(t)}n.style.position="relative",n.style.top="0px",this.options.rtl?n.style.right="-10px":n.style.left="-10px",n.style.height="100%",n.style.width="20px",n.addEventListener?(n.addEventListener("mousewheel",Ni(s).call(s,this),!1),n.addEventListener("DOMMouseScroll",Ni(s).call(s,this),!1)):n.attachEvent("onmousewheel",Ni(s).call(s,this)),o.appendChild(n),this.hammer=new Gw(n),this.hammer.on("panstart",Ni(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",Ni(e=this._onDrag).call(e,this)),this.hammer.on("panend",Ni(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:Gw.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 o=this.options.title;var n;void 0===o?(o=Lp(n="".concat(i.time,": ")).call(n,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")),o=o.charAt(0).toUpperCase()+o.substring(1)):"function"==typeof o&&(o=o.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=o,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(t){this.customTime=iy.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=iy.xss(t),this.marker.style.position="absolute",e)&&(this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",()=>{this.marker.focus()}),this.marker.addEventListener("input",Ni(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,o=this.body.util.toTime(i),n=this.body.util.getScale(),s=this.body.util.getStep(),r=this.options.snap,a=r?r(o,n,s):o;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}_onDragEnd(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())}_onMarkerChange(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}_onMarkerChanged(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}static customTimeFromTarget(t){let e=t.target;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"custom-time"))return e["custom-time"];e=e.parentNode}return null}}class d_{_create(t){var e,i,o;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",Ni(e=this._onTouch).call(e,this)),this.on("panmove",Ni(i=this._onDrag).call(i,this));const n=this;this._origRedraw=Ni(o=this._redraw).call(o,this),this._redraw=iy.throttle(this._origRedraw),this.on("_change",t=>{n.itemSet&&n.itemSet.initialItemSetDrawn&&t&&1==t.queue?n._redraw():n._origRedraw()}),this.hammer=new Gw(this.dom.root);const s=this.hammer.get("pinch").set({enable:!0});s&&function(t){t.getTouchAction=function(){return["pan-y"]}}(s),this.hammer.get("pan").set({threshold:5,direction:Gw.DIRECTION_ALL}),this.timelineListeners={};const r=["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 o=this.options.verticalScroll,n=Math.abs(i)>=Math.abs(e),s=this.options.horizontalScroll&&this.options.horizontalScrollKey&&t[this.options.horizontalScrollKey];if(o&&n&&!s){const e=this.props.scrollTop,o=e+i;return void(this._setScrollTop(o)!==e&&(this._redraw(),this.emit("scroll",t),t.preventDefault()))}if(this.options.horizontalScroll){this.range.stopRolling();let o=(n?i:e)/120*(this.range.end-this.range.start)/20;this.options.horizontalScrollInvert&&n&&(o=-o);const s=this.range.start+o,r=this.range.end+o,a={animation:!1,byUser:!0,event:t};return this.range.setRange(s,r,a),void t.preventDefault()}}Ko(r).call(r,t=>{const e=e=>{n.isActive()&&n.emit(t,e)};n.hammer.on(t,e),n.timelineListeners[t]=e}),Ww(this.hammer,t=>{n.emit("touch",t)}),a=this.hammer,(h=t=>{n.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(n.options.verticalScroll&&(t.preventDefault(),n.isActive())){const e=-t.target.scrollTop;n._setScrollTop(e),n._redraw(),n.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(c,Ni(l).call(l,this),!1),this.dom.top.addEventListener(c,Ni(l).call(l,this),!1),this.dom.bottom.addEventListener(c,Ni(l).call(l,this),!1),this.dom.left.parentNode.addEventListener("scroll",Ni(d).call(d,this)),this.dom.right.parentNode.addEventListener("scroll",Ni(d).call(d,this));let u=!1;function p(t){var e;if(t.preventDefault&&(n.emit("dragover",n.getEventProperties(t)),t.preventDefault()),Em(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?n.itemSet._onAddItem(t):n.itemSet._onDropObjectOnItem(t),n.emit("drop",n.getEventProperties(t)),!1}if(this.dom.center.addEventListener("dragover",Ni(p).call(p,this),!1),this.dom.center.addEventListener("drop",Ni(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(iy.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 Vw(this.body,this.options);t.setOptions=e=>{const i=e?iy.extend({},e):{};i.orientation="top",Vw.prototype.setOptions.call(t,i)},this.components.push(t)}}else if(this.timeAxis2){var i;const t=Em(i=this.components).call(i,this.timeAxis2);var o;if(-1!==t)ku(o=this.components).call(o,t,1);this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&nw(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new Xw(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(Ko(e=this.components).call(e,e=>e.setOptions(t)),"configure"in t){var n;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);const e=iy.deepExtend({},this.options);Ko(n=this.components).call(n,t=>{iy.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,Ko(t=this.components).call(t,t=>t.destroy()),this.body=null}setCustomTime(t,e){var i;const o=cr(i=this.customTimes).call(i,t=>e===t.options.id);if(0===o.length)throw new Error("No custom time bar found with id ".concat(_f(e)));o.length>0&&o[0].setCustomTime(t)}getCustomTime(t){var e;const i=cr(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(_f(t)));return i[0].getCustomTime()}setCustomTimeMarker(t,e,i){var o;const n=cr(o=this.customTimes).call(o,t=>t.options.id===e);if(0===n.length)throw new Error("No custom time bar found with id ".concat(_f(e)));n.length>0&&n[0].setCustomMarker(t,i)}setCustomTimeTitle(t,e){var i;const o=cr(i=this.customTimes).call(i,t=>t.options.id===e);if(0===o.length)throw new Error("No custom time bar found with id ".concat(_f(e)));if(o.length>0)return o[0].setCustomTitle(t)}getEventProperties(t){return{event:t}}addCustomTime(t,e){var i;const o=void 0!==t?iy.convert(t,"Date"):new Date,n=Lw(i=this.customTimes).call(i,t=>t.options.id===e);if(n)throw new Error("A custom time with id ".concat(_f(e)," already exists"));const s=new c_(this.body,iy.extend({},this.options,{time:o,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(s),this.components.push(s),this._redraw(),e}removeCustomTime(t){var e;const i=cr(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(_f(t)));Ko(i).call(i,t=>{var e,i,o,n;ku(e=this.customTimes).call(e,Em(i=this.customTimes).call(i,t),1),ku(o=this.components).call(o,Em(n=this.components).call(n,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 o=i.max-i.min,n=new Date(i.min.valueOf()-.01*o),s=new Date(i.max.valueOf()+.01*o),r=!t||void 0===t.animation||t.animation;this.range.setRange(n,s,{animation:r},e)}getDataRange(){throw new Error("Cannot invoke abstract method getDataRange")}setWindow(t,e,i,o){let n,s;"function"==typeof arguments[2]&&(o=arguments[2],i={}),1==arguments.length?(s=arguments[0],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n})):2==arguments.length&&"function"==typeof arguments[1]?(s=arguments[0],o=arguments[1],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n},o)):(n=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:n},o))}moveTo(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});const o=this.range.end-this.range.start,n=iy.convert(t,"Date").valueOf(),s=n-o/2,r=n+o/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)}getWindow(){const t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}zoomIn(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=(r-r/(1+t))/2,h=n+a,l=s-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 o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=n-r*t/2,h=s+r*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 o=this.options,n=this.props;sw(this.options.moment,this.body,this.options.hiddenDates),"top"==o.orientation?(iy.addClassName(e.root,"vis-top"),iy.removeClassName(e.root,"vis-bottom")):(iy.removeClassName(e.root,"vis-top"),iy.addClassName(e.root,"vis-bottom")),o.rtl?(iy.addClassName(e.root,"vis-rtl"),iy.removeClassName(e.root,"vis-ltr")):(iy.addClassName(e.root,"vis-ltr"),iy.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=iy.option.asSize(o.maxHeight,""),e.root.style.minHeight=iy.option.asSize(o.minHeight,""),e.root.style.width=iy.option.asSize(o.width,"");const s=e.root.offsetWidth;n.border.left=1,n.border.right=1,n.border.top=1,n.border.bottom=1,n.center.height=e.center.offsetHeight,n.left.height=e.left.offsetHeight,n.right.height=e.right.offsetHeight,n.top.height=e.top.clientHeight||-n.border.top,n.bottom.height=Math.round(e.bottom.getBoundingClientRect().height)||e.bottom.clientHeight||-n.border.bottom;const r=Math.max(n.left.height,n.center.height,n.right.height),a=n.top.height+r+n.bottom.height+n.border.top+n.border.bottom;e.root.style.height=iy.option.asSize(o.height,"".concat(a,"px")),n.root.height=e.root.offsetHeight,n.background.height=n.root.height;const h=n.root.height-n.top.height-n.bottom.height;n.centerContainer.height=h,n.leftContainer.height=h,n.rightContainer.height=n.leftContainer.height,n.root.width=s,n.background.width=n.root.width,this.initialDrawDone||(n.scrollbarWidth=iy.getScrollBarWidth());const l=e.leftContainer.clientWidth,c=e.rightContainer.clientWidth;o.verticalScroll?o.rtl?(n.left.width=l||-n.border.left,n.right.width=c+n.scrollbarWidth||-n.border.right):(n.left.width=l+n.scrollbarWidth||-n.border.left,n.right.width=c||-n.border.right):(n.left.width=l||-n.border.left,n.right.width=c||-n.border.right),this._setDOM();let d=this._updateScrollTop();"top"!=o.orientation.item&&(d+=Math.max(n.centerContainer.height-n.center.height-n.border.top-n.border.bottom,0)),e.center.style.transform="translateY(".concat(d,"px)");const u=0==n.scrollTop?"hidden":"",p=n.scrollTop==n.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,o.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"),(!o.verticalScroll||n.center.height<n.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|$)")," "),n.left.width=l||-n.border.left,n.right.width=c||-n.border.right,this._setDOM());const m=n.center.height>n.centerContainer.height;this.hammer.get("pan").set({direction:m?Gw.DIRECTION_ALL:Gw.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),Ko(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 lw(this,t,this.props.center.width)}_toGlobalTime(t){return lw(this,t,this.props.root.width)}_toScreen(t){return hw(this,t,this.props.center.width)}_toGlobalScreen(t){return hw(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=iy.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=zw(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(),o=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),o!=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")}}Pf(d_.prototype);class u_ extends vy{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:$o,locales:l_,locale:"en"},this.options=iy.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=iy.extend({},l_,this.options.locales);const o=this.defaultOptions.locales[this.defaultOptions.locale];Ko(i=Qc(this.options.locales)).call(i,t=>{this.options.locales[t]=iy.extend({},o,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&&iy.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 o=this.options.moment(Ud()+this.offset);this.options.alignCurrentTime&&(o=o.startOf(this.options.alignCurrentTime));const n=this.body.util.toScreen(o);let s=this.options.locales[this.options.locale];s||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),s=this.options.locales.en);let r=Lp(t=Lp(e="".concat(s.current," ")).call(e,s.time,": ")).call(t,o.format("dddd, MMMM Do YYYY, H:mm:ss"));r=r.charAt(0).toUpperCase()+r.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(-1*n,"px)"):this.bar.style.transform="translateX(".concat(n,"px)"),this.bar.title=r}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){const t=this;!function e(){t.stop();let i=1/t.body.range.conversion(t.body.domProps.center.width).scale/10;i<30&&(i=30),i>1e3&&(i=1e3),t.redraw(),t.body.emitter.emit("currentTimeTick"),t.currentTimeTimer=Ji(e,i)}()}stop(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(t){const e=iy.convert(t,"Date").valueOf(),i=Ud();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Ud()+this.offset)}}var p_,m_,f_,g_,v_,b_,y_,w_,__,x_={};function C_(){return f_?m_:(f_=1,function(){if(p_)return x_;p_=1;var t=ti(),e=Wo().find,i=Dh(),o="find",n=!0;o in[]&&Array(1)[o](function(){n=!1}),t({target:"Array",proto:!0,forced:n},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),i(o)}(),m_=Ci()("Array","find"))}function S_(){if(v_)return g_;v_=1;var t=Pt(),e=C_(),i=Array.prototype;return g_=function(o){var n=o.find;return o===i||t(i,o)&&n===i.find?e:n},g_}function D_(){return y_?b_:(y_=1,b_=S_())}var k_,T_,O_,E_,I_,P_,A_,M_,N_,F_,R_,L_,j_,z_,B_,H_,G_,W_,Y_,V_,U_,X_,q_,K_,$_,Z_,Q_,J_,tx,ex=r(__?w_:(__=1,w_=D_())),ix={},ox={exports:{}};function nx(){return T_?k_:(T_=1,k_=S()(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}function sx(){if(E_)return O_;E_=1;var t=S(),e=Ot(),i=O(),o=nx(),n=Object.isExtensible,s=t(function(){});return O_=s||o?function(t){return!!e(t)&&((!o||"ArrayBuffer"!==i(t))&&(!n||n(t)))}:n,O_}function rx(){return P_?I_:(P_=1,I_=!S()(function(){return Object.isExtensible(Object.preventExtensions({}))}))}function ax(){if(A_)return ox.exports;A_=1;var t=ti(),e=T(),i=Dn(),o=Ot(),n=_e(),s=Qe().f,r=Fn(),a=jn(),h=sx(),l=xe(),c=rx(),d=!1,u=l("meta"),p=0,m=function(t){s(t,u,{value:{objectID:"O"+p++,weakData:{}}})},f=ox.exports={enable:function(){f.enable=function(){},d=!0;var i=r.f,o=e([].splice),n={};n[u]=1,i(n).length&&(r.f=function(t){for(var e=i(t),n=0,s=e.length;n<s;n++)if(e[n]===u){o(e,n,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!n(t,u)){if(!h(t))return"F";if(!e)return"E";m(t)}return t[u].objectID},getWeakData:function(t,e){if(!n(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)&&!n(t,u)&&m(t),t}};return i[u]=!0,ox.exports}function hx(){if(N_)return M_;N_=1;var t=Ce(),e=kh(),i=t("iterator"),o=Array.prototype;return M_=function(t){return void 0!==t&&(e.Array===t||o[i]===t)},M_}function lx(){if(R_)return F_;R_=1;var t=eo(),e=zt(),i=Dt(),o=kh(),n=Ce()("iterator");return F_=function(s){if(!i(s))return e(s,n)||e(s,"@@iterator")||o[t(s)]},F_}function cx(){if(j_)return L_;j_=1;var t=L(),e=jt(),i=Ze(),o=Lt(),n=lx(),s=TypeError;return L_=function(r,a){var h=arguments.length<2?n(r):a;if(e(h))return i(t(h,r));throw new s(o(r)+" is not iterable")},L_}function dx(){if(B_)return z_;B_=1;var t=L(),e=Ze(),i=zt();return z_=function(o,n,s){var r,a;e(o);try{if(!(r=i(o,"return"))){if("throw"===n)throw s;return s}r=t(r,o)}catch(t){a=!0,r=t}if("throw"===n)throw s;if(a)throw r;return e(r),s},z_}function ux(){if(G_)return H_;G_=1;var t=Ie(),e=L(),i=Ze(),o=Lt(),n=hx(),s=jo(),r=Pt(),a=cx(),h=lx(),l=dx(),c=TypeError,d=function(t,e){this.stopped=t,this.result=e},u=d.prototype;return H_=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){return g&&l(g,"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(o(p)+" is not iterable");if(n(v)){for(b=0,y=s(p);y>b;b++)if((w=I(p[b]))&&r(u,w))return w;return new d(!1)}g=a(p,v)}for(_=D?p.next:g.next;!(x=e(_,g)).done;){try{w=I(x.value)}catch(t){l(g,"throw",t)}if("object"==typeof w&&w&&r(u,w))return w}return new d(!1)},H_}function px(){if(Y_)return W_;Y_=1;var t=Pt(),e=TypeError;return W_=function(i,o){if(t(o,i))return i;throw new e("Incorrect invocation")},W_}function mx(){if(U_)return V_;U_=1;var t=ti(),e=C(),i=ax(),o=S(),n=Je(),s=ux(),r=px(),a=I(),h=Ot(),l=Dt(),c=ps(),d=Qe().f,u=Wo().forEach,p=R(),m=fs(),f=m.set,g=m.getterFor;return V_=function(m,v,b){var y,w=-1!==m.indexOf("Map"),_=-1!==m.indexOf("Weak"),x=w?"set":"add",C=e[m],S=C&&C.prototype,D={};if(p&&a(C)&&(_||S.forEach&&!o(function(){(new C).entries().next()}))){var k=(y=v(function(t,e){f(r(t,k),{type:m,collection:new C}),l(e)||s(e,t[x],{that:t,AS_ENTRIES:w})})).prototype,T=g(m);u(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(t){var e="add"===t||"set"===t;!(t in S)||_&&"clear"===t||n(k,t,function(i,o){var n=T(this).collection;if(!e&&_&&!h(i))return"get"===t&&void 0;var s=n[t](0===i?0:i,o);return e?this:s})}),_||d(k,"size",{configurable:!0,get:function(){return T(this).collection.size}})}else y=b.getConstructor(v,m,w,x),i.enable();return c(y,m,!1,!0),D[m]=y,t({global:!0,forced:!0},D),_||b.setStrong(y,m,w),y}}function fx(){if(q_)return X_;q_=1;var t=Un();return X_=function(e,i,o){for(var n in i)o&&o.unsafe&&e[n]?e[n]=i[n]:t(e,n,i[n],o);return e}}function gx(){if($_)return K_;$_=1;var t=It(),e=Xn(),i=Ce(),o=R(),n=i("species");return K_=function(i){var s=t(i);o&&s&&!s[n]&&e(s,n,{configurable:!0,get:function(){return this}})}}function vx(){if(Q_)return Z_;Q_=1;var t=An(),e=Xn(),i=fx(),o=Ie(),n=px(),s=Dt(),r=ux(),a=Rh(),h=Lh(),l=gx(),c=R(),d=ax().fastKey,u=fs(),p=u.set,m=u.getterFor;return Z_={getConstructor:function(a,h,l,u){var f=a(function(e,i){n(e,g),p(e,{type:h,index:t(null),first:null,last:null,size:0}),c||(e.size=0),s(i)||r(i,e[u],{that:e,AS_ENTRIES:l})}),g=f.prototype,v=m(h),b=function(t,e,i){var o,n,s=v(t),r=y(t,e);return r?r.value=i:(s.last=r={index:n=d(e,!0),key:e,value:i,previous:o=s.last,next:null,removed:!1},s.first||(s.first=r),o&&(o.next=r),c?s.size++:t.size++,"F"!==n&&(s.index[n]=r)),t},y=function(t,e){var i,o=v(t),n=d(e);if("F"!==n)return o.index[n];for(i=o.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),o=y(e,t);if(o){var n=o.next,s=o.previous;delete i.index[o.index],o.removed=!0,s&&(s.next=n),n&&(n.previous=s),i.first===o&&(i.first=n),i.last===o&&(i.last=s),c?i.size--:e.size--}return!!o},forEach:function(t){for(var e,i=v(this),n=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(n(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 o=e+" Iterator",n=m(e),s=m(o);a(t,e,function(t,e){p(this,{type:o,target:t,state:n(t),kind:e,last:null})},function(){for(var t=s(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?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)}},Z_}function bx(){return tx||(tx=1,J_||(J_=1,mx()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},vx()))),ix}var yx,wx,_x,xx,Cx,Sx,Dx,kx,Tx,Ox,Ex,Ix,Px,Ax,Mx,Nx,Fx,Rx,Lx,jx,zx,Bx,Hx,Gx={};function Wx(){if(wx)return yx;wx=1;var t=Lt(),e=TypeError;return yx=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")},yx}function Yx(){return xx||(xx=1,_x=function(t,e){return 1===e?function(e,i){return e[t](i)}:function(e,i,o){return e[t](i,o)}}),_x}function Vx(){if(Sx)return Cx;Sx=1;var t=It(),e=Yx(),i=t("Set"),o=i.prototype;return Cx={Set:i,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:o}}function Ux(){if(kx)return Dx;kx=1;var t=L();return Dx=function(e,i,o){for(var n,s,r=o?e:e.iterator,a=e.next;!(n=t(a,r)).done;)if(void 0!==(s=i(n.value)))return s},Dx}function Xx(){if(Ox)return Tx;Ox=1;var t=Ux();return Tx=function(e,i,o){return o?t(e.keys(),i,!0):e.forEach(i)},Tx}function qx(){if(Ix)return Ex;Ix=1;var t=Vx(),e=Xx(),i=t.Set,o=t.add;return Ex=function(t){var n=new i;return e(t,function(t){o(n,t)}),n},Ex}function Kx(){return Ax||(Ax=1,Px=function(t){return t.size}),Px}function $x(){return Nx?Mx:(Nx=1,Mx=function(t){return{iterator:t,next:t.next,done:!1}})}function Zx(){if(Rx)return Fx;Rx=1;var t=jt(),e=Ze(),i=L(),o=Ro(),n=$x(),s="Invalid size",r=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 n(e(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},Fx=function(t){e(t);var i=+t.size;if(i!=i)throw new a(s);var n=o(i);if(n<0)throw new r(s);return new l(t,n)}}function Qx(){if(jx)return Lx;jx=1;var t=Wx(),e=Vx(),i=qx(),o=Kx(),n=Zx(),s=Xx(),r=Ux(),a=e.has,h=e.remove;return Lx=function(e){var l=t(this),c=n(e),d=i(l);return o(l)<=c.size?s(l,function(t){c.includes(t)&&h(d,t)}):r(c.getIterator(),function(t){a(d,t)&&h(d,t)}),d}}function Jx(){return Bx?zx:(Bx=1,zx=function(){return!1})}var tC,eC,iC,oC={};function nC(){if(eC)return tC;eC=1;var t=Wx(),e=Vx(),i=Kx(),o=Zx(),n=Xx(),s=Ux(),r=e.Set,a=e.add,h=e.has;return tC=function(e){var l=t(this),c=o(e),d=new r;return i(l)>c.size?s(c.getIterator(),function(t){h(l,t)&&a(d,t)}):n(l,function(t){c.includes(t)&&a(d,t)}),d}}var sC,rC,aC,hC={};function lC(){if(rC)return sC;rC=1;var t=Wx(),e=Vx().has,i=Kx(),o=Zx(),n=Xx(),s=Ux(),r=dx();return sC=function(a){var h=t(this),l=o(a);if(i(h)<=l.size)return!1!==n(h,function(t){if(l.includes(t))return!1},!0);var c=l.getIterator();return!1!==s(c,function(t){if(e(h,t))return r(c,"normal",!1)})},sC}var cC,dC,uC,pC={};function mC(){if(dC)return cC;dC=1;var t=Wx(),e=Kx(),i=Xx(),o=Zx();return cC=function(n){var s=t(this),r=o(n);return!(e(s)>r.size)&&!1!==i(s,function(t){if(!r.includes(t))return!1},!0)}}var fC,gC,vC,bC={};function yC(){if(gC)return fC;gC=1;var t=Wx(),e=Vx().has,i=Kx(),o=Zx(),n=Ux(),s=dx();return fC=function(r){var a=t(this),h=o(r);if(i(a)<h.size)return!1;var l=h.getIterator();return!1!==n(l,function(t){if(!e(a,t))return s(l,"normal",!1)})},fC}var wC,_C,xC,CC,SC,DC={};function kC(){if(_C)return wC;_C=1;var t=Wx(),e=Vx(),i=qx(),o=Zx(),n=Ux(),s=e.add,r=e.has,a=e.remove;return wC=function(e){var h=t(this),l=o(e).getIterator(),c=i(h);return n(l,function(t){r(h,t)?a(c,t):s(c,t)}),c}}function TC(){return CC?xC:(CC=1,xC=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}}}})}},o=e[t](i);return 1===o.size&&4===o.values().next().value}catch(t){return!1}})}var OC,EC,IC,PC,AC,MC,NC,FC,RC,LC={};function jC(){if(EC)return OC;EC=1;var t=Wx(),e=Vx().add,i=qx(),o=Zx(),n=Ux();return OC=function(s){var r=t(this),a=o(s).getIterator(),h=i(r);return n(a,function(t){e(h,t)}),h},OC}function zC(){return AC?PC:(AC=1,jh(),bx(),function(){if(Hx)return Gx;Hx=1;var t=ti(),e=Qx(),i=S();t({target:"Set",proto:!0,real:!0,forced:!Jx()("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(iC)return oC;iC=1;var t=ti(),e=S(),i=nC();t({target:"Set",proto:!0,real:!0,forced:!Jx()("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(aC)return hC;aC=1;var t=ti(),e=lC();t({target:"Set",proto:!0,real:!0,forced:!Jx()("isDisjointFrom",function(t){return!t})},{isDisjointFrom:e})}(),function(){if(uC)return pC;uC=1;var t=ti(),e=mC();t({target:"Set",proto:!0,real:!0,forced:!Jx()("isSubsetOf",function(t){return t})},{isSubsetOf:e})}(),function(){if(vC)return bC;vC=1;var t=ti(),e=yC();t({target:"Set",proto:!0,real:!0,forced:!Jx()("isSupersetOf",function(t){return!t})},{isSupersetOf:e})}(),function(){if(SC)return DC;SC=1;var t=ti(),e=kC(),i=TC();t({target:"Set",proto:!0,real:!0,forced:!Jx()("symmetricDifference")||!i("symmetricDifference")},{symmetricDifference:e})}(),function(){if(IC)return LC;IC=1;var t=ti(),e=jC(),i=TC();t({target:"Set",proto:!0,real:!0,forced:!Jx()("union")||!i("union")},{union:e})}(),Nl(),PC=Et().Set)}function BC(){if(NC)return MC;NC=1;var t=zC();return Bh(),MC=t}var HC=r(RC?FC:(RC=1,FC=BC()));const GC=.001;function WC(t){ow(t).call(t,(t,e)=>t.data.start-e.data.start)}function YC(t){ow(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 VC(t,e,i,o){return null===$C(t,e.item,!1,t=>t.stack&&(i||null===t.top),t=>t.stack,()=>e.axis,o)}function UC(t,e,i){const o=$C(t,e.item,!1,t=>t.stack,()=>!0,t=>t.baseTop);i.height=o-i.top+.5*e.item.vertical}function XC(t,e,i,o){for(let n=0;n<t.length;n++){if(null==t[n].data.subgroup){t[n].top=e.item.vertical;continue}if(void 0===t[n].data.subgroup||!o)continue;let s=0;for(const e in i)!Object.prototype.hasOwnProperty.call(i,e)||!0!==i[e].visible||i[e].index>=i[t[n].data.subgroup].index||(s+=i[e].height,i[t[n].data.subgroup].top=s);t[n].top=s+.5*e.item.vertical}o||qC(t,e,i)}function qC(t,e,i){var o;$C(ow(o=em(i)).call(o,(t,e)=>t.index>e.index?1:t.index<e.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let o=0;o<t.length;o++)void 0!==t[o].data.subgroup&&(t[o].top=i[t[o].data.subgroup].top+.5*e.item.vertical)}function KC(t,e,i){let o=!1;const n=[];for(let t in i)Object.prototype.hasOwnProperty.call(i[t],"index")?n[i[t].index]=t:n.push(t);for(let s=0;s<n.length;s++){let r=n[s];if(!Object.prototype.hasOwnProperty.call(i,r))continue;o=o||i[r].stack,i[r].top=0;for(const t in i)i[t].visible&&i[r].index>i[t].index&&(i[r].top+=i[t].height);const a=t[r];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[r].stack&&(a[t].baseTop=a[t].top));o&&i[r].stack&&UC(t[r],e,i[r])}}function $C(t,e,i,o,n,s,r){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(o(e))l.push(e);else if(n(e)){const t=a(e);null!==d&&t<d-GC&&(u=0),d=t,u=QC(c,e=>a(e)-GC>t,u),ku(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;){var v;const t=l.shift();t.top=s(t);const i=a(t),o=h(t);null!==d&&i<d-GC&&(m=0,f=0,u=0,p=null),(null===d||i>d+GC)&&(m=QC(c,t=>i<h(t)-GC,m)),d=i,(null===p||p<o-GC)&&(f=QC(c,t=>o<a(t)-GC,Math.max(m,f))),null!==p&&p-GC>o&&(f=JC(c,t=>o+GC>=a(t),m,f)+1),p=o;const b=ow(v=tS(c,t=>i<h(t)-GC,m,f)).call(v,(t,e)=>t.top-e.top);for(let i=0;i<b.length;i++){const o=b[i];ZC(t,o,e)&&(t.top=o.top+o.height+e.vertical)}n(t)&&(u=QC(c,t=>a(t)-GC>i,u),ku(c).call(c,u,0,t),u<m&&m++,u<=f&&f++,u++);const y=t.top+t.height;if(y>g&&(g=y),r&&r())return null}return g}function ZC(t,e,i){return t.top-i.vertical+GC<e.top+e.height&&t.top+t.height+i.vertical-GC>e.top}function QC(t,e,i){i||(i=0);for(let o=i;o<t.length;o++)if(e(t[o]))return o;return t.length}function JC(t,e,i,o){i||(i=0),o||(o=t.length);for(let n=o-1;n>=i;n--)if(e(t[n]))return n;return i-1}function tS(t,e,i,o){i||(i=0),o=o?Math.min(o,t.length):t.length;const n=[];for(let s=i;s<o;s++)e(t[s])&&n.push(t[s]);return n}var eS=Object.freeze({__proto__:null,nostack:XC,orderByEnd:YC,orderByStart:WC,stack:VC,stackSubgroups:qC,stackSubgroupsWithInnerStack:KC,substack:UC});const iS="__background__";class oS{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 o=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",o),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off("checkRangedItems",o)}),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 o;this.itemSet.options&&this.itemSet.options.groupTemplate?(i=Ni(o=this.itemSet.options.groupTemplate).call(o,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?iy.xss(e):iy.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?iy.removeClassName(this.dom.inner,"vis-hidden"):iy.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),iy.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(iy.removeClassName(this.dom.label,"collapsed"),iy.addClassName(this.dom.label,"expanded")):(iy.removeClassName(this.dom.label,"expanded"),iy.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,iy.removeClassName(this.dom.label,"collapsed"),iy.removeClassName(this.dom.label,"expanded"),iy.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(iy.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?iy.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):iy.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):iy.addClassName(this.dom.label,"vis-group-level-0");const n=t&&t.className||null;n!=this.className&&(this.className&&(iy.removeClassName(this.dom.label,this.className),iy.removeClassName(this.dom.foreground,this.className),iy.removeClassName(this.dom.background,this.className),iy.removeClassName(this.dom.axis,this.className)),iy.addClassName(this.dom.label,n),iy.addClassName(this.dom.foreground,n),iy.addClassName(this.dom.background,n),iy.addClassName(this.dom.axis,n),this.className=n),this.style&&(iy.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(iy.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;Ko(iy).call(iy,this.items,(t,o)=>{if(t.dirty=!0,t.displayed){const n=!0;e[o]=t.redraw(n),i=e[o].length}});if(i>0)for(let t=0;t<i;t++)Ko(iy).call(iy,e,e=>{e[t]()});return!0}return!1}_calculateGroupSizeAndPosition(){const{offsetTop:t,offsetLeft:e,offsetWidth:i}=this.dom.foreground;this.top=t,this.right=e,this.width=i}_shouldBailItemsRedraw(){const t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems};let o=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Ud()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction(e=>{t.itemSet.userContinueNotBail=e,o=!e}):o=0==t.itemSet.userContinueNotBail)}return o}_redrawItems(t,e,i,o){if(t||this.stackDirty||this.isVisible&&!e){var n,s,r,a,h,l;const t={byEnd:cr(n=this.orderedItems.byEnd).call(n,t=>!t.isCluster),byStart:cr(s=this.orderedItems.byStart).call(s,t=>!t.isCluster)},e={byEnd:[...new HC(cr(r=Ac(a=this.orderedItems.byEnd).call(a,t=>t.cluster)).call(r,t=>!!t))],byStart:[...new HC(cr(h=Ac(l=this.orderedItems.byStart).call(l,t=>t.cluster)).call(h,t=>!!t))]},f=()=>{var i,n;return[...this._updateItemsInRange(t,cr(i=this.visibleItems).call(i,t=>!t.isCluster),o),...this._updateClustersInRange(e,cr(n=this.visibleItems).call(n,t=>t.isCluster),o)]},g=t=>{let e={};for(const o in this.subgroups){var i;if(!Object.prototype.hasOwnProperty.call(this.subgroups,o))continue;const n=cr(i=this.visibleItems).call(i,t=>t.data.subgroup===o);e[o]=t?ow(n).call(n,(e,i)=>t(e.data,i.data)):n}return e};if("function"==typeof this.itemSet.options.order){const t=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){KC(g(this.itemSet.options.order),i,this.subgroups),this.visibleItems=f(),this._updateSubGroupHeights(i)}else{var c,d,u,p;this.visibleItems=f(),this._updateSubGroupHeights(i);const e=ow(c=cr(d=Cd(u=this.visibleItems).call(u)).call(d,t=>t.isCluster||!t.isCluster&&!t.cluster)).call(c,(e,i)=>t.itemSet.options.order(e.data,i.data));this.shouldBailStackItems=VC(e,i,!0,Ni(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=f(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){KC(g(),i,this.subgroups)}else{var m;this.shouldBailStackItems=VC(this.visibleItems,i,!0,Ni(m=this._shouldBailItemsRedraw).call(m,this))}else XC(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&&Ko(iy).call(iy,this.items,t=>{t.cluster&&t.displayed&&t.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=iy.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,o=this.dom.inner.clientHeight;return t=iy.updateProperty(this.props.label,"width",i)||t,t=iy.updateProperty(this.props.label,"height",o)||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==iS||i.displayed&&i.hide()}}redraw(t,e,i,o){var n,s,r,a,h;let l=!1;const c=this.isVisible;let d;const u=[()=>{i=this._didMarkerHeightChange.call(this)||i},Ni(n=this._updateSubGroupHeights).call(n,this,e),Ni(s=this._calculateGroupSizeAndPosition).call(s,this),()=>{var i;this.isVisible=Ni(i=this._isGroupVisible).call(i,this)(t,e)},()=>{var o;Ni(o=this._redrawItems).call(o,this)(i,c,e,t)},Ni(r=this._updateSubgroupsSizes).call(r,this),()=>{var t;d=this.height=Ni(t=this._calculateHeight).call(t,this)(e)},Ni(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var t;l=Ni(t=this._didResize).call(t,this)(l,d)},()=>{var t;Ni(t=this._applyGroupHeight).call(t,this)(d)},()=>{var t;Ni(t=this._updateItemsVerticalPosition).call(t,this)(e)},Ni(h=()=>(!this.isVisible&&this.height&&(l=!1),l)).call(h,this)];if(o)return u;{let t;return Ko(u).call(u,e=>{t=e()}),t}}_updateSubGroupHeights(t){if(Qc(this.subgroups).length>0){const e=this;this._resetSubgroups(),Ko(iy).call(iy,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?iy.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)e=Math.max(this.height,this.props.label.height);else if(i.length>0){let o=i[0].top,n=i[0].top+i[0].height;if(Ko(iy).call(iy,i,t=>{o=Math.min(o,t.top),n=Math.max(n,t.top+t.height)}),o>t.axis){const e=o-t.axis;n-=e,Ko(iy).call(iy,i,t=>{t.top-=e})}e=Math.ceil(n+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 o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)}add(t){var e;if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),!up(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 o=t.subgroups[i].items[0].data.end||t.subgroups[i].items[0].data.start;let n=t.subgroups[i].items[0].data.start,s=o-1;Ko(e=t.subgroups[i].items).call(e,t=>{new Date(t.data.start)<new Date(n)&&(n=t.data.start);const e=t.data.end||t.data.start;new Date(e)>new Date(s)&&(s=e)}),t.subgroups[i].start=n,t.subgroups[i].end=new Date(s-1)}}orderSubgroups(){if(void 0!==this.subgroupOrderer){const t=[];if("string"==typeof this.subgroupOrderer){for(const e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});ow(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);ow(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 o=Em(e=this.visibleItems).call(e,t);-1!=o&&ku(i=this.visibleItems).call(i,o,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 n=this.subgroups[e];if(n){var i;const s=Em(i=n.items).call(i,t);var o;if(s>=0)ku(o=n.items).call(o,s,1),n.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}removeFromDataSet(t){this.itemSet.removeItem(t.id)}order(){const t=iy.toArray(this.items),e=[],i=[];for(let o=0;o<t.length;o++)void 0!==t[o].data.end&&i.push(t[o]),e.push(t[o]);this.orderedItems={byStart:e,byEnd:i},WC(this.orderedItems.byStart),YC(this.orderedItems.byEnd)}_updateItemsInRange(t,e,i){const o=[],n={};if(!this.isVisible&&void 0!==this.height&&this.groupId!=iS){for(let t=0;t<e.length;t++){var s=e[t];s.displayed&&s.hide()}return o}const r=(i.end-i.start)/4,a=i.start-r,h=i.end+r,l=t=>{const{start:e,end:i}=t;return i<a?-1:e<=h?0:1};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],o,n,i);const c=iy.binarySearchCustom(t.byStart,t=>t<a?-1:t<=h?0:1,"data","start");if(this._traceVisible(c,t.byStart,o,n,t=>t.data.start<a||t.data.start>h),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],o,n,i)}else{const e=iy.binarySearchCustom(t.byEnd,l,"data");this._traceVisible(e,t.byEnd,o,n,t=>t.data.end<a||t.data.start>h)}this._sortVisibleItems(t.byStart,o,n);const d={};let u=0;for(let t=0;t<o.length;t++){const e=o[t];if(!e.displayed){const i=!0;d[t]=e.redraw(i),u=d[t].length}}if(u>0)for(let t=0;t<u;t++)Ko(iy).call(iy,d,e=>{e[t]()});for(let t=0;t<o.length;t++)o[t].repositionX();return o}_traceVisible(t,e,i,o,n){if(-1!=t){for(let s=t;s>=0;s--){let t=e[s];if(n(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===o[t.id]&&(o[t.id]=!0,i.unshift(t))}for(let s=t+1;s<e.length;s++){let t=e[s];if(n(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===o[t.id]&&(o[t.id]=!0,i.push(t))}}}_sortVisibleItems(t,e,i){e.length=0;for(let o=0;o<t.length;o++){let n=t[o];i[n.id]&&e.push(n)}}_checkIfVisible(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()}_checkIfVisibleWithReference(t,e,i,o){t.isVisible(o)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()}_updateClustersInRange(t,e,i){const o=[],n={};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],o,n,i);for(let e=0;e<t.byStart.length;e++)this._checkIfVisibleWithReference(t.byStart[e],o,n,i);for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],o,n,i);const s={};let r=0;for(let t=0;t<o.length;t++){const e=o[t];if(!e.displayed){const i=!0;s[t]=e.redraw(i),r=s[t].length}}if(r>0)for(var a=0;a<r;a++)Ko(iy).call(iy,s,function(t){t[a]()});for(let t=0;t<o.length;t++)o[t].repositionX();return o}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 nS extends oS{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 sS{constructor(t,e,i){var o;this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.defaultOptions={locales:l_,locale:"en"},this.options=iy.extend({},this.defaultOptions,i),this.options.locales=iy.extend({},l_,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];Ko(o=Qc(this.options.locales)).call(o,t=>{this.options.locales[t]=iy.extend({},n,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,o=document.createElement("div");o.className="vis-drag-center",o.dragCenterItem=this,this.hammerDragCenter=new Gw(o),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",Ni(t=i.parent.itemSet._onDrag).call(t,i.parent.itemSet)),this.hammerDragCenter.on("panend",Ni(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(o,this.dom.dragLeft):this.dom.box.appendChild(o):this.dom.point&&this.dom.point.appendChild(o),this.dom.dragCenter=o}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 o=this.options.locales[this.options.locale];o||(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),o=this.options.locales.en),i.title=o.deleteSelected,this.hammerDeleteButton=new Gw(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 o;o="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;let n,s;var i;if(o+this.parent.top-t<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top="".concat(this.height+2,"px")):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom="".concat(this.height+2,"px")),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template)s=Ni(i=this.options.tooltipOnItemUpdateTime.template).call(i,this),n=s(this.data);else n="start: ".concat($o(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(n+="<br> end: ".concat($o(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=iy.xss(n)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(t){let e,i,o,n,s;const r=this._getItemData(),a=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];var h,l;this.options.visibleFrameTemplate?(s=Ni(h=this.options.visibleFrameTemplate).call(h,this),n=iy.xss(s(r,a))):n="";if(a)if(n instanceof Object&&!(n instanceof Element))s(r,a);else if(i=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(n),i){if(n instanceof Element)a.innerHTML="",a.appendChild(n);else if(null!=n)a.innerHTML=iy.xss(n);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.itemVisibleFrameContent=n}this.options.template?(o=Ni(l=this.options.template).call(l,this),e=o(r,t,this.data)):e=this.data.content;if(e instanceof Object&&!(e instanceof Element))o(r,t);else if(i=this._contentToString(this.content)!==this._contentToString(e),i){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=iy.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(yi(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Qc(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&&(iy.removeCssText(t,this.style),this.style=null),this.data.style&&(iy.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={},iy.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={},iy.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 Ni(t=this.options.tooltip.template).call(t,this)(this._getItemData(),this.data)}return this.data.title}}sS.prototype.stack=!0;class rS extends sS{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,o=this.width*t.getMillisecondsPerPixel();return e="right"==i?this.data.start.getTime()>t.start&&this.data.start.getTime()-o<t.end:"left"==i?this.data.start.getTime()+o>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+o/2>t.start&&this.data.start.getTime()-o/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,o,n;let s;const r=[Ni(e=this._createDomElement).call(e,this),Ni(i=this._appendDomElement).call(i,this),Ni(o=this._updateDirtyDomComponents).call(o,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&Ni(t=this._updateDomComponentsSizes).call(t,this)(s)},Ni(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Ko(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom;t.box.remove?t.box.remove():t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.remove?t.line.remove():t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.remove?t.dot.remove():t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}}repositionXY(){const t=this.options.rtl,e=function(t,e,i){var o;if(void 0===e&&void 0===i)return;const n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Lp(o="translate(".concat(n,"px, ")).call(o,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(n,"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,o=this.props.dot.width;"right"==e?(this.boxX=t-this.width,this.lineX=t-i,this.dotX=t-i/2-o/2):"left"==e?(this.boxX=t,this.lineX=t,this.dotX=t+i/2-o/2):(this.boxX=t-this.width/2,this.lineX=this.options.rtl?t-i:t-i/2,this.dotX=t-o/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){const t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){const t=this.parent.top+this.top+1;this.boxY=this.top||0,e.height="".concat(t,"px"),e.bottom="",e.top="0"}else{const t=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),e.height="".concat(t,"px"),e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}}class aS extends sS{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,o,n;let s;const r=[Ni(e=this._createDomElement).call(e,this),Ni(i=this._appendDomElement).call(i,this),Ni(o=this._updateDirtyDomComponents).call(o,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&Ni(t=this._updateDomComponentsSizes).call(t,this)(s)},Ni(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Ko(r).call(r,e=>{t=e()}),t}}repositionXY(){const t=this.options.rtl;!function(t,e,i){var o;if(void 0===e&&void 0===i)return;const n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Lp(o="translate(".concat(n,"px, ")).call(o,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(n,"px)")}(this.dom.point,this.pointX,this.pointY,t)}show(t){if(!this.displayed)return this.redraw(t)}hide(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}repositionX(){const t=this.conversion.toScreen(this.data.start);this.pointX=t,this.options.rtl?this.right=t-this.props.dot.width:this.left=t-this.props.dot.width,this.repositionXY()}repositionY(){const t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}}class hS extends sS{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,o,n;let s;const r=[Ni(e=this._createDomElement).call(e,this),Ni(i=this._appendDomElement).call(i,this),Ni(o=this._updateDirtyDomComponents).call(o,this),()=>{var t;this.dirty&&(s=Ni(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&Ni(t=this._updateDomComponentsSizes).call(t,this)(s)},Ni(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Ko(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}}repositionX(t){const e=this.parent.width;let i=this.conversion.toScreen(this.data.start),o=this.conversion.toScreen(this.data.end);const n=void 0===this.data.align?this.options.align:this.data.align;let s,r;!1===this.data.limitSize||void 0!==t&&!0!==t||(i<-e&&(i=-e),o>2*e&&(o=2*e));const a=Math.max(Math.round(1e3*(o-i))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=i:this.left=i,this.width=a+this.props.content.width,r=this.props.content.width):(this.options.rtl?this.right=i:this.left=i,this.width=a,r=Math.min(o-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),n){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){const t=-1*Math.max(a-r,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(a-r,0),"px)");break;case"center":if(this.options.rtl){const t=-1*Math.max((a-r)/2,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((a-r)/2,0),"px)");break;default:if(s=this.overflow?o>0?Math.max(-i,0):-r:i<0?-i:0,this.options.rtl){const t=-1*s;this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(s,"px)")}}repositionY(){const t=this.options.orientation.item,e=this.dom.box;e.style.top="".concat("top"==t?this.top:this.parent.height-this.top-this.height,"px")}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){const t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){const t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}}hS.prototype.baseClassName="vis-item vis-range";class lS extends sS{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,o,n;let s;const r=[Ni(e=this._createDomElement).call(e,this),Ni(i=this._appendDomElement).call(i,this),Ni(o=this._updateDirtyDomComponents).call(o,this),()=>{var t;this.dirty&&(s=Ni(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&Ni(t=this._updateDomComponentsSizes).call(t,this)(s)},Ni(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Ko(r).call(r,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 nS?(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")}}lS.prototype.baseClassName="vis-item vis-background",lS.prototype.stack=!1,lS.prototype.show=hS.prototype.show,lS.prototype.hide=hS.prototype.hide,lS.prototype.repositionX=hS.prototype.repositionX;class cS{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=vm(t),this.y=vm(e)}setText(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=iy.xss(t)}show(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,o=this.frame.parentNode.clientHeight,n=this.frame.parentNode.clientWidth,s=0,r=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){let t=!1,o=!0;"flip"==this.overflowMethod&&(this.y-e<this.padding&&(o=!1),this.x+i>n-this.padding&&(t=!0)),s=t?this.x-i:this.x,r=o?this.y-e:this.y}else(r=this.y-e)+e+this.padding>o&&(r=o-e-this.padding),r<this.padding&&(r=this.padding),(s=this.x)+i+this.padding>n&&(s=n-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=r+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}}var dS,uS,pS,mS,fS,gS,vS,bS,yS,wS={};function _S(){return pS?uS:(pS=1,function(){if(dS)return wS;dS=1;var t=ti(),e=Wo().every;t({target:"Array",proto:!0,forced:!Yo()("every")},{every:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),uS=Ci()("Array","every"))}function xS(){if(fS)return mS;fS=1;var t=Pt(),e=_S(),i=Array.prototype;return mS=function(o){var n=o.every;return o===i||t(i,o)&&n===i.every?e:n},mS}function CS(){return vS?gS:(vS=1,gS=xS())}var SS=r(yS?bS:(yS=1,bS=CS()));class DS extends sS{constructor(t,e,i){if(super(t,e,Nu({},{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=Vb(),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(),o=Math.max(this.data.start.getTime()+e,this.data.start.getTime()+i);return this.data.start<t.end&&o>t.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(t){var e,i,o,n,s,r,a,h,l=[Ni(e=this._createDomElement).call(e,this),Ni(i=this._appendDomElement).call(i,this),Ni(o=this._updateDirtyDomComponents).call(o,this),Ni(n=function(){this.dirty&&(a=this._getDomComponentsSizes())}).call(n,this),Ni(s=function(){var t;this.dirty&&Ni(t=this._updateDomComponentsSizes).call(t,this)(a)}).call(s,this),Ni(r=this._repaintDomAdditionals).call(r,this)];return t?l:(Ko(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,o=this.dom.dot.offsetWidth;if(e){const n=i+t+(e-t)/2,s=n-o/2,r=this.options.rtl?-1*n:n,a=this.options.rtl?-1*s:s;this.dom.line.style.transform="translateX(".concat(r,"px)"),this.dom.dot.style.transform="translateX(".concat(a,"px)")}else{const e=this.options.rtl?-1*t:t,i=this.options.rtl?-1*(t-o/2):t-o/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,o=i-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=i-o+"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=Ac(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 o=Ac(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(...Ac(o).call(o,t=>Math.min(t.start,t.end||t.start))),this.data.max=Math.max(...Ac(o).call(o,t=>Math.max(t.start,t.end||t.start)));const n=Ac(e=this.data.uiItems).call(e,t=>t.center),s=Uc(n).call(n,(t,e)=>t+e,0)/this.data.uiItems.length;Lw(i=this.data.uiItems).call(i,t=>t.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(s),this.data.end=null)}_getUiItems(){var t;return this.data.uiItems&&this.data.uiItems.length?cr(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=Ni(t=DS.prototype._onDoubleClick).call(t,this);this.dom.box["vis-item"]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}const t=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+t,this.options.showStipes&&(this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":""),this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")),this.data.end&&(this.dom.content.style.maxWidth="none")}}_getDomComponentsSizes(){const t={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(t.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},t.line={width:this.dom.line.offsetWidth}),t}_updateDomComponentsSizes(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.data.end?this.minWidth=t.box.width:this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){const t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}_fit(){if(this.emitter){const{fitStart:t,fitEnd:e}=this._getFitRange(),i={start:new Date(t),end:new Date(e),animation:!0};this.emitter.emit("fit",i)}}_getItemData(){return this.data}}DS.prototype.baseClassName="vis-item vis-range vis-cluster";const kS="__ungrouped__";class TS{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new DS(t,e,i)}setItems(t,e){this.items=t||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(t,e,i){let{maxItems:o,clusterCriteria:n}="boolean"==typeof i?{}:i;n||(n=()=>!0),o=o||1;let s=-1,r=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),r=Math.abs(Math.pow(2,s))}if(this.dataChanged){const t=s!=this.cacheLevel;(!this.applyOnChangedLevel||t)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;let a=this.cache[s];if(!a){a=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;const s=this.groups[e],h=s.length;let l=0;for(;l<h;){let e=s[l],h=1,c=l-1;for(;c>=0&&e.center-s[c].center<r/2;)!s[c].cluster&&n(e.data,s[c].data)&&h++,c--;let d=l+1;for(;d<s.length&&s[d].center-e.center<r/2;)n(e.data,s[d].data)&&h++,d++;let u=a.length-1;for(;u>=0&&e.center-a[u].center<r;)e.group==a[u].group&&n(e.data,a[u].data)&&h++,u--;if(h>o){const r=h-o+1,c=[];let d=l;for(;c.length<r&&d<s.length;)n(s[l].data,s[d].data)&&c.push(s[d]),d++;const u=this.itemSet.getGroupId(e.data),p=this.itemSet.groups[u]||this.itemSet.groups[kS];let m=this._getClusterForItems(c,p,t,i);a.push(m),l+=r}else delete e.cluster,l+=1}}this.cache[s]=a}return a}_filterData(){const t={};this.groups=t;for(const e of em(this.items)){const i=e.parent?e.parent.groupId:"";let o=t[i];o||(o=[],t[i]=o),o.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)&&ow(e=t[i]).call(e,(t,e)=>t.center-e.center)}this.dataChanged=!1}_getClusterForItems(t,e,i,o){var n;const s=Ac(n=i||[]).call(n,t=>{var e;return{cluster:t,itemsIds:new HC(Ac(e=t.data.uiItems).call(e,t=>t.id))}});let r;if(s.length)for(let e of s)if(e.itemsIds.size===t.length&&SS(t).call(t,t=>e.itemsIds.has(t.id))){r=e.cluster;break}if(r)return r.setUiItems(t),r.group!==e&&(r.group&&r.group.remove(r),e&&(e.add(r),r.group=e)),r;let a=o.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=Nu({},o,this.itemSet.options),u={content:c,title:l,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return r=this.createClusterItem(u,h,d),e&&(e.add(r),r.group=e),r.attach(),r}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}const OS="__ungrouped__",ES="__background__";class IS extends vy{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:Yw.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=iy.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,o){if(i._onAddGroups(e.items),i.groupsData&&i.groupsData.length>0){var n;const t=i.groupsData.getDataSet();Ko(n=t.get()).call(n,e=>{if(e.nestedGroups){var i;0!=e.showNested&&(e.showNested=!0);let n=[];Ko(i=e.nestedGroups).call(i,i=>{const o=t.get(i);o&&(o.nestedInGroup=e.id,0==e.showNested&&(o.visible=!1),n=Lp(n).call(n,o))}),t.update(n,o)}})}},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,o,n,s,r,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 nS(ES,null,this);w.show(),this.groups[ES]=w,this.hammer=new Gw(this.body.dom.centerContainer),this.hammer.on("hammer.input",t=>{t.isFirst&&this._onTouch(t)}),this.hammer.on("panstart",Ni(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",Ni(e=this._onDrag).call(e,this)),this.hammer.on("panend",Ni(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:Gw.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",Ni(o=this._onSelectItem).call(o,this)),this.hammer.on("press",Ni(n=this._onMultiSelectItem).call(n,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",Ni(s=this._onAddItem).call(s,this)),this.options.rtl?this.groupHammer=new Gw(this.body.dom.rightContainer):this.groupHammer=new Gw(this.body.dom.leftContainer),this.groupHammer.on("tap",Ni(r=this._onGroupClick).call(r,this)),this.groupHammer.on("panstart",Ni(a=this._onGroupDragStart).call(a,this)),this.groupHammer.on("panmove",Ni(h=this._onGroupDrag).call(h,this)),this.groupHammer.on("panend",Ni(l=this._onGroupDragEnd).call(l,this)),this.groupHammer.get("pan").set({threshold:5,direction:Gw.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",Ni(c=this._onMouseOver).call(c,this)),this.body.dom.centerContainer.addEventListener("mouseout",Ni(d=this._onMouseOut).call(d,this)),this.body.dom.centerContainer.addEventListener("mousemove",Ni(u=this._onMouseMove).call(u,this)),this.body.dom.centerContainer.addEventListener("contextmenu",Ni(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener("mousewheel",Ni(m=this._onMouseWheel).call(m,this)),this.show()}setOptions(t){if(t){var e,i;const o=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];iy.selectiveExtend(o,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&&(iy.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&&(iy.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&&iy.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),Ko(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&&iy.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&&iy.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));const n=e=>{const i=t[e];if(i){var o;if("function"!=typeof i)throw new Error(Lp(o="option ".concat(e," must be a function ")).call(o,e,"(item, callback)"));this.options[e]=i}};Ko(i=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(i,n),t.cluster?(Nu(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new TS(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&&Ko(iy).call(iy,this.items,t=>{t.dirty=!0,t.displayed&&t.redraw()}),t.restackGroups&&Ko(iy).call(iy,this.groups,(t,e)=>{e!==ES&&(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=Ji(function(){t.show()},e)}}clearPopupTimer(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(t){var e;null==t&&(t=[]),yi(t)||(t=[t]);const i=cr(e=this.selection).call(e,e=>-1===Em(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 Lp(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 o=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const n=this.groups[t],s=n.isVisible?n.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&o.push(t.id):t.left<e&&t.left+t.width>i&&o.push(t.id)}return o}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 o=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const n=this.groups[t],s=n.isVisible?n.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&o.push(t.id):t.left<e&&t.left+t.width>i&&o.push(t.id)}return o}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]||ex(e=this.clusters).call(e,e=>e.id===t)}_deselect(t){const e=this.selection;for(let i=0,o=e.length;i<o;i++)if(e[i]==t){ku(e).call(e,i,1);break}}redraw(){const t=this.options.margin,e=this.body.range,i=iy.option.asSize,o=this.options,n=o.orientation.item;let s=!1;const r=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,r.className="vis-itemset",this.options.cluster&&this._clusterItems(),s=this._orderGroups()||s;const a=e.end-e.start,h=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,l=e.start!=this.lastRangeStart,c=o.stack!=this.lastStack,d=o.stackSubgroups!=this.lastStackSubgroups,u=h||l||c||d;this.lastVisibleInterval=a,this.lastRangeStart=e.start,this.lastStack=o.stack,this.lastStackSubgroups=o.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[ES].redraw(e,f,u);const b={};let y=0;Ko(iy).call(iy,this.groups,(t,i)=>{if(i===ES)return;const o=t==p?m:f;b[i]=t.redraw(e,o,u,!0),y=b[i].length});if(y>0){const t={};for(let e=0;e<y;e++)Ko(iy).call(iy,b,(i,o)=>{t[o]=i[e]()});Ko(iy).call(iy,this.groups,(e,i)=>{if(i===ES)return;const o=t[i];s=o||s,g+=e.height}),g=Math.max(g,v)}return g=Math.max(g,v),r.style.height=i(g),this.props.width=r.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",this.hammer.get("press").set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,s=this._isResized()||s,s}_firstGroup(){const t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[OS]||null}_updateUngrouped(){let t,e,i=this.groups[OS];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[OS],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),o=this.groups[i];o&&o.add(t)||t.hide()}}else if(!i){const o=null,n=null;for(e in i=new oS(o,n,this),this.groups[OS]=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 o=this.itemsData;if(t){if(!qb(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=Qb(t)}else this.itemsData=null;if(o&&(Ko(iy).call(iy,this.itemListeners,(t,e)=>{o.off(e,t)}),o.dispose(),i=o.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;Ko(iy).call(iy,this.itemListeners,(i,o)=>{e.itemsData.on(o,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&&(Ko(iy).call(iy,this.groupListeners,(t,i)=>{e.groupsData.off(i,t)}),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!qb(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;const t=this.groupsData.getDataSet();Ko(o=t.get()).call(o,e=>{var i;e.nestedGroups&&Ko(i=e.nestedGroups).call(i,i=>{const o=t.get(i);o.nestedInGroup=e.id,0==e.showNested&&(o.visible=!1),t.update(o)})});const n=this.id;Ko(iy).call(iy,this.groupListeners,(t,i)=>{e.groupsData.on(i,t,n)}),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?ES:this.groupsData?t.group:OS}_onUpdate(t){const e=this;Ko(t).call(t,t=>{const i=e.itemsData.get(t);let o=e.items[t];const n=i?e._getType(i):null,s=IS.types[n];let r;if(o&&(s&&o instanceof s?e._updateItem(o,i):(r=o.selected,e._removeItem(o),o=null)),!o&&i){if(!s)throw new TypeError('Unknown item type "'.concat(n,'"'));o=new s(i,e.conversion,e.options),o.id=t,e._addItem(o),r&&(this.selection.push(t),o.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;Ko(t).call(t,t=>{const o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}_order(){Ko(iy).call(iy,this.groups,t=>{t.order()})}_onUpdateGroups(t){this._onAddGroups(t)}_onAddGroups(t){const e=this;Ko(t).call(t,t=>{const i=e.groupsData.get(t);let o=e.groups[t];if(o)o.setData(i);else{if(t==OS||t==ES)throw new Error("Illegal group id. ".concat(t," is a reserved id."));const n=of(e.options);iy.extend(n,{height:null}),o=new oS(t,i,e),e.groups[t]=o;for(const i in e.items){if(!Object.prototype.hasOwnProperty.call(e.items,i))continue;const n=e.items[i];n.data.group==t&&o.add(n)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})}_onRemoveGroups(t){Ko(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=!iy.equalArray(t,this.groupIds);if(e){const e=this.groups;Ko(t).call(t,t=>{e[t].hide()}),Ko(t).call(t,t=>{e[t].show()}),this.groupIds=t}return e}return!1}_orderNestedGroups(t){return function t(e,i){let o=[];return Ko(i).call(i,i=>{o.push(i);if(e.groupsData.get(i).nestedGroups){var n;const s=Ac(n=e.groupsData.get({filter:t=>t.nestedInGroup==i,order:e.options.groupOrder})).call(n,t=>t.id);o=Lp(o).call(o,t(e,s))}}),o}(this,cr(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),o=this.groups[i];o?o&&o.data&&o.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}_removeItem(t){var e,i;t.hide(),delete this.items[t.id];const o=Em(e=this.selection).call(e,t.id);-1!=o&&ku(i=this.selection).call(i,o,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 hS&&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 o;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 n=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=e,n)o={item:n,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[o];else if(s)o={item:s,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[o];else if(this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey))this._onDragStartAddItem(t);else{this.groupIds.length<1&&this.redraw();const o=this._getGroupIndex(e.data.group),n=this.options.itemsAlwaysDraggable.item&&!e.selected?[e.id]:this.getSelection();this.touchParams.itemProps=Ac(n).call(n,e=>{const n=i.items[e],s=i._getGroupIndex(n.data.group);return{item:n,initialX:t.center.x,groupOffset:o-s,data:this._cloneItemData(n.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(),o=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,n=this.body.util.toTime(o),s=this.body.util.getScale(),r=this.body.util.getStep(),a=e?e(n,s,r):n,h={type:"range",start:a,end:a,content:"new item"},l=Vb();h[this.itemsData.idProp]=l;const c=this.groupFromTarget(t);c&&(h.group=c.groupId);const d=new hS(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,o=this.options.snap||null,n=this.body.dom.root.offsetLeft,s=this.options.rtl?n+this.body.domProps.right.width:n+this.body.domProps.left.width,r=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))}Ko(e=this.touchParams.itemProps).call(e,e=>{const n=i.body.util.toTime(t.center.x-s),d=i.body.util.toTime(e.initialX-s);let u,p,m,f,g;u=this.options.rtl?-(n-d):n-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=iy.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=o?o(g,r,a):g):null!=v.start&&(p=iy.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=o?o(f,r,a):f);else if(e.dragRight)this.options.rtl?null!=v.start&&(p=iy.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=o?o(f,r,a):f):null!=v.end&&(m=iy.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=o?o(g,r,a):g);else if(null!=v.start)if(p=iy.convert(e.data.start,"Date").valueOf(),f=new Date(p+u),null!=v.end){m=iy.convert(e.data.end,"Date");const t=m.valueOf()-p.valueOf();v.start=o?o(f,r,a):f,v.end=new Date(v.start.valueOf()+t)}else v.start=o?o(f,r,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,Ko(i).call(i,t=>{const i=t.item.id;if(null!=e.itemsData.get(i)){const o=this._cloneItemData(t.item.data);e.options.onMove(o,o=>{o?(o[this.itemsData.idProp]=i,this.itemsData.update(o)):(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);Ji(()=>{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 o=i.get(t.groupId);o.showNested=t.showNested;let n=t.nestedGroups,s=n;for(;s.length>0;){let t=s;s=[];for(let e=0;e<t.length;e++){let o=i.get(t[e]);o.nestedGroups&&(s=Lp(s).call(s,o.nestedGroups))}s.length>0&&(n=Lp(n).call(n,s))}var r;if(o.showNested){var a=i.get(o.nestedGroups);for(let t=0;t<a.length;t++){let e=a[t];e.nestedGroups&&e.nestedGroups.length>0&&(null==e.showNested||1==e.showNested)&&a.push(...i.get(e.nestedGroups))}r=Ac(a).call(a,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!o.showNested,t})}else{var h;r=Ac(h=i.get(n)).call(h,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!o.showNested,t})}i.update(Lp(r).call(r,o)),o.showNested?(iy.removeClassName(t.dom.label,"collapsed"),iy.addClassName(t.dom.label,"expanded")):(iy.removeClassName(t.dom.label,"expanded"),iy.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,o=t.center?t.center.y:t.clientY,n=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(e){if(n.top+s<o)return}else{const t=i.height;if(n.top+t-s>o)return}}if(i&&i!=this.groupTouchParams.group){const t=e.get(i.groupId),o=e.get(this.groupTouchParams.group.groupId);o&&t&&(this.options.groupOrderSwap(o,t,e),e.update(o),e.update(t));const n=e.getIds({order:this.options.groupOrder});if(!iy.equalArray(n,this.groupTouchParams.originalOrder)){const t=this.groupTouchParams.originalOrder,i=this.groupTouchParams.group.groupId,o=Math.min(t.length,n.length);let s=0,r=0,a=0;for(;s<o;){for(;s+r<o&&s+a<o&&n[s+r]==t[s+a];)s++;if(s+r>=o)break;if(n[s+r]==i)r=1;else if(t[s+a]==i)a=1;else{const i=Em(n).call(n,t[s+a]),o=e.get(n[s+r]),h=e.get(t[s+a]);this.options.groupOrderSwap(o,h,e),e.update(o),e.update(h);const l=n[s+r];n[s+r]=t[s+a],n[i]=l,s++}}}}}}_onGroupDragEnd(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=iy.extend({},o.get(i));e.options.onMoveGroup(n,t=>{if(t)t[o._idProp]=i,o.update(t);else{const t=o.getIds({order:e.options.groupOrder});if(!iy.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,n=Math.min(i.length,t.length);let s=0;for(;s<n;){for(;s<n&&t[s]==i[s];)s++;if(s>=n)break;const r=Em(t).call(t,i[s]),a=o.get(t[s]),h=o.get(i[s]);e.options.groupOrderSwap(a,h,o),o.update(a),o.update(h);const l=t[s];t[s]=i[s],t[r]=l,s++}}}}),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(t){if(!this.options.selectable)return;const e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);const o=this.getSelection(),n=this.itemFromTarget(t),s=n&&n.selectable?[n.id]:[];this.setSelection(s);const r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}_onMouseOver(t){const e=this.itemFromTarget(t);if(!e)return;if(e===this.itemFromRelatedTarget(t))return;const i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new cS(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);const e=this.body.dom.centerContainer,o=e.getBoundingClientRect();this.popup.setPosition(t.clientX-o.left+e.offsetLeft,t.clientY-o.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,o=this.dom.frame.getBoundingClientRect(),n=this.options.rtl?o.right-t.center.x:t.center.x-o.left,s=this.body.util.toTime(n),r=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(s,r,a):s,l.type=l.type||"box",l[this.itemsData.idProp]=l.id||Vb(),"range"!=l.type||l.end||(h=this.body.util.toTime(n+this.props.width/5),l.end=i?i(h,r,a):h)):(l={start:i?i(s,r,a):s,content:"new item"},l[this.itemsData.idProp]=Vb(),"range"===this.options.type&&(h=this.body.util.toTime(n+this.props.width/5),l.end=i?i(h,r,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 o;this.options.multiselectPerGroup&&i.length>0&&(o=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&null!=o&&o!=t||i.push(e.id);const n=IS._getItemRange(this.itemsData.get(i));if(!this.options.multiselectPerGroup||o==t){i=[];for(const t in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,t))continue;const e=this.items[t],s=e.data.start,r=void 0!==e.data.end?e.data.end:s;!(s>=n.min&&r<=n.max)||this.options.multiselectPerGroup&&o!=this.itemsData.get(e.id).group||e instanceof lS||i.push(e.id)}}}else{const t=Em(i).call(i,e.id);-1==t?i.push(e.id):ku(i).call(i,t,1)}const o=cr(i).call(i,t=>this.getItemById(t).selectable);this.setSelection(o),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}static _getItemRange(t){let e=null,i=null;return Ko(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 o=i[t],n=this.groups[o],s=n.dom.foreground,r=s.getBoundingClientRect();if(e>=r.top&&e<r.top+s.offsetHeight)return n;if("top"===this.options.orientation.item){if(t===this.groupIds.length-1&&e>r.top)return n}else if(0===t&&e<r.top+s.offset)return n}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=iy.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=iy.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=iy.convert(i.end,e&&e.end||"Date")),i}_clusterItems(){if(!this.options.cluster)return;const{scale:t}=this.body.range.conversion(this.body.domProps.center.width),e=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=e){if(this._detachAllClusters(),e){for(let t of e)t.attach();this.clusters=e}this._updateClusters(e)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let t of this.clusters)t.detach()}_updateClusters(t){if(this.clusters&&this.clusters.length){var e;const n=new HC(Ac(t).call(t,t=>t.id)),s=cr(e=this.clusters).call(e,t=>!n.has(t.id));let r=!1;for(let t of s){var i;const e=Em(i=this.selection).call(i,t.id);var o;if(-1!==e)t.unselect(),ku(o=this.selection).call(o,e,1),r=!0}if(r){const t=this.getSelection();this.body.emitter.emit("select",{items:t,event:event})}}this.clusters=t||[]}}IS.types={background:lS,box:rS,range:hS,point:aS},IS.prototype._onAdd=IS.prototype._onUpdate;let PS,AS=!1,MS="background: #FFeeee; color: #dd0000";class NS{constructor(){}static validate(t,e,i){AS=!1,PS=e;let o=e;return void 0!==i&&(o=e[i]),NS.parse(t,o,[]),AS}static parse(t,e,i){for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&NS.check(o,t,e,i)}static check(t,e,i,o){if(void 0===i[t]&&void 0===i.__any__)return void NS.getSuggestion(t,i,o);let n=t,s=!0;void 0===i[t]&&void 0!==i.__any__&&(n="__any__",s="object"===NS.getType(e[t]));let r=i[n];s&&void 0!==r.__type__&&(r=r.__type__),NS.checkFields(t,e,i,n,r,o)}static checkFields(t,e,i,o,n,s){let r=function(e){console.log("%c"+e+NS.printLocation(s,t),MS)},a=NS.getType(e[t]),h=n[a];void 0!==h?"array"===NS.getType(h)&&-1===Em(h).call(h,e[t])?(r('Invalid option detected in "'+t+'". Allowed values are:'+NS.print(h)+' not "'+e[t]+'". '),AS=!0):"object"===a&&"__any__"!==o&&(s=iy.copyAndExtendArray(s,t),NS.parse(e[t],i[o],s)):void 0===n.any&&(r('Invalid type received for "'+t+'". Expected: '+NS.print(Qc(n))+". Received ["+a+'] "'+e[t]+'"'),AS=!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":yi(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 o,n=NS.findInOptions(t,e,i,!1),s=NS.findInOptions(t,PS,[],!0);o=void 0!==n.indexMatch?" in "+NS.printLocation(n.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':s.distance<=4&&n.distance>s.distance?" in "+NS.printLocation(n.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+NS.printLocation(s.path,s.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+NS.printLocation(n.path,t):". Did you mean one of these: "+NS.print(Qc(e))+NS.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+o,MS),AS=!0}static findInOptions(t,e,i){let o,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",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===n){let n=NS.findInOptions(t,e[c],iy.copyAndExtendArray(i,c));s>n.distance&&(r=n.closestMatch,a=n.path,s=n.distance,o=n.indexMatch)}else{var l;-1!==Em(l=c.toLowerCase()).call(l,h)&&(o=c),d=NS.levenshteinDistance(t,c),s>d&&(r=c,a=iy.copyArray(i),s=d)}}return{closestMatch:r,path:a,distance:s,indexMatch:o}}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 o=0;o<t.length-e;o++)i+="  ";i+="}\n"}return i+"\n\n"}static print(t){return _f(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,o,n=[];for(i=0;i<=e.length;i++)n[i]=[i];for(o=0;o<=t.length;o++)n[0][o]=o;for(i=1;i<=e.length;i++)for(o=1;o<=t.length;o++)e.charAt(i-1)==t.charAt(o-1)?n[i][o]=n[i-1][o-1]:n[i][o]=Math.min(n[i-1][o-1]+1,Math.min(n[i][o-1]+1,n[i-1][o]+1));return n[e.length][t.length]}}let FS="string",RS="boolean",LS="number",jS="array",zS="date",BS="object",HS="moment",GS={configure:{enabled:{boolean:RS},filter:{boolean:RS,function:"function"},container:{dom:"dom"},__type__:{object:BS,boolean:RS,function:"function"}},align:{string:FS},alignCurrentTime:{string:FS,undefined:"undefined"},rtl:{boolean:RS,undefined:"undefined"},rollingMode:{follow:{boolean:RS},offset:{number:LS,undefined:"undefined"},__type__:{object:BS}},onTimeout:{timeoutMs:{number:LS},callback:{function:"function"},__type__:{object:BS}},verticalScroll:{boolean:RS,undefined:"undefined"},horizontalScroll:{boolean:RS,undefined:"undefined"},horizontalScrollKey:{string:FS,undefined:"undefined"},horizontalScrollInvert:{boolean:RS,undefined:"undefined"},autoResize:{boolean:RS},throttleRedraw:{number:LS},clickToUse:{boolean:RS},dataAttributes:{string:FS,array:jS},editable:{add:{boolean:RS,undefined:"undefined"},remove:{boolean:RS,undefined:"undefined"},updateGroup:{boolean:RS,undefined:"undefined"},updateTime:{boolean:RS,undefined:"undefined"},overrideItems:{boolean:RS,undefined:"undefined"},__type__:{boolean:RS,object:BS}},end:{number:LS,date:zS,string:FS,moment:HS},format:{minorLabels:{millisecond:{string:FS,undefined:"undefined"},second:{string:FS,undefined:"undefined"},minute:{string:FS,undefined:"undefined"},hour:{string:FS,undefined:"undefined"},weekday:{string:FS,undefined:"undefined"},day:{string:FS,undefined:"undefined"},week:{string:FS,undefined:"undefined"},month:{string:FS,undefined:"undefined"},year:{string:FS,undefined:"undefined"},__type__:{object:BS,function:"function"}},majorLabels:{millisecond:{string:FS,undefined:"undefined"},second:{string:FS,undefined:"undefined"},minute:{string:FS,undefined:"undefined"},hour:{string:FS,undefined:"undefined"},weekday:{string:FS,undefined:"undefined"},day:{string:FS,undefined:"undefined"},week:{string:FS,undefined:"undefined"},month:{string:FS,undefined:"undefined"},year:{string:FS,undefined:"undefined"},__type__:{object:BS,function:"function"}},__type__:{object:BS}},moment:{function:"function"},groupHeightMode:{string:FS},groupOrder:{string:FS,function:"function"},groupEditable:{add:{boolean:RS,undefined:"undefined"},remove:{boolean:RS,undefined:"undefined"},order:{boolean:RS,undefined:"undefined"},__type__:{boolean:RS,object:BS}},groupOrderSwap:{function:"function"},height:{string:FS,number:LS},hiddenDates:{start:{date:zS,number:LS,string:FS,moment:HS},end:{date:zS,number:LS,string:FS,moment:HS},repeat:{string:FS},__type__:{object:BS,array:jS}},itemsAlwaysDraggable:{item:{boolean:RS,undefined:"undefined"},range:{boolean:RS,undefined:"undefined"},__type__:{boolean:RS,object:BS}},limitSize:{boolean:RS},locale:{string:FS},locales:{__any__:{any:"any"},__type__:{object:BS}},longSelectPressTime:{number:LS},margin:{axis:{number:LS},item:{horizontal:{number:LS,undefined:"undefined"},vertical:{number:LS,undefined:"undefined"},__type__:{object:BS,number:LS}},__type__:{object:BS,number:LS}},max:{date:zS,number:LS,string:FS,moment:HS},maxHeight:{number:LS,string:FS},maxMinorChars:{number:LS},min:{date:zS,number:LS,string:FS,moment:HS},minHeight:{number:LS,string:FS},moveable:{boolean:RS},multiselect:{boolean:RS},multiselectPerGroup:{boolean:RS},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:FS,undefined:"undefined"},item:{string:FS,undefined:"undefined"},__type__:{string:FS,object:BS}},selectable:{boolean:RS},sequentialSelection:{boolean:RS},showCurrentTime:{boolean:RS},showMajorLabels:{boolean:RS},showMinorLabels:{boolean:RS},showWeekScale:{boolean:RS},stack:{boolean:RS},stackSubgroups:{boolean:RS},cluster:{maxItems:{number:LS,undefined:"undefined"},titleTemplate:{string:FS,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:RS,undefined:"undefined"},fitOnDoubleClick:{boolean:RS,undefined:"undefined"},__type__:{boolean:RS,object:BS}},snap:{function:"function",null:"null"},start:{date:zS,number:LS,string:FS,moment:HS},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:FS,function:"function"},showTooltips:{boolean:RS},tooltip:{followMouse:{boolean:RS},overflowMethod:{string:["cap","flip","none"]},delay:{number:LS},template:{function:"function"},__type__:{object:BS}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:RS,object:BS}},timeAxis:{scale:{string:FS,undefined:"undefined"},step:{number:LS,undefined:"undefined"},__type__:{object:BS}},type:{string:FS},width:{string:FS,number:LS},preferZoom:{boolean:RS},zoomable:{boolean:RS},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:LS},zoomMax:{number:LS},zoomMin:{number:LS},xss:{disabled:{boolean:RS},filterOptions:{__any__:{any:"any"},__type__:{object:BS}},__type__:{object:BS}},__type__:{object:BS}},WS={global:{align:["center","left","right"],alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},groupHeightMode:["auto","fixed","fitItems"],groupsDraggable:!1,height:"",locale:"",longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","shiftKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}};var YS={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 VS{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 YS[t]}setColor(t){let e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var o=this._isColorString(t);if(void 0!==o&&(t=o),!0===iy.isString(t)){if(!0===iy.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===iy.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===iy.isValidHex(t)){let i=iy.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: "+_f(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=iy.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Ji(()=>{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=iy.extend({},t)),this.color=t;let e=iy.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,o=this.r*e.s,n=this.centerCoordinates.x+o*Math.sin(i*e.h),s=this.centerCoordinates.y+o*Math.cos(i*e.h);this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){let e=iy.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=iy.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=iy.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 o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),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),Of(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,o;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 n=this;this.opacityRange.onchange=function(){n._setOpacity(this.value)},this.opacityRange.oninput=function(){n._setOpacity(this.value)},this.brightnessRange.onchange=function(){n._setBrightness(this.value)},this.brightnessRange.oninput=function(){n._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=Ni(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=Ni(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=Ni(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=Ni(o=this._loadLast).call(o,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 Gw(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),Ww(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,o,n,s=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,s,r),this.centerCoordinates={x:.5*s,y:.5*r},this.r=.49*s;let a,h=2*Math.PI/360,l=1/360,c=1/this.r;for(o=0;o<360;o++)for(n=0;n<this.r;n++)e=this.centerCoordinates.x+n*Math.sin(h*o),i=this.centerCoordinates.y+n*Math.cos(h*o),a=iy.HSVToRGB(o*l,n*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,s,r)}this.generated=!0}_moveSelector(t){let e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,o=t.center.y-e.top,n=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=o-n,h=Math.atan2(r,a),l=.98*Math.min(Math.sqrt(r*r+a*a),s),c=Math.cos(h)*l+n,d=Math.sin(h)*l+s;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=iy.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;let f=iy.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 US{constructor(t,e,i){let o=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},iy.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new VS(o),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(yi(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!==cr(t)&&(this.options.filter=cr(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===cr(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=cr(this.options),e=0,i=!1;for(let o in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,o)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(o,[]),i=i||this._handleObject(this.configureOptions[o],[o],!0)):!0!==t&&-1===Em(t).call(t,o)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(o),this._handleObject(this.configureOptions[o],[o])),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 n=document.createElement("div");n.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return Ko(i).call(i,t=>{n.appendChild(t)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(t){let e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=iy.xss(t),this._makeItem([],e)}_makeLabel(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,o.innerHTML=!0===i?iy.xss("<i><b>"+t+":</b></i>"):iy.xss(t+":"),o}_makeDropdown(t,e,i){let o=document.createElement("select");o.className="vis-configuration vis-config-select";let n=0;void 0!==e&&-1!==Em(t).call(t,e)&&(n=Em(t).call(t,e));for(let e=0;e<t.length;e++){let i=document.createElement("option");i.value=t[e],e===n&&(i.selected="selected"),i.innerHTML=t[e],o.appendChild(i)}let s=this;o.onchange=function(){s._update(this.value,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,o)}_makeRange(t,e,i){let o=t[0],n=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=n,a.max=s}catch(t){}a.step=r;let h="",l=0;if(void 0!==e){let t=1.2;e<0&&e*t<n?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<n&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=o;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=iy.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=Ji(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Ji(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){var o=document.createElement("input");o.type="checkbox",o.className="vis-configuration vis-config-checkbox",o.checked=t,void 0!==e&&(o.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 n=this;o.onchange=function(){n._update(this.checked,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeTextInput(t,e,i){var o=document.createElement("input");o.type="text",o.className="vis-configuration vis-config-text",o.value=e,e!==t&&this.changedOptions.push({path:i,value:e});let n=this;o.onchange=function(){n._update(this.value,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeColorField(t,e,i){let o=t[1],n=document.createElement("div");"none"!==(e=void 0===e?o:e)?(n.className="vis-configuration vis-config-colorBlock",n.style.backgroundColor=e):n.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,n.onclick=()=>{this._showColorPicker(e,n,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{let o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,this._update(o,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],o=!1,n=cr(this.options),s=!1;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;o=!0;let a=t[r],h=iy.copyAndExtendArray(e,r);if("function"==typeof n&&(o=n(r,e),!1===o&&!yi(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==o){s=!0;let t=this._getValue(h);if(yi(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!==Em(e).call(e,"physics")&&this.moduleOptions.physics.solver!==r&&(t=!1),!0===t)if(void 0!==a.enabled){let t=iy.copyAndExtendArray(h,"enabled"),e=this._getValue(t);if(!0===e){let t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,e,h)}else{let t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}_handleArray(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}_update(t,e){let i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===o[e[i]]&&(o[e[i]]={}),i!==e.length-1?o=o[e[i]]:o[e[i]]=t);return i}_printOptions(){let t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+_f(t,null,2)+"</pre>"}getOptions(){let t={};for(var e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}class XS extends d_{constructor(t,e,i,o){var n,s,r,a,h,l,c;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof XS))throw new SyntaxError("Constructor must be called with the new operator");if(!yi(i)&&!qb(i)&&i instanceof Object){const t=o;o=i,i=t}o&&o.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:$o},this.options=iy.deepExtend({},this.defaultOptions),o&&iy.setupXSSProtection(o.xss),this._create(t),!o||o&&void 0===o.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=o.rtl;o&&(o.rollingMode&&(this.options.rollingMode=o.rollingMode),o.onInitialDrawComplete&&(this.options.onInitialDrawComplete=o.onInitialDrawComplete),o.onTimeout&&(this.options.onTimeout=o.onTimeout),o.loadingScreenTemplate&&(this.options.loadingScreenTemplate=o.loadingScreenTemplate));const u=document.createElement("div");if(this.options.loadingScreenTemplate){var p;const t=Ni(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=iy.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:Ni(n=this.on).call(n,this),off:Ni(s=this.off).call(s,this),emit:Ni(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>d.timeAxis.step.scale,getStep:()=>d.timeAxis.step.step,toScreen:Ni(a=d._toScreen).call(a,d),toGlobalScreen:Ni(h=d._toGlobalScreen).call(h,d),toTime:Ni(l=d._toTime).call(l,d),toGlobalTime:Ni(c=d._toGlobalTime).call(c,d)}},this.range=new bw(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new Vw(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new u_(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new IS(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&&Ji(()=>d.options.onInitialDrawComplete(),0))}}),this.on("destroyTimeline",()=>{d.destroy()}),o&&this.setOptions(o),this.body.emitter.on("fit",t=>{this._onFit(t),this.redraw()}),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}_createConfigurator(){return new US(this,this.dom.container,WS)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===NS.validate(t,GS)&&console.log("%cErrors have been found in the supplied options object.",MS),d_.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?qb(t)?Qb(t):Qb(new i(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 o=t=>!1!==t.visible;t?(yi(t)&&(t=new i(t)),e=new n(t,{filter:o})):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=yi(t)?t:[t],o=this.itemsData.get(i);let n=null,s=null;if(Ko(o).call(o,t=>{const e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||e<n)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){const t=this,o=this.itemSet.items[i[0]];let r=-1*this._getScrollTop(),a=null;const h=(e,i,n)=>{const s=$S(t,o);if(!1===s)return;if(a||(a=s),a.itemTop==s.itemTop&&!a.shouldScroll)return;a.itemTop!=s.itemTop&&s.shouldScroll&&(a=s,r=-1*t._getScrollTop());const h=r,l=a.scrollOffset,c=n?l:h+(l-h)*e;t._setScrollTop(-c),i||t._redraw()},l=()=>{const e=$S(t,o);e.shouldScroll&&e.itemTop!=a.itemTop&&(t._setScrollTop(-e.scrollOffset),t._redraw())},c=()=>{l(),Ji(l,100)},d=!e||void 0===e.zoom||e.zoom,u=(n+s)/2,p=d?1.1*(s-n):Math.max(this.range.end-this.range.start,1.1*(s-n)),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 o;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(o=this.getDataRange(),this.moveTo(o.min.valueOf(),{animation:i},e)):(o=this.getItemRange(),this.range.setRange(o.min,o.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,o=null,n=null;if(null!=e&&null!=i){let t=i-e;t<=0&&(t=10);const s=t/this.props.center.width,r={};let a=0;Ko(iy).call(iy,this.itemSet.items,(t,e)=>{if(t.groupShowing){const i=!0;r[e]=t.redraw(i),a=r[e].length}});if(a>0)for(let t=0;t<a;t++)Ko(iy).call(iy,r,e=>{e[t]()});if(Ko(iy).call(iy,this.itemSet.items,t=>{const r=qS(t),a=KS(t);let h,l;this.options.rtl?(h=r-(t.getWidthRight()+10)*s,l=a+(t.getWidthLeft()+10)*s):(h=r-(t.getWidthLeft()+10)*s,l=a+(t.getWidthRight()+10)*s),h<e&&(e=h,o=t),l>i&&(i=l,n=t)}),o&&n){const s=o.getWidthLeft()+10,r=n.getWidthRight()+10,a=this.props.center.width-s-r;a>0&&(this.options.rtl?(e=qS(o)-r*t/a,i=KS(n)+s*t/a):(e=qS(o)-s*t/a,i=KS(n)+r*t/a))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}getDataRange(){let t=null,e=null;var i;this.itemsData&&Ko(i=this.itemsData).call(i,i=>{const o=iy.convert(i.start,"Date").valueOf(),n=iy.convert(null!=i.end?i.end:i.start,"Date").valueOf();(null===t||o<t)&&(t=o),(null===e||n>e)&&(e=n)});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,o=this.dom.centerContainer.getBoundingClientRect(),n=this.options.rtl?o.right-e:e-o.left,s=i-o.top,r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),h=c_.customTimeFromTarget(t),l=this.itemSet.options.snap||null,c=this.body.util.getScale(),d=this.body.util.getStep(),u=this._toTime(n),p=l?l(u,c,d):u,m=iy.getTarget(t);let f=null;return null!=r?f="item":null!=h?f="custom-time":iy.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&iy.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":iy.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":iy.hasParent(m,this.currentTime.bar)?f="current-time":iy.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:r?r.id:null,isCluster:!!r&&!!r.isCluster,items:r?r.items||[]:null,group:a?a.groupId:null,customTime:h?h.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:s,time:u,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}_redraw(){d_.prototype._redraw.call(this)}_onFit(t){const{start:e,end:i,animation:o}=t;i?this.range.setRange(e,i,{animation:o}):this.moveTo(e.valueOf(),{animation:o})}}function qS(t){return iy.convert(t.data.start,"Date").valueOf()}function KS(t){const e=null!=t.data.end?t.data.end:t.data.start;return iy.convert(e,"Date").valueOf()}function $S(t,e){if(!e.parent)return!1;const i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,o=t.props.center.height,n=e.parent;let s=n.top,r=!0;const a=t.timeAxis.options.orientation.axis,h=()=>"bottom"==a?n.height-e.top-e.height:e.top,l=-1*t._getScrollTop(),c=s+h(),d=e.height;return c<l?s+i<=s+h()+d&&(s+=h()-t.itemSet.options.margin.item.vertical):c+d>l+i?s+=h()+d-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,o-i),{shouldScroll:r,scrollOffset:s,itemTop:c}}function ZS(t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].redundant=t[e].used,t[e].used=[])}function QS(t){for(var e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];for(var i=0;i<o.redundant.length;i++)o.redundant[i].parentNode.removeChild(o.redundant[i]);o.redundant=[]}}function JS(t,e,i){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.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o}function tD(t,e,i,o){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.createElement(t),i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n}function eD(t,e,i,o,n,s){var r;if("circle"==i.style?((r=JS("circle",o,n)).setAttributeNS(null,"cx",t),r.setAttributeNS(null,"cy",e),r.setAttributeNS(null,"r",.5*i.size)):((r=JS("rect",o,n)).setAttributeNS(null,"x",t-.5*i.size),r.setAttributeNS(null,"y",e-.5*i.size),r.setAttributeNS(null,"width",i.size),r.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&r.setAttributeNS(null,"style",i.styles),r.setAttributeNS(null,"class",i.className+" vis-point"),s){var a=JS("text",o,n);s.xOffset&&(t+=s.xOffset),s.yOffset&&(e+=s.yOffset),s.content&&(a.textContent=s.content),s.className&&a.setAttributeNS(null,"class",s.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return r}function iD(t,e,i,o,n,s,r,a){if(0!=o){o<0&&(e-=o*=-1);var h=JS("rect",s,r);h.setAttributeNS(null,"x",t-.5*i),h.setAttributeNS(null,"y",e),h.setAttributeNS(null,"width",i),h.setAttributeNS(null,"height",o),h.setAttributeNS(null,"class",n),a&&h.setAttributeNS(null,"style",a)}}class oD{constructor(t,e,i,o,n,s){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=n,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=o,this.formattingFunction=a,i||o){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)),o&&(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 o=0;i<0&&(o=i);let n=!1;for(let t=o;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){n=!0,this.minorStepIdx=t;break}}if(!0===n)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 o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t}followScale(t){const e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=()=>{n.magnitudefactor*=2},r=()=>{n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||s(),s()):(this.minorStepIdx=2,1==e||r(),r()));const a=t.convertValue(0),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 n=this._end*this.scale,c=this.magnitudefactor*this.majorSteps[this.minorStepIdx],d=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){const t=a-n;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>o+1e-5)r(),l=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){r(),l=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e<o-i?(s(),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 nD extends vy{constructor(t,e,i,o){super(),this.id=Vb(),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(gy(t.toPrecision(3))),title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>"".concat(gy(t.toPrecision(3))),title:{text:void 0,style:void 0}}},this.linegraphOptions=o,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=iy.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 n=this;this.body.emitter.on("verticalDrag",()=>{n.dom.lineContainer.style.top="".concat(n.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"];iy.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;ZS(this.svgElements);const e=this.options.iconWidth;let i=11.5;t="left"===this.options.orientation?4:this.width-e-4;const o=Qc(this.groups);ow(o).call(o,(t,e)=>t<e?-1:1);for(const n of o)!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);QS(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){!1===this.iconsRemoved&&(ZS(this.svgElements),QS(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 o=this.options.orientation,n=this.options.showMinorLabels,s=this.options.showMajorLabels,r=this.body.dom.backgroundHorizontal.offsetWidth;e.minorLabelHeight=n?e.minorCharHeight:0,e.majorLabelHeight=s?e.majorCharHeight:0,e.minorLineWidth=r-this.lineOffset-this.width+2*this.options.minorLinesOffset,e.minorLineHeight=1,e.majorLineWidth=r-this.lineOffset-this.width+2*this.options.majorLinesOffset,e.majorLineHeight=1,"left"===o?(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(o)}return t}_redrawLabels(){let t=!1;ZS(this.DOMelements.lines),ZS(this.DOMelements.labels);const e=this.options.orientation,i=null!=this.options[e].range?this.options[e].range:{};let o=!0;null!=i.max&&(this.range.end=i.max,o=!1);let n=!0;null!=i.min&&(this.range.start=i.min,n=!1),this.scale=new oD(this.range.start,this.range.end,n,o,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[e].format),!1===this.master&&null!=this.masterAxis?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display="none"):this.dom.lineContainer.style.display="block",this.maxLabelSize=0;const s=this.scale.getLines();Ko(s).call(s,t=>{const i=t.y,o=t.major;this.options.showMinorLabels&&!1===o&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-minor",this.props.minorCharHeight),o&&i>=0&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-major",this.props.majorCharHeight),!0===this.master&&(o?this._redrawLine(i,e,"vis-grid vis-horizontal vis-major",this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(i,e,"vis-grid vis-horizontal vis-minor",this.options.minorLinesOffset,this.props.minorLineWidth))});let r=0;void 0!==this.options[e].title&&void 0!==this.options[e].title.text&&(r=this.props.titleCharHeight);const a=!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-a&&!0===this.options.visible?(this.width=this.maxLabelSize+a,this.options.width="".concat(this.width,"px"),QS(this.DOMelements.lines),QS(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-a&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+a),this.options.width="".concat(this.width,"px"),QS(this.DOMelements.lines),QS(this.DOMelements.labels),this.redraw(),t=!0):(QS(this.DOMelements.lines),QS(this.DOMelements.labels),t=!1),t}convertValue(t){return this.scale.convertValue(t)}screenToValue(t){return this.scale.screenToValue(t)}_redrawLabel(t,e,i,o,n){const s=tD("div",this.DOMelements.labels,this.dom.frame);s.className=o,s.innerHTML=iy.xss(e),"left"===i?(s.style.left="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="right"):(s.style.right="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="left"),s.style.top="".concat(t-.5*n+this.options.labelOffsetY,"px"),e+="";const r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*r&&(this.maxLabelSize=e.length*r)}_redrawLine(t,e,i,o,n){if(!0===this.master){const s=tD("div",this.DOMelements.lines,this.dom.lineContainer);s.className=i,s.innerHTML="","left"===e?s.style.left="".concat(this.width-o,"px"):s.style.right="".concat(this.width-o,"px"),s.style.width="".concat(n,"px"),s.style.top="".concat(t,"px")}}_redrawTitle(t){if(ZS(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){const e=tD("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t),e.innerHTML=iy.xss(this.options[t].title.text),void 0!==this.options[t].title.style&&iy.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")}QS(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 sD(){}function rD(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 aD(){}function hD(){}function lD(t,e,i,o){this.id=e;this.options=iy.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}function cD(t,e,i,o){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=iy.extend({},this.defaultOptions),this.linegraphOptions=o,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)}sD.draw=function(t,e,i,o){o=o||0;for(var n=function(t,e){var i=void 0;t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(i=t.options.drawPoints.onRender);e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(i=e.group.options.drawPoints.onRender);return i}(i,e),s=0;s<t.length;s++)if(n){var r=n(t[s],e);!0!==r&&"object"!=typeof r||eD(t[s].screen_x+o,t[s].screen_y,rD(e,r),i.svgElements,i.svg,t[s].label)}else eD(t[s].screen_x+o,t[s].screen_y,rD(e),i.svgElements,i.svg,t[s].label)},sD.drawIcon=function(t,e,i,o,n,s){var r=.5*n,a=JS("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",o),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline"),eD(e+.5*o,i,rD(t),s.svgElements,s.svg)},aD.drawIcon=function(t,e,i,o,n,s){var r=.5*n,a=JS("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",o),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline");var h=Math.round(.3*o),l=t.options.barChart.width/h,c=Math.round(.4*n),d=Math.round(.75*n),u=Math.round((o-2*h)/3);if(iD(e+.5*h+u,i+r-c-1,h,c,t.className+" vis-bar",s.svgElements,s.svg,t.style),iD(e+1.5*h+u+2,i+r-d-1,h,d,t.className+" vis-bar",s.svgElements,s.svg,t.style),1==t.options.drawPoints.enabled){var p={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/l,className:t.className};eD(e+.5*h+u,i+r-c-1,p,s.svgElements,s.svg),eD(e+1.5*h+u+2,i+r-d-1,p,s.svgElements,s.svg)}},aD.draw=function(t,e,i){var o,n,s,r,a,h,l=[],c={},d=0;for(a=0;a<t.length;a++)if("bar"===(r=i.groups[t[a]]).options.style&&!0===r.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(h=0;h<e[t[a]].length;h++)l.push({screen_x:e[t[a]][h].screen_x,screen_end:e[t[a]][h].screen_end,screen_y:e[t[a]][h].screen_y,x:e[t[a]][h].x,end:e[t[a]][h].end,y:e[t[a]][h].y,groupId:t[a],label:e[t[a]][h].label}),d+=1;if(0!==d)for(ow(l).call(l,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}),aD._getDataIntersections(c,l),a=0;a<l.length;a++){var u=null!=(r=i.groups[l[a].groupId]).options.barChart.minWidth?r.options.barChart.minWidth:.1*r.options.barChart.width,p=0;if(void 0===c[n=l[a].screen_x])a+1<l.length&&(o=Math.abs(l[a+1].screen_x-n)),s=aD._getSafeDrawData(o,r,u);else{var m=a+(c[n].amount-c[n].resolved);m<l.length&&(o=Math.abs(l[m].screen_x-n)),s=aD._getSafeDrawData(o,r,u),c[n].resolved+=1,!0===r.options.stack&&!0!==r.options.excludeFromStacking?l[a].screen_y<r.zeroPosition?(p=c[n].accumulatedNegative,c[n].accumulatedNegative+=r.zeroPosition-l[a].screen_y):(p=c[n].accumulatedPositive,c[n].accumulatedPositive+=r.zeroPosition-l[a].screen_y):!0===r.options.barChart.sideBySide&&(s.width=s.width/c[n].amount,s.offset+=c[n].resolved*s.width-.5*s.width*(c[n].amount+1))}let t=s.width,e=l[a].screen_x;if(null!=l[a].screen_end?(t=l[a].screen_end-l[a].screen_x,e+=.5*t):e+=s.offset,iD(e,l[a].screen_y-p,t,r.zeroPosition-l[a].screen_y,r.className+" vis-bar",i.svgElements,i.svg,r.style),!0===r.options.drawPoints.enabled){let t={screen_x:l[a].screen_x,screen_y:l[a].screen_y-p,x:l[a].x,y:l[a].y,groupId:l[a].groupId,label:l[a].label};sD.draw([t],r,i,s.offset)}}},aD._getDataIntersections=function(t,e){for(var i,o=0;o<e.length;o++)o+1<e.length&&(i=Math.abs(e[o+1].screen_x-e[o].screen_x)),o>0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},aD._getSafeDrawData=function(t,e,i){var o,n;return t<e.options.barChart.width&&t>0?(o=t<i?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,n=0,"left"===e.options.barChart.align?n-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(n+=.5*e.options.barChart.width)),{width:o,offset:n}},aD.getStackedYRange=function(t,e,i,o,n){if(t.length>0){ow(t).call(t,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x});var s={};aD._getDataIntersections(s,t),e[o]=aD._getStackedYRange(s,t),e[o].yAxisOrientation=n,i.push(o)}},aD._getStackedYRange=function(t,e){for(var i,o=e[0].screen_y,n=e[0].screen_y,s=0;s<e.length;s++)void 0===t[i=e[s].screen_x]?(o=o>e[s].screen_y?e[s].screen_y:o,n=n<e[s].screen_y?e[s].screen_y:n):e[s].screen_y<0?t[i].accumulatedNegative+=e[s].screen_y:t[i].accumulatedPositive+=e[s].screen_y;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(o=(o=o>t[r].accumulatedNegative?t[r].accumulatedNegative:o)>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=(n=n<t[r].accumulatedNegative?t[r].accumulatedNegative:n)<t[r].accumulatedPositive?t[r].accumulatedPositive:n);return{min:o,max:n}},hD.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?hD._catmullRom(t,e):hD._linear(t)}},hD.drawIcon=function(t,e,i,o,n,s){var r,a,h=.5*n,l=JS("rect",s.svgElements,s.svg);(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-h),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*h),l.setAttributeNS(null,"class","vis-outline"),(r=JS("path",s.svgElements,s.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&r.setAttributeNS(null,"style",t.style),r.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(a=JS("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-h)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-h)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+h)+" L"+(e+o)+","+(i+h)+"L"+(e+o)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&eD(e+.5*o,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},s.svgElements,s.svg)},hD.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var n,s=Number(o.svg.style.height.replace("px","")),r=JS("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h=0;h="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),n="group"==e.options.shaded.orientation&&null!=i&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+h+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",n)}},hD.draw=function(t,e,i){if(null!=t&&null!=t){var o=JS("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var n="L";1==e.options.interpolation.enabled&&(n="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,n,!1))}},hD.serializePath=function(t,e,i){if(t.length<2)return"";var o,n=e;if(i)for(o=t.length-2;o>0;o--)n+=t[o][0]+","+t[o][1]+" ";else for(o=1;o<t.length;o++)n+=t[o][0]+","+t[o][1]+" ";return n},hD._catmullRomUniform=function(t){var e,i,o,n,s,r,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],o=t[c+1],n=c+2<l?t[c+2]:o,s={screen_x:(-e.screen_x+6*i.screen_x+o.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+o.screen_y)*h},r={screen_x:(i.screen_x+6*o.screen_x-n.screen_x)*h,screen_y:(i.screen_y+6*o.screen_y-n.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([o.screen_x,o.screen_y]);return a},hD._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var o,n,s,r,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++)o=0==S?t[0]:t[S-1],n=t[S],s=t[S+1],r=S+2<C?t[S+2]:s,l=Math.sqrt(Math.pow(o.screen_x-n.screen_x,2)+Math.pow(o.screen_y-n.screen_y,2)),c=Math.sqrt(Math.pow(n.screen_x-s.screen_x,2)+Math.pow(n.screen_y-s.screen_y,2)),d=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.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*o.screen_x+u*n.screen_x+w*s.screen_x)*m,screen_y:(-y*o.screen_y+u*n.screen_y+w*s.screen_y)*m},h={screen_x:(b*n.screen_x+p*s.screen_x-y*r.screen_x)*f,screen_y:(b*n.screen_y+p*s.screen_y-y*r.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},hD._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},lD.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==ow(this.options)&&iy.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},lD.prototype.getItems=function(){return this.itemsData},lD.prototype.setZeroPosition=function(t){this.zeroPosition=t},lD.prototype.setOptions=function(t){if(void 0!==t){iy.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),iy.mergeOptions(this.options,t,"interpolation"),iy.mergeOptions(this.options,t,"drawPoints"),iy.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))}},lD.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)},lD.prototype.getLegend=function(t,e,i,o,n){null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]});switch(null!=o&&null!=o||(o=0),null!=n&&null!=n||(n=.5*e),this.options.style){case"line":hD.drawIcon(this,o,n,t,e,i);break;case"points":case"point":sD.drawIcon(this,o,n,t,e,i);break;case"bar":aD.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},lD.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;o<t.length;o++)e=e>t[o].y?t[o].y:e,i=i<t[o].y?t[o].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},cD.prototype=new vy,cD.prototype.clear=function(){this.groups={},this.amountOfGroups=0},cD.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1)},cD.prototype.updateGroup=function(t,e){this.groups[t]=e},cD.prototype.removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)},cD.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)},cD.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},cD.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},cD.prototype.setOptions=function(t){iy.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},cD.prototype.redraw=function(){var t=0,e=Qc(this.groups);ow(e).call(e,function(t,e){return t<e?-1:1});for(var i=0;i<e.length;i++){var o=e[i];1!=this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&1!=this.linegraphOptions.visibility[o]||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 n=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+n+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px",this.drawLegendIcons());var s="";for(i=0;i<e.length;i++)o=e[i],1!=this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&1!=this.linegraphOptions.visibility[o]||(s+=this.groups[o].content+"<br />");this.dom.textArea.innerHTML=iy.xss(s),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},cD.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Qc(this.groups);ow(t).call(t,function(t,e){return t<e?-1:1}),ZS(l=this.svgElements),QS(l),ZS(l);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,s=.75*this.options.iconSize,r=i+.5*s+3;this.svg.style.width=n+5+i+"px";for(var a=0;a<t.length;a++){var h=t[a];1!=this.groups[h].visible||void 0!==this.linegraphOptions.visibility[h]&&1!=this.linegraphOptions.visibility[h]||(this.groups[h].getLegend(n,s,this.framework,o,r),r+=s+this.options.iconSpacing)}}var l};var dD="__ungrouped__";function uD(t,e){this.id=Vb(),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=iy.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=iy.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}}uD.prototype=new vy,uD.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 nD(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new nD(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new cD(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new cD(this.body,this.options.legend,"right",this.options.groups),this.show()},uD.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&&vm((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),iy.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),iy.mergeOptions(this.options,t,"interpolation"),iy.mergeOptions(this.options,t,"drawPoints"),iy.mergeOptions(this.options,t,"shaded"),iy.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,dD)&&this.groups[dD].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},uD.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},uD.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},uD.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!qb(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=Qb(t)}else this.itemsData=null;if(o&&(Ko(iy).call(iy,this.itemListeners,function(t,e){o.off(e,t)}),o.dispose(),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;Ko(iy).call(iy,this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e)}},uD.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){Ko(iy).call(iy,this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null;for(var o=0;o<e.length;o++)this._removeGroup(e[o])}if(t){if(!qb(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=this.id;Ko(iy).call(iy,this.groupListeners,function(t,e){i.groupsData.on(e,t,n)}),e=this.groupsData.getIds(),this._onAddGroups(e)}},uD.prototype._onUpdate=function(t){this._updateAllGroupData(t)},uD.prototype._onAdd=function(t){this._onUpdate(t)},uD.prototype._onRemove=function(t){this._onUpdate(t)},uD.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},uD.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},uD.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})},uD.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])},uD.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 lD(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()},uD.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},o=this.itemsData.get(),n=this.itemsData.idProp,s={};t&&Ac(t).call(t,function(t){s[t]=t});for(var r={},a=0;a<o.length;a++){var h=o[a],l=h.group;null==l&&(l=dD),Object.prototype.hasOwnProperty.call(r,l)?r[l]++:r[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]=cr(d).call(d,function(t){return c[t[n]]=t[n],t[n]!==s[t[n]]});var u=r[l];r[l]-=i[l].length,i[l].length<u&&(i[l][u-1]={})}for(a=0;a<o.length;a++)if(null==(l=(h=o[a]).group)&&(l=dD),e||!t||h[n]===s[h[n]]||!Object.prototype.hasOwnProperty.call(c,h[n])){Object.prototype.hasOwnProperty.call(i,l)||(i[l]=new Array(r[l]));var p=iy.bridgeObject(h);p.x=iy.convert(h.x,"Date"),p.end=iy.convert(h.end,"Date"),p.orginalY=h.y,p.y=Number(h.y),p[n]=h[n];var m=i[l].length-r[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})}},uD.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,o=i!=this.lastVisibleInterval;(this.lastVisibleInterval=i,1==t)&&(this.svg.style.width=iy.option.asSize(3*this.props.width),this.svg.style.left=iy.option.asSize(-this.props.width),-1==Em(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==o||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 n=this.body.range.start-this.lastStart,s=this.body.range.end-this.body.range.start;if(0!=this.props.width){var r=n*(this.props.width/s);this.svg.style.left=-this.props.width-r+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},uD.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})}iy.insertSort(t,function(t,e){var i=t.zIndex,o=e.zIndex;return void 0===i&&(i=0),void 0===o&&(o=0),i==o?0:i<o?-1:1});for(var o=new Array(t.length),n=0;n<t.length;n++)o[n]=t[n].id;return o},uD.prototype._updateGraph=function(){if(ZS(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},o=this.body.util.toGlobalTime(-this.body.domProps.root.width),n=this.body.util.toGlobalTime(2*this.body.domProps.root.width),s=this._getSortedGroupIds();if(s.length>0){var r={};for(this._getRelevantData(s,r,o,n),this._applySampling(s,r),e=0;e<s.length;e++)this._convertXcoordinates(r[s[e]]);if(this._getYRanges(s,r,i),1==this._updateYAxis(s,i))return QS(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<s.length;e++)t=this.groups[s[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(r[t.id],r[a.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==a.options.shaded.orientation?(a.options.shaded.orientation="group",a.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=a.id))),a=t)),this._convertYcoordinates(r[s[e]],t);var h={};for(e=0;e<s.length;e++)if("line"===(t=this.groups[s[e]]).options.style&&1==t.options.shaded.enabled){var l=r[s[e]];if(null==l||0==l.length)continue;if(Object.prototype.hasOwnProperty.call(h,s[e])||(h[s[e]]=hD.calcPath(l,t)),"group"===t.options.shaded.orientation){var c=t.options.shaded.groupId;if(-1===Em(s).call(s,c)){console.log(t.id+": Unknown shading group target given:"+c);continue}Object.prototype.hasOwnProperty.call(h,c)||(h[c]=hD.calcPath(r[c],this.groups[c])),hD.drawShading(h[s[e]],t,h[c],this.framework)}else hD.drawShading(h[s[e]],t,void 0,this.framework)}for(aD.draw(s,r,this.framework),e=0;e<s.length;e++)if(t=this.groups[s[e]],r[s[e]].length>0)switch(t.options.style){case"line":Object.prototype.hasOwnProperty.call(h,s[e])||(h[s[e]]=hD.calcPath(r[s[e]],t)),hD.draw(h[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||sD.draw(r[s[e]],t,this.framework)}}}return QS(this.svgElements),!1},uD.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;a<t.length;a++){s=void 0,r=void 0;for(var h=i;h<e.length;h++){if(e[h].x===t[a].x){s=e[h],r=e[h],i=h;break}if(e[h].x>t[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,t[a].y=0==o?t[a].orginalY+r.y:t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},uD.prototype._getRelevantData=function(t,e,i,o){var n,s,r,a;if(t.length>0)for(s=0;s<t.length;s++){var h=(n=this.groups[t[s]]).getItems();if(1==ow(n.options)){var l=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},c=Math.max(0,iy.binarySearchValue(h,i,"x","before",l)),d=Math.min(h.length,iy.binarySearchValue(h,o,"x","after",l)+1);d<=0&&(d=h.length);var u=new Array(d-c);for(r=c;r<d;r++)a=n.itemsData[r],u[r-c]=a;e[t[s]]=u}else e[t[s]]=n.itemsData}},uD.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 o=e[t[i]];if(o.length>0){var n,s=o.length,r=s/(this.body.util.toGlobalScreen(o[o.length-1].x)-this.body.util.toGlobalScreen(o[0].x));n=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(r)));for(var a=new Array(s),h=0;h<s;h+=n){a[Math.round(h/n)]=o[h]}e[t[i]]=ku(a).call(a,0,Math.round(s/n))}}},uD.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s<t.length;s++)o=e[t[s]],r=this.groups[t[s]].options,o.length>0&&(n=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=Lp(a).call(a,o):h=Lp(h).call(h,o):i[t[s]]=n.getYRange(o,t[s]));aD.getStackedYRange(a,i,t,"__barStackLeft","left"),aD.getStackedYRange(h,i,t,"__barStackRight","right")}},uD.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,l=-1e9,c=-1e9;if(t.length>0){for(var d=0;d<t.length;d++){var u=this.groups[t[d]];u&&"right"!=u.options.yAxisOrientation?(s=!0,a=1e9,l=-1e9):u&&u.options.yAxisOrientation&&(r=!0,h=1e9,c=-1e9)}for(d=0;d<t.length;d++)Object.prototype.hasOwnProperty.call(e,t[d])&&!0!==e[t[d]].ignore&&(i=e[t[d]].min,o=e[t[d]].max,"right"!=e[t[d]].yAxisOrientation?(s=!0,a=a>i?i:a,l=l<o?o:l):(r=!0,h=h>i?i:h,c=c<o?o:c));1==s&&this.yAxisLeft.setRange(a,l),1==r&&this.yAxisRight.setRange(h,c)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==r?this.yAxisRight.width:0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(d=0;d<p.length;d++)-1!=Em(t).call(t,p[d])&&ku(t).call(t,Em(t).call(t,p[d]),1);return n},uD.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},uD.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},uD.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,o=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var n=0;n<t.length;n++)t[n].screen_y=Math.round(i.convertValue(t[n].y));e.setZeroPosition(Math.min(o,i.convertValue(0)))};let pD="string",mD="boolean",fD="number",gD="date",vD="object",bD="moment",yD={configure:{enabled:{boolean:mD},filter:{boolean:mD,function:"function"},container:{dom:"dom"},__type__:{object:vD,boolean:mD,function:"function"}},alignCurrentTime:{string:pD,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:pD},sort:{boolean:mD},sampling:{boolean:mD},stack:{boolean:mD},graphHeight:{string:pD,number:fD},shaded:{enabled:{boolean:mD},orientation:{string:["bottom","top","zero","group"]},groupId:{object:vD},__type__:{boolean:mD,object:vD}},style:{string:["line","bar","points"]},barChart:{width:{number:fD},minWidth:{number:fD},sideBySide:{boolean:mD},align:{string:["left","center","right"]},__type__:{object:vD}},interpolation:{enabled:{boolean:mD},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:fD},__type__:{object:vD,boolean:mD}},drawPoints:{enabled:{boolean:mD},onRender:{function:"function"},size:{number:fD},style:{string:["square","circle"]},__type__:{object:vD,boolean:mD,function:"function"}},dataAxis:{showMinorLabels:{boolean:mD},showMajorLabels:{boolean:mD},showWeekScale:{boolean:mD},icons:{boolean:mD},width:{string:pD,number:fD},visible:{boolean:mD},alignZeros:{boolean:mD},left:{range:{min:{number:fD,undefined:"undefined"},max:{number:fD,undefined:"undefined"},__type__:{object:vD}},format:{function:"function"},title:{text:{string:pD,number:fD,undefined:"undefined"},style:{string:pD,undefined:"undefined"},__type__:{object:vD}},__type__:{object:vD}},right:{range:{min:{number:fD,undefined:"undefined"},max:{number:fD,undefined:"undefined"},__type__:{object:vD}},format:{function:"function"},title:{text:{string:pD,number:fD,undefined:"undefined"},style:{string:pD,undefined:"undefined"},__type__:{object:vD}},__type__:{object:vD}},__type__:{object:vD}},legend:{enabled:{boolean:mD},icons:{boolean:mD},left:{visible:{boolean:mD},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:vD}},right:{visible:{boolean:mD},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:vD}},__type__:{object:vD,boolean:mD}},groups:{visibility:{any:"any"},__type__:{object:vD}},autoResize:{boolean:mD},throttleRedraw:{number:fD},clickToUse:{boolean:mD},end:{number:fD,date:gD,string:pD,moment:bD},format:{minorLabels:{millisecond:{string:pD,undefined:"undefined"},second:{string:pD,undefined:"undefined"},minute:{string:pD,undefined:"undefined"},hour:{string:pD,undefined:"undefined"},weekday:{string:pD,undefined:"undefined"},day:{string:pD,undefined:"undefined"},week:{string:pD,undefined:"undefined"},month:{string:pD,undefined:"undefined"},quarter:{string:pD,undefined:"undefined"},year:{string:pD,undefined:"undefined"},__type__:{object:vD}},majorLabels:{millisecond:{string:pD,undefined:"undefined"},second:{string:pD,undefined:"undefined"},minute:{string:pD,undefined:"undefined"},hour:{string:pD,undefined:"undefined"},weekday:{string:pD,undefined:"undefined"},day:{string:pD,undefined:"undefined"},week:{string:pD,undefined:"undefined"},month:{string:pD,undefined:"undefined"},quarter:{string:pD,undefined:"undefined"},year:{string:pD,undefined:"undefined"},__type__:{object:vD}},__type__:{object:vD}},moment:{function:"function"},height:{string:pD,number:fD},hiddenDates:{start:{date:gD,number:fD,string:pD,moment:bD},end:{date:gD,number:fD,string:pD,moment:bD},repeat:{string:pD},__type__:{object:vD,array:"array"}},locale:{string:pD},locales:{__any__:{any:"any"},__type__:{object:vD}},max:{date:gD,number:fD,string:pD,moment:bD},maxHeight:{number:fD,string:pD},maxMinorChars:{number:fD},min:{date:gD,number:fD,string:pD,moment:bD},minHeight:{number:fD,string:pD},moveable:{boolean:mD},multiselect:{boolean:mD},orientation:{string:pD},showCurrentTime:{boolean:mD},showMajorLabels:{boolean:mD},showMinorLabels:{boolean:mD},showWeekScale:{boolean:mD},snap:{function:"function",null:"null"},start:{date:gD,number:fD,string:pD,moment:bD},timeAxis:{scale:{string:pD,undefined:"undefined"},step:{number:fD,undefined:"undefined"},__type__:{object:vD}},width:{string:pD,number:fD},zoomable:{boolean:mD},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:fD},zoomMin:{number:fD},zIndex:{number:fD},__type__:{object:vD}},wD={global:{alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",quarter:"[Q]Q",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",quarter:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function _D(t,e,i,o){var n,s,r,a,h,l,c;if(!yi(i)&&!qb(i)&&i instanceof Object){var d=o;o=i,i=d}o&&o.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:$o,width:null,height:null,maxHeight:null,minHeight:null},this.options=iy.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Ni(n=this.on).call(n,this),off:Ni(s=this.off).call(s,this),emit:Ni(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>u.timeAxis.step.scale,getStep:()=>u.timeAxis.step.step,toScreen:Ni(a=u._toScreen).call(a,u),toGlobalScreen:Ni(h=u._toGlobalScreen).call(h,u),toTime:Ni(l=u._toTime).call(l,u),toGlobalTime:Ni(c=u._toGlobalTime).call(c,u)}},this.range=new bw(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new Vw(this.body),this.components.push(this.timeAxis),this.currentTime=new u_(this.body),this.components.push(this.currentTime),this.linegraph=new uD(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&&Ji(()=>u.options.onInitialDrawComplete(),0))}}),o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}_D.prototype=new d_,_D.prototype.setOptions=function(t){!0===NS.validate(t,yD)&&console.log("%cErrors have been found in the supplied options object.",MS),d_.prototype.setOptions.call(this,t)},_D.prototype.setItems=function(t){var e,o=null==this.itemsData;if(e=t?qb(t)?Qb(t):Qb(new i(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),o)if(null!=this.options.start||null!=this.options.end){var n=null!=this.options.start?this.options.start:null,s=null!=this.options.end?this.options.end:null;this.setWindow(n,s,{animation:!1})}else this.fit({animation:!1})},_D.prototype.setGroups=function(t){var e;e=t?qb(t)?t:new i(t):null,this.groupsData=e,this.linegraph.setGroups(e)},_D.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+"'"},_D.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]))},_D.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 o=0;o<this.linegraph.groups[i].itemsData.length;o++){var n=this.linegraph.groups[i].itemsData[o],s=iy.convert(n.x,"Date").valueOf();t=null==t||t>s?s:t,e=null==e||e<s?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},_D.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-iy.getAbsoluteLeft(this.dom.centerContainer),n=i-iy.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(o),r=c_.customTimeFromTarget(t),a=iy.getTarget(t),h=null;iy.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&iy.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":iy.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||iy.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":iy.hasParent(a,this.linegraph.legendLeft.dom.frame)||iy.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=r?h="custom-time":iy.hasParent(a,this.currentTime.bar)?h="current-time":iy.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(n)),!d.hidden&&this.itemsData.length>0&&l.push(d.screenToValue(n)),{event:t,customTime:r?r.options.id:null,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:s,value:l}},_D.prototype._createConfigurator=function(){return new US(this,this.dom.container,wD)};const xD=function(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}();t.locale(xD);const CD={Core:d_,DateUtil:vw,Range:bw,stack:eS,TimeStep:Yw,components:{items:{Item:sS,BackgroundItem:lS,BoxItem:rS,ClusterItem:DS,PointItem:aS,RangeItem:hS},BackgroundGroup:nS,Component:vy,CurrentTime:u_,CustomTime:c_,DataAxis:nD,DataScale:oD,GraphGroup:lD,Group:oS,ItemSet:IS,Legend:cD,LineGraph:uD,TimeAxis:Vw}};export{_D as Graph2d,XS as Timeline,CD as timeline};
//# sourceMappingURL=vis-timeline-graph2d.min.mjs.map
