1!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.vis=t()}}(function(){var t;return function t(e,i,o){function s(r,a){if(!i[r]){if(!e[r]){var h="function"==typeof require&&require;if(!a&&h)return h(r,!0);if(n)return n(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var l=i[r]={exports:{}};e[r][0].call(l.exports,function(t){var i=e[r][1][t];return s(i||t)},l,l.exports,t,e,i,o)}return i[r].exports}for(var n="function"==typeof require&&require,r=0;r<o.length;r++)s(o[r]);return s}({1:[function(t,e,i){i.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},i.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i<t[e].redundant.length;i++)t[e].redundant[i].parentNode.removeChild(t[e].redundant[i]);t[e].redundant=[]}},i.getSVGElement=function(t,e,i){var o;return e.hasOwnProperty(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},i.getDOMElement=function(t,e,i,o){var s;return e.hasOwnProperty(t)?e[t].redundant.length>0?(s=e[t].redundant[0],e[t].redundant.shift()):(s=document.createElement(t),void 0!==o?i.insertBefore(s,o):i.appendChild(s)):(s=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(s,o):i.appendChild(s)),e[t].used.push(s),s},i.drawPoint=function(t,e,o,s,n,r){var a;"circle"==o.options.drawPoints.style?(a=i.getSVGElement("circle",s,n),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",e),a.setAttributeNS(null,"r",.5*o.options.drawPoints.size)):(a=i.getSVGElement("rect",s,n),a.setAttributeNS(null,"x",t-.5*o.options.drawPoints.size),a.setAttributeNS(null,"y",e-.5*o.options.drawPoints.size),a.setAttributeNS(null,"width",o.options.drawPoints.size),a.setAttributeNS(null,"height",o.options.drawPoints.size)),void 0!==o.options.drawPoints.styles&&a.setAttributeNS(null,"style",o.group.options.drawPoints.styles),a.setAttributeNS(null,"class",o.className+" point");
1var h=i.getSVGElement("text",s,n);return r&&(r.xOffset&&(t+=r.xOffset),r.yOffset&&(e+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" label")),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",e),a},i.drawBar=function(t,e,o,s,n,r,a){if(0!=s){s<0&&(s*=-1,e-=s);var h=i.getSVGElement("rect",r,a);h.setAttributeNS(null,"x",t-.5*o),h.setAttributeNS(null,"y",e),h.setAttributeNS(null,"width",o),h.setAttributeNS(null,"height",s),h.setAttributeNS(null,"class",n)}}},{}],2:[function(t,e,i){function o(t,e){if(!t||Array.isArray(t)||s.isDataTable(t)||(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i in this._options.type)if(this._options.type.hasOwnProperty(i)){var o=this._options.type[i];this._type[i]="Date"==o||"ISODate"==o||"ASPDate"==o?"Date":o}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var s=t("./util"),n=t("./Queue");o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=n.extend(this,{replace:["add","update","remove"]})),"object"==typeof t.queue&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=o.prototype.on,o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype.unsubscribe=o.prototype.off,o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var o=[];t in this._subscribers&&(o=o.concat(this._subscribers[t])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var s=0;s<o.length;s++){var n=o[s];n.callback&&n.callback(t,e,i||null)}},o.prototype.add=function(t,e){var i,o=[],n=this;if(Array.isArray(t))for(var r=0,a=t.length;r<a;r++)i=n._addItem(t[r]),o.push(i);else if(s.isDataTable(t))for(var h=this._getColumnNames(t),d=0,l=t.getNumberOfRows();d<l;d++){for(var u={},p=0,c=h.length;p<c;p++){var m=h[p];u[m]=t.getValue(d,p)}i=n._addItem(u),o.push(i)}else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=n._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){var i=[],o=[],n=[],r=this,a=r._fieldId,h=function(t){var e=t[a];r._data[e]?(e=r._updateItem(t),o.push(e),n.push(t)):(e=r._addItem(t),i.push(e))};if(Array.isArray(t))for(var d=0,l=t.length;d<l;d++)h(t[d]);else if(s.isDataTable(t))for(var u=this._getColumnNames(t),p=0,c=t.getNumberOfRows();p<c;p++){for(var m={},f=0,g=u.length;f<g;f++){var y=u[f];m[y]=t.getValue(p,f)}h(m)}else{if(!(t instanceof Object))throw new Error("Unknown dataType");h(t)}return i.length&&this._trigger("add",{items:i},e),o.length&&this._trigger("update",{items:o,data:n},e),i.concat(o)},o.prototype.get=function(t){var e,i,o,n,r=this,a=s.getType(arguments[0]);"String"==a||"Number"==a?(e=arguments[0],o=arguments[1],n=arguments[2]):"Array"==a?(i=arguments[0],o=arguments[1],n=arguments[2]):(o=arguments[0],n=arguments[1]);var h;if(o&&o.returnType){if(h=-1==["DataTable","Array","Object"].indexOf(o.returnType)?"Array":o.returnType,n&&h!=s.getType(n))throw new Error('Type of parameter "data" ('+s.getType(n)+") does not correspond with specified options.type ("+o.type+")");if("DataTable"==h&&!s.isDataTable(n))throw new Error('Parameter "data" must be a DataTable when options.type is "DataTable"')}else h=n&&"DataTable"==s.getType(n)?"DataTable":"Array";var d,l,u,p,c=o&&o.type||this._options.type,m=o&&o.filter,f=[];if(void 0!=e)d=r._getItem(e,c),m&&!m(d)&&(d=null);else if(void 0!=i)for(u=0,p=i.length;u<p;u++)d=r._getItem(i[u],c),m&&!m(d)||f.push(d);else for(l in this._data)this._data.hasOwnProperty(l)&&(d=r._getItem(l,c),m&&!m(d)||f.push(d));if(o&&o.order&&void 0==e&&this._sort(f,o.order),o&&o.fields){var g=o.fields;if(void 0!=e)d=this._filterFields(d,g);else for(u=0,p=f.length;u<p;u++)f[u]=this._filterFields(f[u],g)}if("DataTable"==h){var y=this._getColumnNames(n);if(void 0!=e)r._appendRow(n,y,d);else for(u=0;
1u<f.length;u++)r._appendRow(n,y,f[u]);return n}if("Object"==h){var v={};for(u=0;u<f.length;u++)v[f[u].id]=f[u];return v}if(void 0!=e)return d;if(n){for(u=0,p=f.length;u<p;u++)n.push(f[u]);return n}return f},o.prototype.getIds=function(t){var e,i,o,s,n,r=this._data,a=t&&t.filter,h=t&&t.order,d=t&&t.type||this._options.type,l=[];if(a)if(h){n=[];for(o in r)r.hasOwnProperty(o)&&(s=this._getItem(o,d),a(s)&&n.push(s));for(this._sort(n,h),e=0,i=n.length;e<i;e++)l[e]=n[e][this._fieldId]}else for(o in r)r.hasOwnProperty(o)&&(s=this._getItem(o,d),a(s)&&l.push(s[this._fieldId]));else if(h){n=[];for(o in r)r.hasOwnProperty(o)&&n.push(r[o]);for(this._sort(n,h),e=0,i=n.length;e<i;e++)l[e]=n[e][this._fieldId]}else for(o in r)r.hasOwnProperty(o)&&(s=r[o],l.push(s[this._fieldId]));return l},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,o,s=e&&e.filter,n=e&&e.type||this._options.type,r=this._data;if(e&&e.order)for(var a=this.get(e),h=0,d=a.length;h<d;h++)i=a[h],o=i[this._fieldId],t(i,o);else for(o in r)r.hasOwnProperty(o)&&(i=this._getItem(o,n),s&&!s(i)||t(i,o))},o.prototype.map=function(t,e){var i,o=e&&e.filter,s=e&&e.type||this._options.type,n=[],r=this._data;for(var a in r)r.hasOwnProperty(a)&&(i=this._getItem(a,s),o&&!o(i)||n.push(t(i,a)));return e&&e.order&&this._sort(n,e.order),n},o.prototype._filterFields=function(t,e){if(!t)return t;var i={};if(Array.isArray(e))for(var o in t)t.hasOwnProperty(o)&&-1!=e.indexOf(o)&&(i[o]=t[o]);else for(var o in t)t.hasOwnProperty(o)&&e.hasOwnProperty(o)&&(i[e[o]]=t[o]);return i},o.prototype._sort=function(t,e){if(s.isString(e)){var i=e;t.sort(function(t,e){var o=t[i],s=e[i];return o>s?1:o<s?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,o,s,n=[];if(Array.isArray(t))for(i=0,o=t.length;i<o;i++)null!=(s=this._remove(t[i]))&&n.push(s);else null!=(s=this._remove(t))&&n.push(s);return n.length&&this._trigger("remove",{items:n},e),n},o.prototype._remove=function(t){if(s.isNumber(t)||s.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(e&&this._data[e])return delete this._data[e],this.length--,e}return null},o.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){var e=this._data,i=null,o=null;for(var s in e)if(e.hasOwnProperty(s)){var n=e[s],r=n[t];null!=r&&(!i||r>o)&&(i=n,o=r)}return i},o.prototype.min=function(t){var e=this._data,i=null,o=null;for(var s in e)if(e.hasOwnProperty(s)){var n=e[s],r=n[t];null!=r&&(!i||r<o)&&(i=n,o=r)}return i},o.prototype.distinct=function(t){var e,i=this._data,o=[],n=this._options.type&&this._options.type[t]||null,r=0;for(var a in i)if(i.hasOwnProperty(a)){var h=i[a],d=h[t],l=!1;for(e=0;e<r;e++)if(o[e]==d){l=!0;break}l||void 0===d||(o[r]=d,r++)}if(n)for(e=0;e<o.length;e++)o[e]=s.convert(o[e],n);return o},o.prototype._addItem=function(t){var e=t[this._fieldId];void 0!=e?this._data[e]:(e=s.randomUUID(),t[this._fieldId]=e);var i={};for(var o in t)if(t.hasOwnProperty(o)){var n=this._type[o];i[o]=s.convert(t[o],n)}return this._data[e]=i,this.length++,e},o.prototype._getItem=function(t,e){var i,o,n=this._data[t];if(!n)return null;var r={};if(e)for(i in n)n.hasOwnProperty(i)&&(o=n[i],r[i]=s.convert(o,e[i]));else for(i in n)n.hasOwnProperty(i)&&(o=n[i],r[i]=o);return r},o.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var o in t)if(t.hasOwnProperty(o)){var n=this._type[o];i[o]=s.convert(t[o],n)}return e},o.prototype._getColumnNames=function(t){for(var e=[],i=0,o=t.getNumberOfColumns();i<o;i++)e[i]=t.getColumnId(i)||t.getColumnLabel(i);return e},o.prototype._appendRow=function(t,e,i){for(var o=t.addRow(),s=0,n=e.length;s<n;s++){var r=e[s];t.setValue(o,s,i[r])}},e.exports=o},{"./Queue":4,"./util":37}
1],3:[function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var s=t("./util"),n=t("./DataSet");o.prototype.setData=function(t){var e,i,o;if(this._data){this._data.unsubscribe&&this._data.unsubscribe("*",this.listener),e=[];for(var s in this._ids)this._ids.hasOwnProperty(s)&&e.push(s);this._ids={},this.length=0,this._trigger("remove",{items:e})}if(this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),i=0,o=e.length;i<o;i++)s=e[i],this._ids[s]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){for(var t,e=this._data.getIds({filter:this._options&&this._options.filter}),i={},o=[],s=[],n=0;n<e.length;n++)t=e[n],i[t]=!0,this._ids[t]||(o.push(t),this._ids[t]=!0,this.length++);for(t in this._ids)this._ids.hasOwnProperty(t)&&(i[t]||(s.push(t),delete this._ids[t],this.length--));o.length&&this._trigger("add",{items:o}),s.length&&this._trigger("remove",{items:s})},o.prototype.get=function(t){var e,i,o,n=this,r=s.getType(arguments[0]);"String"==r||"Number"==r||"Array"==r?(e=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var a=s.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(t){return n._options.filter(t)&&i.filter(t)});var h=[];return void 0!=e&&h.push(e),h.push(a),h.push(o),this._data&&this._data.get.apply(this._data,h)},o.prototype.getIds=function(t){var e;if(this._data){var i,o=this._options.filter;i=t&&t.filter?o?function(e){return o(e)&&t.filter(e)}:t.filter:o,e=this._data.getIds({filter:i,order:t&&t.order})}else e=[];return e},o.prototype.getDataSet=function(){for(var t=this;t instanceof o;)t=t._data;return t||null},o.prototype._onEvent=function(t,e,i){var o,s,n,r,a=e&&e.items,h=this._data,d=[],l=[],u=[],p=[];if(a&&h){switch(t){case"add":for(o=0,s=a.length;o<s;o++)n=a[o],(r=this.get(n))&&(this._ids[n]=!0,l.push(n));break;case"update":for(o=0,s=a.length;o<s;o++)n=a[o],r=this.get(n),r?this._ids[n]?(u.push(n),d.push(e.data[o])):(this._ids[n]=!0,l.push(n)):this._ids[n]&&(delete this._ids[n],p.push(n));break;case"remove":for(o=0,s=a.length;o<s;o++)n=a[o],this._ids[n]&&(delete this._ids[n],p.push(n))}this.length+=l.length-p.length,l.length&&this._trigger("add",{items:l},i),u.length&&this._trigger("update",{items:u,data:d},i),p.length&&this._trigger("remove",{items:p},i)}},o.prototype.on=n.prototype.on,o.prototype.off=n.prototype.off,o.prototype._trigger=n.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,e.exports=o},{"./DataSet":2,"./util":37}],4:[function(t,e,i){function o(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}o.prototype.setOptions=function(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()},o.extend=function(t,e){var i=new o(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){i.flush()};var s=[{name:"flush",original:void 0}];if(e&&e.replace)for(var n=0;n<e.replace.length;n++){var r=e.replace[n];s.push({name:r,original:t[r]}),i.replace(t,r)}return i._extended={object:t,methods:s},i},o.prototype.destroy=function(){if(this.flush(),this._extended){for(var t=this._extended.object,e=this._extended.methods,i=0;i<e.length;i++){var o=e[i];o.original?t[o.name]=o.original:delete t[o.name]}this._extended=null}},o.prototype.replace=function(t,e){var i=this,o=t[e];if(!o)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.queue({args:t,fn:o,context:this})}},o.prototype.queue=function(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()},o.prototype._flushIfNeeded=function(){if(this._queue.length>this.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},o.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},e.exports=o},{}
1],5:[function(t,e,i){function o(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}o.prototype.setRange=function(t,e,i,o){this._start=t||0,this._end=e||0,this.setStep(i,o)},o.prototype.setStep=function(t,e){void 0===t||t<=0||(void 0!==e&&(this.prettyStep=e),!0===this.prettyStep?this._step=o.calculatePrettyStep(t):this._step=t)},o.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),s=5*Math.pow(10,Math.round(e(t/5))),n=i;return Math.abs(o-t)<=Math.abs(n-t)&&(n=o),Math.abs(s-t)<=Math.abs(n-t)&&(n=s),n<=0&&(n=1),n},o.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},o.prototype.getStep=function(){return this._step},o.prototype.start=function(){this._current=this._start-this._start%this._step},o.prototype.next=function(){this._current+=this._step},o.prototype.end=function(){return this._current>this._end},e.exports=o},{}],6:[function(t,e,i){var o=t("./module/hammer");i.fakeGesture=function(t,e){var i=o.event.getTouchList(e,null),s=o.event.collectEventData(this,null,i,e);return isNaN(s.center.pageX)&&(s.center.pageX=e.pageX),isNaN(s.center.pageY)&&(s.center.pageY=e.pageY),s}},{"./module/hammer":7}],7:[function(t,e,i){"undefined"!=typeof window?e.exports=window.Hammer||t("hammerjs"):e.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},{hammerjs:39}],8:[function(t,e,i){e.exports="undefined"!=typeof window&&window.moment||t("moment")},{moment:42}],9:[function(t,e,i){function o(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay,{prevent_default:!1}),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this;["touch","pinch","doubletap","hold","dragstart","drag","dragend","mousewheel","DOMMouseScroll"].forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),this.windowHammer=a(window,{prevent_default:!1}),this.windowHammer.on("tap",function(i){s(i.target,t)||e.deactivate()}),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=n(),this.escListener=this.deactivate.bind(this)}function s(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var n=t("keycharm"),r=t("emitter-component"),a=t("../module/hammer"),h=t("../util");r(o.prototype),o.current=null,o.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.hammer=null,this.windowHammer=null},o.prototype.activate=function(){o.current&&o.current.deactivate(),o.current=this,this.active=!0,this.dom.overlay.style.display="none",h.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},o.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",h.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},o.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},e.exports=o},{"../module/hammer":7,"../util":37,"emitter-component":38,keycharm:40}],10:[function(t,e,i){function o(){}var s=t("emitter-component"),n=t("../module/hammer"),r=t("../util"),a=(t("../DataSet"),t("../DataView"),t("./Range"),t("./component/ItemSet"),t("./component/TimeAxis")),h=t("../shared/Activator"),d=t("./DateUtil"),l=t("./component/CustomTime");s(o.prototype),o.prototype._create=function(t){this.dom={},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.root.className="vis timeline root",this.dom.background.className="vispanel background",this.dom.backgroundVertical.className="vispanel background vertical",this.dom.backgroundHorizontal.className="vispanel background horizontal",this.dom.centerContainer.className="vispanel center jooo",this.dom.leftContainer.className="vispanel left",this.dom.rightContainer.className="vispanel right",this.dom.top.className="vispanel top",this.dom.bottom.className="vispanel bottom",this.dom.left.className="
1content",this.dom.center.className="content",this.dom.right.className="content",this.dom.shadowTop.className="shadow top",this.dom.shadowBottom.className="shadow bottom",this.dom.shadowTopLeft.className="shadow top",this.dom.shadowBottomLeft.className="shadow bottom",this.dom.shadowTopRight.className="shadow top",this.dom.shadowBottomRight.className="shadow bottom",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.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.on("rangechange",this._redraw.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("pinch",this._onPinch.bind(this)),this.on("dragstart",this._onDragStart.bind(this)),this.on("drag",this._onDrag.bind(this));var e=this;if(this.on("change",function(t){t&&1==t.queue?e._redrawTimer||(e._redrawTimer=setTimeout(function(){e._redrawTimer=null,e._redraw()},0)):e._redraw()}),this.hammer=n(this.dom.root,{preventDefault:!0}),this.listeners={},["touch","pinch","tap","doubletap","hold","dragstart","drag","dragend","mousewheel","DOMMouseScroll"].forEach(function(t){var i=function(){var i=[t].concat(Array.prototype.slice.call(arguments,0));e.isActive()&&e.emit.apply(e,i)};e.hammer.on(t,i),e.listeners[t]=i}),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.touch={},this.redrawCount=0,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","orientation","clickToUse","dataAttributes","hiddenDates","factory"];if(r.selectiveExtend(e,this.options,t),"both"===this.options.orientation){if(!this.timeAxis2){var i=this.timeAxis2=new a(this.body);i.setOptions=function(t){var e=t?r.extend({},t):{};e.orientation="top",a.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var o=this.components.indexOf(this.timeAxis2);-1!==o&&this.components.splice(o,1),this.timeAxis2.destroy(),this.timeAxis2=null}"hiddenDates"in this.options&&d.convertHiddenOptions(this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new h(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}this.components.forEach(function(e){e.setOptions(t)}),this._redraw()},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.clear(),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(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){if(!this.customTime)throw new Error("Cannot get custom time: Custom time bar is not enabled");var i=e||0;this.components.forEach(function(e,o,s){e instanceof l&&e.options.id===i&&e.setCustomTime(t)})},o.prototype.getCustomTime=function(t){if(!this.customTime)throw new Error("Cannot get custom time: Custom time bar is not enabled");var e=t||0,i=this.customTime.getCustomTime();
1return this.components.forEach(function(t,o,s){t instanceof l&&t.options.id===e&&(i=t.getCustomTime())}),i},o.prototype.addCustomTime=function(t,e){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");if(void 0===t)throw new Error("Time parameter for the custom bar must be provided");var i,o,s,n=r.convert(t,"Date").valueOf();return this.customBarIds&&this.customBarIds.constructor===Array||(this.customBarIds=[0]),void 0===e?(i=this.customBarIds.filter(function(t){return r.isNumber(t)}),s=i.length>0?Math.max.apply(null,i)+1:1):(this.customBarIds.forEach(function(t){if(t===e)throw new Error("Custom time ID already exists")}),s=e),this.customBarIds.push(s),o=new l(this.body,{showCustomTime:!0,time:n,id:s}),this.components.push(o),this.redraw(),s},o.prototype.removeCustomTime=function(t){var e=this;this.components.forEach(function(i,o,s){i instanceof l&&i.options.id===t&&0!==i.options.id&&(e.customBarIds.splice(e.customBarIds.indexOf(t),1),s.splice(o,1),i.destroy())})},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.clear=function(t){t&&!t.items||this.setItems(null),t&&!t.groups||this.setGroups(null),t&&!t.options||(this.components.forEach(function(t){t.setOptions(t.defaultOptions)}),this.setOptions(this.defaultOptions))},o.prototype.fit=function(t){var e=this._getDataRange();if(null!==e.start||null!==e.end){var i=!t||void 0===t.animate||t.animate;this.range.setRange(e.start,e.end,i)}},o.prototype._getDataRange=function(){var t=this.getItemRange(),e=t.min,i=t.max;if(null!=e&&null!=i){var o=i.valueOf()-e.valueOf();o<=0&&(o=864e5),e=new Date(e.valueOf()-.05*o),i=new Date(i.valueOf()+.05*o)}return{start:e,end:i}},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var s=arguments[0];o=void 0===s.animate||s.animate,this.range.setRange(s.start,s.end,o)}else o=!i||void 0===i.animate||i.animate,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=r.convert(t,"Date").valueOf(),s=o-i/2,n=o+i/2,a=!e||void 0===e.animate||e.animate;this.range.setRange(s,n,a)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){var t=!1,e=this.options,i=this.props,o=this.dom;if(o){d.updateHiddenDates(this.body,this.options.hiddenDates),"top"==e.orientation?(r.addClassName(o.root,"top"),r.removeClassName(o.root,"bottom")):(r.removeClassName(o.root,"top"),r.addClassName(o.root,"bottom")),o.root.style.maxHeight=r.option.asSize(e.maxHeight,""),o.root.style.minHeight=r.option.asSize(e.minHeight,""),o.root.style.width=r.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var s=o.root.offsetHeight-o.root.clientHeight,n=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(n=s),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var a=Math.max(i.left.height,i.center.height,i.right.height),h=i.top.height+a+i.bottom.height+s+i.border.top+i.border.bottom;o.root.style.height=r.option.asSize(e.height,h+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-s;var l=i.root.height-i.top.height-i.bottom.height-s;i.centerContainer.height=l,i.leftContainer.height=l,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-n,i.left.width=o.leftContainer.clientWidth||-i.border.left,i.leftContainer.width=i.left.width,i.right.width=o.rightContainer.clientWidth||-i.border.right,i.rightContainer.width=i.right.width;var u=i.root.width-i.left.width-i.right.width-n;i.center.width=u,i.centerContainer.width=u,i.top.width=u,i.bottom.width=u,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.right
1Container.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px",this._updateScrollTop();var p=this.props.scrollTop;"bottom"==e.orientation&&(p+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=p+"px",o.left.style.left="0",o.left.style.top=p+"px",o.right.style.left="0",o.right.style.top=p+"px";var c=0==this.props.scrollTop?"hidden":"",m=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";if(o.shadowTop.style.visibility=c,o.shadowBottom.style.visibility=m,o.shadowTopLeft.style.visibility=c,o.shadowBottomLeft.style.visibility=m,o.shadowTopRight.style.visibility=c,o.shadowBottomRight.style.visibility=m,this.components.forEach(function(e){t=e.redraw()||t}),t){this.redrawCount<3?(this.redrawCount++,this._redraw()):console.log("WARNING: infinite loop in redraw?"),this.redrawCount=0}
1this.emit("finishedRedraw")}},o.prototype.repaint=function(){throw new Error("Function repaint is deprecated. Use redraw instead.")},o.prototype.setCurrentTime=function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)},o.prototype.getCurrentTime=function(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()},o.prototype._toTime=function(t){return d.toTime(this,t,this.props.center.width)},o.prototype._toGlobalTime=function(t){return d.toTime(this,t,this.props.root.width)},o.prototype._toScreen=function(t){return d.toScreen(this,t,this.props.center.width)},o.prototype._toGlobalScreen=function(t){return d.toScreen(this,t,this.props.root.width)},o.prototype._initAutoResize=function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()},o.prototype._startAutoResize=function(){var t=this;this._stopAutoResize(),this._onResize=function(){if(1!=t.options.autoResize)return void t._stopAutoResize();t.dom.root&&(t.dom.root.offsetWidth==t.props.lastWidth&&t.dom.root.offsetHeight==t.props.lastHeight||(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight,t.emit("change")))}, 2r.addEventListener(window,"resize",this._onResize),this.watchTimer=setInterval(this._onResize,1e3)},o.prototype._stopAutoResize=function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),r.removeEventListener(window,"resize",this._onResize),this._onResize=null},o.prototype._onTouch=function(t){this.touch.allowDragging=!0},o.prototype._onPinch=function(t){this.touch.allowDragging=!1},o.prototype._onDragStart=function(t){this.touch.initialScrollTop=this.props.scrollTop},o.prototype._onDrag=function(t){if(this.touch.allowDragging){var e=t.gesture.deltaY,i=this._getScrollTop();this._setScrollTop(this.touch.initialScrollTop+e)!=i&&(this._redraw(),this.emit("verticalDrag"))}},o.prototype._setScrollTop=function(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop},o.prototype._updateScrollTop=function(){var t=Math.min(this.props.centerContainer.height-this.props.center.height,0);return t!=this.props.scrollTopMin&&("bottom"==this.options.orientation&&(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.props.scrollTop},o.prototype._getScrollTop=function(){return this.props.scrollTop},e.exports=o},{"../DataSet":2,"../DataView":3,"../module/hammer":7,"../shared/Activator":9,"../util":37,"./DateUtil":12,"./Range":13,"./component/CustomTime":20,"./component/ItemSet":24,"./component/TimeAxis":27,"emitter-component":38}],11:[function(t,e,i){function o(t,e,i,o,s,n){this.current=0,this.autoScale=!0,this.stepIndex=0,this.step=1,this.scale=1,this.marginStart,this.marginEnd,this.deadSpace=0,this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.alignZeros=n,this.setRange(t,e,i,o,s)}o.prototype.setRange=function(t,e,i,o,s){this._start=void 0===s.min?t:s.min,this._end=void 0===s.max?e:s.max,this._start==this._end&&(this._start-=.75,this._end+=1),1==this.autoScale&&this.setMinimumStep(i,o),this.setFirst(s)},o.prototype.setMinimumStep=function(t,e){var i=this._end-this._start,o=1.2*i,s=t*(o/e),n=Math.round(Math.log(o)/Math.LN10),r=-1,a=Math.pow(10,n),h=0;n<0&&(h=n);for(var d=!1,l=h;Math.abs(l)<=Math.abs(n);l++){a=Math.pow(10,l);for(var u=0;u<this.minorSteps.length;u++){if(a*this.minorSteps[u]>=s){d=!0,r=u;break}}if(1==d)break}this.stepIndex=r,this.scale=a,this.step=a*this.minorSteps[r]},o.prototype.setFirst=function(t){void 0===t&&(t={});var e=void 0===t.min?this._start-2*this.scale*this.minorSteps[this.stepIndex]:t.min,i=void 0===t.max?this._end+this.scale*this.minorSteps[this.stepIndex]:t.max;this.marginEnd=void 0===t.max?this.roundToMinor(i):t.max,this.marginStart=void 0===t.min?this.roundToMinor(e):t.min,1==this.alignZeros&&(this.marginEnd-this.marginStart)%this.step!=0&&(this.marginEnd+=this.marginEnd%this.step),this.deadSpace=this.roundToMinor(i)-i+this.roundToMinor(e)-e,this.marginRange=this.marginEnd-this.marginStart,this.current=this.marginEnd},o.prototype.roundToMinor=function(t){var e=t-t%(this.scale*this.minorSteps[this.stepIndex]);return t%(this.scale*this.minorSteps[this.stepIndex])>this.scale*this.minorSteps[this.stepIndex]*.5?e+this.scale*this.minorSteps[this.stepIndex]:e},o.prototype.hasNext=function(){return this.current>=this.marginStart},o.prototype.next=function(){var t=this.current;this.current-=this.step,this.current==t&&(this.current=this._end)},o.prototype.previous=function(){this.current+=this.step,this.marginEnd+=this.step,this.marginRange=this.marginEnd-this.marginStart},o.prototype.getCurrent=function(t){var e=Math.abs(this.current)<this.step/2?0:this.current,i=""+Number(e).toPrecision(5);
2if(void 0===t||isNaN(Number(t))){if(-1!=i.indexOf(",")||-1!=i.indexOf("."))for(var o=i.length-1;o>0;o--){if("0"!=i[o]){if("."==i[o]||","==i[o]){i=i.slice(0,o);break}break}i=i.slice(0,o)}}else{var s="",n=i.indexOf("e");if(-1!=n&&(s=i.slice(n),i=i.slice(0,n)),n=Math.max(i.indexOf(","),i.indexOf(".")),-1===n?(0!==t&&(i+="."),n=i.length+t):0!==t&&(n+=t+1),n>i.length)for(var r=n-i.length;r>0;r--)i+="0";else i=i.slice(0,n);i+=s}return i},o.prototype.isMajor=function(){return this.current%(this.scale*this.majorSteps[this.stepIndex])==0},e.exports=o},{}],12:[function(t,e,i){var o=t("../module/moment");i.convertHiddenOptions=function(t,e){if(t.hiddenDates=[],e&&1==Array.isArray(e)){for(var i=0;i<e.length;i++)if(void 0===e[i].repeat){var s={};s.start=o(e[i].start).toDate().valueOf(),s.end=o(e[i].end).toDate().valueOf(),t.hiddenDates.push(s)}t.hiddenDates.sort(function(t,e){return t.start-e.start})}},i.updateHiddenDates=function(t,e){if(e&&void 0!==t.domProps.centerContainer.width){i.convertHiddenOptions(t,e);for(var s=o(t.range.start),n=o(t.range.end),r=t.range.end-t.range.start,a=r/t.domProps.centerContainer.width,h=0;h<e.length;h++)if(void 0!==e[h].repeat){var d=o(e[h].start),l=o(e[h].end);if("Invalid Date"==d._d)throw new Error("Supplied start date is not valid: "+e[h].start);if("Invalid Date"==l._d)throw new Error("Supplied end date is not valid: "+e[h].end);var u=l-d;if(u>=4*a){var p=0,c=n.clone();switch(e[h].repeat){case"daily":d.day()!=l.day()&&(p=1),d.dayOfYear(s.dayOfYear()),d.year(s.year()),d.subtract(7,"days"),l.dayOfYear(s.dayOfYear()),l.year(s.year()),l.subtract(7-p,"days"),c.add(1,"weeks");break;case"weekly":var m=l.diff(d,"days"),f=d.day();d.date(s.date()),d.month(s.month()),d.year(s.year()),l=d.clone(),d.day(f),l.day(f),l.add(m,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),c.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(p=1),d.month(s.month()),d.year(s.year()),d.subtract(1,"months"),l.month(s.month()),l.year(s.year()),l.subtract(1,"months"),l.add(p,"months"),c.add(1,"months");break;case"yearly":d.year()!=l.year()&&(p=1),d.year(s.year()),d.subtract(1,"years"),l.year(s.year()),l.subtract(1,"years"),l.add(p,"years"),c.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",e[h].repeat)}for(;d<c;)switch(t.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),e[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");break;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",e[h].repeat)}t.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}i.removeDuplicates(t);var g=i.isHidden(t.range.start,t.hiddenDates),y=i.isHidden(t.range.end,t.hiddenDates),v=t.range.start,b=t.range.end;1==g.hidden&&(v=1==t.range.startToFront?g.startDate-1:g.endDate+1),1==y.hidden&&(b=1==t.range.endToFront?y.startDate-1:y.endDate+1),1!=g.hidden&&1!=y.hidden||t.range._applyRange(v,b)}},i.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],o=0;o<e.length;o++)for(var s=0;s<e.length;s++)o!=s&&1!=e[s].remove&&1!=e[o].remove&&(e[s].start>=e[o].start&&e[s].end<=e[o].end?e[s].remove=!0:e[s].start>=e[o].start&&e[s].start<=e[o].end?(e[o].end=e[s].end,e[s].remove=!0):e[s].end>=e[o].start&&e[s].end<=e[o].end&&(e[o].start=e[s].start,e[s].remove=!0));for(var o=0;o<e.length;o++)!0!==e[o].remove&&i.push(e[o]);t.hiddenDates=i,t.hiddenDates.sort(function(t,e){return t.start-e.start})},i.printDates=function(t){for(var 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)},i.stepOverHiddenDates=function(t,e){for(var i=!1,s=t.current.valueOf(),n=0;n<t.hiddenDates.length;n++){var r=t.hiddenDates[n].start,a=t.hiddenDates[n].end;if(s>=r&&s<a){i=!0;break}}if(1==i&&s<t._end.valueOf()&&s!=e){var h=o(e),d=o(a);h.year()!=d.year()?t.switchedYear=!0:h.month()!=d.month()?t.switchedMonth=!0:h.dayOfYear()!=d.dayOfYear()&&(t.switchedDay=!0),t.current=d.toDate()}}
2,i.toScreen=function(t,e,o){if(0==t.body.hiddenDates.length){var s=t.range.conversion(o);return(e.valueOf()-s.offset)*s.scale}var n=i.isHidden(e,t.body.hiddenDates);1==n.hidden&&(e=n.startDate);var r=i.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end);e=i.correctTimeForHidden(t.body.hiddenDates,t.range,e);var s=t.range.conversion(o,r);return(e.valueOf()-s.offset)*s.scale},i.toTime=function(t,e,o){if(0==t.body.hiddenDates.length){var s=t.range.conversion(o);return new Date(e/s.scale+s.offset)}var n=i.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),r=t.range.end-t.range.start-n,a=r*e/o,h=i.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,a);return new Date(h+a+t.range.start)},i.getHiddenDurationBetween=function(t,e,i){for(var o=0,s=0;s<t.length;s++){var n=t[s].start,r=t[s].end;n>=e&&r<i&&(o+=r-n)}return o},i.correctTimeForHidden=function(t,e,s){return s=o(s).toDate().valueOf(),s-=i.getHiddenDurationBefore(t,e,s)},i.getHiddenDurationBefore=function(t,e,i){var s=0;i=o(i).toDate().valueOf();for(var n=0;n<t.length;n++){var r=t[n].start,a=t[n].end;r>=e.start&&a<e.end&&i>=a&&(s+=a-r)}return s},i.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,s=0,n=e.start,r=0;r<t.length;r++){var a=t[r].start,h=t[r].end;if(a>=e.start&&h<e.end){if(s+=a-n,n=h,s>=i)break;o+=h-a}}return o},i.snapAwayFromHidden=function(t,e,o,s){var n=i.isHidden(e,t);return 1==n.hidden?o<0?1==s?n.startDate-(n.endDate-e)-1:n.startDate-1:1==s?n.endDate+(e-n.startDate)+1:n.endDate+1:e},i.isHidden=function(t,e){for(var i=0;i<e.length;i++){var o=e[i].start,s=e[i].end;if(t>=o&&t<s)return{hidden:!0,startDate:o,endDate:s}}return{hidden:!1,startDate:o,endDate:s}}},{"../module/moment":8}],13:[function(t,e,i){function o(t,e){var i=h().hours(0).minutes(0).seconds(0).milliseconds(0);this.start=i.clone().add(-3,"days").valueOf(),this.end=i.clone().add(4,"days").valueOf(),this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={start:null,end:null,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10},this.options=r.extend({},this.defaultOptions),this.props={touch:{}},this.animateTimer=null,this.body.emitter.on("dragstart",this._onDragStart.bind(this)),this.body.emitter.on("drag",this._onDrag.bind(this)),this.body.emitter.on("dragend",this._onDragEnd.bind(this)),this.body.emitter.on("hold",this._onHold.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("DOMMouseScroll",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.setOptions(e)}function s(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'+t+'". Choose "horizontal" or "vertical".')}function n(t,e){return{x:t.pageX-r.getAbsoluteLeft(e),y:t.pageY-r.getAbsoluteTop(e)}}var r=t("../util"),a=t("../hammerUtil"),h=t("../module/moment"),d=t("./component/Component"),l=t("./DateUtil");o.prototype=new d,o.prototype.setOptions=function(t){if(t){var e=["direction","min","max","zoomMin","zoomMax","moveable","zoomable","activate","hiddenDates"];r.selectiveExtend(e,this.options,t),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}},o.prototype.setRange=function(t,e,i,o){!0!==o&&(o=!1);var s=void 0!=t?r.convert(t,"Date").valueOf():null,n=void 0!=e?r.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),i){var a=this,h=this.start,d=this.end,u="number"==typeof i?i:500,p=(new Date).valueOf(),c=!1,m=function(){if(!a.props.touch.dragging){var t=(new Date).valueOf(),e=t-p,i=e>u,g=i||null===s?s:r.easeInOutQuad(e,h,s,u),y=i||null===n?n:r.easeInOutQuad(e,d,n,u);f=a._applyRange(g,y),l.updateHiddenDates(a.body,a.options.hiddenDates),c=c||f,f&&a.body.emitter.emit("rangechange",{start:new Date(a.start),end:new Date(a.end),byUser:o}),i?c&&a.body.emitter.emit("rangechanged",{start:new Date(a.start),end:new Date(a.end),byUser:o}):a.animateTimer=setTimeout(m,20)}};return m()}var f=this._applyRange(s,n);if(l.updateHiddenDates(this.body,this.options.hiddenDates),f){var g={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",g),this.body.emitter.emit("rangechanged",g)}},o.prototype._cancelAnimation=function(){this.animateTimer&&(clearTimeout(this.animateTimer),this.animateTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,s=null!=e?r.convert(e,"Date").valueOf():this.end,n=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(s)||null===s)throw new Error('Invalid end "'+e+'"');if(s<o&&(s=o),null!==a&&o<a&&(i=a-o,o+=i,s+=i,null!=n&&s>n&&(s=n)),null!==n&&s>n&&(i=s-n,o-=i,s-=i,null!=a&&o<a&&(o=a)),null!==this.options.zoomMin){var h=parseFloat(this.options.zoomMin);h<0&&(h=0),s-o<h&&(this.end-this.start===h&&o>this.start&&s<this.end?(o=this.start,s=this.end):(i=h-(s-o),o-=i/2,s+=i/2))}if(null!==this.options.zoomMax){var d=parseFloat(this.options.zoomMax);d<0&&(d=0),s-o>d&&(this.end-this.start===d&&o<this.start&&s>this.end?(o=this.start,s=this.end):(i=s-o-d,o+=i/2,s-=i/2))}var l=this.start!=o||this.end!=s;return o>=this.start&&o<=this.end||s>=this.start&&s<=this.end||this.start>=o&&this.start<=s||this.end>=o&&this.end<=s||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=s,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)}
2,o.conversion=function(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}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this.props.touch.allowDragging&&(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"))},o.prototype._onDrag=function(t){if(this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;s(e);var i="horizontal"==e?t.gesture.deltaX:t.gesture.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start;o-=l.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);var n="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height,r=-i/n*o,a=this.props.touch.start+r,h=this.props.touch.end+r,d=l.snapAwayFromHidden(this.body.hiddenDates,a,this.previousDelta-i,!0),u=l.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0);if(d!=a||u!=h)return this.deltaDifference+=i,this.props.touch.start=d,this.props.touch.end=u,void this._onDrag(t);this.previousDelta=i,this._applyRange(a,h),this.body.emitter.emit("rangechange",{start:new Date(this.start),end:new Date(this.end),byUser:!0})}},o.prototype._onDragEnd=function(t){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}))},o.prototype._onMouseWheel=function(t){if(this.options.zoomable&&this.options.moveable){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i;i=e<0?1-e/5:1/(1+e/5);var o=a.fakeGesture(this,t),s=n(o.center,this.body.dom.center),r=this._pointerToDate(s);this.zoom(i,r,e)}t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onHold=function(){this.props.touch.allowDragging=!1},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable&&(this.props.touch.allowDragging=!1,t.gesture.touches.length>1)){this.props.touch.center||(this.props.touch.center=n(t.gesture.center,this.body.dom.center));var e=1/(t.gesture.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=l.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),s=l.getHiddenDurationBefore(this.body.hiddenDates,this,i),r=o-s,a=i-s+(this.props.touch.start-(i-s))*e,h=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=!(1-e>0),this.endToFront=!(e-1>0);var d=l.snapAwayFromHidden(this.body.hiddenDates,a,1-e,!0),u=l.snapAwayFromHidden(this.body.hiddenDates,h,e-1,!0);d==a&&u==h||(this.props.touch.start=d,this.props.touch.end=u,this.scaleOffset=1-t.gesture.scale,a=d,h=u),this.setRange(a,h,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(s(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=l.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),s=l.getHiddenDurationBefore(this.body.hiddenDates,this,e),n=o-s,r=e-s+(this.start-(e-s))*t,a=e+n+(this.end-(e+n))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=l.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),d=l.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);h==r&&d==a||(r=h,a=d),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},o.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,s=this.end-i;this.setRange(o,s)},e.exports=o},{"../hammerUtil":6,"../module/moment":8,"../util":37,"./DateUtil":12,"./component/Component":18}
2],14:[function(t,e,i){i.orderByStart=function(t){t.sort(function(t,e){return t.data.start-e.data.start})},i.orderByEnd=function(t){t.sort(function(t,e){return("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start)})},i.stack=function(t,e,o){var s,n;if(o)for(s=0,n=t.length;s<n;s++)t[s].top=null;for(s=0,n=t.length;s<n;s++){var r=t[s];if(r.stack&&null===r.top){r.top=e.axis;do{for(var a=null,h=0,d=t.length;h<d;h++){var l=t[h];if(null!==l.top&&l!==r&&l.stack&&i.collision(r,l,e.item)){a=l;break}}null!=a&&(r.top=a.top+a.height+e.item.vertical)}while(a)}}},i.nostack=function(t,e,i){var o,s,n;for(o=0,s=t.length;o<s;o++)if(void 0!==t[o].data.subgroup){n=e.axis;for(var r in i)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].index<i[t[o].data.subgroup].index&&(n+=i[r].height+e.item.vertical);t[o].top=n}else t[o].top=e.axis},i.collision=function(t,e,i){return t.left-i.horizontal+.001<e.left+e.width&&t.left+t.width+i.horizontal-.001>e.left&&t.top-i.vertical+.001<e.top+e.height&&t.top+t.height+i.vertical-.001>e.top}},{}],15:[function(t,e,i){function o(t,e,i,s){this.current=new Date,this._start=new Date,this._end=new Date,this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,this.hiddenDates=s,void 0===s&&(this.hiddenDates=[]),this.format=o.FORMAT}var s=t("../module/moment"),n=t("./DateUtil"),r=t("../util");o.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",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",month:"YYYY",year:""}},o.prototype.setFormat=function(t){var e=r.deepExtend({},o.FORMAT);this.format=r.deepExtend(e,t)},o.prototype.setRange=function(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=void 0!=t?new Date(t.valueOf()):new Date,this._end=void 0!=e?new Date(e.valueOf()):new Date,this.autoScale&&this.setMinimumStep(i)},o.prototype.first=function(){this.current=new Date(this._start.valueOf()),this.roundToMinor()},o.prototype.roundToMinor=function(){switch(this.scale){case"year":this.current.setFullYear(this.step*Math.floor(this.current.getFullYear()/this.step)),this.current.setMonth(0);case"month":this.current.setDate(1);case"day":case"weekday":this.current.setHours(0);case"hour":this.current.setMinutes(0);case"minute":this.current.setSeconds(0);case"second":this.current.setMilliseconds(0)}if(1!=this.step)switch(this.scale){case"millisecond":this.current.setMilliseconds(this.current.getMilliseconds()-this.current.getMilliseconds()%this.step);break;case"second":this.current.setSeconds(this.current.getSeconds()-this.current.getSeconds()%this.step);break;case"minute":this.current.setMinutes(this.current.getMinutes()-this.current.getMinutes()%this.step);break;case"hour":this.current.setHours(this.current.getHours()-this.current.getHours()%this.step);break;case"weekday":case"day":this.current.setDate(this.current.getDate()-1-(this.current.getDate()-1)%this.step+1);break;case"month":this.current.setMonth(this.current.getMonth()-this.current.getMonth()%this.step);break;case"year":this.current.setFullYear(this.current.getFullYear()-this.current.getFullYear()%this.step)}},o.prototype.hasNext=function(){return this.current.valueOf()<=this._end.valueOf()},o.prototype.next=function(){var t=this.current.valueOf();if(this.current.getMonth()<6)switch(this.scale){case"millisecond":this.current=new Date(this.current.valueOf()+this.step);break;case"second":this.current=new Date(this.current.valueOf()+1e3*this.step);break;case"minute":this.current=new Date(this.current.valueOf()+1e3*this.step*60);break;case"hour":this.current=new Date(this.current.valueOf()+1e3*this.step*60*60);var e=this.current.getHours();this.current.setHours(e-e%this.step);break;case"weekday":case"day":this.current.setDate(this.current.getDate()+this.step);break;case"month":this.current.setMonth(this.current.getMonth()+this.step);break;case"year":this.current.setFullYear(this.current.getFullYear()+this.step)}
2else switch(this.scale){case"millisecond":this.current=new Date(this.current.valueOf()+this.step);break;case"second":this.current.setSeconds(this.current.getSeconds()+this.step);break;case"minute":this.current.setMinutes(this.current.getMinutes()+this.step);break;case"hour":this.current.setHours(this.current.getHours()+this.step);break;case"weekday":case"day":this.current.setDate(this.current.getDate()+this.step);break;case"month":this.current.setMonth(this.current.getMonth()+this.step);break;case"year":this.current.setFullYear(this.current.getFullYear()+this.step)}if(1!=this.step)switch(this.scale){case"millisecond":this.current.getMilliseconds()<this.step&&this.current.setMilliseconds(0);break;case"second":this.current.getSeconds()<this.step&&this.current.setSeconds(0);break;case"minute":this.current.getMinutes()<this.step&&this.current.setMinutes(0);break;case"hour":this.current.getHours()<this.step&&this.current.setHours(0);break;case"weekday":case"day":this.current.getDate()<this.step+1&&this.current.setDate(1);break;case"month":this.current.getMonth()<this.step&&this.current.setMonth(0)}this.current.valueOf()==t&&(this.current=new Date(this._end.valueOf())),n.stepOverHiddenDates(this,t)},o.prototype.getCurrent=function(){return this.current},o.prototype.setScale=function(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){31104e9>t&&(this.scale="year",this.step=1e3),15552e9>t&&(this.scale="year",this.step=500),31104e8>t&&(this.scale="year",this.step=100),15552e8>t&&(this.scale="year",this.step=50),31104e7>t&&(this.scale="year",this.step=10),15552e7>t&&(this.scale="year",this.step=5),31104e6>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),2592e6>t&&(this.scale="month",this.step=1),432e6>t&&(this.scale="day",this.step=5),1728e5>t&&(this.scale="day",this.step=2),864e5>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),36e5>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),6e4>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),1e3>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)}},o.snap=function(t,e,i){var o=new Date(t.valueOf());if("year"==e){var s=o.getFullYear()+Math.round(o.getMonth()/12);o.setFullYear(Math.round(s/i)*i),o.setMonth(0),o.setDate(0),o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)}else if("month"==e)o.getDate()>15?(o.setDate(1),o.setMonth(o.getMonth()+1)):o.setDate(1),o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.setHours(24*Math.round(o.getHours()/24));break;default:o.setHours(12*Math.round(o.getHours()/12))}o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.setHours(12*Math.round(o.getHours()/12));break;default:o.setHours(6*Math.round(o.getHours()/6))}o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)}else if("hour"==e){switch(i){case 4:o.setMinutes(60*Math.round(o.getMinutes()/60));break;default:o.setMinutes(30*Math.round(o.getMinutes()/30))}o.setSeconds(0),o.setMilliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.setMinutes(5*Math.round(o.getMinutes()/5)),o.setSeconds(0);break;case 5:o.setSeconds(60*Math.round(o.getSeconds()/60));break;default:o.setSeconds(30*Math.round(o.getSeconds()/30))}o.setMilliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.setSeconds(5*Math.round(o.getSeconds()/5)),o.setMilliseconds(0);break;case 5:o.setMilliseconds(1e3*Math.round(o.getMilliseconds()/1e3));break;default:o.setMilliseconds(500*Math.round(o.getMilliseconds()/500))}else if("millisecond"==e){var n=i>5?i/2:1;o.setMilliseconds(Math.round(o.getMilliseconds()/n)*n)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.switchedYear=!1,this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.switchedMonth=!1,this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.switchedDay=!1,this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}switch(this.scale){case"millisecond":return 0==this.current.getMilliseconds();case"second":return 0==this.current.getSeconds();case"minute":return 0==this.current.getHours()&&0==this.current.getMinutes();case"hour":return 0==this.current.getHours();case"weekday":case"day":return 1==this.current.getDate();case"month":return 0==this.current.getMonth();case"year":default:return!1}},o.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&e.length>0?s(t).format(e):""},o.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&e.length>0?s(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/r%2==0?" even":" odd"}function e(t){return t.isSame(new Date,"day")?" today":t.isSame(s().add(1,"day"),"day")?" tomorrow":t.isSame(s().add(-1,"day"),"day")?" yesterday":""}function i(t){return t.isSame(new Date,"month")?" current-month":""}var o=s(this.current),n=o.locale?o.locale("en"):o.lang("en"),r=this.step;switch(this.scale){case"millisecond":return t(n.milliseconds()).trim();case"second":return t(n.seconds()).trim();case"minute":return t(n.minutes()).trim();case"hour":var a=n.hours();return 4==this.step&&(a=a+"-"+(a+4)),a+"h"+e(n)+t(n.hours());case"weekday":return n.format("dddd").toLowerCase()+e(n)+function(t){return t.isSame(new Date,"week")?" current-week":""}(n)+t(n.date());case"day":var h=n.date();return"day"+h+" "+n.format("MMMM").toLowerCase()+i(n)+t(h-1);case"month":return n.format("MMMM").toLowerCase()+i(n)+t(n.month());case"year":var d=n.year();return"year"+d+function(t){return t.isSame(new Date,"year")?" current-year":""}(n)+t(d);default:return""}},e.exports=o},{"../module/moment":8,"../util":37,"./DateUtil":12}
2],16:[function(t,e,i){function o(t,e,i,h){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(i)||i instanceof n||i instanceof r)&&i instanceof Object){var c=h;h=i,i=c}var m=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:"bottom",width:null,height:null,maxHeight:null,minHeight:null,factory:{Range:a,Axis:d,CurrentTime:l,CustomTime:u,ItemSet:p,DataSet:n}},this.options=s.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return m.timeAxis.step.scale},getStep:function(){return m.timeAxis.step.step},toScreen:m._toScreen.bind(m),toGlobalScreen:m._toGlobalScreen.bind(m),toTime:m._toTime.bind(m),toGlobalTime:m._toGlobalTime.bind(m)}};var f=h.factory=s.deepExtend(this.defaultOptions.factory,h.factory||{});this.range=new f.Range(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new f.Axis(this.body),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new f.CurrentTime(this.body),this.components.push(this.currentTime),this.customTime=new f.CustomTime(this.body),this.components.push(this.customTime),this.itemSet=new f.ItemSet(this.body),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.zoomKozvetites=function(t,e){this.getWindow();e=new Date(e),t=new Date(t);var i=Math.abs(e-t)/36e5;e=e.setHours(e.getHours()-Math.floor(i-1)),t.setMinutes(t.getMinutes()-10),this.setWindow({start:t.valueOf(),end:e,animate:!1})},this.on("tap",function(t){m.emit("click",m.getEventProperties(t))}),this.on("doubletap",function(t){m.emit("doubleClick",m.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){m.emit("contextmenu",m.getEventProperties(t))},h&&this.setOptions(h),i&&this.setGroups(i),e?this.setItems(e):this._redraw()}var s=(t("emitter-component"),t("../module/hammer"),t("../util")),n=t("../DataSet"),r=t("../DataView"),a=t("./Range"),h=t("./Core"),d=t("./component/TimeAxis"),l=t("./component/CurrentTime"),u=t("./component/CustomTime"),p=t("./component/ItemSet");o.prototype=new h,o.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},o.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof n||t instanceof r?t:new n(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e),i)if(void 0!=this.options.start||void 0!=this.options.end){if(void 0==this.options.start||void 0==this.options.end)var o=this._getDataRange();var s=void 0!=this.options.start?this.options.start:o.start,a=void 0!=this.options.end?this.options.end:o.end;this.setWindow(s,a,{animate:!1})}else this.fit({animate:!1})},o.prototype.setGroups=function(t){var e;e=t?t instanceof n||t instanceof r?t:new this.options.factory.DataSet(t):null,this.groupsData=e,this.itemSet.setGroups(e)},o.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},o.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},o.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),s=null,n=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===s||e<s)&&(s=e),(null===n||i>n)&&(n=i)}),null!==s&&null!==n){ 3var r=(s+n)/2,a=Math.max(this.range.end-this.range.start,1.1*(n-s)),h=!e||void 0===e.animate||e.animate;this.range.setRange(r-a/2,r+a/2,h)}}},o.prototype.getItemRange=function(){var t=this.itemsData.getDataSet(),e=null,i=null;if(t){var o=t.min("start");e=o?s.convert(o.start,"Date").valueOf():null;var n=t.max("start");n&&(i=s.convert(n.start,"Date").valueOf());var r=t.max("end");r&&(i=null==i?s.convert(r.end,"Date").valueOf():Math.max(i,s.convert(r.end,"Date").valueOf()))}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}},o.prototype.getEventProperties=function(t){var e=this.itemSet.itemFromTarget(t),i=this.itemSet.groupFromTarget(t),o=t.gesture?t.gesture.center.pageX:t.pageX,n=t.gesture?t.gesture.center.pageY:t.pageY,r=o-s.getAbsoluteLeft(this.dom.centerContainer),a=n-s.getAbsoluteTop(this.dom.centerContainer),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),l=this.body.util.getStep(),u=this._toTime(r),p=h?h(u,d,l):u,c=s.getTarget(t),m=null;return null!=e?m="item":s.hasParent(c,this.timeAxis.dom.foreground)?m="axis":this.timeAxis2&&s.hasParent(c,this.timeAxis2.dom.foreground)?m="axis":s.hasParent(c,this.itemSet.dom.labelSet)?m="group-label":s.hasParent(c,this.customTime.bar)?m="custom-time":s.hasParent(c,this.currentTime.bar)?m="current-time":s.hasParent(c,this.dom.center)&&(m="background"),{event:t,item:e?e.id:null,group:i?i.groupId:null,what:m,pageX:o,pageY:n,x:r,y:a,time:u,snappedTime:p}},e.exports=o},{"../DataSet":2,"../DataView":3,"../module/hammer":7,"../util":37,"./Core":10,"./Range":13,"./component/CurrentTime":19,"./component/CustomTime":20,"./component/ItemSet":24,"./component/TimeAxis":27,"emitter-component":38}
3],17:[function(t,e,i){function o(t,e,i){s.call(this,t,e,i),this.width=0,this.height=0,this.top=0,this.left=0}var s=(t("../../util"),t("./Group"));o.prototype=Object.create(s.prototype),o.prototype.redraw=function(t,e,i){this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(var o=0,s=this.visibleItems.length;o<s;o++){this.visibleItems[o].repositionY(e)}return!1},o.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},e.exports=o},{"../../util":37,"./Group":23}],18:[function(t,e,i){function o(t,e){this.options=null,this.props=null}o.prototype.setOptions=function(t){t&&util.extend(this.options,t)},o.prototype.redraw=function(){return!1},o.prototype.destroy=function(){},o.prototype._isResized=function(){var 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},e.exports=o},{}],19:[function(t,e,i){function o(t,e){this.body=t,this.defaultOptions={showCurrentTime:!0,locales:a,locale:"en"},this.options=s.extend({},this.defaultOptions),this.offset=0,this._create(),this.setOptions(e)}var s=t("../../util"),n=t("./Component"),r=t("../../module/moment"),a=t("../locales");o.prototype=new n,o.prototype._create=function(){var t=document.createElement("div");t.className="currenttime",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t},o.prototype.destroy=function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null},o.prototype.setOptions=function(t){t&&s.selectiveExtend(["showCurrentTime","locale","locales"],this.options,t)},o.prototype.redraw=function(){if(this.options.showCurrentTime){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());var e=new Date((new Date).valueOf()+this.offset),i=this.body.util.toScreen(e),o=this.options.locales[this.options.locale],s=o.current+" "+o.time+": "+r(e).format("dddd, MMMM Do YYYY, H:mm:ss");s=s.charAt(0).toUpperCase()+s.substring(1),this.bar.style.left=i+"px",this.bar.title=s}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1},o.prototype.start=function(){function t(){e.stop();var i=e.body.range.conversion(e.body.domProps.center.width).scale,o=1/i/10;o<30&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=s.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},e.exports=o},{"../../module/moment":8,"../../util":37,"../locales":36,"./Component":18}],20:[function(t,e,i){function o(t,e){this.body=t,this.defaultOptions={showCustomTime:!1,locales:h,locale:"en",id:0},this.options=n.extend({},this.defaultOptions),e&&e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this._create(),this.setOptions(e)}var s=t("../../module/hammer"),n=t("../../util"),r=t("./Component"),a=t("../../module/moment"),h=t("../locales");o.prototype=new r,o.prototype.setOptions=function(t){t&&(n.selectiveExtend(["showCustomTime","locale","locales","id"],this.options,t),this.options.id&&this.redraw())},o.prototype._create=function(){var t=document.createElement("div");t.className="customtime",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t;var e=document.createElement("div");e.style.position="relative",e.style.top="0px",e.style.left="-10px",e.
3style.height="100%",e.style.width="20px",t.appendChild(e),this.hammer=s(t,{prevent_default:!0}),this.hammer.on("dragstart",this._onDragStart.bind(this)),this.hammer.on("drag",this._onDrag.bind(this)),this.hammer.on("dragend",this._onDragEnd.bind(this))},o.prototype.destroy=function(){this.options.showCustomTime=!1,this.redraw(),this.hammer.enable(!1),this.hammer=null,this.body=null},o.prototype.redraw=function(){if(this.options.showCustomTime){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));var e=this.body.util.toScreen(this.customTime),i=this.options.locales[this.options.locale],o=i.time+": "+a(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss");o=o.charAt(0).toUpperCase()+o.substring(1),this.bar.style.left=e+"px",this.bar.title=o}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar);return!1},o.prototype.setCustomTime=function(t){this.customTime=n.convert(t,"Date"),this.redraw()},o.prototype.getCustomTime=function(){return new Date(this.customTime.valueOf())},o.prototype._onDragStart=function(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation(),t.preventDefault()},o.prototype._onDrag=function(t){if(this.eventParams.dragging){var e=t.gesture.deltaX,i=this.body.util.toScreen(this.eventParams.customTime)+e,o=this.body.util.toTime(i);this.setCustomTime(o),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf())}),t.stopPropagation(),t.preventDefault()}},o.prototype._onDragEnd=function(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf())}),t.stopPropagation(),t.preventDefault())},e.exports=o},{"../../module/hammer":7,"../../module/moment":8,"../../util":37,"../locales":36,"./Component":18}],21:[function(t,e,i){function o(t,e,i,o){this.id=s.randomUUID(),this.body=t,this.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,icons:!0,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,customRange:{left:{min:void 0,max:void 0},right:{min:void 0,max:void 0}},title:{left:{text:void 0},right:{text:void 0}},format:{left:{decimals:void 0},right:{decimals:void 0}}},this.linegraphOptions=o,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.range={start:0,end:0},this.options=s.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number((""+this.options.width).replace("px","")),this.minWidth=this.width,this.height=this.linegraphSVG.offsetHeight,this.hidden=!1,this.stepPixels=25,this.stepPixelsForced=25,this.zeroCrossing=-1,this.lineOffset=0,this.master=!0,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create();var n=this;this.body.emitter.on("verticalDrag",function(){n.dom.lineContainer.style.top=n.body.domProps.scrollTop+"px"})}var s=t("../../util"),n=t("../../DOMutil"),r=t("./Component"),a=t("../DataStep");o.prototype=new r,o.prototype.addGroup=function(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1},o.prototype.updateGroup=function(t,e){this.groups[t]=e},o.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},o.prototype.setOptions=function(t){if(t){var e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);var i=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","customRange","title","format","alignZeros"];s.selectiveExtend(i,this.options,t),this.minWidth=Number((""+this.options.width).replace("px","")),1==e&&this.dom.frame&&(this.hide(),this.show())}},o.prototype._create=function(){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.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)},o.prototype._redrawGroupIcons=function(){n.prepareElements(this.svgElements);var t,e=this.options.iconWidth,i=11.5;t="left"==this.options.orientation?4:this.width-e-4;for(var o in this.groups)this.groups.hasOwnProperty(o)&&(1!=this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&1!=this.linegraphOptions.visibility[o]||(this.groups[o].drawIcon(t,i,this.svgElements,this.svg,e,15),i+=19));n.cleanupElements(this.svgElements),this.iconsRemoved=!1},o.prototype._cleanupIcons=function(){0==this.iconsRemoved&&(n.prepareElements(this.svgElements),n.cleanupElements(this.svgElements),this.iconsRemoved=!0)},o.prototype.show=function(){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)},o.prototype.hide=function(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.parentNode&&this.dom.lineContainer.parentNode.removeChild(this.dom.lineContainer)},o.prototype.setRange=function(t,e){0==this.master&&1==this.options.alignZeros&&-1!=this.zeroCrossing&&t>0&&(t=0),this.range.start=t,this.range.end=e},o.prototype.redraw=function(){var t=!1,e=0;this.dom.lineContainer.style.top=this.body.domProps.scrollTop+"px";for(var i in this.groups)this.groups.hasOwnProperty(i)&&(1!=this.groups[i].visible||void 0!==this.linegraphOptions.visibility[i]&&1!=this.linegraphOptions.visibility[i]||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=this.height+"px",this.width=1==this.options.visible?Number((""+this.options.width).replace("px","")):0;var o=this.props,s=this.dom.frame;s.className="dataaxis",this._calculateCharSize();var n=this.options.orientation,r=this.options.showMinorLabels,a=this.options.showMajorLabels;o.minorLabelHeight=r?o.minorCharHeight:0,o.majorLabelHeight=a?o.majorCharHeight:0,o.minorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.minorLinesOffset,o.minorLineHeight=1,o.majorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.majorLinesOffset,o.majorLineHeight=1,"left"==n?(s.style.top="0",s.style.left="0",s.style.bottom="",s.style.width=this.width+"px",s.style.height=this.height+"px",this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(s.style.top="",s.style.bottom="0",s.style.left="0",s.style.width=this.width+"px",s.style.height=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,1==this.options.icons?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(n)}return t},o.prototype._redrawLabels=function(){var t=!1;n.prepareElements(this.DOMelements.lines),n.prepareElements(this.DOMelements.labels);var e=this.options.orientation,i=this.master?this.props.majorCharHeight||10:this.stepPixelsForced,o=new a(this.range.start,this.range.end,i,this.dom.frame.offsetHeight,this.options.customRange[this.options.orientation],0==this.master&&this.options.alignZeros);this.step=o;var s=(this.dom.frame.offsetHeight-o.deadSpace*(this.dom.frame.offsetHeight/o.marginRange))/((o.marginRange-o.deadSpace)/o.step);this.stepPixels=s;var r=this.height/s,h=0;if(0==this.master){s=this.stepPixelsForced,h=Math.round(this.dom.frame.offsetHeight/s-r);for(var d=0;d<.5*h;d++)o.previous();if(r=this.height/s,-1!=this.zeroCrossing&&1==this.options.alignZeros){var l=o.marginEnd/o.step-this.zeroCrossing;if(l>0)for(var d=0;d<l;d++)o.next();else if(l<0)for(var d=0;d<-l;d++)o.previous()}}else r+=.25;this.valueAtZero=o.marginEnd;var u,p=1;void 0!==this.options.format[e]&&(u=this.options.format[e].decimals),this.maxLabelSize=0;for(var c=0;p<Math.round(r);){o.next(),c=Math.round(p*s),p*s;var m=o.isMajor();(this.options.showMinorLabels&&0==m||0==this.master&&1==this.options.showMinorLabels)&&this._redrawLabel(c-2,o.getCurrent(u),e,"yAxis minor",this.props.minorCharHeight),m&&this.options.showMajorLabels&&1==this.master||0==this.options.showMinorLabels&&0==this.master&&1==m?(c>=0&&this._redrawLabel(c-2,o.getCurrent(u),e,"yAxis major",this.props.majorCharHeight),this._redrawLine(c,e,"grid horizontal major",this.options.majorLinesOffset,this.props.majorLineWidth)):this._redrawLine(c,e,"grid horizontal minor",this.options.minorLinesOffset,this.props.minorLineWidth),1==this.master&&0==o.current&&(this.zeroCrossing=p),p++}0==this.master?this.conversionFactor=c/(this.valueAtZero-o.current):this.conversionFactor=this.dom.frame.offsetHeight/o.marginRange;var f=0;void 0!==this.options.title[e]&&void 0!==this.options.title[e].text&&(f=this.props.titleCharHeight);var g=1==this.options.icons?Math.max(this.options.iconWidth,f)+this.options.labelOffsetX+15:f+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-g&&1==this.options.visible?(this.width=this.maxLabelSize+g,this.options.width=this.width+"px",n.cleanupElements(this.DOMelements.lines),n.cleanupElements(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-g&&1==this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+g),this.options.width=this.width+"px",n.cleanupElements(this.DOMelements.lines),n.cleanupElements(this.DOMelements.labels),this.redraw(),t=!0):(n.cleanupElements(this.DOMelements.lines),n.cleanupElements(this.DOMelements.labels),t=!1),t},o.prototype.convertValue=function(t){return(this.valueAtZero-t)*this.conversionFactor},o.prototype.screenToValue=function(t){return this.valueAtZero-t/this.conversionFactor}
3,o.prototype._redrawLabel=function(t,e,i,o,s){var r=n.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"==i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*s+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*a&&(this.maxLabelSize=e.length*a)},o.prototype._redrawLine=function(t,e,i,o,s){if(1==this.master){var r=n.getDOMElement("div",this.DOMelements.lines,this.dom.lineContainer);r.className=i,r.innerHTML="","left"==e?r.style.left=this.width-o+"px":r.style.right=this.width-o+"px",r.style.width=s+"px",r.style.top=t+"px"}},o.prototype._redrawTitle=function(t){if(n.prepareElements(this.DOMelements.title),void 0!==this.options.title[t]&&void 0!==this.options.title[t].text){var e=n.getDOMElement("div",this.DOMelements.title,this.dom.frame);e.className="yAxis title "+t,e.innerHTML=this.options.title[t].text,void 0!==this.options.title[t].style&&s.addCssText(e,this.options.title[t].style),"left"==t?e.style.left=this.props.titleCharHeight+"px":e.style.right=this.props.titleCharHeight+"px",e.style.width=this.height+"px"}n.cleanupElements(this.DOMelements.title)},o.prototype._calculateCharSize=function(){if(!("minorCharHeight"in this.props)){var t=document.createTextNode("0"),e=document.createElement("div");e.className="yAxis minor 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)){var i=document.createTextNode("0"),o=document.createElement("div");o.className="yAxis major measure",o.appendChild(i),this.dom.frame.appendChild(o),this.props.majorCharHeight=o.clientHeight,this.props.majorCharWidth=o.clientWidth,this.dom.frame.removeChild(o)}if(!("titleCharHeight"in this.props)){var s=document.createTextNode("0"),n=document.createElement("div");n.className="yAxis title measure",n.appendChild(s),this.dom.frame.appendChild(n),this.props.titleCharHeight=n.clientHeight,this.props.titleCharWidth=n.clientWidth,this.dom.frame.removeChild(n)}},e.exports=o},{"../../DOMutil":1,"../../util":37,"../DataStep":11,"./Component":18}],22:[function(t,e,i){function o(t,e,i,o){this.id=e;var n=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","catmullRom"];this.options=s.selectiveBridgeObject(n,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}var s=t("../../util"),n=t("../../DOMutil"),r=t("./graph2d_types/line"),a=t("./graph2d_types/bar"),h=t("./graph2d_types/points");o.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&this.itemsData.sort(function(t,e){return t.x-e.x})):this.itemsData=[]},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart"];s.selectiveDeepExtend(e,this.options,t),s.mergeOptions(this.options,t,"catmullRom"),s.mergeOptions(this.options,t,"drawPoints"),s.mergeOptions(this.options,t,"shaded"),t.catmullRom&&"object"==typeof t.catmullRom&&t.catmullRom.parametrization&&("uniform"==t.catmullRom.parametrization?this.options.catmullRom.alpha=0:"chordal"==t.catmullRom.parametrization?this.options.catmullRom.alpha=1:(this.options.catmullRom.parametrization="centripetal",this.options.catmullRom.alpha=.5))}"line"==this.options.style?this.type=new r(this.id,this.options):"bar"==this.options.style?this.type=new a(this.id,this.options):"points"==this.options.style&&(this.type=new h(this.id,this.options))},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"graphGroup"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)}
3,o.prototype.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*r,l=n.getSVGElement("rect",i,o);if(l.setAttributeNS(null,"x",t),l.setAttributeNS(null,"y",e-d),l.setAttributeNS(null,"width",s),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","outline"),"line"==this.options.style)a=n.getSVGElement("path",i,o),a.setAttributeNS(null,"class",this.className),void 0!==this.style&&a.setAttributeNS(null,"style",this.style),a.setAttributeNS(null,"d","M"+t+","+e+" L"+(t+s)+","+e),1==this.options.shaded.enabled&&(h=n.getSVGElement("path",i,o),"top"==this.options.shaded.orientation?h.setAttributeNS(null,"d","M"+t+", "+(e-d)+"L"+t+","+e+" L"+(t+s)+","+e+" L"+(t+s)+","+(e-d)):h.setAttributeNS(null,"d","M"+t+","+e+" L"+t+","+(e+d)+" L"+(t+s)+","+(e+d)+"L"+(t+s)+","+e),h.setAttributeNS(null,"class",this.className+" iconFill")),1==this.options.drawPoints.enabled&&n.drawPoint(t+.5*s,e,this,i,o);else{var u=Math.round(.3*s),p=Math.round(.4*r),c=Math.round(.75*r),m=Math.round((s-2*u)/3);n.drawBar(t+.5*u+m,e+d-p-1,u,p,this.className+" bar",i,o),n.drawBar(t+1.5*u+m+2,e+d-c-1,u,c,this.className+" bar",i,o)}},o.prototype.getLegend=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");return this.drawIcon(0,.5*e,[],i,t,e),{icon:i,label:this.content,orientation:this.options.yAxisOr
3ientation}},o.prototype.getYRange=function(t){return this.type.getYRange(t)},o.prototype.draw=function(t,e,i){this.type.draw(t,e,i)},e.exports=o},{"../../DOMutil":1,"../../util":37,"./graph2d_types/bar":28,"./graph2d_types/line":29,"./graph2d_types/points":30}],23:[function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var s=t("../../util"),n=t("../Stack");t("./item/RangeItem");o.prototype._create=function(){var t=document.createElement("div");t.className="vlabel",this.dom.label=t;var e=document.createElement("div");e.className="inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="group",this.dom.axis=document.createElement("div"),this.dom.axis.className="group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e=t&&t.content;e instanceof Element?this.dom.inner.appendChild(e):this.dom.inner.innerHTML=void 0!==e&&null!==e?e:this.groupId||"",this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?s.removeClassName(this.dom.inner,"hidden"):s.addClassName(this.dom.inner,"hidden");var i=t&&t.className||null;i!=this.className&&(this.className&&(s.removeClassName(this.dom.label,this.className),s.removeClassName(this.dom.foreground,this.className),s.removeClassName(this.dom.background,this.className),s.removeClassName(this.dom.axis,this.className)),s.addClassName(this.dom.label,i),s.addClassName(this.dom.foreground,i),s.addClassName(this.dom.background,i),s.addClassName(this.dom.axis,i),this.className=i),this.style&&(s.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(s.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;if(r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,s.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),"function"==typeof this.itemSet.options.order){if(i){var a=this;s.forEach(this.items,function(t){t.displayed||(t.redraw(),a.visibleItems.push(t)),t.repositionX(!1)});var h=this.orderedItems.byStart.slice().sort(function(t,e){return a.itemSet.options.order(t.data,e.data)});n.stack(h,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?n.stack(this.visibleItems,e,i):n.nostack(this.visibleItems,e,this.subgroups);var d=this._calculateHeight(e),l=this.dom.foreground;this.top=l.offsetTop,this.left=l.offsetLeft,this.width=l.offsetWidth,o=s.updateProperty(this,"height",d)||o,o=s.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=s.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=d+"px",this.dom.foreground.style.height=d+"px",this.dom.label.style.height=d+"px";for(var u=0,p=this.visibleItems.length;u<p;u++){this.visibleItems[u].repositionY(e)}return o},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;this.resetSubgroups();var o=this;if(i.length){var n=i[0].top,r=i[0].top+i[0].height;if(s.forEach(i,function(t){n=Math.min(n,t.top),r=Math.max(r,t.top+t.height),void 0!==t.data.subgroup&&(o.subgroups[t.data.subgroup].height=Math.max(o.subgroups[t.data.subgroup].height,t.height),o.subgroups[t.data.subgroup].visible=!0)}),n>t.axis){var a=n-t.axis;r-=a,s.forEach(i,function(t){t.top-=a})}e=r+t.item.vertical/2}else e=t.axis+t.item.vertical;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){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)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;i<t.length;i++)this.subgroups[t[i].subgroup].index=i}},o.prototype.resetSubgroups=function(){for(var t in this.subgroups)this.subgroups.hasOwnProperty(t)&&(this.subgroups[t].visible=!1)},o.prototype.remove=function(t){delete this.items[t.id],t.setParent(null);var e=this.visibleItems.indexOf(t);-1!=e&&this.visibleItems.splice(e,1)},o.prototype.removeFromDataSet=function(t){this.itemSet.removeItem(t.id)},o.prototype.order=function(){for(var t=s.toArray(this.items),e=[],i=[],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},n.orderByStart(this.orderedItems.byStart),n.orderByEnd(this.orderedItems.byEnd)}
3,o.prototype._updateVisibleItems=function(t,e,i){var o,n,r=[],a={},h=(i.end-i.start)/4,d=i.start-h,l=i.end+h,u=function(t){return t<d?-1:t<=l?0:1};if(e.length>0)for(n=0;n<e.length;n++)this._checkIfVisibleWithReference(e[n],r,a,i);var p=s.binarySearchCustom(t.byStart,u,"data","start");if(this._traceVisible(p,t.byStart,r,a,function(t){return t.data.start<d||t.data.start>l}),1==this.checkRangedItems)for(this.checkRangedItems=!1,n=0;n<t.byEnd.length;n++)this._checkIfVisibleWithReference(t.byEnd[n],r,a,i);else{var c=s.binarySearchCustom(t.byEnd,u,"data","end");this._traceVisible(c,t.byEnd,r,a,function(t){return t.data.end<d||t.data.end>l})}for(n=0;n<r.length;n++)o=r[n],o.displayed||o.show(),o.repositionX();return r},o.prototype._traceVisible=function(t,e,i,o,s){var n,r;if(-1!=t){for(r=t;r>=0&&(n=e[r],!s(n));r--)void 0===o[n.id]&&(o[n.id]=!0,i.push(n));for(r=t+1;r<e.length&&(n=e[r],!s(n));r++)void 0===o[n.id]&&(o[n.id]=!0,i.push(n))}},o.prototype._checkIfVisible=function(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()},o.prototype._checkIfVisibleWithReference=function(t,e,i,o){t.isVisible(o)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()},e.exports=o},{"../../util":37,"../Stack":14,"./item/RangeItem":35}],24:[function(t,e,i){function o(t,e){this.body=t,this.defaultOptions={type:null,orientation:"bottom",align:"auto",stack:!0,groupOrder:null,selectable:!0,editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1},snap:h.snap,onAdd:function(t,e){e(t)},onUpdate:function(t,e){e(t)},onMove:function(t,e){e(t)},onRemove:function(t,e){e(t)},onMoving:function(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},padding:5},this.options=n.extend({},this.defaultOptions),this.itemOptions={type:{start:"Date",end:"Date"}},this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.stackDirty=!0,this.touchParams={},this._create(),this.setOptions(e)}var s=t("../../module/hammer"),n=t("../../util"),r=t("../../DataSet"),a=t("../../DataView"),h=t("../TimeStep"),d=t("./Component"),l=t("./Group"),u=t("./BackgroundGroup"),p=t("./item/BoxItem"),c=t("./item/PointItem"),m=t("./item/RangeItem"),f=t("./item/BackgroundItem"),g="__ungrouped__",y="__background__";o.prototype=new d,o.types={background:f,box:p,range:m,point:c},o.prototype._create=function(){var t=document.createElement("div");t.className="itemset",t["timeline-itemset"]=this,this.dom.frame=t;var e=document.createElement("div");e.className="background",t.appendChild(e),this.dom.background=e;var i=document.createElement("div");i.className="foreground",t.appendChild(i),this.dom.foreground=i;var o=document.createElement("div");o.className="axis",this.dom.axis=o;var n=document.createElement("div");n.className="labelset",this.dom.labelSet=n,this._updateUngrouped();var r=new u(y,null,this);r.show(),this.groups[y]=r,this.hammer=s(this.body.dom.centerContainer,{preventDefault:!0}),this.hammer.on("touch",this._onTouch.bind(this)),this.hammer.on("dragstart",this._onDragStart.bind(this)),this.hammer.on("drag",this._onDrag.bind(this)),this.hammer.on("dragend",this._onDragEnd.bind(this)),this.hammer.on("tap",this._onSelectItem.bind(this)),this.hammer.on("hold",this._onMultiSelectItem.bind(this)),this.hammer.on("doubletap",this._onAddItem.bind(this)),this.show()},o.prototype.setOptions=function(t){if(t){var e=["type","align","orientation","order","padding","stack","selectable","groupOrder","dataAttributes","template","hide","snap"];n.selectiveExtend(e,this.options,t),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin, 4this.options.margin.item.vertical=t.margin):"object"==typeof t.margin&&(n.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&&n.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),"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):"object"==typeof t.editable&&n.selectiveExtend(["updateTime","updateGroup","add","remove"],this.options.editable,t.editable));["onAdd","onUpdate","onRemove","onMove","onMoving"].forEach(function(e){var i=t[e];if(i){if(!(i instanceof Function))throw new Error("option "+e+" must be a function "+e+"(item, callback)");this.options[e]=i}}.bind(this)),this.markDirty()}},o.prototype.markDirty=function(t){this.groupIds=[],this.stackDirty=!0,t&&t.refreshItems&&n.forEac
4h(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()})},o.prototype.destroy=function(){this.hide(),this.setItems(null),this.setGroups(null),this.hammer=null,this.body=null,this.conversion=null},o.prototype.hide=function(){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)},o.prototype.show=function(){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.body.dom.left.appendChild(this.dom.labelSet)},o.prototype.setSelection=function(t){var e,i,o,s;for(void 0==t&&(t=[]),Array.isArray(t)||(t=[t]),e=0,i=this.selection.length;e<i;e++)o=this.selection[e],(s=this.items[o])&&s.unselect();for(this.selection=[],e=0,i=t.length;e<i;e++)o=t[e],(s=this.items[o])&&(this.selection.push(o),s.select())},o.prototype.getSelection=function(){return this.selection.concat([])},o.prototype.getVisibleItems=function(){var t=this.body.range.getRange(),e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end),o=[];for(var s in this.groups)if(this.groups.hasOwnProperty(s))for(var n=this.groups[s],r=n.visibleItems,a=0;a<r.length;a++){var h=r[a];h.left<i&&h.left+h.width>e&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;i<o;i++)if(e[i]==t){e.splice(i,1);break}},o.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,i=n.option.asSize,o=this.options,s=o.orientation,r=!1,a=this.dom.frame,h=o.editable.updateTime||o.editable.updateGroup;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="itemset"+(h?" editable":""),r=this._orderGroups()||r;var d=e.end-e.start;(d!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth)&&(this.stackDirty=!0),this.lastVisibleInterval=d,this.props.lastWidth=this.props.width;var l=this.stackDirty,u=this._firstGroup(),p={item:t.item,axis:t.axis},c={item:t.item,axis:t.item.vertical/2},m=0,f=t.axis+t.item.vertical;return this.groups[y].redraw(e,c,l),n.forEach(this.groups,function(t){var i=t==u?p:c,o=t.redraw(e,i,l);r=o||r,m+=t.height}),m=Math.max(m,f),this.stackDirty=!1,a.style.height=i(m),this.props.width=a.offsetWidth,this.props.height=m,this.dom.axis.style.top=i("top"==s?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.dom.axis.style.left="0",r=this._isResized()||r},o.prototype._firstGroup=function(){var t="top"==this.options.orientation?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[g]||null},o.prototype._updateUngrouped=function(){var t,e,i=this.groups[g];this.groups[y];if(this.groupsData){if(i){i.hide(),delete this.groups[g];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),s=this.groups[o];s&&s.add(t)||t.hide()}}}else if(!i){i=new l(null,null,this),this.groups[g]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){return this.dom.labelSet},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(n.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var s=this.id;n.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,s)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}},o.prototype.getItems=function(){return this.itemsData},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(n.forEach(this.groupListeners,function(t,e){i.groupsData.unsubscribe(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;
4n.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("change",{queue:!0})},o.prototype.getGroups=function(){return this.groupsData},o.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){return"background"==this._getType(t)&&void 0==t.group?y:this.groupsData?t.group:g},o.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i=e.itemsData.get(t,e.itemOptions),s=e.items[t],n=e._getType(i),r=o.types[n];if(s&&(r&&s instanceof r?e._updateItem(s,i):(e._removeItem(s),s=null)),!s){if(!r)throw"rangeoverflow"==n?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis.timeline .item.range .content {overflow: visible;}'):new TypeError('Unknown item type "'+n+'"');s=new r(i,e.conversion,e.options),s.id=t,e._addItem(s)}}),this._order(),this.stackDirty=!0,this.body.emitter.emit("change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("change",{queue:!0}))},o.prototype._order=function(){n.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==g||t==y)throw new Error("Illegal group id. "+t+" is a reserved id.");var s=Object.create(e.options);n.extend(s,{height:null}),o=new l(t,i,e),e.groups[t]=o;for(var r in e.items)if(e.items.hasOwnProperty(r)){var a=e.items[r];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("change",{queue:!0})},o.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("change",{queue:!0})},o.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),e=!n.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},o.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i&&i.add(t)},o.prototype._updateItem=function(t,e){var i=t.data.group;if(t.setData(e),i!=t.data.group){var o=this.groups[i];o&&o.remove(t);var s=this._getGroupId(t.data),n=this.groups[s];n&&n.add(t)}},o.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;i<t.length;i++)t[i]instanceof m&&e.push(t[i]);return e},o.prototype._onTouch=function(t){this.touchParams.item=this.itemFromTarget(t)},o.prototype._onDragStart=function(t){if(this.options.editable.updateTime||this.options.editable.updateGroup){var e,i=this.touchParams.item||null,o=this;if(i&&i.selected){var s=t.target.dragLeftItem,n=t.target.dragRightItem;s?(e={item:s,initialX:t.gesture.center.clientX},o.options.editable.updateTime&&(e.start=i.data.start.valueOf()),o.options.editable.updateGroup&&"group"in i.data&&(e.group=i.data.group),this.touchParams.itemProps=[e]):n?(e={item:n,initialX:t.gesture.center.clientX},o.options.editable.updateTime&&(e.end=i.data.end.valueOf()),o.options.editable.updateGroup&&"group"in i.data&&(e.group=i.data.group),this.touchParams.itemProps=[e]):this.touchParams.itemProps=this.getSelection().map(function(e){var i=o.items[e],s={item:i,initialX:t.gesture.center.clientX};return o.options.editable.updateTime&&"start"in i.data&&(s.start=i.data.start.valueOf(),"end"in i.data&&(s.duration=i.data.end.valueOf()-s.start)),o.options.editable.updateGroup&&"group"in i.data&&(s.group=i.data.group),s}),t.stopPropagation()}else this.options.editable.add&&t.gesture.srcEvent.ctrlKey&&this._onDragStartAddItem(t)}},o.prototype._onDragStartAddItem=function(t){var e=this.options.snap||null,i=n.getAbsoluteLeft(this.dom.frame),o=t.gesture.center.pageX-i-10,s=this.body.util.toTime(o),r=this.body.util.getScale(),a=this.body.util.getStep(),h=e?e(s,r,a):h,d=h,l={type:"range",start:h,end:d,content:"new item"},u=n.randomUUID();l[this.itemsData._fieldId]=u;var p=this.groupFromTarget(t);p&&(l.group=p.groupId);var c=new m(l,this.conversion,this.options);c.id=u,this._addItem(c);var f={item:c,end:d.valueOf(),initialX:t.gesture.center.clientX};this.touchParams.itemProps=[f],t.stopPropagation()},o.prototype._onDrag=function(t){if(t.preventDefault(),this.touchParams.itemProps){var e=this,i=this.options.snap||null,o=this.body.dom.root.offsetLeft+this.body.domProps.left.width,s=this.body.util.getScale(),r=this.body.util.getStep();this.touchParams.itemProps.forEach(function(a){var h={},d=e.body.util.toTime(t.gesture.center.clientX-o),l=e.body.util.toTime(a.initialX-o),u=d-l;if("start"in a){var p=new Date(a.start+u);h.start=i?i(p,s,r):p}if("end"in a){var c=new Date(a.end+u);h.end=i?i(c,s,r):c}else"duration"in a&&(h.end=new Date(h.start.valueOf()+a.duration));if("group"in a){var m=e.groupFromTarget(t);h.group=m&&m.groupId}var f=n.extend({},a.item.data,h);e.options.onMoving(f,function(t){t&&e._updateItemProps(a.item,t)})}),this.stackDirty=!0,this.body.emitter.emit("change"),t.stopPropagation()}},o.prototype._updateItemProps=function(t,e){"start"in e&&(t.data.start=e.start),"end"in e?t.data.end=e.end:"duration"in e&&(t.data.end=new Date(e.start.valueOf()+e.duration)),"group"in e&&t.data.group!=e.group&&this._moveToGroup(t,e.group)},o.prototype._moveToGroup=function(t,e){var i=this.groups[e];if(i&&i.groupId!=t.data.group){var o=t.parent;o.remove(t),o.order(),i.add(t),i.order(),t.data.group=i.groupId}},o.prototype._onDragEnd=function(t){if(t.preventDefault(),this.touchParams.itemProps){var e=[],i=this,o=this.itemsData.getDataSet(),s=this.touchParams.itemProps;
4this.touchParams.itemProps=null,s.forEach(function(t){var s=t.item.id,r=i.itemsData.get(s,i.itemOptions);if(r){var a=!1;"start"in t.item.data&&(a=t.start!=t.item.data.start.valueOf(),r.start=n.convert(t.item.data.start,o._options.type&&o._options.type.start||"Date")),"end"in t.item.data&&(a=a||t.end!=t.item.data.end.valueOf(),r.end=n.convert(t.item.data.end,o._options.type&&o._options.type.end||"Date")),"group"in t.item.data&&(a=a||t.group!=t.item.data.group,r.group=t.item.data.group),a&&i.options.onMove(r,function(n){n?(n[o._fieldId]=s,e.push(n)):(i._updateItemProps(t.item,t),i.stackDirty=!0,i.body.emitter.emit("change"))})}else i.options.onAdd(t.item.data,function(e){i._removeItem(t.item),e&&i.itemsData.getDataSet().add(e),i.stackDirty=!0,i.body.emitter.emit("change")})}),e.length&&o.update(e),t.stopPropagation()}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.gesture.srcEvent&&t.gesture.srcEvent.ctrlKey,i=t.gesture.srcEvent&&t.gesture.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),s=this.itemFromTarget(t),n=s?[s.id]:[];this.setSelection(n);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var s=e.itemsData.get(o.id);this.options.onUpdate(s,function(t){t&&e.itemsData.getDataSet().update(t)})}else{var r=n.getAbsoluteLeft(this.dom.frame),a=t.gesture.center.pageX-r,h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),u={start:i?i(h,d,l):h,content:"new item"};if("range"===this.options.type){var p=this.body.util.toTime(a+this.props.width/5);u.end=i?i(p,d,l):p}u[this.itemsData._fieldId]=n.randomUUID();var c=this.groupFromTarget(t);c&&(u.group=c.groupId),this.options.onAdd(u,function(t){t&&e.itemsData.getDataSet().add(t)})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e,i=this.itemFromTarget(t);if(i){e=this.getSelection();if(t.gesture.touches[0]&&t.gesture.touches[0].shiftKey||!1){e.push(i.id);var s=o._getItemRange(this.itemsData.get(e,this.itemOptions));e=[];for(var n in this.items)if(this.items.hasOwnProperty(n)){var r=this.items[n],a=r.data.start,h=void 0!==r.data.end?r.data.end:a;a>=s.min&&h<=s.max&&e.push(r.id)}}else{var d=e.indexOf(i.id);-1==d?e.push(i.id):e.splice(d,1)}this.setSelection(e),this.body.emitter.emit("select",{items:this.getSelection()})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.start<i)&&(i=t.start),void 0!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.gesture?t.gesture.center.clientY:t.clientY,i=0;i<this.groupIds.length;i++){var o=this.groupIds[i],s=this.groups[o],r=s.dom.foreground,a=n.getAbsoluteTop(r);if(e>a&&e<a+r.offsetHeight)return s;if("top"===this.options.orientation){if(i===this.groupIds.length-1&&e>a)return s}else if(0===i&&e<a+r.offset)return s}return null},o.itemSetFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-itemset"))return e["timeline-itemset"];e=e.parentNode}return null},e.exports=o},{"../../DataSet":2,"../../DataView":3,"../../module/hammer":7,"../../util":37,"../TimeStep":15,"./BackgroundGroup":17,"./Component":18,"./Group":23,"./item/BackgroundItem":31,"./item/BoxItem":32,"./item/PointItem":34,"./item/RangeItem":35}],25:[function(t,e,i){function o(t,e,i,o){this.body=t,this.defaultOptions={enabled:!0,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-left"}},this.side=i,this.options=s.extend({},this.defaultOptions),this.linegraphOptions=o,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.setOptions(e)}var s=t("../../util"),n=t("../../DOMutil"),r=t("./Component");o.prototype=new r,o.prototype.clear=function(){this.groups={},this.amountOfGroups=0},o.prototype.addGroup=function(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1},o.prototype.updateGroup=function(t,e){this.groups[t]=e},o.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},o.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="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="legendText",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)},o.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},o.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},o.prototype.setOptions=function(t){var e=["enabled","orientation","icons","left","right"];s.selectiveDeepExtend(e,this.options,t)},o.prototype.redraw=function(){var t=0;for(var e in this.groups)this.groups.hasOwnProperty(e)&&(1!=this.groups[e].visible||void 0!==this.linegraphOptions.visibility[e]&&1!=this.linegraphOptions.visibility[e]||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 i=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+i+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 o="";for(var e in this.groups)this.groups.hasOwnProperty(e)&&(1!=this.groups[e].visible||void 0!==this.linegraphOptions.visibility[e]&&1!=this.linegraphOptions.visibility[e]||(o+=this.groups[e].content+"<br />"));this.dom.textArea.innerHTML=o,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconS
4pacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){n.prepareElements(this.svgElements);var t=window.getComputedStyle(this.dom.frame).paddingTop,e=Number(t.replace("px","")),i=e,o=this.options.iconSize,s=.75*this.options.iconSize,r=e+.5*s+3;this.svg.style.width=o+5+e+"px";for(var a in this.groups)this.groups.hasOwnProperty(a)&&(1!=this.groups[a].visible||void 0!==this.linegraphOptions.visibility[a]&&1!=this.linegraphOptions.visibility[a]||(this.groups[a].drawIcon(i,r,this.svgElements,this.svg,o,s),r+=s+this.options.iconSpacing));n.cleanupElements(this.svgElements)}},e.exports=o},{"../../DOMutil":1,"../../util":37,"./Component":18}],26:[function(t,e,i){function o(t,e){this.id=s.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,handleOverlap:"overlap",align:"center"},catmullRom:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,icons:!1,width:"40px",visible:!0,alignZeros:!0,customRange:{left:{min:void 0,max:void 0},right:{min:void 0,max:void 0}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},groups:{visibility:{}}},this.options=s.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){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.COUNTER=0,this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=s.option.asSize(-i.props.width),i.redraw.call(i,!0)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.body.emitter.emit("change")}var s=t("../../util"),n=t("../../DOMutil"),r=t("../../DataSet"),a=t("../../DataView"),h=t("./Component"),d=t("./DataAxis"),l=t("./GraphGroup"),u=t("./Legend"),p=t("./graph2d_types/bar"),c="__ungrouped__";o.prototype=new h,o.prototype._create=function(){var t=document.createElement("div");t.className="LineGraph",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 d(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new d(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new u(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new u(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height&&void 0!==this.body.domProps.centerContainer.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),s.selectiveDeepExtend(e,this.options,t),s.mergeOptions(this.options,t,"catmullRom"),s.mergeOptions(this.options,t,"drawPoints"),s.mergeOptions(this.options,t,"shaded"),s.mergeOptions(this.options,t,"legend"),t.catmullRom&&"object"==typeof t.catmullRom&&t.catmullRom.parametrization&&("uniform"==t.catmullRom.parametrization?this.options.catmullRom.alpha=0:"chordal"==t.catmullRom.parametrization?this.options.catmullRom.alpha=1:(this.options.catmullRom.parametrization="centripetal",this.options.catmullRom.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)),this.groups.hasOwnProperty(c)&&this.groups[c].setOptions(t)}this.dom.frame&&this.redraw(!0)},o.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},o.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(s.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;
4s.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e)}this._updateUngrouped(),this.redraw(!0)},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(s.forEach(this.groupListeners,function(t,e){i.groupsData.unsubscribe(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;s.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._onUpdate()},o.prototype._onUpdate=function(t){this._updateUngrouped(),this._updateAllGroupData(),this.redraw(!0)},o.prototype._onAdd=function(t){this._onUpdate(t)},o.prototype._onRemove=function(t){this._onUpdate(t)},o.prototype._onUpdateGroups=function(t){for(var e=0;e<t.length;e++){var i=this.groupsData.get(t[e]);this._updateGroup(i,t[e])}this.redraw(!0)},o.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},o.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this.groups.hasOwnProperty(t[e])&&("right"==this.groups[t[e]].options.yAxisOr
4ientation?(this.yAxisRight.removeGroup(t[e]),this.legendRight.removeGroup(t[e]),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(t[e]),this.legendLeft.removeGroup(t[e]),this.legendLeft.redraw()),delete this.groups[t[e]]);this._updateUngrouped(),this.redraw(!0)},o.prototype._updateGroup=function(t,e){this.groups.hasOwnProperty(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.updateGroup(e,this.groups[e]),this.legendLeft.updateGroup(e,this.groups[e]))):(this.groups[e]=new l(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()},o.prototype._updateAllGroupData=function(){if(null!=this.itemsData){var t,e={};for(t in this.groups)this.groups.hasOwnProperty(t)&&(e[t]=[]);for(var i in this.itemsData._data)if(this.itemsData._data.hasOwnProperty(i)){var o=this.itemsData._data[i];if(void 0===e[o.group])throw new Error("Cannot find referenced group. Possible reason: items added before groups? Groups need to be added before items, as items refer to groups.");o.x=s.convert(o.x,"Date"),e[o.group].push(o)}for(t in this.groups)this.groups.hasOwnProperty(t)&&this.groups[t].setItems(e[t])}},o.prototype._updateUngrouped=function(){if(this.itemsData&&null!=this.itemsData){var t=0;for(var e in this.itemsData._data)if(this.itemsData._data.hasOwnProperty(e)){var i=this.itemsData._data[e];void 0!=i&&(i.hasOwnProperty("group")?void 0===i.group&&(i.group=c):i.group=c,t=i.group==c?t+1:t)}if(0==t)delete this.groups[c],this.legendLeft.removeGroup(c),this.legendRight.removeGroup(c),this.yAxisLeft.removeGroup(c),this.yAxisRight.removeGroup(c);else{var o={id:c,content:this.options.defaultGroup};this._updateGroup(o,c)}}else delete this.groups[c],this.legendLeft.removeGroup(c),this.legendRight.removeGroup(c),this.yAxisLeft.removeGroup(c),this.yAxisRight.removeGroup(c);this.legendLeft.redraw(),this.legendRight.redraw()},o.prototype.redraw=function(t){var e=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height,void 0===this.lastWidth&&this.props.width&&(t=!0),e=this._isResized()||e;var i=this.body.range.end-this.body.range.start,o=i!=this.lastVisibleInterval;if(this.lastVisibleInterval=i,1==e&&(this.svg.style.width=s.option.asSize(3*this.props.width),this.svg.style.left=s.option.asSize(-this.props.width),-1==(this.options.height+"").indexOf("%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0)),1==this.updateSVGheight?(this.options.graphHeight!=this.body.domProps.centerContainer.height+"px"&&(this.options.graphHeight=this.body.domProps.centerContainer.height+"px",this.svg.style.height=this.body.domProps.centerContainer.height+"px"),this.updateSVGheight=!1):this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",1==e||1==o||1==this.abortedGraphUpdate||1==t)e=this._updateGraph()||e;else if(0!=this.lastStart){var n=this.body.range.start-this.lastStart,r=this.body.range.end-this.body.range.start;if(0!=this.props.width){var a=this.props.width/r,h=n*a;this.svg.style.left=-this.props.width-h+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),e},o.prototype._updateGraph=function(){if(n.prepareElements(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},o={},s={},r=!1,a=[];for(var h in this.groups)this.groups.hasOwnProperty(h)&&(t=this.groups[h],1!=t.visible||void 0!==this.options.groups.visibility[h]&&1!=this.options.groups.visibility[h]||a.push(h));if(a.length>0){var d=this.body.util.toGlobalTime(-this.body.domProps.root.width),l=this.body.util.toGlobalTime(2*this.body.domProps.root.width),u={};for(this._getRelevantData(a,u,d,l),this._applySampling(a,u),e=0;e<a.length;e++)i[a[e]]=this._convertXcoordinates(u[a[e]]);this._getYRanges(a,i,s),r=this._updateYAxis(a,s);if(1==r&&this.COUNTER<5)return n.cleanupElements(this.svgElements),this.abortedGraphUpdate=!0,this.COUNTER++,this.body.emitter.emit("change"),!0;for(this.COUNTER>5&&console.log("WARNING: there may be an infinite loop in the _updateGraph emitter cycle."),this.COUNTER=0,this.abortedGraphUpdate=!1,e=0;e<a.length;e++)t=this.groups[a[e]],o[a[e]]=this._convertYcoordinates(u[a[e]],t);for(e=0;e<a.length;e++)t=this.groups[a[e]],"bar"!=t.options.style&&t.draw(o[a[e]],t,this.framework);p.draw(a,o,this.framework)}}return n.cleanupElements(this.svgElements),!1}
4,o.prototype._getRelevantData=function(t,e,i,o){var n,r,a,h;if(t.length>0)for(r=0;r<t.length;r++){n=this.groups[t[r]],e[t[r]]=[];var d=e[t[r]];if(1==n.options.sort){var l=Math.max(0,s.binarySearchValue(n.itemsData,i,"x","before"));for(a=l;a<n.itemsData.length;a++)if(void 0!==(h=n.itemsData[a])){if(h.x>o){d.push(h);break}d.push(h)}}else for(a=0;a<n.itemsData.length;a++)void 0!==(h=n.itemsData[a])&&h.x>i&&h.x<o&&d.push(h)}},o.prototype._applySampling=function(t,e){var i;if(t.length>0)for(var o=0;o<t.length;o++)if(i=this.groups[t[o]],1==i.options.sampling){var s=e[t[o]];if(s.length>0){var n=1,r=s.length,a=this.body.util.toGlobalScreen(s[s.length-1].x)-this.body.util.toGlobalScreen(s[0].x),h=r/a;n=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=[],l=0;l<r;l+=n)d.push(s[l]);e[t[o]]=d}}},o.prototype._getYRanges=function(t,e,i){var o,s,n,r,a=[],h=[];if(t.length>0){for(n=0;n<t.length;n++)o=e[t[n]],r=this.groups[t[n]].options,o.length>0&&(s=this.groups[t[n]],"stack"==r.barChart.handleOverlap&&"bar"==r.style?"left"==r.yAxisOrientation?a=a.concat(s.getYRange(o)):h=h.concat(s.getYRange(o)):i[t[n]]=s.getYRange(o,t[n]));p.getStackedBarYRange(a,i,t,"__barchartLeft","left"),p.getStackedBarYRange(h,i,t,"__barchartRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,s=!1,n=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;u<t.length;u++){var p=this.groups[t[u]];
4p&&"right"!=p.options.yAxisOrientation?(n=!0,a=0,d=0):p&&p.options.yAxisOrientation&&(r=!0,h=0,l=0)} 5for(var u=0;u<t.length;u++)e.hasOwnProperty(t[u])&&!0!==e[t[u]].ignore&&(i=e[t[u]].min,o=e[t[u]].max,"right"!=e[t[u]].yAxisOrientation?(n=!0,a=a>i?i:a,d=d<o?o:d):(r=!0,h=h>i?i:h,l=l<o?o:l));1==n&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}return s=this._toggleAxisVisiblity(n,this.yAxisLeft)||s,s=this._toggleAxisVisiblity(r,this.yAxisRight)||s,1==r&&1==n?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!n,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==r?this.yAxisRight.width:0,s=this.yAxisLeft.redraw()||s,this.yAxisRight.stepPixelsForced=this.yAxisLeft.stepPixels,this.yAxisRight.zeroCrossing=this.yAxisLeft.zeroCrossing,s=this.yAxisRight.redraw()||s):s=this.yAxisRight.redraw()||s,-1!=t.indexOf("__barchartLeft")&&t.splice(t.indexOf("__barchartLeft"),1),-1!=t.indexOf("__barchartRight")&&t.splice(t.indexOf("__barchartRight"),1),s},o.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},o.prototype._convertXcoordinates=function(t){for(var e,i,o=[],s=this.body.util.toScreen,n=0;n<t.length;n++)e=s(t[n].x)+this.props.width,i=t[n].y,o.push({x:e,y:i});return o},o.prototype._convertYcoordinates=function(t,e){var i,o,s=[],n=this.body.util.toScreen,r=this.yAxisLeft,a=Number(this.svg.style.height.replace("px",""));
5"right"==e.options.yAxisOrientation&&(r=this.yAxisRight);for(var h=0;h<t.length;h++){var d;d=t[h].label?t[h].label:null,i=n(t[h].x)+this.props.width,o=Math.round(r.convertValue(t[h].y)),s.push({x:i,y:o,label:d})}return e.setZeroPosition(Math.min(a,r.convertValue(0))),s},e.exports=o},{"../../DOMutil":1,"../../DataSet":2,"../../DataView":3,"../../util":37,"./Component":18,"./DataAxis":21,"./GraphGroup":22,"./Legend":25,"./graph2d_types/bar":28}],27:[function(t,e,i){function o(t,e){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:"bottom",showMinorLabels:!0,showMajorLabels:!0,format:null,timeAxis:null,factory:{Stepper:r}},this.options=s.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var s=t("../../util"),n=t("./Component"),r=t("../TimeStep"),a=t("../DateUtil"),h=t("../../module/moment");o.prototype=new n,o.prototype.setOptions=function(t){t&&(s.selectiveExtend(["orientation","showMinorLabels","showMajorLabels","hiddenDates","format","timeAxis","factory"],this.options,t),"locale"in t&&("function"==typeof h.locale?h.locale(t.locale):h.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="timeaxis foreground",this.dom.background.className="timeaxis background"},o.prototype.destroy=function(){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},o.prototype.redraw=function(){var t=this.options,e=this.props,i=this.dom.foreground,o=this.dom.background,s="top"==t.orientation?this.body.dom.top:this.body.dom.bottom,n=i.parentNode!==s;this._calculateCharSize();var r=(this.options.orientation,this.options.showMinorLabels),a=this.options.showMajorLabels;e.minorLabelHeight=r?e.minorCharHeight:0,e.majorLabelHeight=a?e.majorCharHeight:0,e.height=e.minorLabelHeight+e.majorLabelHeight,e.width=i.offsetWidth,e.minorLineHeight=this.body.domProps.root.height-e.majorLabelHeight-("top"==t.orientation?this.body.domProps.bottom.height:this.body.domProps.top.height),e.minorLineWidth=1,e.majorLineHeight=e.minorLineHeight+e.majorLabelHeight,e.majorLineWidth=1;var h=i.nextSibling,d=o.nextSibling;return i.parentNode&&i.parentNode.removeChild(i),o.parentNode&&o.parentNode.removeChild(o),i.style.height=this.props.height+"px",this._repaintLabels(),h?s.insertBefore(i,h):s.appendChild(i),d?this.body.dom.backgroundVertical.insertBefore(o,d):this.body.dom.backgroundVertical.appendChild(o),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation,e=s.convert(this.body.range.start,"Number"),i=s.convert(this.body.range.end,"Number"),o=this.body.util.toTime(7*(this.props.minorCharWidth||10)).valueOf(),n=o-a.getHiddenDurationBefore(this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();var h=this.options.factory&&this.options.factory.Stepper?this.options.factory.Stepper:r,d=new h(new Date(e),new Date(i),n,this.body.hiddenDates);this.options.format&&d.setFormat(this.options.format),this.options.timeAxis&&d.setScale(this.options.timeAxis),this.step=d;var l=this.dom;l.redundant.lines=l.lines,l.redundant.majorTexts=l.majorTexts,l.redundant.minorTexts=l.minorTexts,l.lines=[],l.majorTexts=[],l.minorTexts=[];var u,p,c,m,f=0,g=0,y=0,v=void 0,b=0;for(d.first();d.hasNext()&&b<1e3;)b++,u=d.getCurrent(),p=d.isMajor(),m=d.getClassName(),g=f,f=this.body.util.toScreen(u),y=f-g,c&&(c.style.width=y+"px"),this.options.showMinorLabels&&this._repaintMinorText(f,d.getLabelMinor(),t,m),p&&this.options.showMajorLabels?(f>0&&(void 0==v&&(v=f),this._repaintMajorText(f,d.getLabelMajor(),t,m)),c=this._repaintMajorLine(f,t,m)):c=this._repaintMinorLine(f,t,m),d.next();if(this.options.showMajorLabels){var w=this.body.util.toTime(0),_=d.getLabelMajor(w),x=_.length*(this.props.majorCharWidth||10)+10;(void 0==v||x<v)&&this._repaintMajorText(0,_,t,m)}s.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})}
5,o.prototype._repaintMinorText=function(t,e,i,o){var s=this.dom.redundant.minorTexts.shift();if(!s){var n=document.createTextNode("");s=document.createElement("div"),s.appendChild(n),this.dom.foreground.appendChild(s)}this.dom.minorTexts.push(s),s.childNodes[0].nodeValue=e,s.style.top="top"==i?this.props.majorLabelHeight+"px":"0",s.style.left=t+"px",s.className="text minor "+o},o.prototype._repaintMajorText=function(t,e,i,o){var s=this.dom.redundant.majorTexts.shift();if(!s){var n=document.createTextNode(e);s=document.createElement("div"),s.appendChild(n),this.dom.foreground.appendChild(s)}this.dom.majorTexts.push(s),s.childNodes[0].nodeValue=e,s.className="text major "+o,s.style.top="top"==i?"0":this.props.minorLabelHeight+"px",s.style.left=t+"px"},o.prototype._repaintMinorLine=function(t,e,i){var o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);var s=this.props;return o.style.top="top"==e?s.majorLabelHeight+"px":this.body.domProps.top.height+"px",o.style.height=s.minorLineHeight+"px",o.style.left=t-s.minorLineWidth/2+"px",o.className="grid vertical minor "+i,o},o.prototype._repaintMajorLine=function(t,e,i){var o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);var s=this.props;return o.style.top="top"==e?"0":this.body.domProps.top.height+"px",o.style.left=t-s.majorLineWidth/2+"px",o.style.height=s.majorLineHeight+"px",o.className="grid vertical major "+i,o},o.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="text minor 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="text major 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},e.exports=o},{"../../module/moment":8,"../../util":37,"../DateUtil":12,"../TimeStep":15,"./Component":18}],28:[function(t,e,i){function o(t,e){this.groupId=t,this.options=e}var s=t("../../../DOMutil");t("./points");o.prototype.getYRange=function(t){if("stack"!=this.options.barChart.handleOverlap){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;
5return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}}for(var s=[],o=0;o<t.length;o++)s.push({x:t[o].x,y:t[o].y,groupId:this.groupId});return s},o.draw=function(t,e,i){var n,r,a,h,d,l,u=[],p={},c=0;for(d=0;d<t.length;d++)if(h=i.groups[t[d]],"bar"==h.options.style&&1==h.visible&&(void 0===i.options.groups.visibility[t[d]]||1==i.options.groups.visibility[t[d]]))for(l=0;l<e[t[d]].length;l++)u.push({x:e[t[d]][l].x,y:e[t[d]][l].y,groupId:t[d]}),c+=1;if(0!=c)for(u.sort(function(t,e){return t.x==e.x?t.groupId-e.groupId:t.x-e.x}),o._getDataIntersections(p,u),d=0;d<u.length;d++){h=i.groups[u[d].groupId];var m=.1*h.options.barChart.width;r=u[d].x;var f=0;if(void 0===p[r])d+1<u.length&&(n=Math.abs(u[d+1].x-r)),d>0&&(n=Math.min(n,Math.abs(u[d-1].x-r))),a=o._getSafeDrawData(n,h,m);else{var g=d+(p[r].amount-p[r].resolved),y=d-(p[r].resolved+1);g<u.length&&(n=Math.abs(u[g].x-r)),y>0&&(n=Math.min(n,Math.abs(u[y].x-r))),a=o._getSafeDrawData(n,h,m),p[r].resolved+=1,"stack"==h.options.barChart.handleOverlap?(f=p[r].accumulated,p[r].accumulated+=h.zeroPosition-u[d].y):"sideBySide"==h.options.barChart.handleOverlap&&(a.width=a.width/p[r].amount,a.offset+=p[r].resolved*a.width-.5*a.width*(p[r].amount+1),"left"==h.options.barChart.align?a.offset-=.5*a.width:"right"==h.options.barChart.align&&(a.offset+=.5*a.width))}s.drawBar(u[d].x+a.offset,u[d].y-f,a.width,h.zeroPosition-u[d].y,h.className+" bar",i.svgElements,i.svg),1==h.options.drawPoints.enabled&&s.drawPoint(u[d].x+a.offset,u[d].y,h,i.svgElements,i.svg)}},o._getDataIntersections=function(t,e){for(var i,o=0;o<e.length;o++)o+1<e.length&&(i=Math.abs(e[o+1].x-e[o].x)),o>0&&(i=Math.min(i,Math.abs(e[o-1].x-e[o].x))),0==i&&(void 0===t[e[o].x]&&(t[e[o].x]={amount:0,resolved:0,accumulated:0}),t[e[o].x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,s;return t<e.options.barChart.width&&t>0?(o=t<i?i:t,s=0,"left"==e.options.barChart.align?s-=.5*t:"right"==e.options.barChart.align&&(s+=.5*t)):(o=e.options.barChart.width,s=0,"left"==e.options.barChart.align?s-=.5*e.options.barChart.width:"right"==e.options.barChart.align&&(s+=.5*e.options.barChart.width)),{width:o,offset:s}},o.getStackedBarYRange=function(t,e,i,s,n){if(t.length>0){t.sort(function(t,e){return t.x==e.x?t.groupId-e.groupId:t.x-e.x});var r={};o._getDataIntersections(r,t),e[s]=o._getStackedBarYRange(r,t),e[s].yAxisOrientation=n,i.push(s)}},o._getStackedBarYRange=function(t,e){for(var i,o=e[0].y,s=e[0].y,n=0;n<e.length;n++)i=e[n].x,void 0===t[i]?(o=o>e[n].y?e[n].y:o,s=s<e[n].y?e[n].y:s):t[i].accumulated+=e[n].y;for(var r in t)t.hasOwnProperty(r)&&(o=o>t[r].accumulated?t[r].accumulated:o,s=s<t[r].accumulated?t[r].accumulated:s);return{min:o,max:s}},e.exports=o},{"../../../DOMutil":1,"./points":30}],29:[function(t,e,i){function o(t,e){this.groupId=t,this.options=e}var s=t("../../../DOMutil"),n=t("./points");o.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;
5return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},o.prototype.draw=function(t,e,i){if(null!=t&&t.length>0){var r,a,h=Number(i.svg.style.height.replace("px",""));if(r=s.getSVGElement("path",i.svgElements,i.svg),r.setAttributeNS(null,"class",e.className),void 0!==e.style&&r.setAttributeNS(null,"style",e.style),a=1==e.options.catmullRom.enabled?o._catmullRom(t,e):o._linear(t),1==e.options.shaded.enabled){var d,l=s.getSVGElement("path",i.svgElements,i.svg);d="top"==e.options.shaded.orientation?"M"+t[0].x+",0 "+a+"L"+t[t.length-1].x+",0":"M"+t[0].x+","+h+" "+a+"L"+t[t.length-1].x+","+h,l.setAttributeNS(null,"class",e.className+" fill"),void 0!==e.options.shaded.style&&l.setAttributeNS(null,"style",e.options.shaded.style),l.setAttributeNS(null,"d",d)}r.setAttributeNS(null,"d","M"+a),1==e.options.drawPoints.enabled&&n.draw(t,e,i)}},o._catmullRomUniform=function(t){for(var e,i,o,s,n,r,a=Math.round(t[0].x)+","+Math.round(t[0].y)+" ",h=t.length,d=0;d<h-1;d++)e=0==d?t[0]:t[d-1],i=t[d],o=t[d+1],s=d+2<h?t[d+2]:o,n={x:(-e.x+6*i.x+o.x)*(1/6),y:(-e.y+6*i.y+o.y)*(1/6)},r={x:(i.x+6*o.x-s.x)*(1/6),y:(i.y+6*o.y-s.y)*(1/6)},a+="C"+n.x+","+n.y+" "+r.x+","+r.y+" "+o.x+","+o.y+" ";return a},o._catmullRom=function(t,e){var i=e.options.catmullRom.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);for(var o,s,n,r,a,h,d,l,u,p,c,m,f,g,y,v,b,w,_,x=Math.round(t[0].x)+","+Math.round(t[0].y)+" ",D=t.length,M=0;M<D-1;M++)o=0==M?t[0]:t[M-1],s=t[M],n=t[M+1],r=M+2<D?t[M+2]:n,d=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),l=Math.sqrt(Math.pow(s.x-n.x,2)+Math.pow(s.y-n.y,2)),u=Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2)),g=Math.pow(u,i),v=Math.pow(u,2*i),y=Math.pow(l,i),b=Math.pow(l,2*i),_=Math.pow(d,i),w=Math.pow(d,2*i),p=2*w+3*_*y+b,c=2*v+3*g*y+b,m=3*_*(_+y),m>0&&(m=1/m),f=3*g*(g+y),f>0&&(f=1/f),a={x:(-b*o.x+p*s.x+w*n.x)*m,y:(-b*o.y+p*s.y+w*n.y)*m},h={x:(v*s.x+c*n.x-b*r.x)*f,y:(v*s.y+c*n.y-b*r.y)*f},0==a.x&&0==a.y&&(a=s),0==h.x&&0==h.y&&(h=n),x+="C"+a.x+","+a.y+" "+h.x+","+h.y+" "+n.x+","+n.y+" ";return x},o._linear=function(t){for(var e="",i=0;i<t.length;i++)e+=0==i?t[i].x+","+t[i].y:" "+t[i].x+","+t[i].y;return e},e.exports=o},{"../../../DOMutil":1,"./points":30}],30:[function(t,e,i){function o(t,e){this.groupId=t,this.options=e}var s=t("../../../DOMutil");o.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;
5return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},o.prototype.draw=function(t,e,i,s){o.draw(t,e,i,s)},o.draw=function(t,e,i,o){void 0===o&&(o=0);for(var n=0;n<t.length;n++)s.drawPoint(t[n].x+o,t[n].y,e,i.svgElements,i.svg,t[n].label)},e.exports=o},{"../../../DOMutil":1}],31:[function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}s.call(this,t,e,i),this.emptyContent=!1}var s=(t("../../../module/hammer"),t("./Item")),n=t("../BackgroundGroup"),r=t("./RangeItem");o.prototype=new s(null,null,null),o.prototype.baseClassName="item background",o.prototype.stack=!1,o.prototype.isVisible=function(t){return this.data.start<t.end&&this.data.end>t.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.content=document.createElement("div"),t.content.className="content",t.box.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,s=this.parent.subgroups,r=s[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in s)s.hasOwnProperty(h)&&1==s[h].visible&&s[h].index<r&&(a+=s[h].height+t.item.vertical);a+=0!=r?t.axis-.5*t.item.vertical:0,this.dom.box.style.top=a+"px",this.dom.box.style.bottom=""}else{var a=this.parent.top,d=0;for(var h in s)if(s.hasOwnProperty(h)&&1==s[h].visible){var l=s[h].height+t.item.vertical;d+=l,s[h].index>r&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof n?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},e.exports=o},{"../../../module/hammer":7,"../BackgroundGroup":17,"./Item":33,"./RangeItem":35}],32:[function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);s.call(this,t,e,i)}var s=t("./Item");t("../../../util");o.prototype=new s(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.start<t.end+e},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("DIV"),t.content=document.createElement("DIV"),t.content.className="content",t.box.appendChild(t.content),t.line=document.createElement("DIV"),t.line.className="line",t.dot=document.createElement("DIV"),t.dot.className="dot",t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(!t.line.parentNode){var i=this.parent.dom.background;if(!i)throw new Error("Cannot redraw item: parent has no background container element");i.appendChild(t.line)}if(!t.dot.parentNode){var o=this.parent.dom.axis;
5if(!i)throw new Error("Cannot redraw item: parent has no axis container element");o.appendChild(t.dot)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var s=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");t.box.className="item box"+s,t.line.className="item line"+s,t.dot.className="item dot"+s,this.props.dot.height=t.dot.offsetHeight,this.props.dot.width=t.dot.offsetWidth,this.props.line.width=t.line.offsetWidth,this.width=t.box.offsetWidth,this.height=t.box.offsetHeight,this.dirty=!1}this._repaintDeleteButton(t.box)},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}},o.prototype.repositionX=function(){var t=this.conversion.toScreen(this.data.start),e=this.options.align;this.left="right"==e?t-this.width:"left"==e?t:t-this.width/2,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t-this.props.line.width/2+"px",this.dom.dot.style.left=t-this.props.dot.width/2+"px"},o.prototype.repositionY=function(){var t=this.options.orientation,e=this.dom.box,i=this.dom.line,o=this.dom.dot;if("top"==t)e.style.top=(this.top||0)+"px",i.style.top="0",i.style.height=this.parent.top+this.top+1+"px",i.style.bottom="";else{var s=this.parent.itemSet.props.height,n=s-this.parent.top-this.parent.height+this.top;e.style.top=(this.parent.height-this.top-this.height||0)+"px",i.style.top=s-n+"px",i.style.bottom="0"}o.style.top=-this.props.dot.height/2+"px"},e.exports=o},{"../../../util":37,"./Item":33}],33:[function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.left=null,this.width=null,this.height=null}var s=t("../../../module/hammer"),n=t("../../../util");o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){if(this.selected&&this.options.editable.remove&&!this.dom.deleteButton){var e=this,i=document.createElement("div");i.className="delete",i.title="Delete this item",s(i,{preventDefault:!0}).on("tap",function(t){e.parent.removeFromDataSet(e),t.stopPropagation()}),t.appendChild(i),this.dom.deleteButton=i}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._updateContents=function(t){var e;if(this.options.template){var i=this.parent.itemSet.itemsData.get(this.id);e=this.options.template(i)}else e=this.data.content;if(e!==this.content){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;i<e.length;i++){var o=e[i],s=this.data[o];null!=s?t.setAttribute("data-"+o,s):t.removeAttribute("data-"+o)}}},o.prototype._updateStyle=function(t){this.style&&(n.removeCssText(t,this.style),this.style=null),this.data.style&&(n.addCssText(t,this.data.style),this.style=this.data.style)},e.exports=o},{"../../../module/hammer":7,"../../../util":37}
5],34:[function(t,e,i){function o(t,e,i){if(this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0}},t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);s.call(this,t,e,i)}var s=t("./Item");o.prototype=new s(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.start<t.end+e},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.point=document.createElement("div"),t.content=document.createElement("div"),t.content.className="content",t.point.appendChild(t.content),t.dot=document.createElement("div"),t.point.appendChild(t.dot),t.point["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.point.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.point)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.point),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");t.point.className="item point"+i,t.dot.className="item dot"+i,this.width=t.point.offsetWidth,this.height=t.point.offsetHeight,this.props.dot.width=t.dot.offsetWidth,this.props.dot.height=t.dot.offsetHeight,this.props.content.height=t.content.offsetHeight,t.content.style.marginLeft=2*this.props.dot.width+"px",t.dot.style.top=(this.height-this.props.dot.height)/2+"px",t.dot.style.left=this.props.dot.width/2+"px",this.dirty=!1}this._repaintDeleteButton(t.point)},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)},o.prototype.repositionX=function(){var t=this.conversion.toScreen(this.data.start);this.left=t-this.props.dot.width,this.dom.point.style.left=this.left+"px"},o.prototype.repositionY=function(){var t=this.options.orientation,e=this.dom.point;e.style.top="top"==t?this.top+"px":this.parent.height-this.top-this.height+"px"},e.exports=o},{"./Item":33}],35:[function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var s=t("../../../module/hammer"),n=t("./Item");o.prototype=new n(null,null,null),o.prototype.baseClassName="item range",o.prototype.isVisible=function(t){return this.data.start<t.end&&this.data.end>t.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.content=document.createElement("div"),t.content.className="content",t.box.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(t.box),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,s=this.conversion.toScreen(this.data.start),n=this.conversion.toScreen(this.data.end);void 0!==t&&!0!==t||(s<-o&&(s=-o),n>2*o&&(n=2*o));var r=Math.max(n-s,1);switch(this.overflow?(this.left=s,this.width=r+this.props.content.width,i=this.props.content.width):(this.left=s,this.width=r,i=Math.min(n-s-2*this.options.padding,this.props.content.width)),this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.dom.content.style.left="0";break;case"right":this.dom.content.style.left=Math.max(r-i-2*this.options.padding,0)+"px";break;case"center":this.dom.content.style.left=Math.max((r-i-2*this.options.padding)/2,0)+"px";break;default:e=this.overflow?n>0?Math.max(-s,0):-i:s<0?Math.min(-s,n-s-i-2*this.options.padding):0,this.dom.content.style.left=e+"px"}},o.prototype.repositionY=function(){var t=this.options.orientation,e=this.dom.box;e.style.top="top"==t?this.top+"px":this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="drag-left",t.dragLeftItem=this,s(t,{preventDefault:!0}).on("drag",function(){}),this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="drag-right",t.dragRightItem=this,s(t,{preventDefault:!0}).on("drag",function(){}),this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},e.exports=o},{"../../../module/hammer":7,"./Item":33}
5],36:[function(t,e,i){i.en={current:"current",time:"time"},i.en_EN=i.en,i.en_US=i.en,i.nl={custom:"aangepaste",time:"tijd"},i.nl_NL=i.nl,i.nl_BE=i.nl},{}],37:[function(t,e,i){var o=t("./module/moment");i.isNumber=function(t){return t instanceof Number||"number"==typeof t},i.giveRange=function(t,e,i,o){if(e==t)return.5;var s=1/(e-t);return Math.max(0,(o-t)*s)},i.isString=function(t){return t instanceof String||"string"==typeof t},i.isDate=function(t){if(t instanceof Date)return!0;if(i.isString(t)){if(s.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},i.isDataTable=function(t){return"undefined"!=typeof google&&google.visualization&&google.visualization.DataTable&&t instanceof google.visualization.DataTable},i.randomUUID=function(){var t=function(){return Math.floor(65536*Math.random()).toString(16)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},i.extend=function(t,e){for(var i=1,o=arguments.length;i<o;i++){var s=arguments[i];for(var n in s)s.hasOwnProperty(n)&&(t[n]=s[n])}return t},i.selectiveExtend=function(t,e,i){if(!Array.isArray(t))throw new Error("Array with property names expected as first argument");for(var o=2;o<arguments.length;o++)for(var s=arguments[o],n=0;n<t.length;n++){var r=t[n];s.hasOwnProperty(r)&&(e[r]=s[r])}return e},i.selectiveDeepExtend=function(t,e,o){if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s=2;s<arguments.length;s++)for(var n=arguments[s],r=0;r<t.length;r++){var a=t[r];if(n.hasOwnProperty(a))if(o[a]&&o[a].constructor===Object)void 0===e[a]&&(e[a]={}),e[a].constructor===Object?i.deepExtend(e[a],o[a]):e[a]=o[a];else{if(Array.isArray(o[a]))throw new TypeError("Arrays are not supported by deepExtend");e[a]=o[a]}}return e},i.selectiveNotDeepExtend=function(t,e,o){if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s in o)if(o.hasOwnProperty(s)&&-1==t.indexOf(s))if(o[s]&&o[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?i.deepExtend(e[s],o[s]):e[s]=o[s];else{if(Array.isArray(o[s]))throw new TypeError("Arrays are not supported by deepExtend");e[s]=o[s]}return e},i.deepExtend=function(t,e){if(Array.isArray(e))throw new TypeError("Arrays are not supported by deepExtend");for(var o in e)if(e.hasOwnProperty(o))if(e[o]&&e[o].constructor===Object)void 0===t[o]&&(t[o]={}),t[o].constructor===Object?i.deepExtend(t[o],e[o]):t[o]=e[o];else{if(Array.isArray(e[o]))throw new TypeError("Arrays are not supported by deepExtend");t[o]=e[o]}return t},i.equalArray=function(t,e){if(t.length!=e.length)return!1;for(var i=0,o=t.length;i<o;i++)if(t[i]!=e[i])return!1;return!0},i.convert=function(t,e){var n;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(i.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(o.isMoment(t))return new Date(t.valueOf());if(i.isString(t))return n=s.exec(t), 6n?new Date(Number(n[1])):o(t).toDate();throw new Error("Cannot convert object of type "+i.getType(t)+" to type Date");case"Moment":if(i.isNumber(t))return o(t);if(t instanceof Date)return o(t.valueOf());if(o.isMoment(t))return o(t);if(i.isString(t))return n=s.exec(t),o(n?Number(n[1]):t);throw new Error("Cannot convert object of type "+i.getType(t)+" to type Date");case"ISODate":if(i.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(o.isMoment(t))return t.toDate().toISOString();if(i.isString(t))return n=s.exec(t),n?new Date(Number(n[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+i.getType(t)+" to type ISODate");case"ASPDate":if(i.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(i.isString(t)){n=s.exec(t);return"/Date("+(n?new Date(Number(n[1])).valueOf():new Date(t).valueOf())+")/"}throw new Error("Cannot convert object of type "+i.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+e+'"')}}};var s=/^\/?Date\((\-?\d+)/i;i.getType=function(t){var e=typeof t;return"object"==e?null==t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":e},i.getAbsoluteLeft=function(t){return t.getBoundingClientRect().left+window.pageXOffset},i.getAbsoluteTop=function(t){return t.getBoundingClientRect().top+window.pageYOffset},i.addClassName=function(t,e){var i=t.className.split(" ");-1==i.indexOf(e)&&(i.push(e),t.className=i.join(" "))},i.removeClassName=function(t,e){var i=t.className.split(" "),o=i.indexOf(e);-1!=o&&(i.splice(o,1),t.className=i.join(" "))}
6,i.forEach=function(t,e){var i,o;if(Array.isArray(t))for(i=0,o=t.length;i<o;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},i.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},i.updateProperty=function(t,e,i){return t[e]!==i&&(t[e]=i,!0)},i.addEventListener=function(t,e,i,o){t.addEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},i.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},i.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},i.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},i.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},i.option={},i.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},i.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},i.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},i.option.asSize=function(t,e){return"function"==typeof t&&(t=t()),i.isString(t)?t:i.isNumber(t)?t+"px":e||null},i.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},i.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},i.overrideOpacity=function(t,e){if(-1!=t.indexOf("rgb")){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+e+")"}var o=i.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+e+")"},i.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},i.parseColor=function(t){var e;if(i.isString(t)){if(i.isValidRGB(t)){var o=t.substr(4).substr(0,t.length-5).split(",");t=i.RGBToHex(o[0],o[1],o[2])}if(i.isValidHex(t)){var s=i.hexToHSV(t),n={h:s.h,s:.45*s.s,v:Math.min(1,1.05*s.v)},r={h:s.h,s:Math.min(1,1.25*s.v),v:.6*s.v},a=i.HSVToHex(r.h,r.h,r.v),h=i.HSVToHex(n.h,n.s,n.v);e={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else e={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else e={},e.background=t.background||"white",e.border=t.border||e.background,i.isString(t.highlight)?e.highlight={border:t.highlight,background:t.highlight}:(e.highlight={},e.highlight.background=t.highlight&&t.highlight.background||e.background,e.highlight.border=t.highlight&&t.highlight.border||e.border),i.isString(t.hover)?e.hover={border:t.hover,background:t.hover}:(e.hover={},e.hover.background=t.hover&&t.hover.background||e.background,e.hover.border=t.hover&&t.hover.border||e.border);return e},i.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),s=Math.max(t,Math.max(e,i));if(o==s)return{h:0,s:0,v:o};var n=t==o?e-i:i==o?t-e:i-t;return{h:60*((t==o?3:i==o?1:5)-n/(s-o))/360,s:(s-o)/s,v:s}};var n={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),s=i[1].trim();e[o]=s}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};i.addCssText=function(t,e){var o=n.split(t.style.cssText),s=n.split(e),r=i.extend(o,s);t.style.cssText=n.join(r)},i.removeCssText=function(t,e){var i=n.split(t.style.cssText),o=n.split(e);for(var s in o)o.hasOwnProperty(s)&&delete i[s];t.style.cssText=n.join(i)},i.HSVToRGB=function(t,e,i){var o,s,n,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,s=l,n=h;break;case 1:o=d,s=i,n=h;break;case 2:o=h,s=i,n=l;break;case 3:o=h,s=d,n=i;break;case 4:o=l,s=h,n=i;break;case 5:o=i,s=h,n=d}return{r:Math.floor(255*o),g:Math.floor(255*s),b:Math.floor(255*n)}},i.HSVToHex=function(t,e,o){var s=i.HSVToRGB(t,e,o);return i.RGBToHex(s.r,s.g,s.b)},i.hexToHSV=function(t){var e=i.hexToRGB(t);return i.RGBToHSV(e.r,e.g,e.b)},i.isValidHex=function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},i.isValidRGB=function(t){return t=t.replace(" ",""),/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t)},i.selectiveBridgeObject=function(t,e){if("object"==typeof e){for(var o=Object.create(e),s=0;s<t.length;s++)e.hasOwnProperty(t[s])&&"object"==typeof e[t[s]]&&(o[t[s]]=i.bridgeObject(e[t[s]]));return o}return null},i.bridgeObject=function(t){if("object"==typeof t){var e=Object.create(t);
6for(var o in t)t.hasOwnProperty(o)&&"object"==typeof t[o]&&(e[o]=i.bridgeObject(t[o]));return e}return null},i.mergeOptions=function(t,e,i){if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{t[i].enabled=!0;for(var o in e[i])e[i].hasOwnProperty(o)&&(t[i][o]=e[i][o])}},i.binarySearchCustom=function(t,e,i,o){for(var s=0,n=0,r=t.length-1;n<=r&&s<1e4;){var a=Math.floor((n+r)/2),h=t[a],d=void 0===o?h[i]:h[i][o],l=e(d);if(0==l)return a;-1==l?n=a+1:r=a-1,s++}return-1},i.binarySearchValue=function(t,e,i,o){for(var s,n,r,a,h=0,d=0,l=t.length-1;d<=l&&h<1e4;){if(a=Math.floor(.5*(l+d)),s=t[Math.max(0,a-1)][i],n=t[a][i],r=t[Math.min(t.length-1,a+1)][i],n==e)return a;if(s<e&&n>e)return"before"==o?Math.max(0,a-1):a;if(n<e&&r>e)return"before"==o?a:Math.min(t.length-1,a+1);n<e?d=a+1:l=a-1,h++}return-1},i.easeInOutQuad=function(t,e,i,o){var s=i-e;return(t/=o/2)<1?s/2*t*t+e:(t--,-s/2*(t*(t-2)-1)+e)},i.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},{"./module/moment":8}],38:[function(t,e,i){function o(t){if(t)return s(t)}function s(t){for(var e in o.prototype)t[e]=o.prototype[e];return t}e.exports=o,o.prototype.on=o.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},o.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,s=0;s<i.length;s++)if((o=i[s])===e||o.fn===e){i.splice(s,1);break}return this},o.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks[t];if(i){i=i.slice(0);for(var o=0,s=i.length;o<s;++o)i[o].apply(this,e)}return this},o.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},o.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],39:[function(e,i,o){!function(e,o){"use strict";function s(){n.READY||(w.determineEventTypes(),b.each(n.gestures,function(t){x.register(t)}),w.onTouch(n.DOCUMENT,f,x.detect),w.onTouch(n.DOCUMENT,g,x.detect),n.READY=!0)}var n=function t(e,i){return new t.Instance(e,i||{})};n.VERSION="1.1.3",n.defaults={behavior:{userSelect:"none",touchAction:"pan-y",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},n.DOCUMENT=document,n.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,n.HAS_TOUCHEVENTS="ontouchstart"in e,n.IS_MOBILE=/mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),n.NO_MOUSEEVENTS=n.HAS_TOUCHEVENTS&&n.IS_MOBILE||n.HAS_POINTEREVENTS,n.CALCULATE_INTERVAL=25;var r={},a=n.DIRECTION_DOWN="down",h=n.DIRECTION_LEFT="left",d=n.DIRECTION_UP="up",l=n.DIRECTION_RIGHT="right",u=n.POINTER_MOUSE="mouse",p=n.POINTER_TOUCH="touch",c=n.POINTER_PEN="pen",m=n.EVENT_START="start",f=n.EVENT_MOVE="move",g=n.EVENT_END="end",y=n.EVENT_RELEASE="release",v=n.EVENT_TOUCH="touch";n.READY=!1,n.plugins=n.plugins||{},n.gestures=n.gestures||{};var b=n.utils={extend:function(t,e,i){for(var o in e)!e.hasOwnProperty(o)||void 0!==t[o]&&i||(t[o]=e[o]);return t},on:function(t,e,i){t.addEventListener(e,i,!1)}
6,off:function(t,e,i){t.removeEventListener(e,i,!1)},each:function(t,e,i){var o,s;if("forEach"in t)t.forEach(e,i);else if(void 0!==t.length){for(o=0,s=t.length;o<s;o++)if(!1===e.call(i,t[o],o,t))return}else for(o in t)if(t.hasOwnProperty(o)&&!1===e.call(i,t[o],o,t))return},inStr:function(t,e){return t.indexOf(e)>-1},inArray:function(t,e){if(t.indexOf){var i=t.indexOf(e);return-1!==i&&i}for(var o=0,s=t.length;o<s;o++)if(t[o]===e)return o;return!1},toArray:function(t){return Array.prototype.slice.call(t,0)},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){var e=[],i=[],o=[],s=[],n=Math.min,r=Math.max;return 1===t.length?{pageX:t[0].pageX,pageY:t[0].pageY,clientX:t[0].clientX,clientY:t[0].clientY}:(b.each(t,function(t){e.push(t.pageX),i.push(t.pageY),o.push(t.clientX),s.push(t.clientY)}),{pageX:(n.apply(Math,e)+r.apply(Math,e))/2,pageY:(n.apply(Math,i)+r.apply(Math,i))/2,clientX:(n.apply(Math,o)+r.apply(Math,o))/2,clientY:(n.apply(Math,s)+r.apply(Math,s))/2})},getVelocity:function(t,e,i){return{x:Math.abs(e/t)||0,y:Math.abs(i/t)||0}},getAngle:function(t,e){var i=e.clientX-t.clientX,o=e.clientY-t.clientY;return 180*Math.atan2(o,i)/Math.PI},getDirection:function(t,e){return Math.abs(t.clientX-e.clientX)>=Math.abs(t.clientY-e.clientY)?t.clientX-e.clientX>0?h:l:t.clientY-e.clientY>0?d:a},getDistance:function(t,e){var i=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(i*i+o*o)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==d||t==a},setPrefixedCss:function(t,e,i,o){var s=["","Webkit","Moz","O","ms"];e=b.toCamelCase(e);for(var n=0;n<s.length;n++){var r=e;if(s[n]&&(r=s[n]+r.slice(0,1).toUpperCase()+r.slice(1)),r in t.style){t.style[r]=(null==o||o)&&i||"";break}}},toggleBehavior:function(t,e,i){if(e&&t&&t.style){b.each(e,function(e,o){b.setPrefixedCss(t,o,e,i)});var o=i&&function(){return!1};"none"==e.userSelect&&(t.onselectstart=o),"none"==e.userDrag&&(t.ondragstart=o)}},toCamelCase:function(t){return t.replace(/[_-]([a-z])/g,function(t){return t[1].toUpperCase()})}},w=n.event={preventMouseEvents:!1,started:!1,shouldDetect:!1,on:function(t,e,i,o){var s=e.split(" ");b.each(s,function(e){b.on(t,e,i),o&&o(e)})},off:function(t,e,i,o){var s=e.split(" ");b.each(s,function(e){b.off(t,e,i),o&&o(e)})},onTouch:function(t,e,i){var o=this,s=function(s){var r,a=s.type.toLowerCase(),h=n.HAS_POINTEREVENTS,d=b.inStr(a,"mouse");d&&o.preventMouseEvents||(d&&e==m&&0===s.button?(o.preventMouseEvents=!1,o.shouldDetect=!0):h&&e==m?o.shouldDetect=1===s.buttons||_.matchType(p,s):d||e!=m||(o.preventMouseEvents=!0,o.shouldDetect=!0),h&&e!=g&&_.updatePointer(e,s),o.shouldDetect&&(r=o.doDetect.call(o,s,e,t,i)),r==g&&(o.preventMouseEvents=!1,o.shouldDetect=!1,_.reset()),h&&e==g&&_.updatePointer(e,s))};return this.on(t,r[e],s),s},doDetect:function(t,e,i,o){var s=this.getTouchList(t,e),n=s.length,r=e,a=s.trigger,h=n;e==m?a=v:e==g&&(a=y,h=s.length-(t.changedTouches?t.changedTouches.length:1)),h>0&&this.started&&(r=f),this.started=!0;var d=this.collectEventData(i,r,s,t);return e!=g&&o.call(x,d),a&&(d.changedLength=h,d.eventType=a,o.call(x,d),d.eventType=r,delete d.changedLength),r==g&&(o.call(x,d),this.started=!1),r},determineEventTypes:function(){var t;return t=n.HAS_POINTEREVENTS?e.PointerEvent?["pointerdown","pointermove","pointerup pointercancel lostpointercapture"]:["MSPointerDown","MSPointerMove","MSPointerUp MSPointerCancel MSLostPointerCapture"]:n.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],r[m]=t[0],r[f]=t[1],r[g]=t[2],r},getTouchList:function(t,e){if(n.HAS_POINTEREVENTS)return _.getTouchList();if(t.touches){if(e==f)return t.touches;var i=[],o=[].concat(b.toArray(t.touches),b.toArray(t.changedTouches)),s=[];return b.each(o,function(t){!1===b.inArray(i,t.identifier)&&s.push(t),i.push(t.identifier)}),s}return t.identifier=1,[t]}
6,collectEventData:function(t,e,i,o){var s=p;return b.inStr(o.type,"mouse")||_.matchType(u,o)?s=u:_.matchType(c,o)&&(s=c),{center:b.getCenter(i),timeStamp:Date.now(),target:o.target,touches:i,eventType:e,pointerType:s,srcEvent:o,preventDefault:function(){var t=this.srcEvent;t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return x.stopDetect()}}}},_=n.PointerEvent={pointers:{},getTouchList:function(){var t=[];return b.each(this.pointers,function(e){t.push(e)}),t},updatePointer:function(t,e){t==g||t!=g&&1!==e.buttons?delete this.pointers[e.pointerId]:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e)},matchType:function(t,e){if(!e.pointerType)return!1;var i=e.pointerType,o={};return o[u]=i===(e.MSPOINTER_TYPE_MOUSE||u),o[p]=i===(e.MSPOINTER_TYPE_TOUCH||p),o[c]=i===(e.MSPOINTER_TYPE_PEN||c),o[t]},reset:function(){this.pointers={}}},x=n.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:b.extend({},e),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);var e=this.current.inst,i=e.options;return b.each(this.gestures,function(o){!this.stopped&&e.enabled&&i[o.name]&&o.handler.call(o,t,e)},this),this.current&&(this.current.lastEvent=t),t.eventType==g&&this.stopDetect(),t}},stopDetect:function(){this.previous=b.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(t,e,i,o,s){var r=this.current,a=!1,h=r.lastCalcEvent,d=r.lastCalcData;h&&t.timeStamp-h.timeStamp>n.CALCULATE_INTERVAL&&(e=h.center,i=t.timeStamp-h.timeStamp,o=t.center.clientX-h.center.clientX,s=t.center.clientY-h.center.clientY,a=!0),t.eventType!=v&&t.eventType!=y||(r.futureCalcEvent=t),r.lastCalcEvent&&!a||(d.velocity=b.getVelocity(i,o,s),d.angle=b.getAngle(e,t.center),d.direction=b.getDirection(e,t.center),r.lastCalcEvent=r.futureCalcEvent||t,r.futureCalcEvent=t),t.velocityX=d.velocity.x,t.velocityY=d.velocity.y,t.interimAngle=d.angle,t.interimDirection=d.direction},extendEventData:function(t){var e=this.current,i=e.startEvent,o=e.lastEvent||i;t.eventType!=v&&t.eventType!=y||(i.touches=[],b.each(t.touches,function(t){i.touches.push({clientX:t.clientX,clientY:t.clientY})}));var s=t.timeStamp-i.timeStamp,n=t.center.clientX-i.center.clientX,r=t.center.clientY-i.center.clientY;return this.getCalculatedData(t,o.center,s,n,r),b.extend(t,{startEvent:i,deltaTime:s,deltaX:n,deltaY:r,distance:b.getDistance(i.center,t.center),angle:b.getAngle(i.center,t.center),direction:b.getDirection(i.center,t.center),scale:b.getScale(i.touches,t.touches),rotation:b.getRotation(i.touches,t.touches)}),t},register:function(t){var e=t.defaults||{};return void 0===e[t.name]&&(e[t.name]=!0),b.extend(n.defaults,e,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort(function(t,e){return t.index<e.index?-1:t.index>e.index?1:0}),this.gestures}};n.Instance=function(t,e){var i=this;s(),this.element=t,this.enabled=!0,b.each(e,function(t,i){delete e[i],e[b.toCamelCase(i)]=t}),this.options=b.extend(b.extend({},n.defaults),e||{}),this.options.behavior&&b.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=w.onTouch(t,m,function(t){i.enabled&&t.eventType==m?x.startDetect(i,t):t.eventType==v&&x.detect(t)}),this.eventHandlers=[]},n.Instance.prototype={on:function(t,e){var i=this;return w.on(i.element,t,e,function(t){i.eventHandlers.push({gesture:t,handler:e})}),i},off:function(t,e){var i=this;return w.off(i.element,t,e,function(t){var o=b.inArray({gesture:t,handler:e});!1!==o&&i.eventHandlers.splice(o,1)}),i},trigger:function(t,e){e||(e={});var i=n.DOCUMENT.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e;var o=this.element;return b.hasParent(e.target,o)&&(o=e.target),o.dispatchEvent(i),this},enable:function(t){return this.enabled=t,this},dispose:function(){var t,e;for(b.toggleBehavior(this.element,this.options.behavior,!1),t=-1;e=this.eventHandlers[++t];)b.off(this.element,e.gesture,e.handler);return this.eventHandlers=[],w.off(this.element,r[m],this.eventStartHandler),null}},function(t){function e(e,o){var s=x.current;if(!(o.options.dragMaxTouches>0&&e.touches.length>o.options.dragMaxTouches))switch(e.eventType){case m:i=!1;break;case f:if(e.distance<o.options.dragMinDistance&&s.name!=t)return;var n=s.startEvent.center;if(s.name!=t&&(s.name=t,o.options.dragDistanceCorrection&&e.distance>0)){var r=Math.abs(o.options.dragMinDistance/e.distance);n.pageX+=e.deltaX*r,n.pageY+=e.deltaY*r,n.clientX+=e.deltaX*r,n.clientY+=e.deltaY*r,e=x.extendEventData(e)}(s.lastEvent.dragLockToAxis||o.options.dragLockToAxis&&o.options.dragLockMinDistance<=e.distance)&&(e.dragLockToAxis=!0);var u=s.lastEvent.direction;e.dragLockToAxis&&u!==e.direction&&(b.isVertical(u)?e.direction=e.deltaY<0?d:a:e.direction=e.deltaX<0?h:l),i||(o.trigger(t+"start",e),i=!0),o.trigger(t,e),o.trigger(t+e.direction,e);var p=b.isVertical(e.direction);(o.options.dragBlockVertical&&p||o.options.dragBlockHorizontal&&!p)&&e.preventDefault();break;case y:i&&e.changedLength<=o.options.dragMaxTouches&&(o.trigger(t+"end",e),i=!1);break;case g:i=!1}}var i=!1;n.gestures.Drag={name:t,index:50,handler:e,defaults:{dragMinDistance:10,dragDistanceCorrection:!0,dragMaxTouches:1,dragBlockHorizontal:!1,dragBlockVertical:!1,dragLockToAxis:!1,dragLockMinDistance:25}}}("drag"),n.gestures.Gesture={name:"gesture",index:1337,handler:function(t,e){e.trigger(this.name,t)}},function(t){function e(e,o){var s=o.options,n=x.current;switch(e.eventType){case m:clearTimeout(i),n.name=t,i=setTimeout(function(){n&&n.name==t&&o.trigger(t,e)},s.holdTimeout);break;case f:e.distance>s.holdThreshold&&clearTimeout(i);break;case y:clearTimeout(i)}}var i;n.gestures.Hold={name:t,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:e}}("hold"),n.gestures.Release={name:"release",index:1/0,handler:function(t,e){t.eventType==y&&e.trigger(this.name,t)}},n.gestures.Swipe={name:"swipe",index:40,defaults:{swipeMinTouches:1,swipeMaxTouches:1,swipeVelocityX:.6,swipeVelocityY:.6},handler:function(t,e){if(t.eventType==y){var i=t.touches.length,o=e.options;if(i<o.swipeMinTouches||i>o.swipeMaxTouches)return;(t.velocityX>o.swipeVelocityX||t.velocityY>o.swipeVelocityY)&&(e.trigger(this.name,t),e.trigger(this.name+t.direction,t))}}},function(t){function e(e,o){var s,n,r=o.options,a=x.current,h=x.previous;switch(e.eventType){case m:i=!1;break;case f:i=i||e.distance>r.tapMaxDistance;break;case g:!b.inStr(e.srcEvent.type,"cancel")&&e.deltaTime<r.tapMaxTime&&!i&&(s=h&&h.lastEvent&&e.timeStamp-h.lastEvent.timeStamp,n=!1,h&&h.name==t&&s&&s<r.doubleTapInterval&&e.distance<r.doubleTapDistance&&(o.trigger("doubletap",e),n=!0),n&&!r.tapAlways||(a.name=t,o.trigger(a.name,e)))}}var i=!1;n.gestures.Tap={name:t,index:100,handler:e,defaults:{tapMaxTime:250,tapMaxDistance:10,tapAlways:!0,doubleTapDistance:20,doubleTapInterval:300}}}("tap"),n.gestures.Touch={name:"touch",index:-1/0,defaults:{preventDefault:!1,preventMouse:!1},handler:function(t,e){if(e.options.preventMouse&&t.pointerType==u)return void t.stopDetect();e.options.preventDefault&&t.preventDefault(),t.eventType==v&&e.trigger("touch",t)}},function(t){function e(e,o){switch(e.eventType){case m:i=!1;break;case f:if(e.touches.length<2)return;var s=Math.abs(1-e.scale),n=Math.abs(e.rotation);if(s<o.options.transformMinScale&&n<o.options.transformMinRotation)return;x.current.name=t,i||(o.trigger(t+"start",e),i=!0),o.trigger(t,e),n>o.options.transformMinRotation&&o.trigger("rotate",e),s>o.options.transformMinScale&&(o.trigger("pinch",e),o.trigger("pinch"+(e.scale<1?"in":"out"),e));break;case y:i&&e.changedLength<2&&(o.trigger(t+"end",e),i=!1)}}var i=!1;n.gestures.Transform={name:t,index:45,defaults:{transformMinScale:.01,transformMinRotation:1},handler:e}}("transform"),"function"==typeof t&&t.amd?t(function(){return n}):void 0!==i&&i.exports?i.exports=n:e.Hammer=n}(window)},{}],40:[function(e,i,o){"use strict";!function(e,s){"function"==typeof t&&t.amd?t([],s):"object"==typeof o?i.exports=s():e.keycharm=s()}(this,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,s={},n={keydown:{},keyup:{}},r={};for(e=97;e<=122;e++)r[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)r[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r.delete={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==n[e][t.keyCode]){for(var o=n[e][t.keyCode],s=0;s<o.length;s++)void 0===o[s].shift?o[s].fn(t):1==o[s].shift&&1==t.shiftKey?o[s].fn(t):0==o[s].shift&&0==t.shiftKey&&o[s].fn(t);1==i&&t.preventDefault()}};
6return s.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===r[t])throw new Error("unsupported key: "+t);void 0===n[i][r[t].code]&&(n[i][r[t].code]=[]),n[i][r[t].code].push({fn:e,shift:r[t].shift})},s.bindAll=function(t,e){void 0===e&&(e="keydown");for(var i in r)r.hasOwnProperty(i)&&s.bind(i,t,e)},s.getKey=function(t){for(var e in r)if(r.hasOwnProperty(e)){if(1==t.shiftKey&&1==r[e].shift&&t.keyCode==r[e].code)return e;if(0==t.shiftKey&&0==r[e].shift&&t.keyCode==r[e].code)return e;if(t.keyCode==r[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},s.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===r[t])throw new Error("unsupported key: "+t);if(void 0!==e){var o=[],s=n[i][r[t].code];if(void 0!==s)for(var a=0;a<s.length;a++)s[a].fn==e&&s[a].shift==r[t].shift||o.push(n[i][r[t].code][a]);n[i][r[t].code]=o}else n[i][r[t].code]=[]},s.reset=function(){n={keydown:{},keyup:{}}},s.destroy=function(){n={keydown:{},keyup:{}},o.removeEventListener("keydown",a,!0),o.removeEventListener("keyup",h,!0)},o.addEventListener("keydown",a,!0),o.addEventListener("keyup",h,!0),s}return t})},{}],41:[function(e,i,o){(function(s){!function(n){"function"==typeof t&&t.amd?t(["moment"],n):"object"==typeof o?i.exports=n(e("../moment")):n((void 0!==s?s:this).moment)}(function(t){function e(t,e,i,o){var s=t;switch(i){case"s":return o||e?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(o||e?" perc":" perce");case"mm":return s+(o||e?" perc":" perce");case"h":return"egy"+(o||e?" óra":" órája");case"hh":return s+(o||e?" óra":" órája");case"d":return"egy"+(o||e?" nap":" napja");case"dd":return s+(o||e?" nap":" napja");case"M":return"egy"+(o||e?" hónap":" hónapja");case"MM":return s+(o||e?" hónap":" hónapja");case"y":return"egy"+(o||e?" év":" éve");case"yy":return s+(o||e?" év":" éve")}return""}function i(t){return(t?"":"[múlt] ")+"["+o[this.day()]+"] LT[-kor]"}var o="vasárnap hétfÅn kedden szerdán csütörtökön pénteken szombaton".split(" ");return t.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfÅ_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},meridiemParse:/de|du/i,isPM:function(t){return"u"===t.charAt(1).toLowerCase()},meridiem:function(t,e,i){return t<12?!0===i?"de":"DE":!0===i?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return i.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return i.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../moment":42}],42:[function(e,i,o){(function(o){(function(s){function n(t,e,i){switch(arguments.length){case 2:return null!=t?t:e;case 3:return null!=t?t:null!=e?e:i;default:throw new Error("Implement me")}}function r(t,e){return Ot.call(t,e)}function a(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function h(t){!1===xt.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function d(t,e){var i=!0;return y(function(){return i&&(h(t),i=!1),e.apply(this,arguments)},e)}function l(t,e){ye[t]||(h(e),ye[t]=!0)}function u(t,e){return function(i){return w(t.call(this,i),e)}}function p(t,e){var i,o,s=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(s,"months");return e-n<0?(i=t.clone().add(s-1,"months"),o=(e-n)/(n-i)):(i=t.clone().add(s+1,"months"),o=(e-n)/(i-n)),-(s+o)}function c(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&e<12&&(e+=12),o||12!==e||(e=0),e):e}function m(){}function f(t,e){!1!==e&&P(t),v(this,t),this._d=new Date(+t._d),!1===be&&(be=!0,xt.updateOffset(this),be=!1)}function g(t){var e=k(t),i=e.year||0,o=e.quarter||0,s=e.month||0,n=e.week||0,r=e.day||0,a=e.hour||0,h=e.minute||0,d=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*d+6e4*h+36e5*a,this._days=+r+7*n,this._months=+s+3*o+12*i,this._data={},this._locale=xt.localeData(),this._bubble()}function y(t,e){for(var i in e)r(e,i)&&(t[i]=e[i]);return r(e,"toString")&&(t.toString=e.toString),r(e,"valueOf")&&(t.valueOf=e.valueOf),t}function v(t,e){var i,o,s;if(void 0!==e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),void 0!==e._i&&(t._i=e._i),void 0!==e._f&&(t._f=e._f),void 0!==e._l&&(t._l=e._l),void 0!==e._strict&&(t._strict=e._strict),void 0!==e._tzm&&(t._tzm=e._tzm),void 0!==e._isUTC&&(t._isUTC=e._isUTC),void 0!==e._offset&&(t._offset=e._offset),void 0!==e._pf&&(t._pf=e._pf),void 0!==e._locale&&(t._locale=e._locale),Yt.length>0)for(i in Yt)o=Yt[i],void 0!==(s=e[o])&&(t[o]=s);return t}function b(t){return t<0?Math.ceil(t):Math.floor(t)}function w(t,e,i){for(var o=""+Math.abs(t),s=t>=0;o.length<e;)o="0"+o;return(s?i?"+":"":"-")+o}function _(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function x(t,e){var i;return e=z(e,t),t.isBefore(e)?i=_(t,e):(i=_(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function D(t,e){return function(i,o){var s,n;return null===o||isNaN(+o)||(l(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),n=i,i=o,o=n),i="string"==typeof i?+i:i,s=xt.duration(i,o),M(this,s,t),this}}function M(t,e,i,o){var s=e._milliseconds,n=e._days,r=e._months;o=null==o||o,s&&t._d.setTime(+t._d+s*i),n&&yt(t,"Date",gt(t,"Date")+n*i),r&&ft(t,gt(t,"Month")+r*i),o&&xt.updateOffset(t,n||r)}function T(t){return"[object Array]"===Object.prototype.toString.call(t)}function S(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function O(t,e,i){var o,s=Math.min(t.length,e.length),n=Math.abs(t.length-e.length),r=0;for(o=0;o<s;o++)(i&&t[o]!==e[o]||!i&&E(t[o])!==E(e[o]))&&r++;return r+n}function C(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=le[t]||ue[e]||e}return t}function k(t){var e,i,o={};for(i in t)r(t,i)&&(e=C(i))&&(o[e]=t[i]);return o}function E(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=e>=0?Math.floor(e):Math.ceil(e)),i}function N(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function A(t,e,i){return ut(xt([t,11,31+e-i]),e,i).week}function I(t){return L(t)?366:365}function L(t){return t%4==0&&t%100!=0||t%400==0}function P(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[kt]<0||t._a[kt]>11?kt:t._a[Et]<1||t._a[Et]>N(t._a[Ct],t._a[kt])?Et:t._a[Nt]<0||t._a[Nt]>24||24===t._a[Nt]&&(0!==t._a[At]||0!==t._a[It]||0!==t._a[Lt])?Nt:t._a[At]<0||t._a[At]>59?At:t._a[It]<0||t._a[It]>59?It:t._a[Lt]<0||t._a[Lt]>999?Lt:-1,t._pf._overflowDayOfYear&&(e<Ct||e>Et)&&(e=Et),t._pf.overflow=e)}
6function Y(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===s)), 7t._isValid}function R(t){return t?t.toLowerCase().replace("_","-"):t}function H(t){for(var e,i,o,s,n=0;n<t.length;){for(s=R(t[n]).split("-"),e=s.length,i=R(t[n+1]),i=i?i.split("-"):null;e>0;){if(o=G(s.slice(0,e).join("-")))return o;if(i&&i.length>=e&&O(s,i,!0)>=e-1)break;e--}n++}return null}function G(t){var i=null;if(!Pt[t]&&Rt)try{i=xt.locale(),e("./locale/"+t),xt.locale(i)}catch(t){}return Pt[t]}function z(t,e){var i,o;return e._isUTC?(i=e.clone(),o=(xt.isMoment(t)||S(t)?+t:+xt(t))-+i,i._d.setTime(+i._d+o),xt.updateOffset(i,!1),i):xt(t).local()}function j(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function U(t){var e,i,o=t.match(jt);for(e=0,i=o.length;e<i;e++)ge[o[e]]?o[e]=ge[o[e]]:o[e]=j(o[e]);return function(s){var n="";for(e=0;e<i;e++)n+=o[e]instanceof Function?o[e].call(s,t):o[e];return n}}function W(t,e){return t.isValid()?(e=V(e,t.localeData()),pe[e]||(pe[e]=U(e)),pe[e](t)):t.localeData().invalidDate()}function V(t,e){function i(t){return e.longDateFormat(t)||t}var o=5;for(Ut.lastIndex=0;o>=0&&Ut.test(t);)t=t.replace(Ut,i),Ut.lastIndex=0,o-=1;return t}function F(t,e){var i=e._strict;switch(t){case"Q":return Jt;case"DDDD":return ee;case"YYYY":case"GGGG":case"gggg":return i?ie:Ft;case"Y":case"G":case"g":return se;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return i?oe:Bt;case"S":if(i)return Jt;case"SS":if(i)return te;case"SSS":if(i)return ee;case"DDD":return Vt;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return qt;case"a":case"A":return e._locale._meridiemParse;case"x":return $t;case"X":return Kt;case"Z":case"ZZ":return Zt;case"T":return Qt;case"SSSS":return Xt;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return i?te:Wt;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Wt;case"Do":return i?e._locale._ordinalParse:e._locale._ordinalParseLenient;default:return new RegExp(tt(J(t.replace("\\",""))))}}function B(t){t=t||"";var e=t.match(Zt)||[],i=e[e.length-1]||[],o=(i+"").match(he)||["-",0,0],s=60*o[1]+E(o[2]);return"+"===o[0]?s:-s}function X(t,e,i){var o,s=i._a;switch(t){case"Q":null!=e&&(s[kt]=3*(E(e)-1));break;case"M":case"MM":null!=e&&(s[kt]=E(e)-1);break;case"MMM":case"MMMM":o=i._locale.monthsParse(e,t,i._strict),null!=o?s[kt]=o:i._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(s[Et]=E(e));break;case"Do":null!=e&&(s[Et]=E(parseInt(e.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=e&&(i._dayOfYear=E(e));break;case"YY":s[Ct]=xt.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":s[Ct]=E(e);break;case"a":case"A":i._meridiem=e;break;case"h":case"hh":i._pf.bigHour=!0;case"H":case"HH":s[Nt]=E(e);break;case"m":case"mm":s[At]=E(e);break;case"s":case"ss":s[It]=E(e);break;case"S":case"SS":case"SSS":case"SSSS":s[Lt]=E(1e3*("0."+e));break;case"x":i._d=new Date(E(e));break;case"X":i._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":i._useUTC=!0,i._tzm=B(e);break;case"dd":case"ddd":case"dddd":o=i._locale.weekdaysParse(e),null!=o?(i._w=i._w||{},i._w.d=o):i._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(i._w=i._w||{},i._w[t]=E(e));break;case"gg":case"GG":i._w=i._w||{},i._w[t]=xt.parseTwoDigitYear(e)}}function q(t){var e,i,o,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(r=1,a=4,i=n(e.GG,t._a[Ct],ut(xt(),1,4).year),o=n(e.W,1),s=n(e.E,1)):(r=t._locale._week.dow,a=t._locale._week.doy,i=n(e.gg,t._a[Ct],ut(xt(),r,a).year),o=n(e.w,1),null!=e.d?(s=e.d)<r&&++o:s=null!=e.e?e.e+r:r),h=pt(i,o,s,a,r),t._a[Ct]=h.year,t._dayOfYear=h.dayOfYear}function Z(t){var e,i,o,s,r=[];if(!t._d){for(o=$(t),t._w&&null==t._a[Et]&&null==t._a[kt]&&q(t),t._dayOfYear&&(s=n(t._a[Ct],o[Ct]),t._dayOfYear>I(s)&&(t._pf._overflowDayOfYear=!0),i=at(s,0,t._dayOfYear),t._a[kt]=i.getUTCMonth(),t._a[Et]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=o[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Nt]&&0===t._a[At]&&0===t._a[It]&&0===t._a[Lt]&&(t._nextDay=!0,t._a[Nt]=0),t._d=(t._useUTC?at:rt).apply(null,r),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Nt]=24)}}function Q(t){var e;t._d||(e=k(t._i),t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],Z(t))}function $(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function K(t){if(t._f===xt.ISO_8601)return void it(t);t._a=[],t._pf.empty=!0;var e,i,o,n,r,a=""+t._i,h=a.length,d=0;for(o=V(t._f,t._locale).match(jt)||[],e=0;e<o.length;e++)n=o[e],i=(a.match(F(n,t))||[])[0],i&&(r=a.substr(0,a.indexOf(i)),r.length>0&&t._pf.unusedInput.push(r),a=a.slice(a.indexOf(i)+i.length),d+=i.length),ge[n]?(i?t._pf.empty=!1:t._pf.unusedTokens.push(n),X(n,i,t)):t._strict&&!i&&t._pf.unusedTokens.push(n);t._pf.charsLeftOver=h-d,a.length>0&&t._pf.unusedInput.push(a),!0===t._pf.bigHour&&t._a[Nt]<=12&&(t._pf.bigHour=s),t._a[Nt]=c(t._locale,t._a[Nt],t._meridiem),Z(t),P(t)}function J(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,
7i,o,s){return e||i||o||s})}function tt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(t){var e,i,o,s,n;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(NaN));for(s=0;s<t._f.length;s++)n=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._pf=a(),e._f=t._f[s],K(e),Y(e)&&(n+=e._pf.charsLeftOver,n+=10*e._pf.unusedTokens.length,e._pf.score=n,(null==o||n<o)&&(o=n,i=e));y(t,i||e)}function it(t){var e,i,o=t._i,s=ne.exec(o);if(s){for(t._pf.iso=!0,e=0,i=re.length;e<i;e++)if(re[e][1].exec(o)){t._f=re[e][0]+(s[6]||" ");break}for(e=0,i=ae.length;e<i;e++)if(ae[e][1].exec(o)){t._f+=ae[e][0];break}o.match(Zt)&&(t._f+="Z"),K(t)}else t._isValid=!1}function ot(t){it(t),!1===t._isValid&&(delete t._isValid,xt.createFromInputFallback(t))}function st(t,e){var i,o=[];for(i=0;i<t.length;++i)o.push(e(t[i],i));return o}function nt(t){var e,i=t._i;i===s?t._d=new Date:S(i)?t._d=new Date(+i):null!==(e=Ht.exec(i))?t._d=new Date(+e[1]):"string"==typeof i?ot(t):T(i)?(t._a=st(i.slice(0),function(t){return parseInt(t,10)}),Z(t)):"object"==typeof i?Q(t):"number"==typeof i?t._d=new Date(i):xt.createFromInputFallback(t)}function rt(t,e,i,o,s,n,r){var a=new Date(t,e,i,o,s,n,r);return t<1970&&a.setFullYear(t),a}function at(t){var e=new Date(Date.UTC.apply(null,arguments));return t<1970&&e.setUTCFullYear(t),e}function ht(t,e){if("string"==typeof t)if(isNaN(t)){if("number"!=typeof(t=e.weekdaysParse(t)))return null}else t=parseInt(t,10);return t}function dt(t,e,i,o,s){return s.relativeTime(e||1,!!i,t,o)}function lt(t,e,i){var o=xt.duration(t).abs(),s=St(o.as("s")),n=St(o.as("m")),r=St(o.as("h")),a=St(o.as("d")),h=St(o.as("M")),d=St(o.as("y")),l=s<ce.s&&["s",s]||1===n&&["m"]||n<ce.m&&["mm",n]||1===r&&["h"]||r<ce.h&&["hh",r]||1===a&&["d"]||a<ce.d&&["dd",a]||1===h&&["M"]||h<ce.M&&["MM",h]||1===d&&["y"]||["yy",d];return l[2]=e,l[3]=+t>0,l[4]=i,dt.apply({},l)}function ut(t,e,i){var o,s=i-e,n=i-t.day();return n>s&&(n-=7),n<s-7&&(n+=7),o=xt(t).add(n,"d"),{week:Math.ceil(o.dayOfYear()/7),year:o.year()}}function pt(t,e,i,o,s){var n,r,a=at(t,0,1).getUTCDay();return a=0===a?7:a,i=null!=i?i:s,n=s-a+(a>o?7:0)-(a<s?7:0),r=7*(e-1)+(i-s)+n+1,{year:r>0?t:t-1,dayOfYear:r>0?r:I(t-1)+r}}function ct(t){var e,i=t._i,o=t._f;return t._locale=t._locale||xt.localeData(t._l),null===i||o===s&&""===i?xt.invali
7d({nullInput:!0}):("string"==typeof i&&(t._i=i=t._locale.preparse(i)),xt.isMoment(i)?new f(i,!0):(o?T(o)?et(t):K(t):nt(t),e=new f(t),e._nextDay&&(e.add(1,"d"),e._nextDay=s),e))}function mt(t,e){var i,o;if(1===e.length&&T(e[0])&&(e=e[0]),!e.length)return xt();for(i=e[0],o=1;o<e.length;++o)e[o][t](i)&&(i=e[o]);return i}function ft(t,e){var i;return"string"==typeof e&&"number"!=typeof(e=t.localeData().monthsParse(e))?t:(i=Math.min(t.date(),N(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t)}function gt(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function yt(t,e,i){return"Month"===e?ft(t,i):t._d["set"+(t._isUTC?"UTC":"")+e](i)}function vt(t,e){return function(i){return null!=i?(yt(this,t,i),xt.updateOffset(this,e),this):gt(this,t)}}function bt(t){return 400*t/146097}function wt(t){return 146097*t/400}function _t(t){"undefined"==typeof ender&&(Dt=Tt.moment,Tt.moment=t?d("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",xt):xt)}for(var xt,Dt,Mt,Tt=void 0===o||"undefined"!=typeof window&&window!==o.window?this:o,St=Math.round,Ot=Object.prototype.hasOwnProperty,Ct=0,kt=1,Et=2,Nt=3,At=4,It=5,Lt=6,Pt={},Yt=[],Rt=void 0!==i&&i&&i.exports,Ht=/^\/?Date\((\-?\d+)/i,Gt=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,zt=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,jt=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ut=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Wt=/\d\d?/,Vt=/\d{1,3}/,Ft=/\d{1,4}/,Bt=/[+\-]?\d{1,6}/,Xt=/\d+/,qt=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Zt=/Z|[\+\-]\d\d:?\d\d/gi,Qt=/T/i,$t=/[\+\-]?\d+/,Kt=/[\+\-]?\d+(\.\d{1,3})?/,Jt=/\d/,te=/\d\d/,ee=/\d{3}/,ie=/\d{4}/,oe=/[+-]?\d{6}/,se=/[+-]?\d+/,ne=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,re=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],ae=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],he=/([\+\-]|\d\d)/gi,de=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),le={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},ue={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},pe={},ce={s:45,m:45,h:22,d:26,M:11},me="DDD w W M D d".split(" "),fe="M D H h m s w W".split(" "),ge={M:function(){return this.month()+1},MMM:function(t){return this.localeData().monthsShort(this,t)},MMMM:function(t){return this.localeData().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.localeData().weekdaysMin(this,t)},ddd:function(t){return this.localeData().weekdaysShort(this,t)},dddd:function(t){return this.localeData().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return w(this.year()%100,2)},YYYY:function(){return w(this.year(),4)},YYYYY:function(){return w(this.year(),5)},YYYYYY:function(){var t=this.year();return(t>=0?"+":"-")+w(Math.abs(t),6)},gg:function(){return w(this.weekYear()%100,2)},gggg:function(){return w(this.weekYear(),4)},ggggg:function(){return w(this.weekYear(),5)},GG:function(){return w(this.isoWeekYear()%100,2)},GGGG:function(){return w(this.isoWeekYear(),4)},GGGGG:function(){return w(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return E(this.milliseconds()/100)},SS:function(){return w(E(this.milliseconds()/10),2)},SSS:function(){return w(this.milliseconds(),3)},SSSS:function(){return w(this.milliseconds(),3)},Z:function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+w(E(t/60),2)+":"+w(E(t)%60,2)},ZZ:function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+w(E(t/60),2)+w(E(t)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},ye={},ve=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],be=!1;me.length;)Mt=me.pop(),ge[Mt+"o"]=function(t,e){return function(i){return this.localeData().ordinal(t.call(this,i),e)}}(ge[Mt],Mt);for(;fe.length;)Mt=fe.pop(),ge[Mt+Mt]=u(ge[Mt],2);ge.DDDD=u(ge.DDD,3),y(m.prototype,{set:function(t){var e,i;for(i in t)e=t[i],"function"==typeof e?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]}
7,monthsParse:function(t,e,i){var o,s,n;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(s=xt.utc([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(n="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[o]=new RegExp(n.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(i&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,i,o;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;e<7;e++)if(this._weekdaysParse[e]||(i=xt([2e3,1]).day(e),o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[e]=new RegExp(o.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e,i){var o=this._calendar[t];return"function"==typeof o?o.apply(e,[i]):o},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,i,o){var s=this._relativeTime[i];return"function"==typeof s?s(t,e,i,o):s.replace(/%d/i,t)},pastFuture:function(t,e){var i=this._relativeTime[t>0?"future":"past"];return"function"==typeof i?i(e):i.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(t){return t},postformat:function(t){return t},week:function(t){return ut(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),xt=function(t,e,i,o){var n;return"boolean"==typeof i&&(o=i,i=s),n={},n._isAMomentObject=!0,n._i=t,n._f=e,n._l=i,n._strict=o,n._isUTC=!1,n._pf=a(),ct(n)},xt.suppressDeprecationWarnings=!1,xt.createFromInputFallback=d("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),xt.min=function(){return mt("isBefore",[].slice.call(arguments,0))},xt.max=function(){return mt("isAfter",[].slice.call(arguments,0))},xt.utc=function(t,e,i,o){var n;return"boolean"==typeof i&&(o=i,i=s),n={},n._isAMomentObject=!0,n._useUTC=!0,n._isUTC=!0,n._l=i,n._i=t,n._f=e,n._strict=o,n._pf=a(),ct(n).utc()},xt.unix=function(t){return xt(1e3*t)},xt.duration=function(t,e){var i,o,s,n,a=t,h=null;return xt.isDuration(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(h=Gt.exec(t))?(i="-"===h[1]?-1:1,a={y:0,d:E(h[Et])*i,h:E(h[Nt])*i,m:E(h[At])*i,s:E(h[It])*i,ms:E(h[Lt])*i}):(h=zt.exec(t))?(i="-"===h[1]?-1:1,s=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*i},a={y:s(h[2]),M:s(h[3]),d:s(h[4]),h:s(h[5]),m:s(h[6]),s:s(h[7]),w:s(h[8])}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(n=x(xt(a.from),xt(a.to)),a={},a.ms=n.milliseconds,a.M=n.months),o=new g(a),xt.isDuration(t)&&r(t,"_locale")&&(o._locale=t._locale),o},xt.version="2.9.0",xt.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",xt.ISO_8601=function(){},xt.momentProperties=Yt,xt.updateOffset=function(){},xt.relativeTimeThreshold=function(t,e){return ce[t]!==s&&(e===s?ce[t]:(ce[t]=e,!0))},xt.lang=d("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return xt.locale(t,e)}),xt.locale=function(t,e){var i;return t&&(i=void 0!==e?xt.defineLocale(t,e):xt.localeData(t))&&(xt.duration._locale=xt._locale=i),xt._locale._abbr},xt.defineLocale=function(t,e){return null!==e?(e.abbr=t,Pt[t]||(Pt[t]=new m),Pt[t].set(e),xt.locale(t),Pt[t]):(delete Pt[t],null)},xt.langData=d("moment.langData is deprecated. Use moment.localeData instead.",function(t){return xt.localeData(t)}),xt.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return xt._locale;if(!T(t)){if(e=G(t))return e;t=[t]}return H(t)},xt.isMoment=function(t){return t instanceof f||null!=t&&r(t,"_isAMomentObject")},xt.isDuration=function(t){return t instanceof g};for(Mt=ve.length-1;Mt>=0;--Mt)!function(t){var e,i;if(0===t.indexOf("week"))e=7,i="day";else{if(0!==t.indexOf("month"))return;e=12,i="month"}xt[t]=function(o,n){var r,a,h=xt._locale[t],d=[];if("number"==typeof o&&(n=o,o=s),a=function(t){var e=xt().utc().set(i,t);return h.call(xt._locale,e,o||"")},null!=n)return a(n);for(r=0;r<e;r++)d.push(a(r));return d}}(ve[Mt]);xt.normalizeUnits=function(t){return C(t)}
7,xt.invalid=function(t){var e=xt.utc(NaN);return null!=t?y(e._pf,t):e._pf.userInvalidated=!0,e},xt.parseZone=function(){return xt.apply(null,arguments).parseZone()},xt.parseTwoDigitYear=function(t){return E(t)+(E(t)>68?1900:2e3)},xt.isDate=S,y(xt.fn=f.prototype,{clone:function(){return xt(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var t=xt(this).utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():W(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):W(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return Y(this)},isDSTShifted:function(){return!!this._a&&(this.isValid()&&O(this._a,(this._isUTC?xt.utc(this._a):xt(this._a)).toArray())>0)},parsingFlags:function(){return y({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.utcOffset(0,t)},local:function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(t){var e=W(this,t||xt.defaultFormat);return this.localeData().postformat(e)},add:D(1,"add"),subtract:D(-1,"subtract"),diff:function(t,e,i){var o,s,n=z(t,this),r=6e4*(n.utcOffset()-this.utcOffset());return e=C(e),"year"===e||"month"===e||"quarter"===e?(s=p(this,n),"quarter"===e?s/=3:"year"===e&&(s/=12)):(o=this-n,s="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-r)/864e5:"week"===e?(o-r)/6048e5:o),i?s:b(s)},from:function(t,e){return xt.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(xt(),t)},calendar:function(t){var e=t||xt(),i=z(e,this).startOf("day"),o=this.diff(i,"days",!0),s=o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse";return this.format(this.localeData().calendar(s,this,xt(e)))},isLeapYear:function(){return L(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ht(t,this.localeData()),this.add(t-e,"d")):e},month:vt("Month",!0),startOf:function(t){switch(t=C(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.weekday(0):"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=C(t),t===s||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(t,e){return e=C(void 0!==e?e:"millisecond"),"millisecond"===e?(t=xt.isMoment(t)?t:xt(t),+this>+t):(xt.isMoment(t)?+t:+xt(t))<+this.clone().startOf(e)},isBefore:function(t,e){var i;return e=C(void 0!==e?e:"millisecond"),"millisecond"===e?(t=xt.isMoment(t)?t:xt(t),+this<+t):(i=xt.isMoment(t)?+t:+xt(t),+this.clone().endOf(e)<i)},isBetween:function(t,e,i){return this.isAfter(t,i)&&this.isBefore(e,i)},isSame:function(t,e){var i;return e=C(e||"millisecond"),"millisecond"===e?(t=xt.isMoment(t)?t:xt(t),+this==+t):(i=+xt(t),+this.clone().startOf(e)<=i&&i<=+this.clone().endOf(e))},min:d("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(t){return t=xt.apply(null,arguments),t<this?this:t}),max:d("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=xt.apply(null,arguments),t>this?this:t}),zone:d("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),utcOffset:function(t,e){var i,o=this._offset||0;return null!=t?("string"==typeof t&&(t=B(t)),Math.abs(t)<16&&(t*=60),!this._isUTC&&e&&(i=this._dateUtcOffset()),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==t&&(!e||this._changeInProgress?M(this,xt.duration(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,xt.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?o:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(B(this._i)),this},hasAlignedHourOffset:function(t){return t=t?xt(t).utcOffset():0,(this.utcOffset()-t)%60==0},daysInMonth:function(){return N(this.year(),this.month())},dayOfYear:function(t){var e=St((xt(this).startOf("day")-xt(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=ut(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=ut(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=ut(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return A(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return A(this.year(),t.dow,t.doy)},get:function(t){return t=C(t),this[t]()},set:function(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else t=C(t),"function"==typeof this[t]&&this[t](e);return this},locale:function(t){var e;return t===s?this._locale._abbr:(e=xt.localeData(t),null!=e&&(this._locale=e),this)},lang:d("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===s?this.localeData():this.locale(t)}),localeData:function(){return this._locale}
7,_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),xt.fn.millisecond=xt.fn.milliseconds=vt("Milliseconds",!1),xt.fn.second=xt.fn.seconds=vt("Seconds",!1),xt.fn.minute=xt.fn.minutes=vt("Minutes",!1),xt.fn.hour=xt.fn.hours=vt("Hours",!0),xt.fn.date=vt("Date",!0),xt.fn.dates=d("dates accessor is deprecated. Use date instead.",vt("Date",!0)),xt.fn.year=vt("FullYear",!0),xt.fn.years=d("years accessor is deprecated. Use year instead.",vt("FullYear",!0)),xt.fn.days=xt.fn.day,xt.fn.months=xt.fn.month,xt.fn.weeks=xt.fn.week,xt.fn.isoWeeks=xt.fn.isoWeek,xt.fn.quarters=xt.fn.quarter,xt.fn.toJSON=xt.fn.toISOString,xt.fn.isUTC=xt.fn.isUtc,y(xt.duration.fn=g.prototype,{_bubble:function(){var t,e,i,o=this._milliseconds,s=this._days,n=this._months,r=this._data,a=0;r.milliseconds=o%1e3,t=b(o/1e3),r.seconds=t%60,e=b(t/60),r.minutes=e%60,i=b(e/60),r.hours=i%24,s+=b(i/24),a=b(bt(s)),s-=b(wt(a)),n+=b(s/30),s%=30,a+=b(n/12),n%=12,r.days=s,r.months=n,r.years=a},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return b(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*E(this._months/12)},humanize:function(t){var e=lt(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var i=xt.duration(t,e);return this._milliseconds+=i._milliseconds,this._days+=i._days,this._months+=i._months,this._bubble(),this},subtract:function(t,e){var i=xt.duration(t,e);return this._milliseconds-=i._milliseconds,this._days-=i._days,this._months-=i._months,this._bubble(),this},get:function(t){return t=C(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,i;if("month"===(t=C(t))||"year"===t)return e=this._days+this._milliseconds/864e5,i=this._months+12*bt(e),"month"===t?i:i/12;switch(e=this._days+Math.round(wt(this._months/12)),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4;case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:xt.fn.lang,locale:xt.fn.locale,toIsoString:d("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),i=Math.abs(this.days()),o=Math.abs(this.hours()),s=Math.abs(this.minutes()),n=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(i?i+"D":"")+(o||s||n?"T":"")+(o?o+"H":"")+(s?s+"M":"")+(n?n+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),xt.duration.fn.toString=xt.duration.fn.toISOString;for(Mt in de)r(de,Mt)&&function(t){xt.duration.fn[t]=function(){return this._data[t]}}(Mt.toLowerCase());xt.duration.fn.asMilliseconds=function(){return this.as("ms")},xt.duration.fn.asSeconds=function(){return this.as("s")},xt.duration.fn.asMinutes=function(){return this.as("m")},xt.duration.fn.asHours=function(){return this.as("h")},xt.duration.fn.asDays=function(){return this.as("d")},xt.duration.fn.asWeeks=function(){return this.as("weeks")},xt.duration.fn.asMonths=function(){return this.as("M")},xt.duration.fn.asYears=function(){return this.as("y")},xt.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===E(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),Rt?i.exports=xt:"function"==typeof t&&t.amd?(t(function(t,e,i){return i.config&&i.config()&&!0===i.config().noGlobal&&(Tt.moment=Dt),xt}),_t(!0)):_t()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}
7],43:[function(t,e,i){i.Timeline=t("./lib/timeline/Timeline"),i.timeline={DateUtil:t("./lib/timeline/DateUtil"),DataStep:t("./lib/timeline/DataStep"),Range:t("./lib/timeline/Range"),stack:t("./lib/timeline/Stack"),TimeStep:t("./lib/timeline/TimeStep"),StepNumber:t("./lib/graph3d/StepNumber"),components:{items:{Item:t("./lib/timeline/component/item/Item"),BackgroundItem:t("./lib/timeline/component/item/BackgroundItem"),BoxItem:t("./lib/timeline/component/item/BoxItem"),PointItem:t("./lib/timeline/component/item/PointItem"),RangeItem:t("./lib/timeline/component/item/RangeItem")},Component:t("./lib/timeline/component/Component"),CurrentTime:t("./lib/timeline/component/CurrentTime"),CustomTime:t("./lib/timeline/component/CustomTime"),DataAxis:t("./lib/timeline/component/DataAxis"),GraphGroup:t("./lib/timeline/component/GraphGroup"),Group:t("./lib/timeline/component/Group"),BackgroundGroup:t("./lib/timeline/component/BackgroundGroup"),ItemSet:t("./lib/timeline/component/ItemSet"),Legend:t("./lib/timeline/component/Legend"),LineGraph:t("./lib/timeline/component/LineGraph"),TimeAxis:t("./lib/timeline/component/TimeAxis")}},i.moment=t("./lib/module/moment"),i.moment_hu=t("./node_modules/moment/locale/hu.js"),i.hammer=t("./lib/module/hammer")},{"./lib/graph3d/StepNumber":5,"./lib/module/hammer":7,"./lib/module/moment":8,"./lib/timeline/DataStep":11,"./lib/timeline/DateUtil":12,"./lib/timeline/Range":13,"./lib/timeline/Stack":14,"./lib/timeline/TimeStep":15,"./lib/timeline/Timeline":16,"./lib/timeline/component/BackgroundGroup":17,"./lib/timeline/component/Component":18,"./lib/timeline/component/CurrentTime":19,"./lib/timeline/component/CustomTime":20,"./lib/timeline/component/DataAxis":21,"./lib/timeline/component/GraphGroup":22,"./lib/timeline/component/Group":23,"./lib/timeline/component/ItemSet":24,"./lib/timeline/component/Legend":25,"./lib/timeline/component/LineGraph":26,"./lib/timeline/component/TimeAxis":27,"./lib/timeline/component/item/BackgroundItem":31, 8"./lib/timeline/component/item/BoxItem":32,"./lib/timeline/component/item/Item":33,"./lib/timeline/component/item/PointItem":34,"./lib/timeline/component/item/RangeItem":35,"./node_modules/moment/locale/hu.js":41}]},{},[43])(43)}),function(t,e,i){var o=function(t){if(!i&&!i.Timeline&&e.isPlainObject(t))return console.error("Zimeline requires visLib.Timeline");var s={};if(t instanceof i.Timeline)this.adapter=t;else if(t instanceof e)this.adapter=new i.Timeline(t[0]);else if(e.isPlainObject(t)&&t.selector)s=o.defaultOptions(t),this.adapter=new i.Timeline(e(t.selector)[0],t.items||[],s);else if(e.isPlainObject(t)&&t.container)s=o.defaultOptions(t),this.adapter=new i.Timeline(t.container instanceof e?t.container[0]:e(t.container)[0],t.items||[],s),this.adapter.setOptions();else{if(!t.length||!t.substr)return console.error("Zimeline requires options parameter with selector, container key or a links.Timeline object");s=o.defaultOptions(),this.adapter=new i.Timeline(e(t)[0],[],s)}s.groups&&this.adapter.setGroups(s.groups),this.setBinds(s)};o.prototype.setBinds=function(t){e(".timeline-controls a").click(function(){void 0!==t.timelinePPUrl&&e.get("http://dex.hu/x.php?id=timeline_ctrl&noredirect=true&url="+encodeURIComponent(t.timelinePPUrl))})},o.prototype.setOptions=function(t){this.adapter.setOptions(t)},o.prototype.redraw=function(){this.adapter.redraw()},o.prototype.fit=function(){this.adapter.fit()},o.prototype.addItem=function(t,i){var s=e.extend(!0,{},o.itemDefaults,t||{});return this.adapter.itemsData.update(s),i||this.redraw(),s},o.prototype.move=function(t,e){var i=this.adapter.getWindow(),o=i.end-i.start,s=i.start.valueOf(),n=i.end.valueOf();t&&(t>0&&s==+this.adapter.options.start||t<0&&n==+this.adapter.options.end||this.adapter.setWindow({start:i.start.valueOf()-o*t,end:i.end.valueOf()-o*t,animate:e}))},o.prototype.zoom=function(t,e){var i,o=this.adapter.getWindow(),s=o.end-o.start;i=s*t,this.adapter.setWindow({start:o.start.valueOf()-i,end:o.end.valueOf()+i,animate:e})},o.prototype.removeItem=function(t,e){var i=this.adapter.itemsData.remove(t);return e||this.redraw(),i},o.prototype.refresh=function(t){var e=[];t.forEach(function(t,i){var o=t.cim,s="";o.length<110&&(o="<p>"+o+"<i></i></p>"),t.esemenytipus_ertek&&(s="ikon-"+(t.esemenytipus_sportag_id?t.esemenytipus_sportag_id+"-":"")+t.esemenytipus_ertek),e.push({id:t.id,start:t.ido?parseInt(t.ido):t.datum,content:o,group:i%2?1:2,"data-url":"//"+t.site_url+t.path,className:s})});var i=this.adapter.itemsData;i.clear(),i.add(e),this.redraw()},o.itemDefaults={className:null,content:"",start:null,id:1,end:null,title:"",style:"box",dataAttributes:{}},o.defaults={locale:"hu",width:"400px",height:"300px",autoHeight:!1,align:"left",autoResize:!1,clickToUse:!1,dataAttributes:["id","start"],editable:!1,start:+new Date-6048e5,end:new Date,max:null,min:null,items:[],moveable:!0,orientation:"bottom",selectable:!0,unselectable:!1,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showNavigation:!0,showButtonNew:!0,stack:!0,style:"box",zoomable:!1,template:null,format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"MMMM D HH:mm",minute:"MMMM D dddd",hour:"MMMM D dddd",weekday:"YYYY MMMM",day:"YYYY MMMM",month:"YYYY",year:""}}},o.defaultOptions=function(t){return e.extend(!0,{},o.defaults,t||{})},t.Zimeline=o}
8(window,jQuery,window.vis),function(t,e,i,o){i.TimeStepper=function(t,e,i,s){o.timeline.TimeStep.call(this,t,e,i,s)},e.extend(i.TimeStepper.prototype,o.timeline.TimeStep.prototype),i.TimeStepper.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&"[object Function]"=={}.toString.call(e)?e.call(this,t):e&&e.length>0&&o.moment?o.moment(t).format(e):""},i.TimeStepper.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&"[object Function]"=={}.toString.call(e)?e(t):e&&e.length>0&&o.moment?o.moment(t).format(e):""}}(window,jQuery,Zimeline,vis),function(t,e,i){var o=function(e,i,o){return function(s){s.preventDefault(),t.clearInterval(i[0]),e(),i[0]=t.setInterval(e,o)}},s=function(e){return function(i){r(i),t.clearInterval(e[0])}},n=function(t,e,i){return function(){t(e,i)}},r=function(t){return t.preventDefault(),!1},a=function(t){var i={interval:200,zoom:.2,move:.2,animate:!0,opened:!0,selector:{zoomin:".zoomin",zoomout:".zoomout",left:".left",right:".right",close:".close-btn"}};this.opts=e.extend(!0,{},i,t||{}),this.opts.zimeline=(t||{}).zimeline,this.bindEvents()};a.prototype.bindEvents=function(){var t=this.opts.zimeline.zoom.bind(this.opts.zimeline),i=this.opts.zimeline.move.bind(this.opts.zimeline),a=[];e(this.opts.selector.zoomin).off("mousedown.zin").on("mousedown.zin",o(n(t,-1*this.opts.zoom,this.opts.animate),a,this.opts.interval)).off("mouseup.zin").on("mouseup.zin",s(a)).off("click.zin").on("click.zin",r),e(this.opts.selector.zoomout).off("mousedown.zin").on("mousedown.zin",o(n(t,this.opts.zoom,this.opts.animate),a,this.opts.interval)).off("mouseup.zin").on("mouseup.zin",s(a)).off("click.zin").on("click.zin",r),e(this.opts.selector.right).off("mousedown.zin").on("mousedown.zin",o(n(i,-1*this.opts.move,this.opts.animate),a,this.opts.interval)).off("mouseup.zin").on("mouseup.zin",s(a)).off("click.zin").on("click.zin",r),e(this.opts.selector.left).off("mousedown.zin").on("mousedown.zin",o(n(i,this.opts.move,this.opts.animate),a,this.opts.interval)).off("mouseup.zin").on("mouseup.zin",s(a)).off("click.zin").on("click.zin",r);var h=this;e(this.opts.zimeline.adapter.dom.top.parentNode);e(this.opts.selector.close).off("click.close").on("click.close",function(t){e(h.opts.zimeline.adapter.dom.top.parentNode).parents("#timeline-container").toggleClass("closed"),e(".cikk-cover-v2").toggleClass("close-timeline"),e(this).toggleClass("closed"),e(".timeline-controls-container").toggleClass("show-btn"),e(".timeline-controls-container").toggleClass("hide-btn"),t.preventDefault()})},i.Navbar=a}(window,jQuery,Zimeline); 9//# sourceMappingURL=timeline.ugly.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.